@zonos/elements 1.3.33 → 1.3.34

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 (84) hide show
  1. package/dist/cjs/{cart-11b47252.js → cart-42cc98d9.js} +0 -1
  2. package/dist/cjs/index.cjs.js +4 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{submitGtag-3a1d091e.js → submitGtag-09f2e437.js} +1 -1
  5. package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
  6. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
  7. package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-controller.cjs.entry.js +9 -2
  9. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-elements.cjs.js +1 -1
  12. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-notification_2.cjs.entry.js +1 -1
  16. package/dist/collection/components/main/zonos-controller.js +26 -1
  17. package/dist/collection/components/store/hello/localization.js +0 -1
  18. package/dist/esm/{cart-22ba08ec.js → cart-b9f15a63.js} +0 -1
  19. package/dist/esm/index.js +4 -4
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/{submitGtag-1435eec8.js → submitGtag-8b52cfdd.js} +1 -1
  22. package/dist/esm/zonos-address_8.entry.js +1 -1
  23. package/dist/esm/zonos-cart-items_12.entry.js +2 -2
  24. package/dist/esm/zonos-checkout.entry.js +2 -2
  25. package/dist/esm/zonos-controller.entry.js +9 -2
  26. package/dist/esm/zonos-country-flag.entry.js +1 -1
  27. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  28. package/dist/esm/zonos-elements.js +1 -1
  29. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  30. package/dist/esm/zonos-hello.entry.js +1 -1
  31. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  32. package/dist/esm/zonos-notification_2.entry.js +1 -1
  33. package/dist/esm-es5/{cart-22ba08ec.js → cart-b9f15a63.js} +1 -1
  34. package/dist/esm-es5/index.js +1 -1
  35. package/dist/esm-es5/loader.js +1 -1
  36. package/dist/esm-es5/{submitGtag-1435eec8.js → submitGtag-8b52cfdd.js} +1 -1
  37. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  38. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  39. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  40. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  41. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  42. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  43. package/dist/esm-es5/zonos-elements.js +1 -1
  44. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  45. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  46. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  47. package/dist/esm-es5/zonos-notification_2.entry.js +1 -1
  48. package/dist/scripts/index.d.ts +4 -0
  49. package/dist/scripts/index.js +1 -1
  50. package/dist/scripts/loadZonos.js +1 -1
  51. package/dist/scripts/zonos.js +1 -1
  52. package/dist/types/components/main/zonos-controller.d.ts +4 -0
  53. package/dist/types/components.d.ts +4 -0
  54. package/dist/zonos-elements/index.esm.js +1 -1
  55. package/dist/zonos-elements/{p-ddb1cfe2.entry.js → p-09f89949.entry.js} +1 -1
  56. package/dist/zonos-elements/{p-35604380.entry.js → p-0f58c8ab.entry.js} +1 -1
  57. package/dist/zonos-elements/{p-e09df465.entry.js → p-1a67d86d.entry.js} +1 -1
  58. package/dist/zonos-elements/{p-3b95a9a3.entry.js → p-1b33ed3b.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-56152835.system.entry.js → p-210f3405.system.entry.js} +1 -1
  60. package/dist/zonos-elements/{p-cdb53aaf.system.entry.js → p-27538d28.system.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-88129ef9.system.entry.js → p-3143bbf8.system.entry.js} +1 -1
  62. package/dist/zonos-elements/p-3625cdc7.system.entry.js +1 -0
  63. package/dist/zonos-elements/{p-11672829.js → p-3bc94271.js} +1 -1
  64. package/dist/zonos-elements/{p-6f589755.entry.js → p-4c49eb9b.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-b5825bb7.entry.js → p-4ff5c708.entry.js} +1 -1
  66. package/dist/zonos-elements/{p-dafa2b79.system.js → p-679e42d8.system.js} +1 -1
  67. package/dist/zonos-elements/{p-fe296307.entry.js → p-6a42fa2a.entry.js} +1 -1
  68. package/dist/zonos-elements/{p-74bd6150.entry.js → p-6f51a7ee.entry.js} +1 -1
  69. package/dist/zonos-elements/{p-450eb8ff.system.js → p-758c2820.system.js} +1 -1
  70. package/dist/zonos-elements/{p-dec21ca2.system.entry.js → p-7a3bf998.system.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-478357b0.system.entry.js → p-829bac92.system.entry.js} +1 -1
  72. package/dist/zonos-elements/{p-fa7e2a01.entry.js → p-83e265cf.entry.js} +1 -1
  73. package/dist/zonos-elements/p-88e5c33b.entry.js +1 -0
  74. package/dist/zonos-elements/{p-28e6963b.system.entry.js → p-9b525aaa.system.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-95d52a24.system.entry.js → p-af5fc5f7.system.entry.js} +1 -1
  76. package/dist/zonos-elements/{p-84997f2e.js → p-b5f769ba.js} +1 -1
  77. package/dist/zonos-elements/{p-7624013b.system.js → p-b65cc2cf.system.js} +1 -1
  78. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  79. package/dist/zonos-elements/{p-b8a4b345.system.entry.js → p-f64ac752.system.entry.js} +1 -1
  80. package/dist/zonos-elements/{p-a0b17e0b.system.entry.js → p-fdf79bff.system.entry.js} +1 -1
  81. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  82. package/package.json +1 -1
  83. package/dist/zonos-elements/p-36bb4360.entry.js +0 -1
  84. package/dist/zonos-elements/p-eb566457.system.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,d as i}from"./p-ce347974.js";import{l as e}from"./p-84997f2e.js";import{d as a}from"./p-5821856c.js";import{c as n}from"./p-b4b7f705.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const h=class{constructor(s){t(this,s),this.countryCode=e.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=a();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.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{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
1
+ import{r as t,h as s,H as o,d as i}from"./p-ce347974.js";import{l as a}from"./p-b5f769ba.js";import{d as e}from"./p-5821856c.js";import{c as n}from"./p-b4b7f705.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const h=class{constructor(s){t(this,s),this.countryCode=a.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=e();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.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{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
@@ -1 +1 @@
1
- import{r as o,h as t,H as s,d as n}from"./p-ce347974.js";import{d as e}from"./p-5821856c.js";import{c as i}from"./p-b4b7f705.js";import{h as a}from"./p-84997f2e.js";import{a as c}from"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const r=class{constructor(t){o(this,t),this.notificationArray=[]}async showNotification(o){const t=`id-${Math.random().toString(36).substring(2,9)}`,s=Object.assign(Object.assign({},o),{id:t,timeout:o.timeout||5e3,transitionClass:"",type:o.type||"success"});this.notificationArray=[...this.notificationArray,s],setTimeout((()=>{this.updateTransitionClass({id:t,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(t)}),s.timeout)}updateTransitionClass({id:o,transitionClass:t}){this.notificationArray=this.notificationArray.map((s=>s.id===o?Object.assign(Object.assign({},s),{transitionClass:t}):s))}removeNotification(o){this.updateTransitionClass({id:o,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((t=>t.id!==o))}),300)}render(){return t(s,{key:"17c08c90c6c1dfade4e43451c196127a0f53429e",class:i(["zonos--elements zonos--notification"]),style:{"--font-family":e()}},t("div",{key:"6624419d86a5c7518539069dbc5c9d7c08262c75",class:"zonos--notification-items"},this.notificationArray.map((o=>t("div",{"aria-hidden":"true",class:i(["zonos--notification-item",o.type,o.transitionClass]),key:o.id,onClick:()=>{this.removeNotification(o.id)}},t("zonos-text",{textColor:"gray-0"},o.message))))))}};r.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{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";const m=class{constructor(t){o(this,t),this.titleText=void 0,this.stripe=a.stripe,this.stripeElements=a.stripeElements}watchInitStripe(){if(!this.stripeElements)return;const o=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"}),t=this.el.querySelector(".zonos--payment-component");t?(o.mount(t),o.on("change",(o=>{a.stripePaymentEventData=o})),a.stripePaymentElement=o):c("Cannot find container element for paymentElement")}componentDidLoad(){this.watchInitStripe()}render(){return t(s,{key:"870d7a4cb6132332368d356488c5eedd1dea16f3",class:"zonos--payment zonos--elements"},this.titleText&&t("zonos-text",{key:"7aef62f6daae0c5b59caa685c4255fb78eebc1be",class:"zonos--title",type:"semiBoldLabel"},this.titleText),t("div",{key:"073976bceadf5f8efa78d0b1f6098e94bfa3d1a6",class:"zonos--payment-component"}))}get el(){return n(this)}static get watchers(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}}};m.style=".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:16px}";export{r as zonos_notification,m as zonos_payment}
1
+ import{r as o,h as t,H as s,d as n}from"./p-ce347974.js";import{d as e}from"./p-5821856c.js";import{c as i}from"./p-b4b7f705.js";import{h as a}from"./p-b5f769ba.js";import{a as c}from"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const r=class{constructor(t){o(this,t),this.notificationArray=[]}async showNotification(o){const t=`id-${Math.random().toString(36).substring(2,9)}`,s=Object.assign(Object.assign({},o),{id:t,timeout:o.timeout||5e3,transitionClass:"",type:o.type||"success"});this.notificationArray=[...this.notificationArray,s],setTimeout((()=>{this.updateTransitionClass({id:t,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(t)}),s.timeout)}updateTransitionClass({id:o,transitionClass:t}){this.notificationArray=this.notificationArray.map((s=>s.id===o?Object.assign(Object.assign({},s),{transitionClass:t}):s))}removeNotification(o){this.updateTransitionClass({id:o,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((t=>t.id!==o))}),300)}render(){return t(s,{key:"17c08c90c6c1dfade4e43451c196127a0f53429e",class:i(["zonos--elements zonos--notification"]),style:{"--font-family":e()}},t("div",{key:"6624419d86a5c7518539069dbc5c9d7c08262c75",class:"zonos--notification-items"},this.notificationArray.map((o=>t("div",{"aria-hidden":"true",class:i(["zonos--notification-item",o.type,o.transitionClass]),key:o.id,onClick:()=>{this.removeNotification(o.id)}},t("zonos-text",{textColor:"gray-0"},o.message))))))}};r.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{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";const m=class{constructor(t){o(this,t),this.titleText=void 0,this.stripe=a.stripe,this.stripeElements=a.stripeElements}watchInitStripe(){if(!this.stripeElements)return;const o=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"}),t=this.el.querySelector(".zonos--payment-component");t?(o.mount(t),o.on("change",(o=>{a.stripePaymentEventData=o})),a.stripePaymentElement=o):c("Cannot find container element for paymentElement")}componentDidLoad(){this.watchInitStripe()}render(){return t(s,{key:"870d7a4cb6132332368d356488c5eedd1dea16f3",class:"zonos--payment zonos--elements"},this.titleText&&t("zonos-text",{key:"7aef62f6daae0c5b59caa685c4255fb78eebc1be",class:"zonos--title",type:"semiBoldLabel"},this.titleText),t("div",{key:"073976bceadf5f8efa78d0b1f6098e94bfa3d1a6",class:"zonos--payment-component"}))}get el(){return n(this)}static get watchers(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}}};m.style=".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:16px}";export{r as zonos_notification,m as zonos_payment}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(n,e,r,t){function o(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,i){function u(n){try{a(t.next(n))}catch(n){i(n)}}function s(n){try{a(t["throw"](n))}catch(n){i(n)}}function a(n){n.done?r(n.value):o(n.value).then(u,s)}a((t=t.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return a([n,e])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(r=0)),r)try{if(t=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(n,r)}catch(n){s=[6,n];o=0}finally{t=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-63db40b9.system.js"],(function(n){"use strict";var e,r;return{setters:[function(n){e=n.l;r=n.a}],execute:function(){var t=this;var o=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var r=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var t=["qa.js.zonos.com"];var o=new URL(e).origin;var i=r.some((function(n){return o.includes(n)}));var u=t.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var i=["jsdelivr","unpkg","vercel"];var u=function(n){var e=i.indexOf(n);var r=i[e+1];return r||null};var s=function(n){if(!n){return null}var e=new URL(n).searchParams;var r=e.get("zonosQaUrl");if(!r){return null}var t=/[^a-zA-Z0-9-_]+/.test(r);if(!!t){return null}return r};var a=function(){if(typeof window==="undefined"){return null}var n=s(window.location.href);if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var r="preview.js.zonos.com";var t="https://".concat(n,".").concat(r);e("[ZONOS-WARNING] using '".concat(t,"' for loading script"),"warn");void fetch(t).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(t,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var r="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",r);window.location.reload();return null}));return t};var c="https://js.stripe.com/v3";var l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var f=function(){var n=document.querySelectorAll('script[src^="'.concat(c,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(!l.test(r.src)){continue}return r}return null};var v=null;var m=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(c).concat(e);var o=document.head||document.body;if(!o){r("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}o.appendChild(t);return t};var w=function(n){if(v!==null){return v}v=new Promise((function(e,r){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(d)}if(window.Stripe){e(window.Stripe);return}try{var t=f();if(t&&n){console.warn(d)}else if(!t){t=m(n)}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{r(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(n){r(n);return}}));return v};var p=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var h=function(n,e,r){if(n===null){return null}var t=n.apply(undefined,e);p(t,r);return t};var y=Promise.resolve().then((function(){return w(null)}));var z=false;y.catch((function(n){if(!z){console.warn(n)}}));var g=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(r){z=true;e=Date.now();return[2,y.then((function(r){return h(r,n,e)}))]}))}))};var j;var b=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=o({loadScriptSrc:n===null||n===void 0?void 0:n.src}),r=e.currentLoadScriptUrl,t=e.isWhiteListed;if(t){return r}return null}();var k="https://v1.3.33.js.zonos.com";var S=b||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.33";var O="https://unpkg.com/@zonos/elements@1.3.33";var _="jsdelivr";var L="https://rsms.me";var N="https://fonts.googleapis.com";var A=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;var R=function(){function n(){}return n}();n("Zonos",R);j=R;R.doneInit=false;R.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);R.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);R.isBigCommerce=false;R.isNpm=true;R.zonosQaUrl=null;R.version="v".concat("1.3.33");R.modeAlerted=false;R.tempCartData=null;R.getCurrentTimestamp=function(){return(new Date).getTime()};R.zonosController=null;R.init=function(n){return __awaiter(t,[n],void 0,(function(n){var t=n.appearance,o=n.checkoutSettings,i=n.currencyConverter,u=n.helloSettings,s=n.onCountryChange,a=n.overrideCurrencyFormat,c=n.storeId,l=n.zonosApiKey;return __generator(this,(function(n){if(j.doneInit){return[2]}e("====== ZONOS DEBUG MODE: on (".concat(j.version,") ======"));if(!l){r("Missing Zonos API key");return[2]}j.zonosApiKey=l;j.storeId=c;e("init zonos");j.injectZonosCdn();j.injectZonosCss();j.injectFonts();j.injectController({config:{appearance:t,checkoutSettings:o,currencyConverter:i,helloSettings:u,onCountryChange:s,overrideCurrencyFormat:a},zonosApiKey:l});j.doneInit=true;return[2]}))}))};R.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};R.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};R.showNotification=function(n){var e;void((e=j.zonosController)===null||e===void 0?void 0:e.showNotification(n))};R.updateOrganizationName=function(n){var e;void((e=j.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};R.disablePlaceOrderButtons=function(n){var e=n.autoEnable,r=e===void 0?true:e,t=n.config,o=n.disable,i=n.placeOrderButtonSelector;var u;if((u=t.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var a=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};s.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(o){n.setAttribute("disabled","true");n.addEventListener("click",a)}else{n.removeAttribute("disabled");n.removeEventListener("click",a)}}));if(r&&o){setTimeout((function(){s.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",a)}))}),5e3)}}};R.injectController=function(n){var o=n.config,i=n.zonosApiKey;var u;if(document.querySelector("zonos-controller")){return}if((u=o.checkoutSettings)===null||u===void 0?void 0:u.placeOrderButtonSelector){var s=o.checkoutSettings.placeOrderButtonSelector;j.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s});var a=new MutationObserver((function(){j.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s})}));a.observe(document.body,{childList:true,subtree:true})}var c=document.createElement("zonos-controller");c.config=o;c.zonosApiKey=i;c.addEventListener("stripeInitEvent",(function(n){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:t=n.detail;e("loading Stripe");return[4,g(t.publishableKey)];case 1:o=i.sent();if(!o){r("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;void c.initCheckoutElement(o);return[2]}}))}))}));document.body.appendChild(c);j.zonosController=c;e("Zonos controller injected!")};R.injectScript=function(n){var t=n.cdnType,o=n.isModule,i=n.theRestUrl;var s=j.getZonosUrl(t);var a="".concat(s,"/").concat(i);var c=function(){var n=document.querySelector('script[src="'.concat(a,'"]'));return!!n};if(c()){e('Zonos script "'.concat(a,'" already exists in the document'),"warn");return}var l=document.head||document.body;var d=document.createElement("script");if(!!o){d.type="module"}else{d.noModule=true}d.src=a;d.crossOrigin="anonymous";d.onerror=function(){r("Failed to load ".concat(d.src));var n=u(t);if(!n){return}j.injectScript({cdnType:n,isModule:o,theRestUrl:i})};l.appendChild(d)};R.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return S;case"unpkg":return O;default:return k}};if(j.isNpm){var r=a();return r||e()}return e()};R.injectZonosCdn=function(){j.injectScript({cdnType:_,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});j.injectScript({cdnType:_,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});e("Zonos cdn script injected!")};R.injectStylesheet=function(n){var e=n.cdnType,t=n.theRestUrl;var o=j.getZonosUrl(e);var i=document.head||document.body;var s=document.createElement("link");s.rel="preconnect";s.href="".concat(k,"/");i.appendChild(s);var a=document.createElement("link");a.rel="stylesheet";a.href="".concat(o,"/").concat(t);a.onerror=function(){r("Failed to load ".concat(a.href));var n=u(e);if(!n){return}j.injectStylesheet({cdnType:n,theRestUrl:t})};i.appendChild(a)};R.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){e("Zonos style links already injected","warn");return}j.injectStylesheet({cdnType:_,theRestUrl:"dist/zonos-elements/zonos-elements.css"});e("Zonos style css injected!")};R.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(L,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(A.test(r.href)){continue}return r}return null};if(n()){e("Inter font already injected","warn");return}var r=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=L;r.appendChild(t);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(L,"/inter/inter.css");r.appendChild(o);e("Zonos font injected!")};R.setupGoogleFont=function(n){var e;void((e=j.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};R.injectSupportGoogleFont=function(n){var r;e("[FONT] injecting ".concat(n));var t=(r=n.match(/family=(.*?):/))===null||r===void 0?void 0:r[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(N,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=N;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){e("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);e("[FONT] ".concat(t," font injected!"))}}}}));
1
+ var __awaiter=this&&this.__awaiter||function(n,e,r,t){function o(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,i){function u(n){try{a(t.next(n))}catch(n){i(n)}}function s(n){try{a(t["throw"](n))}catch(n){i(n)}}function a(n){n.done?r(n.value):o(n.value).then(u,s)}a((t=t.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return a([n,e])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(r=0)),r)try{if(t=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(n,r)}catch(n){s=[6,n];o=0}finally{t=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-63db40b9.system.js"],(function(n){"use strict";var e,r;return{setters:[function(n){e=n.l;r=n.a}],execute:function(){var t=this;var o=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var r=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var t=["qa.js.zonos.com"];var o=new URL(e).origin;var i=r.some((function(n){return o.includes(n)}));var u=t.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var i=["jsdelivr","unpkg","vercel"];var u=function(n){var e=i.indexOf(n);var r=i[e+1];return r||null};var s=function(n){if(!n){return null}var e=new URL(n).searchParams;var r=e.get("zonosQaUrl");if(!r){return null}var t=/[^a-zA-Z0-9-_]+/.test(r);if(!!t){return null}return r};var a=function(){if(typeof window==="undefined"){return null}var n=s(window.location.href);if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var r="preview.js.zonos.com";var t="https://".concat(n,".").concat(r);e("[ZONOS-WARNING] using '".concat(t,"' for loading script"),"warn");void fetch(t).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(t,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var r="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",r);window.location.reload();return null}));return t};var c="https://js.stripe.com/v3";var l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var f=function(){var n=document.querySelectorAll('script[src^="'.concat(c,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(!l.test(r.src)){continue}return r}return null};var v=null;var m=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(c).concat(e);var o=document.head||document.body;if(!o){r("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}o.appendChild(t);return t};var w=function(n){if(v!==null){return v}v=new Promise((function(e,r){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(d)}if(window.Stripe){e(window.Stripe);return}try{var t=f();if(t&&n){console.warn(d)}else if(!t){t=m(n)}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{r(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(n){r(n);return}}));return v};var p=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var h=function(n,e,r){if(n===null){return null}var t=n.apply(undefined,e);p(t,r);return t};var y=Promise.resolve().then((function(){return w(null)}));var z=false;y.catch((function(n){if(!z){console.warn(n)}}));var g=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(r){z=true;e=Date.now();return[2,y.then((function(r){return h(r,n,e)}))]}))}))};var j;var b=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=o({loadScriptSrc:n===null||n===void 0?void 0:n.src}),r=e.currentLoadScriptUrl,t=e.isWhiteListed;if(t){return r}return null}();var k="https://v1.3.34.js.zonos.com";var S=b||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.34";var O="https://unpkg.com/@zonos/elements@1.3.34";var _="jsdelivr";var L="https://rsms.me";var N="https://fonts.googleapis.com";var A=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;var R=function(){function n(){}return n}();n("Zonos",R);j=R;R.doneInit=false;R.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);R.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);R.isBigCommerce=false;R.isNpm=true;R.zonosQaUrl=null;R.version="v".concat("1.3.34");R.modeAlerted=false;R.tempCartData=null;R.getCurrentTimestamp=function(){return(new Date).getTime()};R.zonosController=null;R.init=function(n){return __awaiter(t,[n],void 0,(function(n){var t=n.appearance,o=n.checkoutSettings,i=n.currencyConverter,u=n.helloSettings,s=n.onCountryChange,a=n.overrideCurrencyFormat,c=n.storeId,l=n.zonosApiKey;return __generator(this,(function(n){if(j.doneInit){return[2]}e("====== ZONOS DEBUG MODE: on (".concat(j.version,") ======"));if(!l){r("Missing Zonos API key");return[2]}j.zonosApiKey=l;j.storeId=c;e("init zonos");j.injectZonosCdn();j.injectZonosCss();j.injectFonts();j.injectController({config:{appearance:t,checkoutSettings:o,currencyConverter:i,helloSettings:u,onCountryChange:s,overrideCurrencyFormat:a},zonosApiKey:l});j.doneInit=true;return[2]}))}))};R.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};R.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};R.showNotification=function(n){var e;void((e=j.zonosController)===null||e===void 0?void 0:e.showNotification(n))};R.updateOrganizationName=function(n){var e;void((e=j.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};R.disablePlaceOrderButtons=function(n){var e=n.autoEnable,r=e===void 0?true:e,t=n.config,o=n.disable,i=n.placeOrderButtonSelector;var u;if((u=t.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var a=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};s.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(o){n.setAttribute("disabled","true");n.addEventListener("click",a)}else{n.removeAttribute("disabled");n.removeEventListener("click",a)}}));if(r&&o){setTimeout((function(){s.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",a)}))}),5e3)}}};R.injectController=function(n){var o=n.config,i=n.zonosApiKey;var u;if(document.querySelector("zonos-controller")){return}if((u=o.checkoutSettings)===null||u===void 0?void 0:u.placeOrderButtonSelector){var s=o.checkoutSettings.placeOrderButtonSelector;j.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s});var a=new MutationObserver((function(){j.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s})}));a.observe(document.body,{childList:true,subtree:true})}var c=document.createElement("zonos-controller");c.config=o;c.zonosApiKey=i;c.addEventListener("stripeInitEvent",(function(n){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:t=n.detail;e("loading Stripe");return[4,g(t.publishableKey)];case 1:o=i.sent();if(!o){r("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;void c.initCheckoutElement(o);return[2]}}))}))}));document.body.appendChild(c);j.zonosController=c;e("Zonos controller injected!")};R.injectScript=function(n){var t=n.cdnType,o=n.isModule,i=n.theRestUrl;var s=j.getZonosUrl(t);var a="".concat(s,"/").concat(i);var c=function(){var n=document.querySelector('script[src="'.concat(a,'"]'));return!!n};if(c()){e('Zonos script "'.concat(a,'" already exists in the document'),"warn");return}var l=document.head||document.body;var d=document.createElement("script");if(!!o){d.type="module"}else{d.noModule=true}d.src=a;d.crossOrigin="anonymous";d.onerror=function(){r("Failed to load ".concat(d.src));var n=u(t);if(!n){return}j.injectScript({cdnType:n,isModule:o,theRestUrl:i})};l.appendChild(d)};R.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return S;case"unpkg":return O;default:return k}};if(j.isNpm){var r=a();return r||e()}return e()};R.injectZonosCdn=function(){j.injectScript({cdnType:_,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});j.injectScript({cdnType:_,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});e("Zonos cdn script injected!")};R.injectStylesheet=function(n){var e=n.cdnType,t=n.theRestUrl;var o=j.getZonosUrl(e);var i=document.head||document.body;var s=document.createElement("link");s.rel="preconnect";s.href="".concat(k,"/");i.appendChild(s);var a=document.createElement("link");a.rel="stylesheet";a.href="".concat(o,"/").concat(t);a.onerror=function(){r("Failed to load ".concat(a.href));var n=u(e);if(!n){return}j.injectStylesheet({cdnType:n,theRestUrl:t})};i.appendChild(a)};R.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){e("Zonos style links already injected","warn");return}j.injectStylesheet({cdnType:_,theRestUrl:"dist/zonos-elements/zonos-elements.css"});e("Zonos style css injected!")};R.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(L,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(A.test(r.href)){continue}return r}return null};if(n()){e("Inter font already injected","warn");return}var r=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=L;r.appendChild(t);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(L,"/inter/inter.css");r.appendChild(o);e("Zonos font injected!")};R.setupGoogleFont=function(n){var e;void((e=j.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};R.injectSupportGoogleFont=function(n){var r;e("[FONT] injecting ".concat(n));var t=(r=n.match(/family=(.*?):/))===null||r===void 0?void 0:r[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(N,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=N;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){e("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);e("[FONT] ".concat(t," font injected!"))}}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function l(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):r(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,r&&(i=l[0]&2?r["return"]:l[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;if(r=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;r=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){t.label=l[1];break}if(l[0]===6&&t.label<i[1]){t.label=i[1];i=l;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(l);break}if(i[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];r=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-dafa2b79.system.js","./p-23e7c655.system.js","./p-63db40b9.system.js","./p-bc7bf53e.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(e){"use strict";var o,t,n,r,i,s,l,a,h,d,u,f,c,m,v,g,w,p,z,b,x,y,k,_;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){r=e._;i=e.e;s=e.i;l=e.f;a=e.z;h=e.g;d=e.m},function(e){u=e.r;f=e.l;c=e.u;m=e.t;v=e.w;g=e.x;w=e.y;p=e.z;z=e.A;b=e.B},function(e){x=e.c},function(e){y=e.a;k=e.l},function(e){_=e.g},function(){},function(){}],execute:function(){var L=this;var T=r;var j=function(){return T.Date.now()};var E=j;var O=/\s/;function S(e){var o=e.length;while(o--&&O.test(e.charAt(o))){}return o}var C=S;var I=C;var D=/^\s+/;function X(e){return e?e.slice(0,I(e)+1).replace(D,""):e}var A=X;var B=i,R=s;var H="[object Symbol]";function N(e){return typeof e=="symbol"||R(e)&&B(e)==H}var M=N;var P=A,F=l,$=M;var U=0/0;var W=/^[-+]0x[0-9a-f]+$/i;var G=/^0b[01]+$/i;var K=/^0o[0-7]+$/i;var Y=parseInt;function q(e){if(typeof e=="number"){return e}if($(e)){return U}if(F(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=F(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=P(e);var t=G.test(e);return t||K.test(e)?Y(e.slice(2),t?2:8):W.test(e)?U:+e}var J=q;var Q=l,V=E,Z=J;var ee="Expected a function";var oe=Math.max,te=Math.min;function ne(e,o,t){var n,r,i,s,l,a,h=0,d=false,u=false,f=true;if(typeof e!="function"){throw new TypeError(ee)}o=Z(o)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;i=u?oe(Z(t.maxWait)||0,o):i;f="trailing"in t?!!t.trailing:f}function c(o){var t=n,i=r;n=r=undefined;h=o;s=e.apply(i,t);return s}function m(e){h=e;l=setTimeout(w,o);return d?c(e):s}function v(e){var t=e-a,n=e-h,r=o-t;return u?te(r,i-n):r}function g(e){var t=e-a,n=e-h;return a===undefined||t>=o||t<0||u&&n>=i}function w(){var e=V();if(g(e)){return p(e)}l=setTimeout(w,v(e))}function p(e){l=undefined;if(f&&n){return c(e)}n=r=undefined;return s}function z(){if(l!==undefined){clearTimeout(l)}h=0;n=a=r=l=undefined}function b(){return l===undefined?s:p(V())}function x(){var e=V(),t=g(e);n=arguments;r=this;a=e;if(t){if(l===undefined){return m(a)}if(u){clearTimeout(l);l=setTimeout(w,o);return c(a)}}if(l===undefined){l=setTimeout(w,o)}return s}x.cancel=z;x.flush=b;return x}var re=ne;var ie=function(e){return __awaiter(L,[e],void 0,(function(e){var o,t,n,r,i,s;var l=e.items,a=e.shipFrom,h=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");n={items:l,shipFrom:a,shipTo:h};return[4,u(t,{body:n,method:"POST"})];case 1:r=e.sent(),i=r.errors,s=r.json;if(i.length||!s){y("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,s.filter(Boolean)]}}))}))};var se=function(e){return __awaiter(L,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:if(!e.length){return[2,[]]}o=f.selectedCountryCode;if(!o){y("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,ie({items:t,shipFrom:"AD",shipTo:o})];case 1:n=i.sent();r=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2,r]}}))}))};var le=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var ae=function(){var e=a.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,r=e.productListUrlPattern;if(le(o)){return"cart"}if(le(n)){return"productDetail"}if(le(r)){return"productList"}if(le(t)){return"home"}return""};var he=function(){var e,o;var t=a.helloSettings,n=t.productAddToCartElementSelector,r=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!r){y("Hello Could not check item restrictions - must provide title and description selectors.")}var l=i&&c(i)&&document.querySelectorAll(i)||[];var h=r&&c(r)&&document.querySelectorAll(r)||[];if(l.length!==h.length){y("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&c(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var f=[];for(var m=0;m<l.length;m++){var v=l[m];var g=h[m];var w=u[m];if(v&&g){var p={cartButtonNode:w||null,description:((e=g.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=v.textContent)===null||o===void 0?void 0:o.trim())||""};f.push(p)}}return f};var de=":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{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";var ue=de;var fe=3e3;var ce=500;var me=e("zonos_hello",function(){function e(e){var t=this;o(this,e);this.getHelloPeekMessage=function(e){var o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=m("click to learn more");var r=a.currentHelloPage==="productDetail"?m("Restricted item"):m("Restricted items found");return"".concat(r," - ").concat(n)}switch(a.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(!o||a.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,se(e)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(a.organizationName);var e=a.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;var r=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){t.showPeekMessage=false}),fe)}}),r)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var r=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(r){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var r=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=he();e=this.productsOnPage.filter((function(e){return!r.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=i.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=re((function(){var e=a.helloSettings.productTitleElementSelector;if(e){var o=he();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&v(e.searchParams);if(o!==f.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;a.currentHelloPage=ae();var n=new URL(window.location.href);var r=v(n.searchParams);if(!r){g(f.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&e==="relative"){var o=_(t.helloRef);return o}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!f.localizationLoaded){return false}var o=a.helloSettings.showForCountries;if(e){if(!f.isShippableCountry){k("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return f.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.includes(f.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=a.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false}e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(a.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(a.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!f.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}w();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,p(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,z(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,b({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){re(this.render.bind(this),ce)};e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,r;if(this.isHelloWidgetRendered){return}if(f.selectedCountryCode&&typeof a.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((r=(n=a.helloSettings).onInitSuccess)===null||r===void 0?void 0:r.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme)}};e.prototype.render=function(){var e=this;var o,r;var i=(o=a.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return new RegExp(e).test(window.location.href)}));if(i){k("Hello is excluded on this url","warn");return null}var s=f.selectedCountryCode,l=f.targetCurrency;var h=this.mobileLocationOverride||a.helloSettings.mobileLocation;var u=window.innerWidth<768;var c=this.animateFromLeftOverride||u&&h.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var m=h.includes("TOP");var v=d(a.appearance,this.appearanceSettingsOverride);var g=v.theme;var w=(r=this.allRestrictedItems)===null||r===void 0?void 0:r.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(a.organizationName);var p=this.shouldRenderHello()&&!!s;if(p&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:s,currencyCode:l})}return t(n,{class:"zonos--hello zonos--elements","data-theme":g},p&&t("div",{class:"zonos--hello-wrapper"},t("button",{class:x(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",c&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:x(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:v,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:w,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}());me.style=ue}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function l(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):r(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,r&&(i=l[0]&2?r["return"]:l[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;if(r=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;r=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){t.label=l[1];break}if(l[0]===6&&t.label<i[1]){t.label=i[1];i=l;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(l);break}if(i[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];r=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-679e42d8.system.js","./p-23e7c655.system.js","./p-63db40b9.system.js","./p-bc7bf53e.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(e){"use strict";var o,t,n,r,i,s,l,a,h,d,u,f,c,m,v,g,w,p,z,b,x,y,k,_;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){r=e._;i=e.e;s=e.i;l=e.f;a=e.z;h=e.g;d=e.m},function(e){u=e.r;f=e.l;c=e.u;m=e.t;v=e.w;g=e.x;w=e.y;p=e.z;z=e.A;b=e.B},function(e){x=e.c},function(e){y=e.a;k=e.l},function(e){_=e.g},function(){},function(){}],execute:function(){var L=this;var T=r;var j=function(){return T.Date.now()};var E=j;var O=/\s/;function S(e){var o=e.length;while(o--&&O.test(e.charAt(o))){}return o}var C=S;var I=C;var D=/^\s+/;function X(e){return e?e.slice(0,I(e)+1).replace(D,""):e}var A=X;var B=i,R=s;var H="[object Symbol]";function N(e){return typeof e=="symbol"||R(e)&&B(e)==H}var M=N;var P=A,F=l,$=M;var U=0/0;var W=/^[-+]0x[0-9a-f]+$/i;var G=/^0b[01]+$/i;var K=/^0o[0-7]+$/i;var Y=parseInt;function q(e){if(typeof e=="number"){return e}if($(e)){return U}if(F(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=F(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=P(e);var t=G.test(e);return t||K.test(e)?Y(e.slice(2),t?2:8):W.test(e)?U:+e}var J=q;var Q=l,V=E,Z=J;var ee="Expected a function";var oe=Math.max,te=Math.min;function ne(e,o,t){var n,r,i,s,l,a,h=0,d=false,u=false,f=true;if(typeof e!="function"){throw new TypeError(ee)}o=Z(o)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;i=u?oe(Z(t.maxWait)||0,o):i;f="trailing"in t?!!t.trailing:f}function c(o){var t=n,i=r;n=r=undefined;h=o;s=e.apply(i,t);return s}function m(e){h=e;l=setTimeout(w,o);return d?c(e):s}function v(e){var t=e-a,n=e-h,r=o-t;return u?te(r,i-n):r}function g(e){var t=e-a,n=e-h;return a===undefined||t>=o||t<0||u&&n>=i}function w(){var e=V();if(g(e)){return p(e)}l=setTimeout(w,v(e))}function p(e){l=undefined;if(f&&n){return c(e)}n=r=undefined;return s}function z(){if(l!==undefined){clearTimeout(l)}h=0;n=a=r=l=undefined}function b(){return l===undefined?s:p(V())}function x(){var e=V(),t=g(e);n=arguments;r=this;a=e;if(t){if(l===undefined){return m(a)}if(u){clearTimeout(l);l=setTimeout(w,o);return c(a)}}if(l===undefined){l=setTimeout(w,o)}return s}x.cancel=z;x.flush=b;return x}var re=ne;var ie=function(e){return __awaiter(L,[e],void 0,(function(e){var o,t,n,r,i,s;var l=e.items,a=e.shipFrom,h=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");n={items:l,shipFrom:a,shipTo:h};return[4,u(t,{body:n,method:"POST"})];case 1:r=e.sent(),i=r.errors,s=r.json;if(i.length||!s){y("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,s.filter(Boolean)]}}))}))};var se=function(e){return __awaiter(L,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:if(!e.length){return[2,[]]}o=f.selectedCountryCode;if(!o){y("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,ie({items:t,shipFrom:"AD",shipTo:o})];case 1:n=i.sent();r=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2,r]}}))}))};var le=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var ae=function(){var e=a.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,r=e.productListUrlPattern;if(le(o)){return"cart"}if(le(n)){return"productDetail"}if(le(r)){return"productList"}if(le(t)){return"home"}return""};var he=function(){var e,o;var t=a.helloSettings,n=t.productAddToCartElementSelector,r=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!r){y("Hello Could not check item restrictions - must provide title and description selectors.")}var l=i&&c(i)&&document.querySelectorAll(i)||[];var h=r&&c(r)&&document.querySelectorAll(r)||[];if(l.length!==h.length){y("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&c(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var f=[];for(var m=0;m<l.length;m++){var v=l[m];var g=h[m];var w=u[m];if(v&&g){var p={cartButtonNode:w||null,description:((e=g.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=v.textContent)===null||o===void 0?void 0:o.trim())||""};f.push(p)}}return f};var de=":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{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";var ue=de;var fe=3e3;var ce=500;var me=e("zonos_hello",function(){function e(e){var t=this;o(this,e);this.getHelloPeekMessage=function(e){var o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=m("click to learn more");var r=a.currentHelloPage==="productDetail"?m("Restricted item"):m("Restricted items found");return"".concat(r," - ").concat(n)}switch(a.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(!o||a.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,se(e)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(a.organizationName);var e=a.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;var r=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){t.showPeekMessage=false}),fe)}}),r)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var r=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(r){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var r=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=he();e=this.productsOnPage.filter((function(e){return!r.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=i.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=re((function(){var e=a.helloSettings.productTitleElementSelector;if(e){var o=he();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&v(e.searchParams);if(o!==f.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;a.currentHelloPage=ae();var n=new URL(window.location.href);var r=v(n.searchParams);if(!r){g(f.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&e==="relative"){var o=_(t.helloRef);return o}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!f.localizationLoaded){return false}var o=a.helloSettings.showForCountries;if(e){if(!f.isShippableCountry){k("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return f.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.includes(f.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=a.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false}e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(a.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(a.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!f.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}w();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,p(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,z(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,b({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){re(this.render.bind(this),ce)};e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,r;if(this.isHelloWidgetRendered){return}if(f.selectedCountryCode&&typeof a.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((r=(n=a.helloSettings).onInitSuccess)===null||r===void 0?void 0:r.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme)}};e.prototype.render=function(){var e=this;var o,r;var i=(o=a.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return new RegExp(e).test(window.location.href)}));if(i){k("Hello is excluded on this url","warn");return null}var s=f.selectedCountryCode,l=f.targetCurrency;var h=this.mobileLocationOverride||a.helloSettings.mobileLocation;var u=window.innerWidth<768;var c=this.animateFromLeftOverride||u&&h.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var m=h.includes("TOP");var v=d(a.appearance,this.appearanceSettingsOverride);var g=v.theme;var w=(r=this.allRestrictedItems)===null||r===void 0?void 0:r.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(a.organizationName);var p=this.shouldRenderHello()&&!!s;if(p&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:s,currencyCode:l})}return t(n,{class:"zonos--hello zonos--elements","data-theme":g},p&&t("div",{class:"zonos--hello-wrapper"},t("button",{class:x(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",c&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:x(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:v,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:w,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}());me.style=ue}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,n,o,e){function s(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,i){function a(t){try{c(e.next(t))}catch(t){i(t)}}function r(t){try{c(e["throw"](t))}catch(t){i(t)}}function c(t){t.done?o(t.value):s(t.value).then(a,r)}c((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,s,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(n){return c([t,n])}}function c(r){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(o=0)),o)try{if(e=1,s&&(i=r[0]&2?s["return"]:r[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,r[1])).done)return i;if(s=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;s=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){o.label=r[1];break}if(r[0]===6&&o.label<i[1]){o.label=i[1];i=r;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(r);break}if(i[2])o.ops.pop();o.trys.pop();continue}r=n.call(t,o)}catch(t){r=[6,t];s=0}finally{e=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,o){if(o||arguments.length===2)for(var e=0,s=n.length,i;e<s;e++){if(i||!(e in n)){if(!i)i=Array.prototype.slice.call(n,0,e);i[e]=n[e]}}return t.concat(i||Array.prototype.slice.call(n))};System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-dafa2b79.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(t){"use strict";var n,o,e,s,i,a,r,c;return{setters:[function(t){n=t.r;o=t.h;e=t.H;s=t.d},function(t){i=t.d},function(t){a=t.c},function(t){r=t.h},function(t){c=t.a},function(){},function(){}],execute:function(){var f=":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{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var m=f;var u=t("zonos_notification",function(){function t(t){n(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o;var e=this;return __generator(this,(function(s){n="id-".concat(Math.random().toString(36).substring(2,9));o=Object.assign(Object.assign({},t),{id:n,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[o],false);setTimeout((function(){e.updateTransitionClass({id:n,transitionClass:"show"})}),50);setTimeout((function(){e.removeNotification(n)}),o.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var n=t.id,o=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===n){return Object.assign(Object.assign({},t),{transitionClass:o})}return t}))};t.prototype.removeNotification=function(t){var n=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){n.notificationArray=n.notificationArray.filter((function(n){return n.id!==t}))}),300)};t.prototype.render=function(){var t=this;return o(e,{key:"17c08c90c6c1dfade4e43451c196127a0f53429e",class:a(["zonos--elements zonos--notification"]),style:{"--font-family":i()}},o("div",{key:"6624419d86a5c7518539069dbc5c9d7c08262c75",class:"zonos--notification-items"},this.notificationArray.map((function(n){return o("div",{"aria-hidden":"true",class:a(["zonos--notification-item",n.type,n.transitionClass]),key:n.id,onClick:function(){t.removeNotification(n.id)}},o("zonos-text",{textColor:"gray-0"},n.message))}))))};return t}());u.style=m;var h=".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:16px}";var l=h;var y=t("zonos_payment",function(){function t(t){n(this,t);this.titleText=undefined;this.stripe=r.stripe;this.stripeElements=r.stripeElements}t.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var t=r.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var n=this.el.querySelector(".zonos--payment-component");if(!n){c("Cannot find container element for paymentElement");return}t.mount(n);t.on("change",(function(t){r.stripePaymentEventData=t}));r.stripePaymentElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return o(e,{key:"870d7a4cb6132332368d356488c5eedd1dea16f3",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"7aef62f6daae0c5b59caa685c4255fb78eebc1be",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"073976bceadf5f8efa78d0b1f6098e94bfa3d1a6",class:"zonos--payment-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());y.style=l}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,n,o,e){function s(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,i){function a(t){try{c(e.next(t))}catch(t){i(t)}}function r(t){try{c(e["throw"](t))}catch(t){i(t)}}function c(t){t.done?o(t.value):s(t.value).then(a,r)}c((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,s,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(n){return c([t,n])}}function c(r){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(o=0)),o)try{if(e=1,s&&(i=r[0]&2?s["return"]:r[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,r[1])).done)return i;if(s=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;s=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){o.label=r[1];break}if(r[0]===6&&o.label<i[1]){o.label=i[1];i=r;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(r);break}if(i[2])o.ops.pop();o.trys.pop();continue}r=n.call(t,o)}catch(t){r=[6,t];s=0}finally{e=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,o){if(o||arguments.length===2)for(var e=0,s=n.length,i;e<s;e++){if(i||!(e in n)){if(!i)i=Array.prototype.slice.call(n,0,e);i[e]=n[e]}}return t.concat(i||Array.prototype.slice.call(n))};System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-679e42d8.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(t){"use strict";var n,o,e,s,i,a,r,c;return{setters:[function(t){n=t.r;o=t.h;e=t.H;s=t.d},function(t){i=t.d},function(t){a=t.c},function(t){r=t.h},function(t){c=t.a},function(){},function(){}],execute:function(){var f=":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{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var m=f;var u=t("zonos_notification",function(){function t(t){n(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o;var e=this;return __generator(this,(function(s){n="id-".concat(Math.random().toString(36).substring(2,9));o=Object.assign(Object.assign({},t),{id:n,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[o],false);setTimeout((function(){e.updateTransitionClass({id:n,transitionClass:"show"})}),50);setTimeout((function(){e.removeNotification(n)}),o.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var n=t.id,o=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===n){return Object.assign(Object.assign({},t),{transitionClass:o})}return t}))};t.prototype.removeNotification=function(t){var n=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){n.notificationArray=n.notificationArray.filter((function(n){return n.id!==t}))}),300)};t.prototype.render=function(){var t=this;return o(e,{key:"17c08c90c6c1dfade4e43451c196127a0f53429e",class:a(["zonos--elements zonos--notification"]),style:{"--font-family":i()}},o("div",{key:"6624419d86a5c7518539069dbc5c9d7c08262c75",class:"zonos--notification-items"},this.notificationArray.map((function(n){return o("div",{"aria-hidden":"true",class:a(["zonos--notification-item",n.type,n.transitionClass]),key:n.id,onClick:function(){t.removeNotification(n.id)}},o("zonos-text",{textColor:"gray-0"},n.message))}))))};return t}());u.style=m;var h=".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:16px}";var l=h;var y=t("zonos_payment",function(){function t(t){n(this,t);this.titleText=undefined;this.stripe=r.stripe;this.stripeElements=r.stripeElements}t.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var t=r.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var n=this.el.querySelector(".zonos--payment-component");if(!n){c("Cannot find container element for paymentElement");return}t.mount(n);t.on("change",(function(t){r.stripePaymentEventData=t}));r.stripePaymentElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return o(e,{key:"870d7a4cb6132332368d356488c5eedd1dea16f3",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"7aef62f6daae0c5b59caa685c4255fb78eebc1be",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"073976bceadf5f8efa78d0b1f6098e94bfa3d1a6",class:"zonos--payment-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());y.style=l}}}));
@@ -1 +1 @@
1
- import{r as o,c as e,h as t,H as s}from"./p-ce347974.js";import{l as i,B as n,t as a}from"./p-84997f2e.js";import{z as l}from"./p-5821856c.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-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const c=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,f=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(l.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.hasTaxId=()=>{var o;return null===(o=i.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.dutyDeminimus)?n({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] duty free",{threshold:e}):a("Duties will apply to all orders")},this.getTaxMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.vatTaxDeminimus)?n({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] tax free",{threshold:e}):a("Taxes will apply to all orders")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:n({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>[a("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders",{percentage:100*o.vatTaxRate+"%"}),`${a("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${c({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>[a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:n({amount:o.vatTaxDeminimus})})],this.getAdditionalDutyTaxMessage=()=>{if(!i.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(i.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(i.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(i.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(i.countryLandedCost);default:return null}},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{selectedCountryCode:e}=i,n=this.getDutyMessage(),c=this.getTaxMessage(),f=this.getAdditionalDutyTaxMessage(),m=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),g=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:b}=i,u=a("Welcome to [storeName]",{storeName:l.organizationName}),p=(null===(o=b.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),z=h(p),w=this.getCurrentPageEnum(),v=b.filter((o=>o.pageName===w));return t(s,{key:"af2c46bcc413205d644a2b94ee2ff568d3d004f2",class:"zonos--elements"},t("div",{key:"67a563de9e702e370d057ee3cc45bc0c14feedc5","aria-hidden":"true",class:r(["zonos--hello-dialog",m&&"zonos--hello-dialog-animate-from-left",g&&"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&&t("div",{key:"412a8d2f4c01e4ff216feb92a979be5987bcd8c7"},t("div",{key:"b2921acfc77c6a402a14256a6f1c28607f6533e7",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"aa623c0533a5f852dab7f0f98d6dc26f62ef899a",class:"zonos--close-button",icon:t("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)}),t("zonos-v-stack",{key:"4fdac9331a5b2506a5ca1c7c1b6bfecf822bfcd9",spacing:24},t("zonos-country-flag",{key:"57afef45e0bebe9bdfa715306f6ec2c30aca8dc1",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"954b970c82fd631efadbd9c916e8bad78f0e1321",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"cde98a9636e6150d6cab009970938a0cf61bc05a",type:"boldSubheader"},u),t("zonos-text",{key:"b63fc79317f23854737c1f2dd2cbde38f3841f2a",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"e115a03222d2271b358c3f1ae3feb938bafcdbef",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"6f5ef13c8ce1171b99c148f43f491ced8f29cd57",spacing:"12px"},t("zonos-v-stack",{key:"816a373a6dcf69976279af51f09d136f18c6b4a8",spacing:12},t("div",{key:"51fc31937cb4885c7a98ee5fbc0755a00158f172",class:"zonos--flex-message"},t("zonos-icon",{key:"bc659d649b3a7f046225270870e7ae31597027f4","aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"e63ce2eb6f381718ca26962c7429f266bf8cf8d9"},n)),t("div",{key:"6f49eac81be52709ad8f35c04cccd7d2fec03b7a",class:"zonos--flex-message"},t("zonos-icon",{key:"d95f29c3c42480c89a34e831740cfdbb3d64c058","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'}),t("zonos-text",{key:"c226092fef030070af3af1d45debab989fb4f1b7"},c)),null==f?void 0:f.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",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'}),t("zonos-text",{innerHTML:o})))))),v.map((o=>t("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})))))),t("zonos-hello-dialog-footer",{key:"32739e817940a937b59380197934ced91f2afc50",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"be58e393680370837ae35d5d4f85f77cf9620db2"},t("zonos-country-select",{key:"bc5c7e086513a44f817e5769acf2ca382b01fcc4",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"7cbee089b9661602bb23e5e2821030d04891f18a"},t("zonos-language-select",{key:"55d654b2b339cfd83e3fe9814d914a382a891af3",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};f.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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-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(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-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:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-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(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-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:12px}: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{f as zonos_hello_dialog}
1
+ import{r as o,c as e,h as t,H as s}from"./p-ce347974.js";import{l as i,B as n,t as a}from"./p-b5f769ba.js";import{z as l}from"./p-5821856c.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-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const c=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,f=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(l.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.hasTaxId=()=>{var o;return null===(o=i.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.dutyDeminimus)?n({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] duty free",{threshold:e}):a("Duties will apply to all orders")},this.getTaxMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.vatTaxDeminimus)?n({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] tax free",{threshold:e}):a("Taxes will apply to all orders")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:n({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>[a("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders",{percentage:100*o.vatTaxRate+"%"}),`${a("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${c({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>[a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:n({amount:o.vatTaxDeminimus})})],this.getAdditionalDutyTaxMessage=()=>{if(!i.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(i.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(i.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(i.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(i.countryLandedCost);default:return null}},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{selectedCountryCode:e}=i,n=this.getDutyMessage(),c=this.getTaxMessage(),f=this.getAdditionalDutyTaxMessage(),m=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),g=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:b}=i,u=a("Welcome to [storeName]",{storeName:l.organizationName}),p=(null===(o=b.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),z=h(p),w=this.getCurrentPageEnum(),v=b.filter((o=>o.pageName===w));return t(s,{key:"af2c46bcc413205d644a2b94ee2ff568d3d004f2",class:"zonos--elements"},t("div",{key:"67a563de9e702e370d057ee3cc45bc0c14feedc5","aria-hidden":"true",class:r(["zonos--hello-dialog",m&&"zonos--hello-dialog-animate-from-left",g&&"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&&t("div",{key:"412a8d2f4c01e4ff216feb92a979be5987bcd8c7"},t("div",{key:"b2921acfc77c6a402a14256a6f1c28607f6533e7",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"aa623c0533a5f852dab7f0f98d6dc26f62ef899a",class:"zonos--close-button",icon:t("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)}),t("zonos-v-stack",{key:"4fdac9331a5b2506a5ca1c7c1b6bfecf822bfcd9",spacing:24},t("zonos-country-flag",{key:"57afef45e0bebe9bdfa715306f6ec2c30aca8dc1",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"954b970c82fd631efadbd9c916e8bad78f0e1321",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"cde98a9636e6150d6cab009970938a0cf61bc05a",type:"boldSubheader"},u),t("zonos-text",{key:"b63fc79317f23854737c1f2dd2cbde38f3841f2a",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"e115a03222d2271b358c3f1ae3feb938bafcdbef",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"6f5ef13c8ce1171b99c148f43f491ced8f29cd57",spacing:"12px"},t("zonos-v-stack",{key:"816a373a6dcf69976279af51f09d136f18c6b4a8",spacing:12},t("div",{key:"51fc31937cb4885c7a98ee5fbc0755a00158f172",class:"zonos--flex-message"},t("zonos-icon",{key:"bc659d649b3a7f046225270870e7ae31597027f4","aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"e63ce2eb6f381718ca26962c7429f266bf8cf8d9"},n)),t("div",{key:"6f49eac81be52709ad8f35c04cccd7d2fec03b7a",class:"zonos--flex-message"},t("zonos-icon",{key:"d95f29c3c42480c89a34e831740cfdbb3d64c058","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'}),t("zonos-text",{key:"c226092fef030070af3af1d45debab989fb4f1b7"},c)),null==f?void 0:f.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",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'}),t("zonos-text",{innerHTML:o})))))),v.map((o=>t("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})))))),t("zonos-hello-dialog-footer",{key:"32739e817940a937b59380197934ced91f2afc50",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"be58e393680370837ae35d5d4f85f77cf9620db2"},t("zonos-country-select",{key:"bc5c7e086513a44f817e5769acf2ca382b01fcc4",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"7cbee089b9661602bb23e5e2821030d04891f18a"},t("zonos-language-select",{key:"55d654b2b339cfd83e3fe9814d914a382a891af3",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};f.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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-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(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-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:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-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(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-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:12px}: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{f as zonos_hello_dialog}
@@ -0,0 +1 @@
1
+ import{r as o,c as t,h as n,H as e}from"./p-ce347974.js";import{r as i,u as s,h as r,v as a,d as c,a as l}from"./p-b5f769ba.js";import{z as d,b as h,d as u}from"./p-5821856c.js";import{a as m,l as f}from"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const p=o=>{const t=document.querySelector(o);if(!document.querySelector("zonos-hello")&&t){const o=document.createElement("zonos-hello");return t.appendChild(o),!0}return!1},w=async o=>{const{anchorElementSelector:t}=o,n=(({position:o="bottom-right"})=>{const t=".zonos--hello-mobile-wrapper";if(document.querySelector(t))return t;const n=document.createElement("div");return n.className="zonos--hello-mobile-wrapper",n.style.position="fixed","top-right"===o&&(n.style.top="72px",n.style.right="24px"),"top-left"===o&&(n.style.top="72px",n.style.left="24px"),"bottom-right"===o&&(n.style.bottom="72px",n.style.right="24px"),"bottom-left"===o&&(n.style.bottom="72px",n.style.left="24px"),n.style.zIndex="2147483007",document.body.appendChild(n),t})({position:"bottom-right"}),e=t||n;if(e&&s(e)){if(f("Hello init complete"),!p(e)){const o=new MutationObserver((()=>{p(e)&&o.disconnect()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{o.disconnect(),p(n)}),1e3)}}else m(`Selector anchorElementSelector "${o.anchorElementSelector}" is not a valid selector.`)},y=class{constructor(n){o(this,n),this.stripeInitEvent=t(this,"stripeInitEvent",7),this.config=void 0,this.zonosApiKey=void 0}async initCheckoutElement(o){var t;o?(r.stripe=o,(t=d.checkoutSettings).placeOrderButtonSelector&&(s(t.placeOrderButtonSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const o=document.createElement("zonos-checkout");document.body.appendChild(o)}})():m(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),f("init checkout element")):f("Stripe is not loaded yet - cannot init checkout element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const o=document.createElement("zonos-notification");document.body.appendChild(o)}async setupGoogleFont(o){var t,n;const e=o||u();if("Inter"===e){if(!o)return;f("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:o})}const{errors:s,json:r}=await i(`https://v1.route.js.zonos.com/api/zonos-elements/get-font-detail?family=${e}`);s.length>0||!r?f(`Failed to load font ${e}`,"warn"):(null===(n=(t=window.Zonos).injectSupportGoogleFont)||void 0===n||n.call(t,r.fontUrl),o&&(f(`[FONT] ${o} font override applied`),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:o})))}handleLocationChange(){w(d.helloSettings)}initHistoryListener(){const o=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),o.apply(this,arguments)};const t=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)}}async componentWillLoad(){this.initHistoryListener(),d.zonosApiKey=this.zonosApiKey,(async()=>{var o,t;const{errors:n,json:e}=await(async()=>{const{errors:o,json:t}=await i("https://v1.route.js.zonos.com/api/zonos-elements/zonos-settings");return o.length?(m("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null}):{errors:[],json:t}})();if("403"===(null===(o=n[0])||void 0===o?void 0:o.type.toString()))return void f("Failed to load zonos settings. This domain may not have access","warn");this.initZonosNotification();const s=Object.assign(Object.assign({},this.config),{subscriptionStatus:void 0});h({overrideSettings:s,zonosSettings:e}),this.setupGoogleFont(),d.helloSettings&&w(d.helloSettings),await a();const r=(null===(t=null==e?void 0:e.checkoutSettings)||void 0===t?void 0:t.externalServiceTokens.find((o=>"STRIPE_PUBLISHABLE_TOKEN"===o.type)))||null;if(r&&this.stripeInitEvent){if("INACTIVE"===d.checkoutSettings.subscriptionStatus)return f('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void f("zonos controller loaded");if("DISABLED"===d.checkoutSettings.visibilityStatus)return f("=== Checkout is disabled by store owner ===","warn"),void f("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:r.token}),f("zonos controller loaded")}else f("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(o){const t=document.querySelector("zonos-notification");t?t.showNotification(o):f("Failed to show notification - zonos-notification not found","warn")}async reset(){c.checkoutSessionId=null,r.clientSecret=null}async overrideConfig(o){h({overrideSettings:o,zonosSettings:null})}async overrideCountry(o){f(`Override country code to ${o}`),l(o)}async getAppearanceSetting(){return d.appearance}async updateOrganizationName(o){d.organizationName=o}render(){return n(e,{key:"c22a26c71e3f57f97bd67d8c8775fef7585774cf",class:"zonos--elements"})}};y.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{visibility:hidden;opacity:0;height:0}";export{y as zonos_controller}