index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/1071.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[1071],{4805:function(e,t,n){n.d(t,{a:function(){return p},b:function(){return u},g:function(){return d}});var r=n(4467),i=n(296);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var _n=0,r=function(){};return{s:r,n:function(){return _n>=e.length?{done:!0}:{done:!1,value:e[_n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){for(var t,n="",r=Object.entries(e);t=r.shift();){var o=t,a=(0,i.A)(o,2),c=a[0],u=a[1];if(Array.isArray(u)||u&&u.constructor===Object){var l,d=s(Object.entries(u).reverse());try{for(d.s();!(l=d.n()).done;){var p=(0,i.A)(l.value,2),h=p[0],f=p[1];r.unshift(["".concat(c,"[").concat(h,"]"),f])}}catch(e){d.e(e)}finally{d.f()}}else void 0!==u&&(null===u&&(u=""),n+="&"+[c,u].map(encodeURIComponent).join("="))}return n.substr(1)}function l(e){try{return decodeURIComponent(e)}catch(t){return e}}function d(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var n=t.split("=").filter(Boolean).map(l),r=(0,i.A)(n,2),o=r[0],s=r[1],c=void 0===s?"":s;return o&&function(e,t,n){for(var r=t.length,i=r-1,o=0;o<r;o++){var s=t[o];!s&&Array.isArray(e)&&(s=e.length.toString()),s=["__proto__","constructor","prototype"].includes(s)?s.toUpperCase():s;var c=!isNaN(Number(t[o+1]));e[s]=o===i?n:e[s]||(c?[]:{}),Array.isArray(e[s])&&!c&&(e[s]=a({},e[s])),e=e[s]}}(e,o.replace(/\]/g,"").split("["),c),e}),Object.create(null))}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(d(e),t),n=n.substr(0,r)),n+"?"+u(t)}},3:function(e,t,n){n.d(t,{a:function(){return z},h:function(){return H}});var r=n(467),i=n(45),o=n(296),a=n(4467),s=n(9280),c=n.n(s),u=n(4805),l=n(3506),d=["rest_route"],p=["path","url"],h=["url","path","data","parse"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,a.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t){return void 0!==(0,l.g)(e,t)}function y(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).map((function(e){return e.map(decodeURIComponent)})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.map(encodeURIComponent)})).map((function(e){return e.join("=")})).join("&"):r}var g=function(e,t){var n,r,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),i=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(v(v({},e),{},{path:i}))};function m(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}var _=function(e){return e.json?e.json():Promise.reject(e)},b=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},k=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},O=function(){var e=(0,r.A)(c().mark((function e(t,n){var r,o,a,s,l,d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(k(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,z(v(v({},(h={per_page:100},void 0,void 0,f=(c=t).path,w=c.url,v(v({},(0,i.A)(c,p)),{},{url:w&&(0,u.a)(w,h),path:f&&(0,u.a)(f,h)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,_(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=b(r)){e.next=15;break}return e.abrupt("return",o);case 15:s=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,z(v(v({},t),{},{path:void 0,url:a,parse:!1}));case 19:return l=e.sent,e.next=22,_(l);case 22:d=e.sent,s=s.concat(d),a=b(l),e.next=16;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}var c,h,f,w}),e)})));return function(_x,t){return e.apply(this,arguments)}}(),j=new Set(["PATCH","PUT","DELETE"]),x=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:204===e.status?null:e.json?e.json():Promise.reject(e)}(e,t)).catch((function(e){return A(e,t)}))};function A(e){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1])throw e;return function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))}(e).then((function(e){var t={code:"unknown_error",message:wp.i18n.__("An unknown error occurred.")};throw e||t}))}var P,C,D,E,S,T,M,I={Accept:"application/json, */*;q=0.1"},L={credentials:"include"},R=[function(e,t){return"string"!=typeof e.url||w(e.url,"_locale")||(e.url=(0,u.a)(e.url,{_locale:"user"})),"string"!=typeof e.path||w(e.path,"_locale")||(e.path=(0,u.a)(e.path,{_locale:"user"})),t(e)},g,function(e,t){var n=e.method,r=void 0===n?"GET":n;return j.has(r.toUpperCase())&&(e=v(v({},e),{},{headers:v(v({},e.headers),{},{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e)},O],N=function(e){if(e.status>=200&&e.status<300)return e;throw e},U=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,s=(0,i.A)(e,h),c=e.body,u=e.headers;return u=v(v({},I),u),r&&(c=JSON.stringify(r),u["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,v(v(v({},L),s),{},{body:c,headers:u})).then((function(e){return Promise.resolve(e).then(N).catch((function(e){return A(e,a)})).then((function(e){return x(e,a)}))}),(function(e){if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:wp.i18n.__("You are probably offline.")}}))};function z(e){return R.reduceRight((function(e,t){return function(n){return t(n,e)}}),U)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(z.nonceEndpoint).then(N).then((function(e){return e.text()})).then((function(t){return z.nonceMiddleware.nonce=t,z(e)}))}))}z.use=function(e){R.unshift(e)},z.setFetchHandler=function(e){U=e},z.createNonceMiddleware=function(e){var t=function e(t,n){var r=t.headers,i=void 0===r?{}:r;for(var o in i)if("x-wp-nonce"===o.toLowerCase()&&i[o]===e.nonce)return n(t);return n(v(v({},t),{},{headers:v(v({},i),{},{"X-WP-Nonce":e.nonce})}))};return t.nonce=e,t},z.createPreloadingMiddleware=function(e){var t=Object.fromEntries(Object.entries(e).map((function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return[y(n),r]})));return function(e,n){var r=e.parse,o=void 0===r||r,a=e.path;if(!a&&e.url){var s=(0,u.g)(e.url),c=s.rest_route,l=(0,i.A)(s,d);"string"==typeof c&&(a=(0,u.a)(c,l))}if("string"!=typeof a)return n(e);var p=e.method||"GET",h=y(a);if("GET"===p&&t[h]){var f=t[h];return delete t[h],m(f,!!o)}if("OPTIONS"===p&&t[p]&&t[p][h]){var v=t[p][h];return delete t[p][h],m(v,!!o)}return n(e)}},z.createRootURLMiddleware=function(e){return function(t,n){return g(t,(function(t){var r,i=t.url,o=t.path;return"string"==typeof o&&(r=e,-1!==e.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(o=o.replace("?","&")),i=r+o),n(v(v({},t),{},{url:i}))}))}},z.fetchAllMiddleware=O,z.mediaUploadMiddleware=function(e,t){if(!function(e){var t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);var n=0,r=function e(r){return n++,t({path:"/wp/v2/media/".concat(r,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return n<5?e(r):(t({path:"/wp/v2/media/".concat(r,"?force=true"),method:"DELETE"}),Promise.reject())}))};return t(v(v({},e),{},{parse:!1})).catch((function(t){var n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:wp.i18n.__("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):A(t,e.parse)})).then((function(t){return x(t,e.parse)}))},z.createThemePreviewMiddleware=function(e){return function(t,n){if("string"==typeof t.url){var r=(0,l.g)(t.url,"wp_theme_preview");void 0===r?t.url=(0,u.a)(t.url,{wp_theme_preview:e}):""===r&&(t.url=(0,l.r)(t.url,"wp_theme_preview"))}if("string"==typeof t.path){var i=(0,l.g)(t.path,"wp_theme_preview");void 0===i?t.path=(0,u.a)(t.path,{wp_theme_preview:e}):""===i&&(t.path=(0,l.r)(t.path,"wp_theme_preview"))}return n(t)}},z.fetchAllMiddleware=null,z.use(z.createRootURLMiddleware((null===(C=null===(P=null===window||void 0===window?void 0:window.parent)||void 0===P?void 0:P.scData)||void 0===C?void 0:C.root_url)||(null===(D=null===window||void 0===window?void 0:window.scData)||void 0===D?void 0:D.root_url))),(null===(E=null===window||void 0===window?void 0:window.scData)||void 0===E?void 0:E.nonce)&&(z.nonceMiddleware=z.createNonceMiddleware(null===(S=null===window||void 0===window?void 0:window.scData)||void 0===S?void 0:S.nonce),z.use(z.nonceMiddleware)),(null===(T=null===window||void 0===window?void 0:window.scData)||void 0===T?void 0:T.nonce_endpoint)&&(z.nonceEndpoint=null===(M=null===window||void 0===window?void 0:window.scData)||void 0===M?void 0:M.nonce_endpoint),z.use((function(e,t){return e.path=(0,u.a)(e.path,{t:Date.now()}),t(e)})),z.use((function(e,t){var n=t(e);return n.catch((function(e){return"invalid_json"===e.code&&(e.message=wp.i18n.__("The response is not a valid JSON response.","surecart"),e.additional_errors=[{code:"invalid_json",message:wp.i18n.sprintf(/* translators: %s: URL to debug settings page */ wp.i18n.__("Please ensure that your site is not in debug mode as this may interfere with API responses. %s","surecart"),'<a href="'.concat("https://surecart.com/docs/is-not-a-valid-json-response/",'" target="_blank" rel="noopener noreferrer">').concat(wp.i18n.__("More Information","surecart"),"</a>"))}]),"checkout.finalize_error"===e.code&&(e.additional_errors=[{code:"checkout.finalize_error",message:e.message}],e.message=wp.i18n.__("We were not able to process this order","surecart")),Promise.reject(e)})),n}));var F=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.","surecart")};if((null==e?void 0:e.code)&&(null==e?void 0:e.message))throw e;if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},H=function(){var e=(0,r.A)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F(t);case 2:if("rest_cookie_invalid_nonce"===(n=e.sent).code){e.next=5;break}throw n;case 5:return e.abrupt("return",window.fetch(z.nonceEndpoint).then((function(e){if(e.status>=200&&e.status<300)return e;throw e})).then((function(e){return e.text()})).then((function(e){z.nonceMiddleware.nonce=e})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},2942:function(e,t,n){n.d(t,{o:function(){return r}});var r=function(e,t){new window.IntersectionObserver((function(e,n){e[0].intersectionRatio>0&&(t(),n.unobserve(e[0].target))})).observe(e)}},3506:function(e,t,n){n.d(t,{g:function(){return i},r:function(){return o}});var r=n(4805);function i(e,t){return(0,r.g)(e)[t]}function o(e){var t=e.indexOf("?");if(-1===t)return e;for(var n=(0,r.g)(e),i=e.substr(0,t),o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];a.forEach((function(e){return delete n[e]}));var c=(0,r.b)(n);return c?i+"?"+c:i}},1071:function(e,t,n){n.r(t),n.d(t,{sc_license:function(){return p}});var r=n(467),i=n(3029),o=n(2901),a=n(9280),s=n.n(a),c=n(1346),u=n(2942),l=n(3),d=n(4805),p=function(){return(0,o.A)((function e(t){var n=this;(0,i.A)(this,e),(0,c.r)(this,t),this.deleteActivation=(0,r.A)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n.busy=!0,e.next=4,(0,l.a)({path:"surecart/v1/activations/".concat(n.selectedActivationId),method:"DELETE"});case 4:return n.onCloseDeleteModal(),e.next=7,n.initialFetch();case 7:e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),n.deleteActivationError=(null===e.t0||void 0===e.t0?void 0:e.t0.message)||wp.i18n.__("Something went wrong","surecart");case 13:return e.prev=13,n.busy=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])}))),this.onCloseDeleteModal=function(){n.selectedActivationId="",n.showConfirmDelete=!1,n.busy=!1,n.deleteActivationError=""},this.licenseId=void 0,this.loading=!1,this.error="",this.license=void 0,this.copied=!1,this.showConfirmDelete=!1,this.selectedActivationId="",this.deleteActivationError="",this.busy=!1}),[{key:"componentWillLoad",value:function(){var e=this;(0,u.o)(this.el,(function(){e.initialFetch()}))}},{key:"initialFetch",value:(n=(0,r.A)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,this.getLicense();case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),this.error=(null===e.t0||void 0===e.t0?void 0:e.t0.message)||wp.i18n.__("Something went wrong","surecart");case 10:return e.prev=10,this.loading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,this,[[0,6,10,13]])}))),function(){return n.apply(this,arguments)})},{key:"getLicense",value:(t=(0,r.A)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.a)({path:(0,d.a)("surecart/v1/licenses/".concat(this.licenseId),{expand:["activations","purchase","purchase.product"]})});case 2:this.license=e.sent;case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"copyKey",value:(e=(0,r.A)(s().mark((function e(t){var n=this;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.writeText(t);case 3:this.copied=!0,setTimeout((function(){n.copied=!1}),2e3),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),alert(wp.i18n.__("Error copying to clipboard","surecart"));case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(_x){return e.apply(this,arguments)})},{key:"renderStatus",value:function(){var e,t,n,r;return"active"===(null===(e=this.license)||void 0===e?void 0:e.status)?(0,c.h)("sc-tag",{type:"success"},wp.i18n.__("Active","surecart")):"revoked"===(null===(t=this.license)||void 0===t?void 0:t.status)?(0,c.h)("sc-tag",{type:"danger"},wp.i18n.__("Revoked","surecart")):"inactive"===(null===(n=this.license)||void 0===n?void 0:n.status)?(0,c.h)("sc-tag",{type:"info"},wp.i18n.__("Inactive","surecart")):(0,c.h)("sc-tag",{type:"info"},null===(r=this.license)||void 0===r?void 0:r.status)}},{key:"renderLoading",value:function(){return(0,c.h)("sc-dashboard-module",null,(0,c.h)("span",{slot:"heading"},(0,c.h)("sc-skeleton",{style:{width:"120px"}})),(0,c.h)("sc-card",null,(0,c.h)("sc-stacked-list",null,(0,c.h)("sc-flex",{flexDirection:"column",style:{gap:"1em"}},(0,c.h)("sc-skeleton",{style:{width:"20%",display:"inline-block"}}),(0,c.h)("sc-skeleton",{style:{width:"60%",display:"inline-block"}}),(0,c.h)("sc-skeleton",{style:{width:"40%",display:"inline-block"}})))))}},{key:"renderEmpty",value:function(){return(0,c.h)("sc-empty",{icon:"activity"},wp.i18n.__("License not found.","surecart"))}},{key:"renderLicenseHeader",value:function(){var e,t=null===(e=this.license)||void 0===e?void 0:e.purchase,n=null==t?void 0:t.product;return(0,c.h)(c.F,null,(0,c.h)("span",{slot:"heading"},(0,c.h)("div",{class:"license__heading"},null==n?void 0:n.name,!this.loading&&!t.live_mode&&(0,c.h)("sc-tag",{type:"warning",size:"small"},wp.i18n.__("Test Mode","surecart")))))}},{key:"renderContent",value:function(){var e,t,n,r,i,o,a,s,u,l,d=this;return this.loading&&!(null===(e=this.license)||void 0===e?void 0:e.id)?this.renderLoading():(null===(t=this.license)||void 0===t?void 0:t.id)?(0,c.h)(c.F,null,(0,c.h)("sc-dashboard-module",{error:this.error},this.renderLicenseHeader(),(0,c.h)("sc-card",{noPadding:!0},(0,c.h)("sc-stacked-list",null,(0,c.h)("sc-stacked-list-row",{style:{"--columns":"2","--sc-stacked-list-row-align-items":"center"}},(0,c.h)("div",null,wp.i18n.__("License Status","surecart")),this.renderStatus()),(0,c.h)("sc-stacked-list-row",{style:{"--columns":"2"}},(0,c.h)("div",null,wp.i18n.__("License Key","surecart")),(0,c.h)("div",{class:"license__key"},(0,c.h)("sc-input",{value:null===(n=this.license)||void 0===n?void 0:n.key,readonly:!0},(0,c.h)("sc-button",{class:"license__copy",type:"default",size:"small",slot:"suffix",onClick:function(){var e;return d.copyKey(null===(e=d.license)||void 0===e?void 0:e.key)}},this.copied?wp.i18n.__("Copied!","surecart"):wp.i18n.__("Copy","surecart"))))),(0,c.h)("sc-stacked-list-row",{style:{"--columns":"2"}},(0,c.h)("div",null,wp.i18n.__("Date","surecart")),(0,c.h)("span",null,null===(r=this.license)||void 0===r?void 0:r.created_at_date)),(0,c.h)("sc-stacked-list-row",{style:{"--columns":"2"}},(0,c.h)("div",null,wp.i18n.__("Activations Count","surecart")),(0,c.h)("span",null,null===(i=this.license)||void 0===i?void 0:i.activation_count," / ",(null===(o=this.license)||void 0===o?void 0:o.activation_limit)||(0,c.h)("span",null,"∞")))))),(0,c.h)("sc-dashboard-module",null,(0,c.h)("span",{slot:"heading"},(0,c.h)("slot",{name:"heading"},wp.i18n.__("Activations","surecart"))),(0,c.h)("sc-card",{noPadding:!0},(null===(u=null===(s=null===(a=this.license)||void 0===a?void 0:a.activations)||void 0===s?void 0:s.data)||void 0===u?void 0:u.length)?(0,c.h)("sc-stacked-list",null,null===(l=this.license)||void 0===l?void 0:l.activations.data.map((function(e){return(0,c.h)("sc-stacked-list-row",{style:{"--columns":"4"}},(0,c.h)("div",{class:"license__date"},e.created_at_date),(0,c.h)("div",null,e.name),(0,c.h)("div",null,e.fingerprint),(0,c.h)("div",null,(0,c.h)("sc-button",{size:"small",onClick:function(){d.selectedActivationId=e.id,d.showConfirmDelete=!0}},"Delete")))}))):(0,c.h)("sc-empty",null,wp.i18n.__("No activations present.","surecart")),this.loading&&(0,c.h)("sc-block-ui",{style:{"--sc-block-ui-opacity":"0.75"},spinner:!0})))):this.renderEmpty()}},{key:"renderConfirmDelete",value:function(){return(0,c.h)("sc-dialog",{open:this.showConfirmDelete,style:{"--body-spacing":"var(--sc-spacing-x-large)"},noHeader:!0,onScRequestClose:this.onCloseDeleteModal},(0,c.h)("sc-button",{class:"close__button",type:"text",circle:!0,onClick:this.onCloseDeleteModal,disabled:this.loading},(0,c.h)("sc-icon",{name:"x"})),(0,c.h)("sc-dashboard-module",{heading:wp.i18n.__("Delete Activation","surecart"),class:"license-cancel",error:this.error,style:{"--sc-dashboard-module-spacing":"1em"}},(0,c.h)("span",{slot:"description"},wp.i18n.__("Are you sure you want to delete activation?","surecart")),(0,c.h)("sc-flex",{justifyContent:"flex-start"},(0,c.h)("sc-button",{type:"primary",disabled:this.loading||this.busy,onClick:this.deleteActivation},wp.i18n.__("Delete Activation","surecart")),(0,c.h)("sc-button",{style:{color:"var(--sc-color-gray-500"},type:"text",onClick:this.onCloseDeleteModal,disabled:this.loading||this.busy},wp.i18n.__("Cancel","surecart"))),this.busy&&(0,c.h)("sc-block-ui",{style:{"--sc-block-ui-opacity":"0.75"},spinner:!0})))}},{key:"render",value:function(){return(0,c.h)("sc-spacing",{key:"1329e1e2c50f53b6bfe97b199d6f06c245a88dcd",style:{"--spacing":"var(--sc-spacing-large)"}},this.renderContent(),this.renderConfirmDelete())}},{key:"el",get:function(){return(0,c.a)(this)}}]);var e,t,n}();p.style=":host{display:block}.license__date{font-weight:var(--sc-font-weight-semibold)}.license__heading{display:flex;align-items:center;gap:1rem}.license__key{display:block}.close__button{position:absolute;top:0;right:0;font-size:22px;z-index:1}.license-cancel{display:grid;gap:0.5em}"},45:function(e,t,n){n.d(t,{A:function(){return i}});var r=n(8587);function i(e,t){if(null==e)return{};var n,i,o=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},8587:function(e,t,n){function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}n.d(t,{A:function(){return r}})}}]);