@zonos/elements 1.3.8-alpha.2 → 1.3.8-alpha.3

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.
Files changed (94) hide show
  1. package/dist/cjs/{cart-c22d66c8.js → cart-cdce5003.js} +4 -6
  2. package/dist/cjs/{submitGtag-bc28bb8f.js → submitGtag-6c250312.js} +1 -1
  3. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -4
  4. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-cart-items_9.cjs.entry.js +2 -2
  6. package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
  7. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  8. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
  13. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +2 -0
  14. package/dist/collection/components/store/checkout/cart.js +3 -0
  15. package/dist/collection/components/store/checkout/stripe.js +1 -6
  16. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -4
  17. package/dist/collection/types/generated/graphql.customer.types.js +22 -0
  18. package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
  19. package/dist/components/stripe.js +5 -7
  20. package/dist/components/submitGtag.js +1 -1
  21. package/dist/components/trackConversionEvent.js +1 -1
  22. package/dist/components/zonos-address2.js +2 -4
  23. package/dist/components/zonos-checkout-footer2.js +1 -1
  24. package/dist/components/zonos-checkout.js +1 -1
  25. package/dist/components/zonos-controller.js +1 -1
  26. package/dist/components/zonos-country-flag2.js +1 -1
  27. package/dist/components/zonos-country-select2.js +1 -1
  28. package/dist/components/zonos-hello-dialog-footer2.js +1 -1
  29. package/dist/components/zonos-hello-dialog2.js +1 -1
  30. package/dist/components/zonos-hello.js +2 -2
  31. package/dist/components/zonos-language-select2.js +1 -1
  32. package/dist/components/zonos-link-authentication2.js +1 -1
  33. package/dist/esm/{cart-f70b9be6.js → cart-6be7e36f.js} +4 -6
  34. package/dist/esm/{submitGtag-afeca6f9.js → submitGtag-67d79f43.js} +1 -1
  35. package/dist/esm/zonos-address_4.entry.js +2 -4
  36. package/dist/esm/zonos-card_2.entry.js +1 -1
  37. package/dist/esm/zonos-cart-items_9.entry.js +2 -2
  38. package/dist/esm/zonos-checkout.entry.js +2 -2
  39. package/dist/esm/zonos-controller.entry.js +1 -1
  40. package/dist/esm/zonos-country-flag.entry.js +1 -1
  41. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  42. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  43. package/dist/esm/zonos-hello.entry.js +2 -2
  44. package/dist/esm/zonos-payment.entry.js +1 -1
  45. package/dist/esm-es5/{cart-f70b9be6.js → cart-6be7e36f.js} +1 -1
  46. package/dist/esm-es5/{submitGtag-afeca6f9.js → submitGtag-67d79f43.js} +1 -1
  47. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  48. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  49. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
  50. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  51. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  52. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  53. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  54. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  55. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  56. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  57. package/dist/scripts/loadZonos.js +1 -1
  58. package/dist/scripts/zonos.js +1 -1
  59. package/dist/scripts/zonosBase.js +1 -1
  60. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  61. package/dist/types/types/generated/graphql.customer.types.d.ts +26 -0
  62. package/dist/types/types/generated/graphql.customer.types.ts +34 -0
  63. package/dist/types/types/generated/graphql.frontend.types.d.ts +12 -1
  64. package/dist/types/types/generated/graphql.frontend.types.ts +24 -1
  65. package/dist/zonos-elements/{p-9a9dc265.entry.js → p-01b49a3e.entry.js} +1 -1
  66. package/dist/zonos-elements/p-066c5893.system.js +1 -1
  67. package/dist/zonos-elements/{p-d93d74c1.system.entry.js → p-09c9bf58.system.entry.js} +1 -1
  68. package/dist/zonos-elements/{p-0ed00121.entry.js → p-2f84b148.entry.js} +1 -1
  69. package/dist/zonos-elements/{p-faa0ab72.system.entry.js → p-3c2082c8.system.entry.js} +1 -1
  70. package/dist/zonos-elements/p-4a37f7c8.entry.js +1 -0
  71. package/dist/zonos-elements/{p-04acf5ef.entry.js → p-72390726.entry.js} +1 -1
  72. package/dist/zonos-elements/{p-6dc7222d.js → p-776f07e7.js} +1 -1
  73. package/dist/zonos-elements/{p-fc0a051b.entry.js → p-7cb2dfd5.entry.js} +1 -1
  74. package/dist/zonos-elements/{p-2eb62b45.system.entry.js → p-865900d4.system.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-780ab968.entry.js → p-8f423d46.entry.js} +1 -1
  76. package/dist/zonos-elements/{p-c6eaecb6.system.js → p-93053feb.system.js} +1 -1
  77. package/dist/zonos-elements/{p-824882ce.system.entry.js → p-a38876df.system.entry.js} +1 -1
  78. package/dist/zonos-elements/p-a6a83331.system.entry.js +1 -0
  79. package/dist/zonos-elements/{p-56318a1f.system.entry.js → p-af3ff326.system.entry.js} +1 -1
  80. package/dist/zonos-elements/{p-6cd190f4.js → p-bc8b6f99.js} +1 -1
  81. package/dist/zonos-elements/{p-d9ba11cf.system.entry.js → p-c284e71c.system.entry.js} +1 -1
  82. package/dist/zonos-elements/p-c6f186fe.system.entry.js +1 -0
  83. package/dist/zonos-elements/{p-7736198d.system.entry.js → p-db49edae.system.entry.js} +1 -1
  84. package/dist/zonos-elements/{p-373e579c.entry.js → p-dd25205e.entry.js} +1 -1
  85. package/dist/zonos-elements/{p-e043e830.entry.js → p-e67ed67d.entry.js} +1 -1
  86. package/dist/zonos-elements/{p-039803aa.system.js → p-eb5dc3ef.system.js} +1 -1
  87. package/dist/zonos-elements/{p-7fded506.entry.js → p-f15f8441.entry.js} +1 -1
  88. package/dist/zonos-elements/{p-32f43296.entry.js → p-f5b75c6b.entry.js} +1 -1
  89. package/dist/zonos-elements/{p-d1934261.system.entry.js → p-fe3851a4.system.entry.js} +1 -1
  90. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  91. package/package.json +1 -1
  92. package/dist/zonos-elements/p-5d73cde0.system.entry.js +0 -1
  93. package/dist/zonos-elements/p-86fe18ea.system.entry.js +0 -1
  94. package/dist/zonos-elements/p-9a9902ca.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host,d as getElement}from"./index-b5be4dc3.js";import{j as stripeStore,d as logError}from"./cart-f70b9be6.js";import"./zonosStore-807f931f.js";import"./isDarkColor-8eeda28e.js";import"./getBorderRadius-0d133844.js";var zonosPaymentCss=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";var ZonosPaymentStyle0=zonosPaymentCss;var ZonosPayment=function(){function n(n){registerInstance(this,n);this.titleText=undefined;this.stripe=stripeStore.stripe;this.stripeElements=stripeStore.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=stripeStore.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var e=this.el.querySelector(".zonos--payment-component");if(!e){logError("Cannot find container element for paymentElement");return}n.mount(e);n.on("change",(function(n){stripeStore.stripePaymentEventData=n}));stripeStore.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return h(Host,{key:"e10a4ce1a9ecf05ad8efaceeb861284a92e475d2",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"a1b52de6a2cec2f707e00c39ebcd7752ad191af6",class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}();ZonosPayment.style=ZonosPaymentStyle0;export{ZonosPayment as zonos_payment};
1
+ import{r as registerInstance,h,H as Host,d as getElement}from"./index-b5be4dc3.js";import{j as stripeStore,d as logError}from"./cart-6be7e36f.js";import"./zonosStore-807f931f.js";import"./isDarkColor-8eeda28e.js";import"./getBorderRadius-0d133844.js";var zonosPaymentCss=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";var ZonosPaymentStyle0=zonosPaymentCss;var ZonosPayment=function(){function n(n){registerInstance(this,n);this.titleText=undefined;this.stripe=stripeStore.stripe;this.stripeElements=stripeStore.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=stripeStore.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var e=this.el.querySelector(".zonos--payment-component");if(!e){logError("Cannot find container element for paymentElement");return}n.mount(e);n.on("change",(function(n){stripeStore.stripePaymentEventData=n}));stripeStore.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return h(Host,{key:"e10a4ce1a9ecf05ad8efaceeb861284a92e475d2",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"a1b52de6a2cec2f707e00c39ebcd7752ad191af6",class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}();ZonosPayment.style=ZonosPaymentStyle0;export{ZonosPayment as zonos_payment};
@@ -1 +1 @@
1
- (function(){"use strict";"function"==typeof SuppressedError&&SuppressedError;const o=async({response:o,shouldLog:e=!0,shouldThrow:n=!1})=>{try{return await o.json()}catch(o){if(n)throw o;return e&&console.error(o),null}};const e=async(e,n)=>{const t=(function(o,e){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&e.indexOf(t)<0&&(n[t]=o[t]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(o);r<t.length;r++)e.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(o,t[r])&&(n[t[r]]=o[t[r]])}return n})(n||{},[]),r=t.body?JSON.stringify(t.body):void 0,s=t.method||"GET",i=new URL(e);i.searchParams.set("zToken",(function(o){try{return btoa(o).replace(/=/g,"")}catch(e){return o.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));const a=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},t.headers),c=Object.assign(Object.assign({},t),{body:"GET"===s?void 0:r,headers:a,method:s});return(async(e,n)=>{let t;try{t=await fetch(e,n)}catch(o){return o instanceof Error?{errors:[{message:o.message,type:"unknown"}],json:null,response:null}:{errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null}}const r=t.headers.get("Zonos-Mode"),s=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&r&&s&&("production"===r&&alert("Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!"),"test"===r&&alert("For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration"),window.Zonos.modeAlerted=!0),t.ok)return{errors:[],json:await o({response:t}),response:t};const i=t.status.toString();try{const e=await o({response:t,shouldThrow:!0});return{errors:[{message:`${i}: ${JSON.stringify(e)}`,type:i}],json:null,response:t}}catch(o){return{errors:[{message:`${i}: Unknown error`,type:i}],json:null,response:null}}})(i.toString(),c)},n=(o,e,...n)=>{var t,r;if(!(!!(null===(t=window.Zonos)||void 0===t?void 0:t.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===e&&console.error(o,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(e){case"warn":i.warn(o,...n);break;case"info":i.info(o,...n);break;case"error":i.error(o,...n);break;default:i.groupCollapsed(o,...n),i.trace(),i.groupEnd()}},t=async({endpoint:o,errors:n,metadata:t})=>{const r={endpoint:o,errors:n,metadata:Object.assign({href:window.location.href,userAgent:"userAgentData"in window.navigator?window.navigator.userAgentData:window.navigator.userAgent},t)};e("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:r,method:"POST"})};var r;const s=(()=>{const o=(o=>{if(!o)return null;const e=new URL(o).searchParams.get("zonosQaUrl");return e?/[^a-zA-Z0-9-_]+/.test(e)?null:e:null})(window.location.href);if(!o)return null;const e=`https://${o}.preview.js.zonos.com`;return n(`[ZONOS-WARNING] using '${e}' for loading script`,"warn"),fetch(e).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${e}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const o=new URLSearchParams(window.location.search);o.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${o.toString()}`;return window.history.replaceState({},"",t),window.location.reload(),null})),e})();class i{}r=i,i.isBigCommerce=!1,i.requested=!1,i.internationalHideSelector="",i.zonosQaUrl=null,i.injectZonos=({initConfig:o,isSecondAttempt:i=!1,url:a,version:c})=>{const l=s||a,d=l.replace("https://","").replace("http://",""),u=document.createElement("script"),p=(new Date).getTime(),m=c&&c<"1.2.5"?"loadZonos.js":"zonos.js";u.src=`https://${d}/dist/scripts/${m}?timestamp=${p}`,n(`[ZONOS - loadZonos] Injecting "${m}" from "${d}"`,"info"),u.addEventListener("load",(()=>{r.isBigCommerce||(r.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.zonosQaUrl=s,window.Zonos.internationalHideSelector=r.internationalHideSelector,window.Zonos.isBigCommerce=r.isBigCommerce,window.Zonos.version&&(n(`[ZONOS - loadZonos] Execute "Zonos.init" from "${m}" from "${d}"`,"info"),window.Zonos.init(o))})),u.addEventListener("error",(async()=>{if(["localhost",".zonos.com"].some((o=>window.location.href.includes(o))))return;if(i)return void t({endpoint:u.src,errors:["zonos.js - Script failed to be injected on second attempt"],metadata:{loadUrl:l,version:c}});await new Promise((o=>setTimeout(o,100)));const{errors:n,response:s}=await e(u.src);(null==s?void 0:s.ok)?r.injectZonos({initConfig:o,isSecondAttempt:!0,url:a,version:c}):t({endpoint:u.src,errors:[`zonos.js - Script failed to load and test fetch failed after 100ms: ${JSON.stringify(n)}`],metadata:{loadUrl:l,version:c}})})),document.head.appendChild(u)},i.init=async o=>{var t;const s="https://v1.3.8-alpha.2.js.zonos.com",i=null===(t=document.querySelector("script[src*='/loadZonos.js']"))||void 0===t?void 0:t.src,a=document.querySelector('script[src*="/zonos.js"]'),c=null==i?void 0:i.includes("timestamp=");if(!i||!c)return void((o,...e)=>{n(o,"error",...e)})("[ZONOS - loadZonos] A timestamp is required as a query parameter in the loadZonos.js script source. This timestamp ensures that you are loading the most recent version of the script, avoiding any cached versions.");if(a||!i||r.requested)return void n("[ZONOS - loadZonos] script is already loaded or requested","info");if(r.requested=!0,!o.storeId)return n("[ZONOS - loadZonos] loading latest script since storeId is not provided."),void r.injectZonos({initConfig:o,url:s,version:null});const l=new URL("https://v1.route.js.zonos.com/api/get-store-version");l.searchParams.set("storeId",o.storeId.toString());const{errors:d,json:u}=await e(l.toString());if(d.length||!u)return n("[ZONOS - loadZonos] Error getting store version, loadding the latest version.","error"),void r.injectZonos({initConfig:o,url:s,version:null});const{version:p}=u;if(!a){const{currentLoadScriptUrl:e,isForceLoadVersionDomain:t,isWhiteListed:s}=(({loadScriptSrc:o})=>{if(!o)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const e=new URL(o).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((o=>e.includes(o))),t=["qa.js.zonos.com"].some((o=>e.includes(o)));return{currentLoadScriptUrl:e,isForceLoadVersionDomain:t,isWhiteListed:n}})({loadScriptSrc:i}),a=s&&!t?e:`${"alpha"===p?"alpha":`v${p}`}.js.zonos.com`,c=s&&!t?null:p;n("[ZONOS - loadZonos] injecting zonos script","info",{currentLoadScriptUrl:e,isForceLoadVersionDomain:t,isWhiteListed:s,loadUrl:a,loadVersion:c,version:p}),r.injectZonos({initConfig:o,url:a,version:c})}},void 0===window.Zonos&&(window.Zonos=i)})();
1
+ (function(){"use strict";"function"==typeof SuppressedError&&SuppressedError;const o=async({response:o,shouldLog:e=!0,shouldThrow:n=!1})=>{try{return await o.json()}catch(o){if(n)throw o;return e&&console.error(o),null}};const e=async(e,n)=>{const t=(function(o,e){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&e.indexOf(t)<0&&(n[t]=o[t]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(o);r<t.length;r++)e.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(o,t[r])&&(n[t[r]]=o[t[r]])}return n})(n||{},[]),r=t.body?JSON.stringify(t.body):void 0,s=t.method||"GET",i=new URL(e);i.searchParams.set("zToken",(function(o){try{return btoa(o).replace(/=/g,"")}catch(e){return o.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));const a=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},t.headers),c=Object.assign(Object.assign({},t),{body:"GET"===s?void 0:r,headers:a,method:s});return(async(e,n)=>{let t;try{t=await fetch(e,n)}catch(o){return o instanceof Error?{errors:[{message:o.message,type:"unknown"}],json:null,response:null}:{errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null}}const r=t.headers.get("Zonos-Mode"),s=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&r&&s&&("production"===r&&alert("Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!"),"test"===r&&alert("For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration"),window.Zonos.modeAlerted=!0),t.ok)return{errors:[],json:await o({response:t}),response:t};const i=t.status.toString();try{const e=await o({response:t,shouldThrow:!0});return{errors:[{message:`${i}: ${JSON.stringify(e)}`,type:i}],json:null,response:t}}catch(o){return{errors:[{message:`${i}: Unknown error`,type:i}],json:null,response:null}}})(i.toString(),c)},n=(o,e,...n)=>{var t,r;if(!(!!(null===(t=window.Zonos)||void 0===t?void 0:t.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===e&&console.error(o,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(e){case"warn":i.warn(o,...n);break;case"info":i.info(o,...n);break;case"error":i.error(o,...n);break;default:i.groupCollapsed(o,...n),i.trace(),i.groupEnd()}},t=async({endpoint:o,errors:n,metadata:t})=>{const r={endpoint:o,errors:n,metadata:Object.assign({href:window.location.href,userAgent:"userAgentData"in window.navigator?window.navigator.userAgentData:window.navigator.userAgent},t)};e("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:r,method:"POST"})};var r;const s=(()=>{const o=(o=>{if(!o)return null;const e=new URL(o).searchParams.get("zonosQaUrl");return e?/[^a-zA-Z0-9-_]+/.test(e)?null:e:null})(window.location.href);if(!o)return null;const e=`https://${o}.preview.js.zonos.com`;return n(`[ZONOS-WARNING] using '${e}' for loading script`,"warn"),fetch(e).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${e}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const o=new URLSearchParams(window.location.search);o.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${o.toString()}`;return window.history.replaceState({},"",t),window.location.reload(),null})),e})();class i{}r=i,i.isBigCommerce=!1,i.requested=!1,i.internationalHideSelector="",i.zonosQaUrl=null,i.maxRetries=5,i.pollingFailedLoadScript=async({times:o=1,url:n})=>{if(o>r.maxRetries)return void t({endpoint:n,errors:[`[Info] Using alternative CDN. Failed to fetch for ${r.maxRetries} times (max: ${r.maxRetries}) with each spaced 100ms apart.`],metadata:{}});await new Promise((o=>setTimeout(o,100)));const{response:s}=await e(n);(null==s?void 0:s.ok)?t({endpoint:n,errors:[`[Info] Using alternative CDN. Fetched successfully after retried ${o} times (max: ${r.maxRetries}) with each spaced 100ms apart.`],metadata:{}}):await r.pollingFailedLoadScript({times:o+1,url:n})},i.injectZonos=({initConfig:o,isGithubCdn:e=!1,url:i,version:a})=>{const c=s||i,l=c.replace("https://","").replace("http://",""),d=document.createElement("script"),u=a&&a<"1.2.5"?"loadZonos.js":"zonos.js";d.src=`https://${l}/dist/scripts/${u}`,n(`[ZONOS - loadZonos] Injecting "${u}" from "${l}"`,"info"),d.addEventListener("load",(()=>{r.isBigCommerce||(r.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.zonosQaUrl=s,window.Zonos.internationalHideSelector=r.internationalHideSelector,window.Zonos.isBigCommerce=r.isBigCommerce,window.Zonos.version&&(n(`[ZONOS - loadZonos] Execute "Zonos.init" from "${u}" from "${l}"`,"info"),window.Zonos.init(o))})),d.addEventListener("error",(async()=>{if(!e){const e="https://unpkg.com/@zonos/elements@1.3.8-alpha.3",n=a?e.replace(/@(.+)/,`@${a}`):e;r.injectZonos({initConfig:o,isGithubCdn:!0,url:n,version:a})}["localhost",".zonos.com"].some((o=>window.location.href.includes(o)))||s||(e?t({endpoint:d.src,errors:["zonos.js - Failed to fetch github CDN."],metadata:{loadUrl:c,version:a}}):r.pollingFailedLoadScript({url:d.src}))})),document.head.appendChild(d)},i.init=async o=>{var t;const s="https://v1.3.8-alpha.3.js.zonos.com",i=null===(t=document.querySelector("script[src*='/loadZonos.js']"))||void 0===t?void 0:t.src,a=document.querySelector('script[src*="/zonos.js"]'),c=null==i?void 0:i.includes("timestamp=");if(!i||!c)return void((o,...e)=>{n(o,"error",...e)})("[ZONOS - loadZonos] A timestamp is required as a query parameter in the loadZonos.js script source. This timestamp ensures that you are loading the most recent version of the script, avoiding any cached versions.");if(a||!i||r.requested)return void n("[ZONOS - loadZonos] script is already loaded or requested","info");if(r.requested=!0,!o.storeId)return n("[ZONOS - loadZonos] loading latest script since storeId is not provided."),void r.injectZonos({initConfig:o,url:s,version:null});const l=new URL("https://v1.route.js.zonos.com/api/get-store-version");l.searchParams.set("storeId",o.storeId.toString());const{errors:d,json:u}=await e(l.toString());if(d.length||!u)return n("[ZONOS - loadZonos] Error getting store version, loadding the latest version.","error"),void r.injectZonos({initConfig:o,url:s,version:null});const{version:p}=u;if(!a){const{currentLoadScriptUrl:e,isForceLoadVersionDomain:t,isWhiteListed:s}=(({loadScriptSrc:o})=>{if(!o)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const e=new URL(o).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((o=>e.includes(o))),t=["qa.js.zonos.com"].some((o=>e.includes(o)));return{currentLoadScriptUrl:e,isForceLoadVersionDomain:t,isWhiteListed:n}})({loadScriptSrc:i}),a=s&&!t?e:`${"alpha"===p?"alpha":`v${p}`}.js.zonos.com`,c=s&&!t?null:p;n("[ZONOS - loadZonos] injecting zonos script","info",{currentLoadScriptUrl:e,isForceLoadVersionDomain:t,isWhiteListed:s,loadUrl:a,loadVersion:c,version:p}),r.injectZonos({initConfig:o,url:a,version:c})}},void 0===window.Zonos&&(window.Zonos=i)})();
@@ -1 +1 @@
1
- (function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var d;const a=(()=>{const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})()||"https://v1.3.8-alpha.2.js.zonos.com",u="https://unpkg.com/@zonos/elements@1.3.8-alpha.2",m="https://rsms.me",p="https://fonts.googleapis.com",h=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}d=y,y.doneInit=!1,y.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.isBigCommerce=!1,y.internationalHideSelector="",y.zonosQaUrl=null,y.version="v1.3.8-alpha.2",y.modeAlerted=!1,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{d.doneInit||(e(`====== ZONOS DEBUG MODE: on (${d.version}) ======`),l?(d.zonosApiKey=l,d.storeId=i,e("init zonos"),d.injectSentryScript(),d.injectZonosCdn(),d.injectZonosCss(),d.injectFonts(),d.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),d.doneInit=!0):t("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},y.showNotification=e=>{var t;null===(t=d.zonosController)||void 0===t||t.showNotification(e)},y.updateOrganizationName=e=>{var t;null===(t=d.zonosController)||void 0===t||t.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},y.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),d.zonosController=s,e("Zonos controller injected!")},y.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${d.version}`})},o.appendChild(r)},y.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&d.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},y.injectZonosCdn=()=>{d.injectScript({fallBackDomain:u,isModule:!0,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),d.injectScript({fallBackDomain:u,isModule:!1,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${a}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&d.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(d.injectStylesheet({fallBackDomain:u,stylesheetDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!h.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var t;null===(t=d.zonosController)||void 0===t||t.setupGoogleFont(e)},y.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${p}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=p,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},window.Zonos=y})();
1
+ (function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var d;const a=(()=>{const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})()||"https://v1.3.8-alpha.3.js.zonos.com",u="https://unpkg.com/@zonos/elements@1.3.8-alpha.3",m="https://rsms.me",p="https://fonts.googleapis.com",h=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}d=y,y.doneInit=!1,y.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.isBigCommerce=!1,y.internationalHideSelector="",y.zonosQaUrl=null,y.version="v1.3.8-alpha.3",y.modeAlerted=!1,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{d.doneInit||(e(`====== ZONOS DEBUG MODE: on (${d.version}) ======`),l?(d.zonosApiKey=l,d.storeId=i,e("init zonos"),d.injectSentryScript(),d.injectZonosCdn(),d.injectZonosCss(),d.injectFonts(),d.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),d.doneInit=!0):t("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},y.showNotification=e=>{var t;null===(t=d.zonosController)||void 0===t||t.showNotification(e)},y.updateOrganizationName=e=>{var t;null===(t=d.zonosController)||void 0===t||t.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},y.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),d.zonosController=s,e("Zonos controller injected!")},y.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${d.version}`})},o.appendChild(r)},y.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&d.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},y.injectZonosCdn=()=>{d.injectScript({fallBackDomain:u,isModule:!0,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),d.injectScript({fallBackDomain:u,isModule:!1,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${a}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&d.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(d.injectStylesheet({fallBackDomain:u,stylesheetDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!h.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var t;null===(t=d.zonosController)||void 0===t||t.setupGoogleFont(e)},y.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${p}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=p,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},window.Zonos=y})();
@@ -1 +1 @@
1
- (function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var d;const a=(()=>{const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})()||"https://v1.3.8-alpha.2.js.zonos.com",u="https://unpkg.com/@zonos/elements@1.3.8-alpha.2",m="https://rsms.me",p="https://fonts.googleapis.com",h=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}d=y,y.doneInit=!1,y.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.isBigCommerce=!1,y.internationalHideSelector="",y.zonosQaUrl=null,y.version="v1.3.8-alpha.2",y.modeAlerted=!1,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{d.doneInit||(e(`====== ZONOS DEBUG MODE: on (${d.version}) ======`),l?(d.zonosApiKey=l,d.storeId=i,e("init zonos"),d.injectSentryScript(),d.injectZonosCdn(),d.injectZonosCss(),d.injectFonts(),d.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),d.doneInit=!0):t("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},y.showNotification=e=>{var t;null===(t=d.zonosController)||void 0===t||t.showNotification(e)},y.updateOrganizationName=e=>{var t;null===(t=d.zonosController)||void 0===t||t.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},y.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),d.zonosController=s,e("Zonos controller injected!")},y.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${d.version}`})},o.appendChild(r)},y.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&d.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},y.injectZonosCdn=()=>{d.injectScript({fallBackDomain:u,isModule:!0,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),d.injectScript({fallBackDomain:u,isModule:!1,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${a}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&d.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(d.injectStylesheet({fallBackDomain:u,stylesheetDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!h.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var t;null===(t=d.zonosController)||void 0===t||t.setupGoogleFont(e)},y.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${p}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=p,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},exports.Zonos=y})();
1
+ (function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var d;const a=(()=>{const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})()||"https://v1.3.8-alpha.3.js.zonos.com",u="https://unpkg.com/@zonos/elements@1.3.8-alpha.3",m="https://rsms.me",p="https://fonts.googleapis.com",h=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}d=y,y.doneInit=!1,y.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.isBigCommerce=!1,y.internationalHideSelector="",y.zonosQaUrl=null,y.version="v1.3.8-alpha.3",y.modeAlerted=!1,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{d.doneInit||(e(`====== ZONOS DEBUG MODE: on (${d.version}) ======`),l?(d.zonosApiKey=l,d.storeId=i,e("init zonos"),d.injectSentryScript(),d.injectZonosCdn(),d.injectZonosCss(),d.injectFonts(),d.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),d.doneInit=!0):t("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},y.showNotification=e=>{var t;null===(t=d.zonosController)||void 0===t||t.showNotification(e)},y.updateOrganizationName=e=>{var t;null===(t=d.zonosController)||void 0===t||t.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},y.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),d.zonosController=s,e("Zonos controller injected!")},y.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${d.version}`})},o.appendChild(r)},y.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&d.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},y.injectZonosCdn=()=>{d.injectScript({fallBackDomain:u,isModule:!0,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),d.injectScript({fallBackDomain:u,isModule:!1,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${a}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&d.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(d.injectStylesheet({fallBackDomain:u,stylesheetDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!h.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var t;null===(t=d.zonosController)||void 0===t||t.setupGoogleFont(e)},y.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${p}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=p,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},exports.Zonos=y})();
@@ -4,7 +4,7 @@ export declare const getLocaleMessages: ({ countryCode, localeTo, storeId, }: {
4
4
  localeTo?: string | undefined;
5
5
  storeId: number;
6
6
  }) => Promise<{
7
- countryCodes: string[];
7
+ countryCodes: string[] | null;
8
8
  countryCodesPageMessageLinks: {
9
9
  id: number;
10
10
  message: {
@@ -1986,6 +1986,32 @@ export declare const stripeChargeStatus: {
1986
1986
  readonly Succeeded: "SUCCEEDED";
1987
1987
  };
1988
1988
  export type StripeChargeStatus = (typeof stripeChargeStatus)[keyof typeof stripeChargeStatus];
1989
+ export declare const stripeConnectAccountType: {
1990
+ readonly Custom: "CUSTOM";
1991
+ readonly Express: "EXPRESS";
1992
+ readonly Standard: "STANDARD";
1993
+ };
1994
+ export type StripeConnectAccountType = (typeof stripeConnectAccountType)[keyof typeof stripeConnectAccountType];
1995
+ export declare const stripeConnectBusinessType: {
1996
+ readonly Company: "COMPANY";
1997
+ readonly GovernmentEntity: "GOVERNMENT_ENTITY";
1998
+ readonly Individual: "INDIVIDUAL";
1999
+ readonly NonProfit: "NON_PROFIT";
2000
+ };
2001
+ export type StripeConnectBusinessType = (typeof stripeConnectBusinessType)[keyof typeof stripeConnectBusinessType];
2002
+ export declare const stripeConnectCapabilityStatus: {
2003
+ readonly Active: "ACTIVE";
2004
+ readonly Inactive: "INACTIVE";
2005
+ readonly Pending: "PENDING";
2006
+ };
2007
+ export type StripeConnectCapabilityStatus = (typeof stripeConnectCapabilityStatus)[keyof typeof stripeConnectCapabilityStatus];
2008
+ export declare const stripeConnectPayoutIntervalType: {
2009
+ readonly Daily: "DAILY";
2010
+ readonly Manual: "MANUAL";
2011
+ readonly Monthly: "MONTHLY";
2012
+ readonly Weekly: "WEEKLY";
2013
+ };
2014
+ export type StripeConnectPayoutIntervalType = (typeof stripeConnectPayoutIntervalType)[keyof typeof stripeConnectPayoutIntervalType];
1989
2015
  export declare const stripePaymentIntentStatus: {
1990
2016
  readonly Canceled: "CANCELED";
1991
2017
  readonly Processing: "PROCESSING";
@@ -2359,6 +2359,40 @@ export const stripeChargeStatus = {
2359
2359
 
2360
2360
  export type StripeChargeStatus =
2361
2361
  (typeof stripeChargeStatus)[keyof typeof stripeChargeStatus];
2362
+ export const stripeConnectAccountType = {
2363
+ Custom: 'CUSTOM',
2364
+ Express: 'EXPRESS',
2365
+ Standard: 'STANDARD',
2366
+ } as const;
2367
+
2368
+ export type StripeConnectAccountType =
2369
+ (typeof stripeConnectAccountType)[keyof typeof stripeConnectAccountType];
2370
+ export const stripeConnectBusinessType = {
2371
+ Company: 'COMPANY',
2372
+ GovernmentEntity: 'GOVERNMENT_ENTITY',
2373
+ Individual: 'INDIVIDUAL',
2374
+ NonProfit: 'NON_PROFIT',
2375
+ } as const;
2376
+
2377
+ export type StripeConnectBusinessType =
2378
+ (typeof stripeConnectBusinessType)[keyof typeof stripeConnectBusinessType];
2379
+ export const stripeConnectCapabilityStatus = {
2380
+ Active: 'ACTIVE',
2381
+ Inactive: 'INACTIVE',
2382
+ Pending: 'PENDING',
2383
+ } as const;
2384
+
2385
+ export type StripeConnectCapabilityStatus =
2386
+ (typeof stripeConnectCapabilityStatus)[keyof typeof stripeConnectCapabilityStatus];
2387
+ export const stripeConnectPayoutIntervalType = {
2388
+ Daily: 'DAILY',
2389
+ Manual: 'MANUAL',
2390
+ Monthly: 'MONTHLY',
2391
+ Weekly: 'WEEKLY',
2392
+ } as const;
2393
+
2394
+ export type StripeConnectPayoutIntervalType =
2395
+ (typeof stripeConnectPayoutIntervalType)[keyof typeof stripeConnectPayoutIntervalType];
2362
2396
 
2363
2397
  export const stripePaymentIntentStatus = {
2364
2398
  Canceled: 'CANCELED',
@@ -551,7 +551,7 @@ export type GetAudienceByAspectKeyQuery = {
551
551
  };
552
552
  export type LocaleCountryMessagesQuery = {
553
553
  locale_countryCodesPage: Array<{
554
- countryCodes: Array<string>;
554
+ countryCodes: Array<string> | null;
555
555
  countryCodesPageMessageLinks: Array<{
556
556
  id: number;
557
557
  message: {
@@ -591,6 +591,14 @@ export type AllSettingsQuery = {
591
591
  zonosStoreId: number | null;
592
592
  }>;
593
593
  };
594
+ export type HasPreviousErrorsQuery = {
595
+ error_event: Array<{
596
+ endpoint: string;
597
+ errors: Record<string, unknown> | Record<string, unknown>[];
598
+ metadata: Record<string, unknown> | Record<string, unknown>[] | null;
599
+ requestPayload: Record<string, unknown> | Record<string, unknown>[];
600
+ }>;
601
+ };
594
602
  export type InsertOrderImportLockMutation = {
595
603
  insert_bigcommerce_orderImportLock_one: {
596
604
  id: number;
@@ -765,6 +773,9 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
765
773
  cleanupTestZonosElementSetting(variables?: {
766
774
  [x: string]: never;
767
775
  } | undefined, requestHeaders?: GraphQLClientRequestHeaders): Promise<CleanupTestZonosElementSettingMutation>;
776
+ hasPreviousErrors(variables?: {
777
+ [x: string]: never;
778
+ } | undefined, requestHeaders?: GraphQLClientRequestHeaders): Promise<HasPreviousErrorsQuery>;
768
779
  insertConversionEvent(variables?: {
769
780
  [x: string]: never;
770
781
  } | undefined, requestHeaders?: GraphQLClientRequestHeaders): Promise<InsertConversionEventMutation>;
@@ -554,7 +554,7 @@ export type GetAudienceByAspectKeyQuery = {
554
554
 
555
555
  export type LocaleCountryMessagesQuery = {
556
556
  locale_countryCodesPage: Array<{
557
- countryCodes: Array<string>;
557
+ countryCodes: Array<string> | null;
558
558
  countryCodesPageMessageLinks: Array<{
559
559
  id: number;
560
560
  message: {
@@ -596,6 +596,15 @@ export type AllSettingsQuery = {
596
596
  }>;
597
597
  };
598
598
 
599
+ export type HasPreviousErrorsQuery = {
600
+ error_event: Array<{
601
+ endpoint: string;
602
+ errors: Record<string, unknown> | Record<string, unknown>[];
603
+ metadata: Record<string, unknown> | Record<string, unknown>[] | null;
604
+ requestPayload: Record<string, unknown> | Record<string, unknown>[];
605
+ }>;
606
+ };
607
+
599
608
  export type InsertOrderImportLockMutation = {
600
609
  insert_bigcommerce_orderImportLock_one: {
601
610
  id: number;
@@ -985,6 +994,20 @@ export function getSdk(
985
994
  'mutation',
986
995
  );
987
996
  },
997
+ hasPreviousErrors(
998
+ variables?: { [x: string]: never },
999
+ requestHeaders?: GraphQLClientRequestHeaders,
1000
+ ): Promise<HasPreviousErrorsQuery> {
1001
+ return withWrapper(
1002
+ wrappedRequestHeaders =>
1003
+ client.request<HasPreviousErrorsQuery>('', variables, {
1004
+ ...requestHeaders,
1005
+ ...wrappedRequestHeaders,
1006
+ }),
1007
+ 'hasPreviousErrors',
1008
+ 'query',
1009
+ );
1010
+ },
988
1011
  insertConversionEvent(
989
1012
  variables?: { [x: string]: never },
990
1013
  requestHeaders?: GraphQLClientRequestHeaders,
@@ -1 +1 @@
1
- import{r as o,h as s,F as e,H as c}from"./p-58127116.js";import{l as t,a as n,s as i,b as a,c as r,d as h,e as d,i as l,f as u,g as z,h as m,j as k,k as p,m as g,n as f,o as v,p as b,q as w,r as y,t as x}from"./p-6dc7222d.js";import{z as C,m as B}from"./p-9cdc6b5f.js";import{s as S,a as A,t as I}from"./p-6cd190f4.js";import{i as L}from"./p-81a54668.js";import{c as j}from"./p-b4b7f705.js";import{g as O}from"./p-3d4fc5aa.js";import{i as H}from"./p-e71fbec9.js";const M=(o=!0)=>!(!t.localizationLoaded||!t.isShippableCountry&&(o&&n("Checkout: not shippable country"),1)),N='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',P='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',_=class{constructor(s){o(this,s),this.applyStripeTheme=async()=>{var o,s,e,c;const t=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||C.appearance.theme;await l({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.colorPrimary,overrideSecondaryColor:null===(c=this.appearanceSettingsOverride)||void 0===c?void 0:c.colorSecondary,overrideTheme:this.isMobile?t:void 0})},this.getCurrentLocalePageEnum=()=>{switch(u.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.paymentError=!1,this.collapseReviewMobile=!1,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button"}async initCartInfoHandler(o){z(o.detail)}async closeDialogHandler(){A("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==u.step||m(),u.step="customer-info"}async buildCartAndInit(){if(C.checkoutSettings.buildCartDetail){n("build cart detail");const o=await C.checkoutSettings.buildCartDetail();await z(o)}if(!k.clientSecret){const o=await p();if(n(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}attachCheckout(){const o=C.checkoutSettings.placeOrderButtonSelector;o&&document.querySelectorAll(`${o}, ${this.domesticRedirectedBtnSelector}`).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if(M()){o.preventDefault(),o.stopPropagation(),n("zonos checkout button clicked"),k.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");A("zonos-checkout-start"),I("checkout_open")}catch(o){k.isFetchingSession=!1,g({messages:[x("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:x("Error creating Checkout")})}}})),o.removeAttribute("disabled"),o.setAttribute("data-zonos-checkout-attached","true"),o.matches(this.domesticRedirectedBtnSelector)&&(o.dispatchEvent(new CustomEvent("click")),r(),o.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}async init(){k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const e=new MutationObserver((async()=>{const c=document.querySelector(o),t=i();if(!c&&t){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(t),void e.disconnect()}const n=document.querySelector('select[name="shippingAddress.countryCode"]'),l=document.querySelector("#checkout-shipping-continue");n&&l&&(e.disconnect(),l.addEventListener("click",(async o=>{var s,e;const c=n.value;if(!c)return;if(a(c),!M(!1))return void r();const t=document.querySelector("form");if(!t)return;const i=new FormData(t),l=document.querySelector("input#addressLine1Input"),u={address1:null!==(s=i.get("shippingAddress.address1"))&&void 0!==s?s:l&&l.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(e=i.get("shippingAddress.stateOrProvince"))&&void 0!==e?e:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(u).some((o=>null==o)))return h("One or more shipping address field is missing",Object.entries(u)),void S({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(u))],metadata:{domain:window.location.hostname,storeId:C.storeId}});d({address1:u.address1,address2:u.address2,city:u.city,countryCode:u.countryCode,firstName:u.firstName,lastName:u.lastName,phone:u.phone,postalCode:u.postalCode,state:u.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));e.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:`${o.firstName} ${o.lastName}`,phone:o.phone}}});const o=setInterval((()=>{const s=window.Zonos.internationalHideSelector;if(!s)return void clearInterval(o);const e=M(!1),c=document.querySelectorAll(s);e?null==c||c.forEach((o=>{const s=o;s.setAttribute("data-zonos-checkout-original-display",s.style.display),s.style.display="none"})):null==c||c.forEach((o=>{const s=o,e=s.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(s).display;s.style.display=e||"initial"}))}),100),s=setInterval((()=>{k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(n("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(s)):n("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(s)}),1e4)}async setToFinishStep(o){u.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await f();const o=setInterval((()=>{!u.landedCostData&&k.isFetchingLandedCost||(u.landedCostData&&v(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{v(),this.submitLoading=!1}),500)}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0;try{await b(),v()}catch(o){h(o),this.paymentError=!0}this.submitLoading=!1}async handleFinishClick(){if(w(),this.preview)return u.step="customer-info",void await this.init();m();const o=window.location.href.split("?")[0];window.history.replaceState({},document.title,o),this.open=!1,window.location.reload()}async handleBackClick(){"customer-info"!==u.step?y():await this.closeDialogHandler()}handleWindowResize(){this.isMobile=L(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=L(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}componentWillLoad(){this.init(),this.isMobile=L(this.mobile),n(`mobile: ${this.isMobile}`)}disconnectedCallback(){w(),m()}render(){var o;const n="finish"!==u.step&&"error"!==u.step&&!k.stripeElements||k.isFetchingSession,{colorPrimary:i,colorSecondary:a,logoUrl:r,style:h}=B(C.appearance,this.appearanceSettingsOverride),d="ENABLED"===C.appearance.zonosAttribution,l=C.appearance.theme,z=i&&H(i)?"DARK":"LIGHT",m=this.isMobile?l:z,p=this.isMobile?void 0:a,{customMessages:g}=t,f=null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,v=this.getCurrentLocalePageEnum(),b=g.filter((o=>o.pageName===v)),w=()=>s("div",{class:"zonos--logo"},r&&s("img",{alt:`${C.organizationName} logo`,src:r,width:100})),y=()=>s("zonos-v-stack",null,w(),b.map((o=>s("zonos-custom-message",{icon:N,message:o.message}))),s("div",null,s("zonos-button",{class:"zonos--back-button",icon:s("zonos-icon",{"aria-label":"Back to previous step",content:'<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>'}),noBackground:!0,noPaddingLeft:!0,noPaddingRight:!0,onClick:()=>this.handleBackClick(),theme:m},x("Back")))),S=()=>s("div",{class:"zonos--content",style:{"--border-radius":O(h)}},"finish"!==u.step&&"error"!==u.step&&s(e,null,s("div",{class:"zonos--left","data-theme":m,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&y(),"customer-info"===u.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:p}),"shipping"===u.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:p}),"payment"===u.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:p})),s("div",{class:"zonos--right","data-theme":l},this.isMobile&&y(),!this.isMobile&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),s("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-cart-items",null))),s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:N,message:f}))))),("finish"===u.step||"error"===u.step)&&s("div",{class:"zonos--done","data-theme":l},s("div",{class:"zonos--header"},w(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:l})),s("zonos-checkout-finish",{borderRadius:h,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===u.step&&u.error?Object.assign(Object.assign({},u.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),s("zonos-checkout-footer",null));return s(c,{class:j(["zonos--checkout zonos--elements",d&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?S():s("zonos-dialog",{borderStyle:h,"data-theme":l,height:"980px",isLoading:n,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},S()))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}}};_.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-48) var(--amino-space-56) var(--amino-space-76)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12);padding-bottom:var(--amino-space-76)}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:var(--amino-space-0)}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";export{_ as zonos_checkout}
1
+ import{r as o,h as s,F as e,H as c}from"./p-58127116.js";import{l as t,a as n,s as i,b as a,c as r,d as h,e as d,i as l,f as u,g as z,h as m,j as k,k as p,m as g,n as f,o as v,p as b,q as w,r as y,t as x}from"./p-776f07e7.js";import{z as C,m as B}from"./p-9cdc6b5f.js";import{s as S,a as A,t as I}from"./p-bc8b6f99.js";import{i as L}from"./p-81a54668.js";import{c as j}from"./p-b4b7f705.js";import{g as O}from"./p-3d4fc5aa.js";import{i as H}from"./p-e71fbec9.js";const M=(o=!0)=>!(!t.localizationLoaded||!t.isShippableCountry&&(o&&n("Checkout: not shippable country"),1)),N='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',P='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',_=class{constructor(s){o(this,s),this.applyStripeTheme=async()=>{var o,s,e,c;const t=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||C.appearance.theme;await l({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.colorPrimary,overrideSecondaryColor:null===(c=this.appearanceSettingsOverride)||void 0===c?void 0:c.colorSecondary,overrideTheme:this.isMobile?t:void 0})},this.getCurrentLocalePageEnum=()=>{switch(u.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.paymentError=!1,this.collapseReviewMobile=!1,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button"}async initCartInfoHandler(o){z(o.detail)}async closeDialogHandler(){A("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==u.step||m(),u.step="customer-info"}async buildCartAndInit(){if(C.checkoutSettings.buildCartDetail){n("build cart detail");const o=await C.checkoutSettings.buildCartDetail();await z(o)}if(!k.clientSecret){const o=await p();if(n(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}attachCheckout(){const o=C.checkoutSettings.placeOrderButtonSelector;o&&document.querySelectorAll(`${o}, ${this.domesticRedirectedBtnSelector}`).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if(M()){o.preventDefault(),o.stopPropagation(),n("zonos checkout button clicked"),k.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");A("zonos-checkout-start"),I("checkout_open")}catch(o){k.isFetchingSession=!1,g({messages:[x("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:x("Error creating Checkout")})}}})),o.removeAttribute("disabled"),o.setAttribute("data-zonos-checkout-attached","true"),o.matches(this.domesticRedirectedBtnSelector)&&(o.dispatchEvent(new CustomEvent("click")),r(),o.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}async init(){k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const e=new MutationObserver((async()=>{const c=document.querySelector(o),t=i();if(!c&&t){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(t),void e.disconnect()}const n=document.querySelector('select[name="shippingAddress.countryCode"]'),l=document.querySelector("#checkout-shipping-continue");n&&l&&(e.disconnect(),l.addEventListener("click",(async o=>{var s,e;const c=n.value;if(!c)return;if(a(c),!M(!1))return void r();const t=document.querySelector("form");if(!t)return;const i=new FormData(t),l=document.querySelector("input#addressLine1Input"),u={address1:null!==(s=i.get("shippingAddress.address1"))&&void 0!==s?s:l&&l.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(e=i.get("shippingAddress.stateOrProvince"))&&void 0!==e?e:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(u).some((o=>null==o)))return h("One or more shipping address field is missing",Object.entries(u)),void S({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(u))],metadata:{domain:window.location.hostname,storeId:C.storeId}});d({address1:u.address1,address2:u.address2,city:u.city,countryCode:u.countryCode,firstName:u.firstName,lastName:u.lastName,phone:u.phone,postalCode:u.postalCode,state:u.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));e.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:`${o.firstName} ${o.lastName}`,phone:o.phone}}});const o=setInterval((()=>{const s=window.Zonos.internationalHideSelector;if(!s)return void clearInterval(o);const e=M(!1),c=document.querySelectorAll(s);e?null==c||c.forEach((o=>{const s=o;s.setAttribute("data-zonos-checkout-original-display",s.style.display),s.style.display="none"})):null==c||c.forEach((o=>{const s=o,e=s.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(s).display;s.style.display=e||"initial"}))}),100),s=setInterval((()=>{k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(n("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(s)):n("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(s)}),1e4)}async setToFinishStep(o){u.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await f();const o=setInterval((()=>{!u.landedCostData&&k.isFetchingLandedCost||(u.landedCostData&&v(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{v(),this.submitLoading=!1}),500)}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0;try{await b(),v()}catch(o){h(o),this.paymentError=!0}this.submitLoading=!1}async handleFinishClick(){if(w(),this.preview)return u.step="customer-info",void await this.init();m();const o=window.location.href.split("?")[0];window.history.replaceState({},document.title,o),this.open=!1,window.location.reload()}async handleBackClick(){"customer-info"!==u.step?y():await this.closeDialogHandler()}handleWindowResize(){this.isMobile=L(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=L(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}componentWillLoad(){this.init(),this.isMobile=L(this.mobile),n(`mobile: ${this.isMobile}`)}disconnectedCallback(){w(),m()}render(){var o;const n="finish"!==u.step&&"error"!==u.step&&!k.stripeElements||k.isFetchingSession,{colorPrimary:i,colorSecondary:a,logoUrl:r,style:h}=B(C.appearance,this.appearanceSettingsOverride),d="ENABLED"===C.appearance.zonosAttribution,l=C.appearance.theme,z=i&&H(i)?"DARK":"LIGHT",m=this.isMobile?l:z,p=this.isMobile?void 0:a,{customMessages:g}=t,f=null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,v=this.getCurrentLocalePageEnum(),b=g.filter((o=>o.pageName===v)),w=()=>s("div",{class:"zonos--logo"},r&&s("img",{alt:`${C.organizationName} logo`,src:r,width:100})),y=()=>s("zonos-v-stack",null,w(),b.map((o=>s("zonos-custom-message",{icon:N,message:o.message}))),s("div",null,s("zonos-button",{class:"zonos--back-button",icon:s("zonos-icon",{"aria-label":"Back to previous step",content:'<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>'}),noBackground:!0,noPaddingLeft:!0,noPaddingRight:!0,onClick:()=>this.handleBackClick(),theme:m},x("Back")))),S=()=>s("div",{class:"zonos--content",style:{"--border-radius":O(h)}},"finish"!==u.step&&"error"!==u.step&&s(e,null,s("div",{class:"zonos--left","data-theme":m,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&y(),"customer-info"===u.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:p}),"shipping"===u.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:p}),"payment"===u.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:p})),s("div",{class:"zonos--right","data-theme":l},this.isMobile&&y(),!this.isMobile&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),s("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-cart-items",null))),s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:N,message:f}))))),("finish"===u.step||"error"===u.step)&&s("div",{class:"zonos--done","data-theme":l},s("div",{class:"zonos--header"},w(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:l})),s("zonos-checkout-finish",{borderRadius:h,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===u.step&&u.error?Object.assign(Object.assign({},u.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),s("zonos-checkout-footer",null));return s(c,{class:j(["zonos--checkout zonos--elements",d&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?S():s("zonos-dialog",{borderStyle:h,"data-theme":l,height:"980px",isLoading:n,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},S()))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}}};_.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-48) var(--amino-space-56) var(--amino-space-76)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12);padding-bottom:var(--amino-space-76)}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:var(--amino-space-0)}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";export{_ as zonos_checkout}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(r,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-56ba5cbf.system.js"],(function(e,o){"use strict";var t,n,i;return{setters:[function(o){t=o.p;n=o.b;e("setNonce",o.s)},function(e){i=e.g}],execute:function(){var e=this;var s=function(){var e=o.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};s().then((function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-faa0ab72.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}]]],["p-5d73cde0.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]]]]],["p-824882ce.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["p-58e2f6a1.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-314be538.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-50460bf4.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-af946fb3.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-d9ba11cf.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-121c551d.system",[[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-56318a1f.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-35e878eb.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],selectedItem:[32]}]]],["p-e28d648c.system",[[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-7736198d.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-e76069cc.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-3a406969.system",[[1,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}]]],["p-166ec0c2.system",[[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}],[1,"zonos-v-stack",{spacing:[2]}]]],["p-d93d74c1.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-card",{actions:[16],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-2eb62b45.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-86fe18ea.system",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],hasInvalidCharacters:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]}],[2,"zonos-link-authentication",{titleText:[1,"title-text"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-d1934261.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],defaultAddress:[16],disabled:[32],hasInvalidShippingCharacters:[32],hasInvalidBillingCharacters:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-checkout-footer",{showDialog:[32]},[[4,"click","handleGlobalClick"]]],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],disabled:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],footerRightAction:[16],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}]]]],o)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(r,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-56ba5cbf.system.js"],(function(e,o){"use strict";var t,n,i;return{setters:[function(o){t=o.p;n=o.b;e("setNonce",o.s)},function(e){i=e.g}],execute:function(){var e=this;var s=function(){var e=o.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};s().then((function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-3c2082c8.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}]]],["p-c6f186fe.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]]]]],["p-a38876df.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["p-58e2f6a1.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-314be538.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-50460bf4.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-af946fb3.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-c284e71c.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-121c551d.system",[[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-af3ff326.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-35e878eb.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],selectedItem:[32]}]]],["p-e28d648c.system",[[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-db49edae.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-e76069cc.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-3a406969.system",[[1,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}]]],["p-166ec0c2.system",[[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}],[1,"zonos-v-stack",{spacing:[2]}]]],["p-09c9bf58.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-card",{actions:[16],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-865900d4.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-a6a83331.system",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],hasInvalidCharacters:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]}],[2,"zonos-link-authentication",{titleText:[1,"title-text"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-fe3851a4.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],defaultAddress:[16],disabled:[32],hasInvalidShippingCharacters:[32],hasInvalidBillingCharacters:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-checkout-footer",{showDialog:[32]},[[4,"click","handleGlobalClick"]]],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],disabled:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],footerRightAction:[16],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}]]]],o)]}}))}))}))}}}));
@@ -1 +1 @@
1
- System.register(["./p-d1ab0823.system.js","./p-75490d7c.system.js","./p-23e7c655.system.js","./p-039803aa.system.js","./p-abe7524f.system.js","./p-95dee6f4.system.js","./p-c476a347.system.js"],(function(e){"use strict";var a,t,n,s,o,i,r,c,l;return{setters:[function(e){a=e.r;t=e.h;n=e.H},function(e){s=e.d},function(e){o=e.c},function(e){i=e.G;r=e.t;c=e.l},function(e){l=e.l},function(){},function(){}],execute:function(){var d=":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(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-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, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";var h=d;var g=e("zonos_card",function(){function e(e){a(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 t(n,{key:"b350f7a592ea35c3b6beaf5eefaa2ab0208975dd",style:{"--font-family":s()}},t("div",{key:"125e8b550cd8f371e28a012536722f48402774f2",class:o(["styled-card"]),style:{padding:this.spacing}},this.label&&t("header",{class:"card-header",style:{padding:this.spacing}},t("zonos-text",{type:"subheader"},this.label),t("h-stack",{spacing:8},this.actions)),t("slot",{key:"3cf038c62910ebac736ed1c37ecf1a490c8e1d0e"}),(this.footerActions||this.footerContent)&&t("footer",{class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},t("div",null,this.footerContent),t("h-stack",{spacing:8},this.footerActions))))};return e}());g.style=h;var f='<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 m=":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:var(--amino-space-16);padding-top:var(--amino-space-0)}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:var(--amino-space-8);gap:var(--amino-space-4);-ms-flex-align:center;align-items:center;border-radius:var(--amino-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(--amino-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var u=m;var p=e("zonos_language_select",function(){function e(e){var t=this;a(this,e);this.languageSelected=function(e){void i(e);t.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var a=c.selectedLocale;return t(n,{key:"d12676d6438941bb8d987826f68c1b72a7e02ccd",class:"zonos--elements",style:{"--font-family":s()}},t("div",{key:"259eaa6a8ae682cc96c98eaaab574757285188b9",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"88bff024a5f678b00bf4edd7b2497177a986af4c",handleOnClose:function(){return e.handleOnClose()},label:r("Select a language")}),t("div",{key:"be1d87991dec9ac2a3b530a0cf9129b9e191781b",class:"zonos--language-select-content"},l.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===a&&t("zonos-icon",{content:f,size:16}))})))))};return e}());p.style=u}}}));
1
+ System.register(["./p-d1ab0823.system.js","./p-75490d7c.system.js","./p-23e7c655.system.js","./p-eb5dc3ef.system.js","./p-abe7524f.system.js","./p-95dee6f4.system.js","./p-c476a347.system.js"],(function(e){"use strict";var a,t,n,s,o,i,r,c,l;return{setters:[function(e){a=e.r;t=e.h;n=e.H},function(e){s=e.d},function(e){o=e.c},function(e){i=e.G;r=e.t;c=e.l},function(e){l=e.l},function(){},function(){}],execute:function(){var d=":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(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-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, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";var h=d;var g=e("zonos_card",function(){function e(e){a(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 t(n,{key:"b350f7a592ea35c3b6beaf5eefaa2ab0208975dd",style:{"--font-family":s()}},t("div",{key:"125e8b550cd8f371e28a012536722f48402774f2",class:o(["styled-card"]),style:{padding:this.spacing}},this.label&&t("header",{class:"card-header",style:{padding:this.spacing}},t("zonos-text",{type:"subheader"},this.label),t("h-stack",{spacing:8},this.actions)),t("slot",{key:"3cf038c62910ebac736ed1c37ecf1a490c8e1d0e"}),(this.footerActions||this.footerContent)&&t("footer",{class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},t("div",null,this.footerContent),t("h-stack",{spacing:8},this.footerActions))))};return e}());g.style=h;var f='<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 m=":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:var(--amino-space-16);padding-top:var(--amino-space-0)}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:var(--amino-space-8);gap:var(--amino-space-4);-ms-flex-align:center;align-items:center;border-radius:var(--amino-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(--amino-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var u=m;var p=e("zonos_language_select",function(){function e(e){var t=this;a(this,e);this.languageSelected=function(e){void i(e);t.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var a=c.selectedLocale;return t(n,{key:"d12676d6438941bb8d987826f68c1b72a7e02ccd",class:"zonos--elements",style:{"--font-family":s()}},t("div",{key:"259eaa6a8ae682cc96c98eaaab574757285188b9",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"88bff024a5f678b00bf4edd7b2497177a986af4c",handleOnClose:function(){return e.handleOnClose()},label:r("Select a language")}),t("div",{key:"be1d87991dec9ac2a3b530a0cf9129b9e191781b",class:"zonos--language-select-content"},l.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===a&&t("zonos-icon",{content:f,size:16}))})))))};return e}());p.style=u}}}));
@@ -1 +1 @@
1
- import{r as o,c as t,h as e,H as i}from"./p-58127116.js";import{C as s,l as n,t as l}from"./p-6dc7222d.js";import{z as a}from"./p-9cdc6b5f.js";import{c as r}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as d}from"./p-5883217a.js";import"./p-e71fbec9.js";import"./p-3d4fc5aa.js";const m=class{constructor(e){o(this,e),this.closeDialog=t(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(a.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{countryLandedCost:t,selectedCountryCode:m}=n,c=(null==t?void 0:t.dutyDeminimus)?s(t.dutyDeminimus):null,g="CA"===n.selectedCountryCode?s(40):c,f=g?`${l("Spend")} ${g} ${l("duty free")}`:l("Duties will apply to all orders"),p=(null==t?void 0:t.vatTaxDeminimus)?s(t.vatTaxDeminimus):null,u="CA"===n.selectedCountryCode?s(150):p,b=u?`${l("Spend")} ${u} ${l("tax free")}`:l("Taxes will apply to all orders"),w=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),z=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:v}=n,x=`${l("Welcome to")} ${a.organizationName}!`,C=(null===(o=v.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||l("Know about duties and taxes before you buy. Shop with confidence!"),k=h(C),y=this.getCurrentPageEnum(),H=v.filter((o=>o.pageName===y));return e(i,{key:"d5ac86955cf9f9a22e47fe2154dee6e10f6a9361",class:"zonos--elements"},e("div",{key:"d34dd3f937330cd5fdd2d7a11dc321c215983146","aria-hidden":"true",class:r(["zonos--hello-dialog",w&&"zonos--hello-dialog-animate-from-left",z&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&e("div",null,e("div",{class:"zonos--hello-dialog-content"},e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),e("zonos-v-stack",{spacing:24},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:m}),e("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},e("zonos-text",{type:"boldSubheader"},x),e("zonos-text",{innerHTML:k,textColor:"gray-800"})),e("zonos-v-stack",{spacing:8},this.restrictedItems.map((o=>{var t;return o&&e("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(t=o.itemRestrictions)||void 0===t?void 0:t.map((o=>e("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),e("zonos-card",{spacing:"12px"},e("zonos-v-stack",{spacing:12},e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,f)),e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,b)))),H.map((o=>e("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),e("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&e("div",null,e("zonos-country-select",{handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&e("div",null,e("zonos-language-select",{handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};m.style=":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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{m as zonos_hello_dialog}
1
+ import{r as o,c as t,h as e,H as i}from"./p-58127116.js";import{C as s,l as n,t as l}from"./p-776f07e7.js";import{z as a}from"./p-9cdc6b5f.js";import{c as r}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as d}from"./p-5883217a.js";import"./p-e71fbec9.js";import"./p-3d4fc5aa.js";const m=class{constructor(e){o(this,e),this.closeDialog=t(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(a.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{countryLandedCost:t,selectedCountryCode:m}=n,c=(null==t?void 0:t.dutyDeminimus)?s(t.dutyDeminimus):null,g="CA"===n.selectedCountryCode?s(40):c,f=g?`${l("Spend")} ${g} ${l("duty free")}`:l("Duties will apply to all orders"),p=(null==t?void 0:t.vatTaxDeminimus)?s(t.vatTaxDeminimus):null,u="CA"===n.selectedCountryCode?s(150):p,b=u?`${l("Spend")} ${u} ${l("tax free")}`:l("Taxes will apply to all orders"),w=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),z=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:v}=n,x=`${l("Welcome to")} ${a.organizationName}!`,C=(null===(o=v.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||l("Know about duties and taxes before you buy. Shop with confidence!"),k=h(C),y=this.getCurrentPageEnum(),H=v.filter((o=>o.pageName===y));return e(i,{key:"d5ac86955cf9f9a22e47fe2154dee6e10f6a9361",class:"zonos--elements"},e("div",{key:"d34dd3f937330cd5fdd2d7a11dc321c215983146","aria-hidden":"true",class:r(["zonos--hello-dialog",w&&"zonos--hello-dialog-animate-from-left",z&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&e("div",null,e("div",{class:"zonos--hello-dialog-content"},e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),e("zonos-v-stack",{spacing:24},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:m}),e("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},e("zonos-text",{type:"boldSubheader"},x),e("zonos-text",{innerHTML:k,textColor:"gray-800"})),e("zonos-v-stack",{spacing:8},this.restrictedItems.map((o=>{var t;return o&&e("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(t=o.itemRestrictions)||void 0===t?void 0:t.map((o=>e("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),e("zonos-card",{spacing:"12px"},e("zonos-v-stack",{spacing:12},e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,f)),e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,b)))),H.map((o=>e("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),e("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&e("div",null,e("zonos-country-select",{handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&e("div",null,e("zonos-language-select",{handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};m.style=":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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{m as zonos_hello_dialog}