@zonos/elements 1.3.26 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-7e817cad.js → cart-62ff7ee7.js} +320 -200
- package/dist/cjs/index.cjs.js +3 -54
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-7e0065da.js → submitGtag-a5f8eaab.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +59 -22
- package/dist/cjs/zonos-hello.cjs.entry.js +30 -3
- package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +31 -3
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +55 -21
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +16 -10
- package/dist/collection/components/store/translationStore/strings.base.js +16 -10
- package/dist/collection/components/store/translationStore/strings.chinese.js +16 -10
- package/dist/collection/components/store/translationStore/strings.danish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.dutch.js +16 -10
- package/dist/collection/components/store/translationStore/strings.french.js +16 -10
- package/dist/collection/components/store/translationStore/strings.german.js +16 -10
- package/dist/collection/components/store/translationStore/strings.hebrew.js +16 -10
- package/dist/collection/components/store/translationStore/strings.indonesian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.italian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.japanese.js +16 -10
- package/dist/collection/components/store/translationStore/strings.korean.js +16 -10
- package/dist/collection/components/store/translationStore/strings.norwegian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.polish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.portuguese.js +16 -10
- package/dist/collection/components/store/translationStore/strings.russian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.spanish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.swedish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.turkish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +16 -10
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/wrapStringWithLink.js +3 -0
- package/dist/collection/scripts/_zonosBase.js +0 -51
- package/dist/esm/{cart-13e6a811.js → cart-b96aaa4f.js} +320 -200
- package/dist/esm/index.js +3 -54
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-c8bb6f2e.js → submitGtag-6e271d76.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +3 -3
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +59 -22
- package/dist/esm/zonos-hello.entry.js +30 -3
- package/dist/esm/zonos-payment.entry.js +2 -2
- package/dist/esm-es5/cart-b96aaa4f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-c8bb6f2e.js → submitGtag-6e271d76.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/scripts/index.d.ts +11 -3
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +8 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +8 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.base.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.danish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.french.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.german.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.italian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.korean.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.polish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.russian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +14 -8
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/wrapStringWithLink.d.ts +4 -0
- package/dist/types/scripts/_zonosBase.d.ts +0 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +2 -2
- package/dist/types/types/hello/HelloConfig.d.ts +10 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-eea8111c.system.entry.js → p-087c83a5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3e61deb.system.entry.js → p-10b9a681.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1a40aaf4.system.js +1 -0
- package/dist/zonos-elements/{p-43c1dd27.system.entry.js → p-2613b5d3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2cb880e7.system.entry.js +1 -0
- package/dist/zonos-elements/p-3de62c84.entry.js +1 -0
- package/dist/zonos-elements/{p-492b8e12.entry.js → p-4a0cf47b.entry.js} +1 -1
- package/dist/zonos-elements/{p-094c7343.system.entry.js → p-4e01d1ab.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-452ed1a7.entry.js → p-5b4c1c09.entry.js} +1 -1
- package/dist/zonos-elements/p-5d53f9a4.js +1 -0
- package/dist/zonos-elements/{p-089c3737.system.entry.js → p-666d1605.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b88e52b5.entry.js → p-692816a7.entry.js} +1 -1
- package/dist/zonos-elements/p-725c2d57.entry.js +1 -0
- package/dist/zonos-elements/{p-e975b187.entry.js → p-7664dec5.entry.js} +1 -1
- package/dist/zonos-elements/{p-2011cb03.entry.js → p-78a839b8.entry.js} +1 -1
- package/dist/zonos-elements/p-8b2125b3.system.js +1 -0
- package/dist/zonos-elements/{p-3e488bff.entry.js → p-8c9e7980.entry.js} +1 -1
- package/dist/zonos-elements/p-9b0aa65c.system.js +1 -0
- package/dist/zonos-elements/{p-cab01f64.system.entry.js → p-9cdfb51b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-99da2348.entry.js → p-9f7c0472.entry.js} +1 -1
- package/dist/zonos-elements/{p-58edaab6.system.entry.js → p-b208fec6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-eabe2abc.js → p-b468f941.js} +1 -1
- package/dist/zonos-elements/{p-60621085.entry.js → p-c63a7dde.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7e2d33b.system.entry.js → p-d7b2a87f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-a5d823d3.system.entry.js → p-f69f1ec6.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-13e6a811.js +0 -1
- package/dist/zonos-elements/p-121be462.system.js +0 -1
- package/dist/zonos-elements/p-1f2077df.entry.js +0 -1
- package/dist/zonos-elements/p-3baf7a18.entry.js +0 -1
- package/dist/zonos-elements/p-74488e31.system.js +0 -1
- package/dist/zonos-elements/p-875a311d.js +0 -1
- package/dist/zonos-elements/p-d1771035.system.js +0 -1
- package/dist/zonos-elements/p-e80a5ed7.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-
|
|
1
|
+
System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-1a40aaf4.system.js","./p-c9e433c0.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(e){"use strict";var t,a,s,n,o,i,r,c,d;return{setters:[function(e){t=e.r;a=e.h;s=e.H},function(e){n=e.d},function(e){o=e.c},function(e){i=e.H;r=e.t;c=e.l},function(e){d=e.l},function(){},function(){},function(){}],execute:function(){var l=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos-elements-radius-6);padding:var(--spacing, 24px);text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var h=l;var f=e("zonos_card",function(){function e(e){t(this,e);this.actions=undefined;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}e.prototype.render=function(){return a(s,{key:"0e52ca31db6c2f956da1910d6e0a222b588c1bcc",style:{"--font-family":n()}},a("div",{key:"69f391d821f88cbee4b0c586a8323b1dd68d7fd3",class:o(["styled-card"]),style:{padding:this.spacing}},this.label&&a("header",{key:"4568a1d7c354830e6e65e31b20b38140aaab9d01",class:"card-header",style:{padding:this.spacing}},a("zonos-text",{key:"e0a6b7a3776916f8208c27373878041807d91960",type:"subheader"},this.label),a("h-stack",{key:"c5f8d01b2f477b16ab9387081987eae64b156e76",spacing:8},this.actions)),a("slot",{key:"6001acfaae8ba37456a7c23bae5c44a91da074f9"}),(this.footerActions||this.footerContent)&&a("footer",{key:"78b926a323a5f1375c8120d5aa8b1ab2a4f3fa4a",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},a("div",{key:"2bd0c86b75096c2ee786d4a9b16a3d6e385fbbf1"},this.footerContent),a("h-stack",{key:"7a3f840ac9678a905338a99b8327115bc8199789",spacing:8},this.footerActions))))};return e}());f.style=h;var g='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var u=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var m=u;var p=e("zonos_language_select",function(){function e(e){var a=this;t(this,e);this.languageSelected=function(e){void i(e);a.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var t=c.selectedLocale;return a(s,{key:"34580123b768ce983c0c9c6fa309bdb1d6756a5a",class:"zonos--elements",style:{"--font-family":n()}},a("div",{key:"6e86352a45b5d9ad0e5ed5dac330367a49a6c6fe",class:"zonos--language-select"},a("zonos-select-dialog-header",{key:"d5b55cbb2858a2c0a6aa6ce0ea0d50eecc7360e8",handleOnClose:function(){return e.handleOnClose()},label:r("Select a language")}),a("div",{key:"c9aeb075428357c4cb15d9a2b09df7c8d6b01b11",class:"zonos--language-select-content"},d.map((function(s){return a("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(s.code)}},a("zonos-text",{textColor:"gray-800"},s.translatedLabel),s.code===t&&a("zonos-icon",{content:g,size:16}))})))))};return e}());p.style=m}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function i(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{a(e.next(t))}catch(t){r(t)}}function s(t){try{a(e["throw"](t))}catch(t){r(t)}}function a(t){t.done?o(t.value):i(t.value).then(u,s)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(e=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];i=0}finally{e=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function i(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{a(e.next(t))}catch(t){r(t)}}function s(t){try{a(e["throw"](t))}catch(t){r(t)}}function a(t){t.done?o(t.value):i(t.value).then(u,s)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(e=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];i=0}finally{e=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-1a40aaf4.system.js","./p-0b538ed4.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(t){"use strict";var n,o,e,i,r,u,s,a,c,f,d,h,l,v;return{setters:[function(t){n=t.r;o=t.c;e=t.h;i=t.H},function(t){r=t.r;u=t.u;s=t.h;a=t.v;c=t.a},function(t){f=t.z;d=t.b;h=t.d},function(t){l=t.a;v=t.l},function(){},function(){}],execute:function(){var w=this;var m=function(){return __awaiter(w,void 0,void 0,(function(){var t,n,o,e;return __generator(this,(function(i){switch(i.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/zonos-settings");return[4,r(t)];case 1:n=i.sent(),o=n.errors,e=n.json;if(o.length){l("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:o,json:null}]}return[2,{errors:[],json:e}]}}))}))};var _=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector){return}if(!u(t.placeOrderButtonSelector)){l('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}_()};var g=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var e=document.createElement("zonos-hello");n.appendChild(e);return true}return false};var y=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var e=".zonos--hello-mobile-wrapper";var i=document.querySelector(e);if(i){return e}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return e};var b=function(t){return __awaiter(w,void 0,void 0,(function(){var n,o,e,i,r;return __generator(this,(function(s){n=t.anchorElementSelector;o=y({position:"bottom-right"});e=n||o;if(!e||!u(e)){l('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}v("Hello init complete");i=g(e);if(!i){r=new MutationObserver((function(){var t=g(e);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){r.disconnect();g(o)}),1e3)}return[2]}))}))};var z=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";var j=z;var k=t("zonos_controller",function(){function t(t){n(this,t);this.stripeInitEvent=o(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){v("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}s.stripe=t;void p(f.checkoutSettings);v("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,e,i,u,s,a,c;return __generator(this,(function(d){switch(d.label){case 0:e=t||h();if(e==="Inter"){if(!t){return[2]}v("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}i="https://v1.route.js.zonos.com";return[4,r("".concat(i,"/api/zonos-elements/get-font-detail?family=").concat(e))];case 1:u=d.sent(),s=u.errors,a=u.json;if(s.length>0||!a){v("Failed to load font ".concat(e),"warn");return[2]}c=a.fontUrl;(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,c);if(!t){return[2]}v("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void b(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,e,i,r,u;return __generator(this,(function(s){switch(s.label){case 0:return[4,m()];case 1:o=s.sent(),e=o.errors,i=o.json;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){v("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();r=Object.assign(Object.assign({},this.config),{subscriptionStatus:undefined});d({overrideSettings:r,zonosSettings:i});void this.setupGoogleFont();if(f.helloSettings){void b(f.helloSettings)}return[4,a()];case 2:s.sent();u=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!u||!this.stripeInitEvent){v("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){v('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");v("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){v("=== Checkout is disabled by store owner ===","warn");v("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:u.token});v("zonos controller loaded");return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(o){n=document.querySelector("zonos-notification");if(!n){v("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){void c(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return e(i,{key:"cfacd00a3f5fba372425ec51cf885356353ad909",class:"zonos--elements"})};return t}());k.style=j}}}));
|