@zonos/elements 1.3.17 → 1.3.18-alpha.1

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 (171) hide show
  1. package/dist/cjs/{cart-d25723e7.js → cart-95209ae8.js} +308 -8
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{submitGtag-484eaf9d.js → submitGtag-9d60f3bb.js} +1 -1
  4. package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  6. package/dist/cjs/{zonos-cart-items_9.cjs.entry.js → zonos-cart-items_10.cjs.entry.js} +114 -10
  7. package/dist/cjs/zonos-checkout.cjs.entry.js +4 -4
  8. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  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-payment.cjs.entry.js +1 -1
  15. package/dist/collection/collection-manifest.json +1 -0
  16. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +2 -1
  17. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/assets/ChevronUpIcon.svg +23 -0
  18. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/assets/empty-item.jpeg +0 -0
  19. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.css +105 -0
  20. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +101 -0
  21. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +6 -3
  22. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
  23. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +1 -1
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +18 -2
  26. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -2
  27. package/dist/collection/components/store/checkout/cart.js +55 -5
  28. package/dist/collection/components/store/checkout/stripe.js +6 -2
  29. package/dist/collection/components/store/hello/localization.js +1 -1
  30. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  31. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  32. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  33. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  34. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  35. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  36. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  37. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  38. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  39. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  40. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  41. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  42. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  43. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  44. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  45. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  46. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  47. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  48. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  49. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  50. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +1 -1
  51. package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +6 -1
  52. package/dist/collection/types/checkout/RestrictProduct.js +1 -0
  53. package/dist/collection/types/generated/graphql.customer.types.js +40 -0
  54. package/dist/collection/types/generated/graphql.frontend.types.js +1 -0
  55. package/dist/components/stripe.js +68 -9
  56. package/dist/components/submitGtag.js +1 -1
  57. package/dist/components/trackConversionEvent.js +1 -1
  58. package/dist/components/translationStore.js +240 -0
  59. package/dist/components/zonos-cart-items2.js +2 -1
  60. package/dist/components/zonos-cart-restricted-items.d.ts +11 -0
  61. package/dist/components/zonos-cart-restricted-items.js +6 -0
  62. package/dist/components/zonos-cart-restricted-items2.js +135 -0
  63. package/dist/components/zonos-cart-subtotal2.js +6 -3
  64. package/dist/components/zonos-checkout-finish2.js +1 -1
  65. package/dist/components/zonos-checkout-payment2.js +1 -1
  66. package/dist/components/zonos-checkout.js +27 -21
  67. package/dist/components/zonos-controller.js +1 -1
  68. package/dist/components/zonos-country-select2.js +1 -1
  69. package/dist/components/zonos-customer-info2.js +19 -3
  70. package/dist/components/zonos-hello-dialog2.js +1 -1
  71. package/dist/components/zonos-hello.js +1 -1
  72. package/dist/components/zonos-language-select2.js +1 -1
  73. package/dist/components/zonos-review2.js +3 -2
  74. package/dist/components/zonos-shipping2.js +1 -1
  75. package/dist/esm/{cart-02f5c2ea.js → cart-6448e883.js} +308 -9
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/esm/{submitGtag-ba38e1ac.js → submitGtag-b7d369cd.js} +1 -1
  78. package/dist/esm/zonos-address_8.entry.js +1 -1
  79. package/dist/esm/zonos-card_2.entry.js +1 -1
  80. package/dist/esm/{zonos-cart-items_9.entry.js → zonos-cart-items_10.entry.js} +114 -11
  81. package/dist/esm/zonos-checkout.entry.js +4 -4
  82. package/dist/esm/zonos-controller.entry.js +1 -1
  83. package/dist/esm/zonos-country-flag.entry.js +1 -1
  84. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  85. package/dist/esm/zonos-elements.js +1 -1
  86. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  87. package/dist/esm/zonos-hello.entry.js +1 -1
  88. package/dist/esm/zonos-payment.entry.js +1 -1
  89. package/dist/esm-es5/cart-6448e883.js +1 -0
  90. package/dist/esm-es5/loader.js +1 -1
  91. package/dist/esm-es5/{submitGtag-ba38e1ac.js → submitGtag-b7d369cd.js} +1 -1
  92. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  93. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  94. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -0
  95. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  96. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  97. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  98. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  99. package/dist/esm-es5/zonos-elements.js +1 -1
  100. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  101. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  102. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  103. package/dist/scripts/loadZonos.js +1 -1
  104. package/dist/scripts/zonos.js +1 -1
  105. package/dist/scripts/zonosBase.js +1 -1
  106. package/dist/types/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.d.ts +14 -0
  107. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +2 -0
  108. package/dist/types/components/store/checkout/cart.d.ts +38 -4
  109. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  110. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  111. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  112. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  113. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  114. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  115. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  116. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  117. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  118. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  119. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  120. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  121. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  122. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  123. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  124. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  125. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  126. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  127. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  128. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  129. package/dist/types/components/store/translationStore.d.ts +1 -1
  130. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  131. package/dist/types/components.d.ts +21 -0
  132. package/dist/types/scripts/zonosBase.d.ts +6 -1
  133. package/dist/types/types/checkout/RestrictProduct.d.ts +7 -0
  134. package/dist/types/types/generated/graphql.customer.types.d.ts +54 -0
  135. package/dist/types/types/generated/graphql.customer.types.ts +66 -1
  136. package/dist/types/types/generated/graphql.frontend.types.d.ts +2 -1
  137. package/dist/types/types/generated/graphql.frontend.types.ts +2 -1
  138. package/dist/zonos-elements/{p-6dec476d.system.entry.js → p-0759a84d.system.entry.js} +1 -1
  139. package/dist/zonos-elements/{p-47e00966.system.entry.js → p-0ee61fba.system.entry.js} +1 -1
  140. package/dist/zonos-elements/p-154aaf95.system.js +1 -1
  141. package/dist/zonos-elements/{p-239cc943.system.entry.js → p-2fc561ac.system.entry.js} +1 -1
  142. package/dist/zonos-elements/{p-cf0f8e32.entry.js → p-345503b7.entry.js} +1 -1
  143. package/dist/zonos-elements/{p-6ece23b9.entry.js → p-3be2e469.entry.js} +1 -1
  144. package/dist/zonos-elements/p-47c75f81.system.entry.js +1 -0
  145. package/dist/zonos-elements/{p-532995a4.system.entry.js → p-58f8cee7.system.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-572a4de2.system.entry.js → p-61100d2e.system.entry.js} +1 -1
  147. package/dist/zonos-elements/{p-905d842b.entry.js → p-6ea746b9.entry.js} +1 -1
  148. package/dist/zonos-elements/{p-f124e659.system.entry.js → p-70c35519.system.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-246133d3.entry.js → p-7b19cd96.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-0265da6f.js → p-7cc730b0.js} +1 -1
  151. package/dist/zonos-elements/{p-57adc7f8.entry.js → p-7f48fafe.entry.js} +1 -1
  152. package/dist/zonos-elements/p-9c575a18.system.entry.js +1 -0
  153. package/dist/zonos-elements/{p-e0e66004.system.js → p-aaf1e517.system.js} +1 -1
  154. package/dist/zonos-elements/p-aff5f4ca.js +1 -0
  155. package/dist/zonos-elements/{p-f99eb5e7.entry.js → p-beca252d.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-1ba4cf64.entry.js → p-c1f4bb4a.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-5e33aab7.system.entry.js → p-c64eefdd.system.entry.js} +1 -1
  158. package/dist/zonos-elements/p-ca621143.entry.js +1 -0
  159. package/dist/zonos-elements/{p-0267a969.entry.js → p-dbee6587.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-9da0562e.system.entry.js → p-e0706108.system.entry.js} +1 -1
  161. package/dist/zonos-elements/{p-54a32fd7.entry.js → p-e3335228.entry.js} +1 -1
  162. package/dist/zonos-elements/p-ef9cbb66.system.js +1 -0
  163. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  164. package/package.json +12 -12
  165. package/dist/esm-es5/cart-02f5c2ea.js +0 -1
  166. package/dist/esm-es5/zonos-cart-items_9.entry.js +0 -1
  167. package/dist/zonos-elements/p-168e5b5f.system.js +0 -1
  168. package/dist/zonos-elements/p-1b8082dd.entry.js +0 -1
  169. package/dist/zonos-elements/p-5d13795a.system.entry.js +0 -1
  170. package/dist/zonos-elements/p-981bf71a.js +0 -1
  171. package/dist/zonos-elements/p-ed7d251d.system.entry.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,n,e,o){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function u(t){try{a(o.next(t))}catch(t){r(t)}}function s(t){try{a(o["throw"](t))}catch(t){r(t)}}function a(t){t.done?e(t.value):i(t.value).then(u,s)}a((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(e=0)),e)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;i=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-163ff5b5.system.js","./p-168e5b5f.system.js","./p-87badea9.system.js","./p-771fbeb3.system.js","./p-79f3c4f5.system.js"],(function(t){"use strict";var n,e,o,i,r,u,s,a,c,f,h,d,l,v;return{setters:[function(t){n=t.r;e=t.c;o=t.h;i=t.H},function(t){r=t.v;u=t.d;s=t.w;a=t.a;c=t.k;f=t.x;h=t.b},function(t){d=t.z;l=t.b;v=t.d},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,e,o;return __generator(this,(function(i){switch(i.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/zonos-settings");return[4,r(t)];case 1:n=i.sent(),e=n.errors,o=n.json;if(e.length){u("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:e,json:null}]}return[2,{errors:[],json:o}]}}))}))};var w=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector){return}if(!s(t.placeOrderButtonSelector)){u('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}w()};var g=function(t){var n=document.querySelector(t);var e=document.querySelector("zonos-hello");if(!e&&n){var o=document.createElement("zonos-hello");n.appendChild(o);return true}return false};var b=function(t){var n=t.position,e=n===void 0?"bottom-right":n;var o=".zonos--hello-mobile-wrapper";var i=document.querySelector(o);if(i){return o}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(e==="top-right"){r.style.top="72px";r.style.right="24px"}if(e==="top-left"){r.style.top="72px";r.style.left="24px"}if(e==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(e==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return o};var y=function(t){return __awaiter(m,void 0,void 0,(function(){var n,e,o,i,r;return __generator(this,(function(c){n=t.anchorElementSelector;e=b({position:"bottom-right"});o=n||e;if(!o||!s(o)){u('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}a("Hello init complete");i=g(o);if(!i){r=new MutationObserver((function(){var t=g(o);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){r.disconnect()}),5e3)}return[2]}))}))};var z=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";var k=z;var I=t("zonos_controller",function(){function t(t){n(this,t);this.stripeInitEvent=e(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){a("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}c.stripe=t;void p(d.checkoutSettings);a("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,o,i,u,s,c,f;return __generator(this,(function(h){switch(h.label){case 0:o=t||v();if(o==="Inter"){if(!t){return[2]}a("[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:t})}i="https://v1.route.js.zonos.com";return[4,r("".concat(i,"/api/zonos-elements/get-font-detail?family=").concat(o))];case 1:u=h.sent(),s=u.errors,c=u.json;if(s.length>0||!c){a("Failed to load font ".concat(o),"warn");return[2]}f=c.fontUrl;(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,f);if(!t){return[2]}a("[FONT] ".concat(t," font override applied"));d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){d.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,o,i,r;return __generator(this,(function(u){switch(u.label){case 0:return[4,_()];case 1:e=u.sent(),o=e.errors,i=e.json;if(((t=o[0])===null||t===void 0?void 0:t.type.toString())==="403"){a("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();l({overrideSettings:this.config,zonosSettings:i});void this.setupGoogleFont();if(d.helloSettings){void y(d.helloSettings)}return[4,f()];case 2:u.sent();r=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!r||!this.stripeInitEvent){a("Checkout failed to load -- missing publishable key","warn");return[2]}if(d.checkoutSettings.subscriptionStatus==="INACTIVE"){a('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");a("zonos controller loaded");return[2]}if(d.checkoutSettings.visibilityStatus==="DISABLED"){a("=== Checkout is disabled by store owner ===","warn");a("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:r.token});a("zonos controller loaded");return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=document.querySelector("zonos-notification");if(!n){a("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){l({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){void h(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,d.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d.organizationName=t;return[2]}))}))};t.prototype.render=function(){return o(i,{key:"c607814c97ec998ef3e56ccdb28ef0369daf9ff3",class:"zonos--elements"})};return t}());I.style=k}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,n,e,o){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function u(t){try{a(o.next(t))}catch(t){r(t)}}function s(t){try{a(o["throw"](t))}catch(t){r(t)}}function a(t){t.done?e(t.value):i(t.value).then(u,s)}a((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(e=0)),e)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;i=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-163ff5b5.system.js","./p-ef9cbb66.system.js","./p-87badea9.system.js","./p-771fbeb3.system.js","./p-79f3c4f5.system.js"],(function(t){"use strict";var n,e,o,i,r,u,s,a,c,f,h,d,l,v;return{setters:[function(t){n=t.r;e=t.c;o=t.h;i=t.H},function(t){r=t.v;u=t.d;s=t.w;a=t.a;c=t.k;f=t.x;h=t.b},function(t){d=t.z;l=t.b;v=t.d},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,e,o;return __generator(this,(function(i){switch(i.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/zonos-settings");return[4,r(t)];case 1:n=i.sent(),e=n.errors,o=n.json;if(e.length){u("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:e,json:null}]}return[2,{errors:[],json:o}]}}))}))};var w=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector){return}if(!s(t.placeOrderButtonSelector)){u('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}w()};var g=function(t){var n=document.querySelector(t);var e=document.querySelector("zonos-hello");if(!e&&n){var o=document.createElement("zonos-hello");n.appendChild(o);return true}return false};var b=function(t){var n=t.position,e=n===void 0?"bottom-right":n;var o=".zonos--hello-mobile-wrapper";var i=document.querySelector(o);if(i){return o}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(e==="top-right"){r.style.top="72px";r.style.right="24px"}if(e==="top-left"){r.style.top="72px";r.style.left="24px"}if(e==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(e==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return o};var y=function(t){return __awaiter(m,void 0,void 0,(function(){var n,e,o,i,r;return __generator(this,(function(c){n=t.anchorElementSelector;e=b({position:"bottom-right"});o=n||e;if(!o||!s(o)){u('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}a("Hello init complete");i=g(o);if(!i){r=new MutationObserver((function(){var t=g(o);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){r.disconnect()}),5e3)}return[2]}))}))};var z=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";var k=z;var I=t("zonos_controller",function(){function t(t){n(this,t);this.stripeInitEvent=e(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){a("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}c.stripe=t;void p(d.checkoutSettings);a("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,o,i,u,s,c,f;return __generator(this,(function(h){switch(h.label){case 0:o=t||v();if(o==="Inter"){if(!t){return[2]}a("[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:t})}i="https://v1.route.js.zonos.com";return[4,r("".concat(i,"/api/zonos-elements/get-font-detail?family=").concat(o))];case 1:u=h.sent(),s=u.errors,c=u.json;if(s.length>0||!c){a("Failed to load font ".concat(o),"warn");return[2]}f=c.fontUrl;(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,f);if(!t){return[2]}a("[FONT] ".concat(t," font override applied"));d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){d.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,o,i,r;return __generator(this,(function(u){switch(u.label){case 0:return[4,_()];case 1:e=u.sent(),o=e.errors,i=e.json;if(((t=o[0])===null||t===void 0?void 0:t.type.toString())==="403"){a("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();l({overrideSettings:this.config,zonosSettings:i});void this.setupGoogleFont();if(d.helloSettings){void y(d.helloSettings)}return[4,f()];case 2:u.sent();r=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!r||!this.stripeInitEvent){a("Checkout failed to load -- missing publishable key","warn");return[2]}if(d.checkoutSettings.subscriptionStatus==="INACTIVE"){a('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");a("zonos controller loaded");return[2]}if(d.checkoutSettings.visibilityStatus==="DISABLED"){a("=== Checkout is disabled by store owner ===","warn");a("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:r.token});a("zonos controller loaded");return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=document.querySelector("zonos-notification");if(!n){a("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){l({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){void h(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,d.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d.organizationName=t;return[2]}))}))};t.prototype.render=function(){return o(i,{key:"c607814c97ec998ef3e56ccdb28ef0369daf9ff3",class:"zonos--elements"})};return t}());I.style=k}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(r,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-163ff5b5.system.js","./p-56ba5cbf.system.js"],(function(e,o){"use strict";var t,n,i;return{setters:[function(o){t=o.p;n=o.b;e("setNonce",o.s)},function(e){i=e.g}],execute:function(){var e=this;var s=function(){var e=o.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};s().then((function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-ed7d251d.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"]}]]],["p-6dec476d.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-47e00966.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["p-679877b1.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-36a461a6.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-bf32179a.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-4dca5484.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-239cc943.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-ad088d46.system",[[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-f124e659.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-fe246229.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-b98bdbcc.system",[[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-f71489e5.system",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-e108e5ed.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-54004793.system",[[1,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-17e265c3.system",[[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}],[1,"zonos-v-stack",{spacing:[2]}]]],["p-9da0562e.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-card",{actions:[16],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-572a4de2.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-532995a4.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-5e33aab7.system",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}]]],["p-5d13795a.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}]]]],o)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(r,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-163ff5b5.system.js","./p-56ba5cbf.system.js"],(function(e,o){"use strict";var t,n,i;return{setters:[function(o){t=o.p;n=o.b;e("setNonce",o.s)},function(e){i=e.g}],execute:function(){var e=this;var s=function(){var e=o.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};s().then((function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-47c75f81.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"]}]]],["p-0759a84d.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-0ee61fba.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["p-679877b1.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-36a461a6.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-bf32179a.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-4dca5484.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-2fc561ac.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-ad088d46.system",[[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-70c35519.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-fe246229.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-b98bdbcc.system",[[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-f71489e5.system",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-e108e5ed.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-54004793.system",[[1,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-17e265c3.system",[[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}],[1,"zonos-v-stack",{spacing:[2]}]]],["p-e0706108.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-card",{actions:[16],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-61100d2e.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-58f8cee7.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-c64eefdd.system",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-9c575a18.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}]]]],o)]}}))}))}))}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?t(o.value):i(o.value).then(a,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-163ff5b5.system.js","./p-168e5b5f.system.js","./p-87badea9.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-771fbeb3.system.js","./p-79f3c4f5.system.js"],(function(o){"use strict";var e,t,n,i,s,a,r,l,h,d,c;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.H},function(o){s=o.D;a=o.t;r=o.l},function(o){l=o.z},function(o){h=o.c},function(o){d=o.f},function(o){c=o.g},function(){},function(){}],execute:function(){var f=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var u='<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';var b='<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';var g='<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';var m='<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';var v='<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>';var p=":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)}}";var w=p;var z=o("zonos_hello_dialog",function(){function o(o){var n=this;e(this,o);this.closeDialog=t(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){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=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.getDutyMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?s(o.dutyDeminimus):null;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("duty free")):a("Duties will apply to all orders")};this.getTaxMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?s(o.vatTaxDeminimus):null;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("tax free")):a("Taxes will apply to all orders")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return a("Orders to ${countryName} must be over ${threshold} to ship.",{countryName:"United Kingdom",threshold:s(e)})};this.getAustraliaDutyTaxMessage=function(o){return a("${percentage} GST due on any order above ${threshold}.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getNewZealandDutyTaxMessge=function(o){return a("${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getAdditionalDutyTaxMessage=function(){if(!r.countryLandedCost){return null}if(!r.countryLandedCost.hasTaxId){return null}switch(r.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(r.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(r.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(r.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e;var t=r.selectedCountryCode;var s=this.getDutyMessage();var p=this.getTaxMessage();var w=this.getAdditionalDutyTaxMessage();var z=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var x=this.dialogRef&&f(this.dialogRef);var y=r.customMessages;var C="".concat(a("Welcome to")," ").concat(l.organizationName,"!");var k=((e=y.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var H=d(k);var L=this.getCurrentPageEnum();var V=y.filter((function(o){return o.pageName===L}));return n(i,{key:"e54181bd2c3eb1c77d5dad36c5426f4e9ddee766",class:"zonos--elements"},n("div",{key:"3960f91898ed2409018cbac487491f38ab0b0c5e","aria-hidden":"true",class:h(["zonos--hello-dialog",z&&"zonos--hello-dialog-animate-from-left",x&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",{key:"69c9b9ebe1cdde7a43773eeabfa07e9bb842df14"},n("div",{key:"fcad53ed6962a775ec1cb325636db397f34f62b2",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"018c3ce79334f35d6f7c04143b2a1f14c068405f",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:v}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"38e19b5e803f0fcd89adf54e95f40549c93ea511",spacing:24},n("zonos-country-flag",{key:"01ea29a0de53d00c9eb49e29fb8680da92656db4",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"7a1dd895a58fdf4e008164828e6ee7bae96723ab",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"a1c334ba3f4e7a15de6f14d17440faae44a26498",type:"boldSubheader"},C),n("zonos-text",{key:"dad722c938d002eaa223ef847c86bafbe1815bdc",innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{key:"1b1d7d1e3ee671fecba8ec2731ffb0f4356af1e7",spacing:8},this.restrictedItems.map((function(o){var e;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{key:"0bef1474f44e1a60c48845562f455bfb214bcc80",spacing:"12px"},n("zonos-v-stack",{key:"5d65f0de1641b30119463da8b42622805fef4f9b",spacing:12},n("div",{key:"f752d5a9738490220fd4c98615bc7416d38cc2d1",class:"zonos--flex-message"},n("zonos-icon",{key:"7a9ac42800b0d35a18cc13bd611d79acd20244cf","aria-label":"Duty de minimis",content:b}),n("zonos-text",{key:"3d31748fcd4c718326ff62ea2e97088d8ab1ed3e"},s)),n("div",{key:"699d72e9efc630452bf947be8f0e44ca09819cfe",class:"zonos--flex-message"},n("zonos-icon",{key:"e997263930e53e22c3a4e8dd5f20e1ee3cd695e4","aria-label":"Tax de minimis",content:m}),n("zonos-text",{key:"e1c2a5ee2718a5446a63c2b8d547848e262817f0"},p)),w&&n("div",{key:"8522ab846d9733fb8ffd3b9873e8b9650aa63b58",class:"zonos--flex-message"},n("zonos-icon",{key:"20cb281304b9839fe7f30685949af2aa3af9721d","aria-label":"Low value order shipping restriction",content:u}),n("zonos-text",{key:"9347d34c8fbfd9bf04ba2b6d79186263b524c2a8"},w)))),V.map((function(o){return n("zonos-custom-message",{icon:g,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"a6980cae6e361ae1f5b00ec4827127422adee301",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"be7793fb262c395ae96fa6acfe0c14fbf062b1c9"},n("zonos-country-select",{key:"2224aade7391512826b4b9c46bd826f013945f83",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"006ac0317c9a7911c1e48f7c30f66b3e8882f6d6"},n("zonos-language-select",{key:"1577f733b5556e7683b6c74dc111e99c77ba0649",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());z.style=w}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?t(o.value):i(o.value).then(a,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-163ff5b5.system.js","./p-ef9cbb66.system.js","./p-87badea9.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-771fbeb3.system.js","./p-79f3c4f5.system.js"],(function(o){"use strict";var e,t,n,i,s,a,r,l,h,d,c;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.H},function(o){s=o.D;a=o.t;r=o.l},function(o){l=o.z},function(o){h=o.c},function(o){d=o.f},function(o){c=o.g},function(){},function(){}],execute:function(){var f=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var u='<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';var b='<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';var g='<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';var m='<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';var v='<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>';var p=":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)}}";var w=p;var z=o("zonos_hello_dialog",function(){function o(o){var n=this;e(this,o);this.closeDialog=t(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){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=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.getDutyMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?s(o.dutyDeminimus):null;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("duty free")):a("Duties will apply to all orders")};this.getTaxMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?s(o.vatTaxDeminimus):null;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("tax free")):a("Taxes will apply to all orders")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return a("Orders to ${countryName} must be over ${threshold} to ship.",{countryName:"United Kingdom",threshold:s(e)})};this.getAustraliaDutyTaxMessage=function(o){return a("${percentage} GST due on any order above ${threshold}.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getNewZealandDutyTaxMessge=function(o){return a("${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getAdditionalDutyTaxMessage=function(){if(!r.countryLandedCost){return null}if(!r.countryLandedCost.hasTaxId){return null}switch(r.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(r.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(r.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(r.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e;var t=r.selectedCountryCode;var s=this.getDutyMessage();var p=this.getTaxMessage();var w=this.getAdditionalDutyTaxMessage();var z=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var x=this.dialogRef&&f(this.dialogRef);var y=r.customMessages;var C="".concat(a("Welcome to")," ").concat(l.organizationName,"!");var k=((e=y.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var H=d(k);var L=this.getCurrentPageEnum();var V=y.filter((function(o){return o.pageName===L}));return n(i,{key:"e54181bd2c3eb1c77d5dad36c5426f4e9ddee766",class:"zonos--elements"},n("div",{key:"3960f91898ed2409018cbac487491f38ab0b0c5e","aria-hidden":"true",class:h(["zonos--hello-dialog",z&&"zonos--hello-dialog-animate-from-left",x&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",{key:"69c9b9ebe1cdde7a43773eeabfa07e9bb842df14"},n("div",{key:"fcad53ed6962a775ec1cb325636db397f34f62b2",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"018c3ce79334f35d6f7c04143b2a1f14c068405f",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:v}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"38e19b5e803f0fcd89adf54e95f40549c93ea511",spacing:24},n("zonos-country-flag",{key:"01ea29a0de53d00c9eb49e29fb8680da92656db4",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"7a1dd895a58fdf4e008164828e6ee7bae96723ab",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"a1c334ba3f4e7a15de6f14d17440faae44a26498",type:"boldSubheader"},C),n("zonos-text",{key:"dad722c938d002eaa223ef847c86bafbe1815bdc",innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{key:"1b1d7d1e3ee671fecba8ec2731ffb0f4356af1e7",spacing:8},this.restrictedItems.map((function(o){var e;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{key:"0bef1474f44e1a60c48845562f455bfb214bcc80",spacing:"12px"},n("zonos-v-stack",{key:"5d65f0de1641b30119463da8b42622805fef4f9b",spacing:12},n("div",{key:"f752d5a9738490220fd4c98615bc7416d38cc2d1",class:"zonos--flex-message"},n("zonos-icon",{key:"7a9ac42800b0d35a18cc13bd611d79acd20244cf","aria-label":"Duty de minimis",content:b}),n("zonos-text",{key:"3d31748fcd4c718326ff62ea2e97088d8ab1ed3e"},s)),n("div",{key:"699d72e9efc630452bf947be8f0e44ca09819cfe",class:"zonos--flex-message"},n("zonos-icon",{key:"e997263930e53e22c3a4e8dd5f20e1ee3cd695e4","aria-label":"Tax de minimis",content:m}),n("zonos-text",{key:"e1c2a5ee2718a5446a63c2b8d547848e262817f0"},p)),w&&n("div",{key:"8522ab846d9733fb8ffd3b9873e8b9650aa63b58",class:"zonos--flex-message"},n("zonos-icon",{key:"20cb281304b9839fe7f30685949af2aa3af9721d","aria-label":"Low value order shipping restriction",content:u}),n("zonos-text",{key:"9347d34c8fbfd9bf04ba2b6d79186263b524c2a8"},w)))),V.map((function(o){return n("zonos-custom-message",{icon:g,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"a6980cae6e361ae1f5b00ec4827127422adee301",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"be7793fb262c395ae96fa6acfe0c14fbf062b1c9"},n("zonos-country-select",{key:"2224aade7391512826b4b9c46bd826f013945f83",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"006ac0317c9a7911c1e48f7c30f66b3e8882f6d6"},n("zonos-language-select",{key:"1577f733b5556e7683b6c74dc111e99c77ba0649",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());z.style=w}}}));
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,d as i}from"./p-13ddaf31.js";import{l as a}from"./p-981bf71a.js";import{d as e}from"./p-f1962041.js";import{c as n}from"./p-b4b7f705.js";import"./p-909a331c.js";import"./p-83cc2936.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
+ import{r as t,h as s,H as o,d as i}from"./p-13ddaf31.js";import{l as a}from"./p-aff5f4ca.js";import{d as e}from"./p-f1962041.js";import{c as n}from"./p-b4b7f705.js";import"./p-909a331c.js";import"./p-83cc2936.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 s,c as o,h as e,H as t,d as i}from"./p-13ddaf31.js";import{k as n,d as a,l as d,t as l}from"./p-981bf71a.js";import{i as r}from"./p-81a54668.js";import{i as c,c as h}from"./p-0c64dbbb.js";import{z as b,d as f}from"./p-f1962041.js";import{c as p}from"./p-b4b7f705.js";import{R as m}from"./p-08e7107d.js";import{g as u}from"./p-83cc2936.js";import{i as z}from"./p-909a331c.js";const y=class{constructor(e){s(this,e),this.invalidCharacters=o(this,"invalidCharacters",7),this.type=void 0,this.titleText=void 0,this.defaultAddress=null,this.stripe=window.Zonos.stripe,this.isDirtyAddress=!1}getStripeAddressInstance(){return"billing"===this.type?{stripeAddressElement:n.stripeBillingAddressElement,stripeAddressEventData:n.stripeBillingAddressEventData,stripeElements:n.stripeElementsForBillingAddress}:{stripeAddressElement:n.stripeAddressElement,stripeAddressEventData:n.stripeAddressEventData,stripeElements:n.stripeElements}}updateAddressEventData({event:s,type:o}){"billing"===o?n.stripeBillingAddressEventData=s:n.stripeAddressEventData=s}updateAddressElement({stripeAddressElement:s,type:o}){"shipping"!==o?n.stripeBillingAddressElement=s:n.stripeAddressElement=s}async watchInitStripe(){var s,o;this.stripe=window.Zonos.stripe;const{stripeAddressEventData:e,stripeElements:t}=this.getStripeAddressInstance();if(!this.stripe||!t)return void a("Stripe is not initialized. Couldn't load stripe element.");(null===(s=this.defaultAddress)||void 0===s?void 0:s.phone)||null===(o=this.defaultAddress)||void 0===o||delete o.phone;const i=d.shippingZoneCountries,n=i?Object.values(i).map((s=>s.code)):[],l=t.create("address",{allowedCountries:"shipping"===this.type?n:[],contacts:this.defaultAddress&&!e?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},null==e?void 0:e.value.address),{country:(null==e?void 0:e.value.address.country)||d.selectedCountryCode||"AL"}),firstName:null==e?void 0:e.value.firstName,lastName:null==e?void 0:e.value.lastName,phone:null==e?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});l.mount(this.el.querySelector(".zonos--address-component")),l.on("change",(s=>{const o=s.value;!this.isDirtyAddress&&o.address.line1.length>=3&&(this.isDirtyAddress=!0,setTimeout((()=>{if(r())this.el.scrollIntoView({behavior:"smooth",block:"end"});else{const s="shipping"===this.type?100:600,o=this.el.closest(".zonos--group"),e=this.el.getBoundingClientRect().top+s;null==o||o.scrollTo({behavior:"smooth",top:e})}}),600)),this.updateAddressEventData({event:Object.assign(Object.assign({},s),{elementMode:this.type,elementType:"address",value:Object.assign(Object.assign({},o),{firstName:o.firstName||o.name.split(" ")[0],lastName:o.lastName||o.name.split(" ")[1]})}),type:this.type})})),this.updateAddressElement({stripeAddressElement:l,type:this.type})}disconnectedCallback(){const s=this.getStripeAddressInstance().stripeAddressElement;null==s||s.destroy()}componentDidLoad(){const s=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!s&&s.value.address.line1.length>0,this.watchInitStripe()}render(){return e(t,{key:"f45a7bbe9d6b5ffac15671a862b3ad4f2eb4a87b",class:"zonos--address zonos--elements"},e("zonos-text",{key:"a9119e6e0c4e5c81a7d17ebe4d6bec925404a3dd",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"7dc12043c6e75ebabd646490c390bafdc2cd4a1d",class:"zonos--address-component"}))}get el(){return i(this)}static get watchers(){return{stripe:["watchInitStripe"]}}};y.style=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";const g=class{constructor(o){s(this,o),this.currentAddress=void 0,this.addressType=void 0}render(){var s;const{city:o,country:i,email:n,line1:a,line2:r,name:h,phone:b,postal_code:f,state:p}=this.currentAddress,m=null===(s=d.shippingZoneCountries)||void 0===s?void 0:s[i],u=({bold:s,content:o})=>{const t=c(o)?"red-600":"gray-1200";return e("zonos-text",{textColor:t,type:s?"boldLabel":"body"},o)};return e(t,{class:"zonos--address-form zonos--elements"},e("div",{class:"zonos--title"},e("zonos-text",{textColor:"gray-700",type:"smallHeader"},l("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{class:"zonos--address-group"},h&&e("div",{class:"zonos--address-line"},u({bold:!0,content:h})),n&&e("div",{class:"zonos--address-line"},u({content:n})),b&&e("div",{class:"zonos--address-line"},u({content:b})),a&&e("div",{class:"zonos--address-line"},u({content:a})),r&&e("div",{class:"zonos--address-line"},u({content:r})),e("div",{class:"zonos--address-line"},o&&u({content:o}),p&&u({content:p}),f&&u({content:f})),m&&e("div",{class:"zonos--address-line"},e("zonos-country-flag",{class:"zonos--country-flag",countryCode:m.code})," ",u({content:m.displayName}))))}};g.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--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';const v=class{constructor(e){s(this,e),this.addressChange=o(this,"addressChange",7),this.onInputChange=({key:s,value:o})=>{this.addressChange.emit(Object.assign(Object.assign({},this.localAddress),{[s]:o}))},this.currentAddress=void 0,this.translatedAddress=void 0,this.addressType=void 0,this.localAddress=this.currentAddress}watchCurrentAddress(){var s,o,e,t,i,n;const{city:a,line1:d,line2:l,name:r,postal_code:c,state:h}=this.currentAddress;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:(null===(s=this.translatedAddress.city)||void 0===s?void 0:s[a])||a,line1:(null===(o=this.translatedAddress.line1)||void 0===o?void 0:o[d])||d,line2:(null===(e=this.translatedAddress.line2)||void 0===e?void 0:e[l])||l,name:(null===(t=this.translatedAddress.name)||void 0===t?void 0:t[r])||r,postal_code:(null===(i=this.translatedAddress.postal_code)||void 0===i?void 0:i[c])||c,state:(null===(n=this.translatedAddress.state)||void 0===n?void 0:n[h])||h})}componentWillLoad(){this.watchCurrentAddress()}render(){const{city:s,country:o,line1:i,line2:n,name:a,phone:d,postal_code:r,state:h}=this.localAddress,b=a.split(" ")[0]||"",f=a.split(" ")[1]||"";return e(t,{key:"9c1ee87200d1f90e9dfac58c49aabba1777373a9",class:"zonos--address-form zonos--elements"},e("div",{key:"eec3416268ff2324fd751408552705086905423d",class:"zonos--title"},e("zonos-text",{key:"a4c254f78420dcfc712e1a83b20dd3ac9e64c460",textColor:"gray-700",type:"smallHeader"},l("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{key:"b8109545d282fb8c06a2e791c30088018d6ffec0",class:"zonos--address-group"},e("div",{key:"833a395984cd75242e5d97697fd6566f11932d1b",class:"zonos--contact"},e("zonos-text",{key:"e60f574e95162aabf6465b878fc9b16c708e8029",type:"label"},l("Contact")),e("zonos-input",{key:"24cd24a362a1bbc76d0c91718c48ae32baa20ae6",class:"zonos--form-email",inputLabel:l("Email"),inputValue:this.currentAddress.email,isDisabled:!0}),e("div",{key:"84e64ef44eb3b39ac7ab542e07d7a52a95377cae",class:"zonos--name zonos--address-row"},e("zonos-input",{key:"26621aca0d57a7fee743874b8d11af5f58c91b69",class:"zonos--form-first-name",inputLabel:l("First name"),inputValue:b,isError:c(b),onInputChange:s=>this.onInputChange({key:"name",value:`${s.detail} ${f}`})}),e("zonos-input",{key:"01e3e5038b4a4311dd5874a1213f936451dc300d",class:"zonos--form-last-name",inputLabel:l("Last name"),inputValue:f,isError:c(f),onInputChange:s=>this.onInputChange({key:"name",value:`${b} ${s.detail}`})}))),e("div",{key:"eb42dece28082ff16a453110b3208de5b44b9fdb",class:"zonos--address"},e("zonos-text",{key:"3557122c716533be7b36a8bd395ea616a7061665",type:"label"},l("Address")),e("zonos-input",{key:"bcc7d84d530f2f3a10537117eb6ef143df7cc8e2",class:"zonos--form-country",inputLabel:l("Country"),inputValue:o,isDisabled:!0}),e("zonos-input",{key:"6ce78e25151a129b69b501cf768604134a395e85",class:"zonos--form-line1",inputLabel:l("Address line 1"),inputValue:i,isError:c(i),onInputChange:s=>this.onInputChange({key:"line1",value:s.detail})}),e("zonos-input",{key:"6f7a18010e2d8131327154a31ba58544df56768c",class:"zonos--form-line2",inputLabel:l("Address line 2"),inputValue:n,isError:c(n),onInputChange:s=>this.onInputChange({key:"line2",value:s.detail})}),e("div",{key:"48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6",class:"zonos--address-row"},e("zonos-input",{key:"6decf8c430d8d25b2c555b110009da74e0ac9e5f",class:"zonos--form-city",inputLabel:l("City"),inputValue:s,isError:c(s),onInputChange:s=>this.onInputChange({key:"city",value:s.detail})}),e("zonos-input",{key:"065e1be213d3cfec7749ab32890f96b0b484a25a",class:"zonos--form-state",inputLabel:l("State/Province"),inputValue:h,isError:c(h),onInputChange:s=>this.onInputChange({key:"state",value:s.detail})})),e("zonos-input",{key:"a69244bf84c9fd007c9ad4aad2b6cc6d44420775",class:"zonos--form-postal-code",inputLabel:l("Postal code"),inputValue:r,isError:c(r),onInputChange:s=>this.onInputChange({key:"postal_code",value:s.detail})}),e("zonos-input",{key:"0bcc89de1ecc4aae8a69d74eff42dfd117ada40b",class:"zonos--form-phone",inputLabel:l("Phone number"),inputValue:d,onInputChange:s=>this.onInputChange({key:"phone",value:s.detail})}))))}static get watchers(){return{translatedAddress:["watchCurrentAddress"]}}};v.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--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";const x=class{constructor(e){s(this,e),this.closeDialog=o(this,"closeDialog",7),this.continueClicked=o(this,"continueClicked",7),this.closeDialogHandler=()=>{this.closeDialog.emit()},this.getTranslatedAddress=({currentAddress:s,translatedAddress:o})=>{var e,t,i,n,a,d;const{city:l,line1:r,line2:c,name:h,postal_code:b,state:f}=s;return{city:(null===(e=o.city)||void 0===e?void 0:e[l])||l,line1:(null===(t=o.line1)||void 0===t?void 0:t[r])||r,line2:(null===(i=o.line2)||void 0===i?void 0:i[c])||c,name:(null===(n=o.name)||void 0===n?void 0:n[h])||h,postal_code:(null===(a=o.postal_code)||void 0===a?void 0:a[b])||b,state:(null===(d=o.state)||void 0===d?void 0:d[f])||f}},this.continueClickHandler=async()=>{var s,o,e;this.continueLoading=!0;const t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null,i=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState}),n=h(Object.assign(Object.assign({},i),{country:this.shippingAddress.country})),a=t&&this.billingAddress&&h(Object.assign(Object.assign({},t),{country:this.billingAddress.country})),d=!!Object.keys(n).length,l=!!a&&!!Object.keys(a).length;if(d||l){const t=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelectorAll("zonos-address-form"),i=null==t?void 0:t[0],n=null==t?void 0:t[1],a=(null===(o=null==i?void 0:i.shadowRoot)||void 0===o?void 0:o.querySelector(".has-error"))||(null===(e=null==n?void 0:n.shadowRoot)||void 0===e?void 0:e.querySelector(".has-error"));return a&&a.scrollIntoView({behavior:"smooth",block:"center"}),void(this.continueLoading=!1)}this.continueClicked.emit({billingAddress:t,shippingAddress:i})},this.buildTranslateAddressState=({currentAddress:s,translatedAddress:o})=>{const{city:e,line1:t,line2:i,name:n,postal_code:a,state:d}=s;return{city:{[e]:o.city},line1:{[t]:o.line1},line2:{[i]:o.line2},name:{[n]:o.name},postal_code:{[a]:o.postal_code},state:{[d]:o.state}}},this.continueLoading=!1,this.dialogLoading=void 0,this.dialogOpen=!1,this.submitBtnType=void 0,this.submitBtnColor=void 0,this.isMobile=!1,this.shippingAddress=void 0,this.billingAddress=void 0,this.translatedShippingAddress=void 0,this.translatedBillingAddress=void 0,this.showErrorBanner=!1,this.translatedShippingAddressState={},this.translatedBillingAddressState={}}watchTranslatedShippingAddress(){this.translatedShippingAddressState=this.translatedShippingAddress}watchTranslatedBillingAddress(){this.translatedBillingAddressState=this.translatedBillingAddress}componentWillLoad(){this.watchTranslatedBillingAddress(),this.watchTranslatedShippingAddress()}render(){const s="#ffffff"===(this.submitBtnColor||b.appearance.colorSecondary)?"outline":this.submitBtnType||"standard",o=this.billingAddress,i=this.shippingAddress;return e(t,{key:"03535edacb348258592641baa349e9dcf14bf78c",class:p(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},e("zonos-dialog",{key:"c16871425dffe955d422ffa5b9aee1ece0da2890",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialog.emit(),open:this.dialogOpen,width:"568px"},e("div",{key:"e4fad501f7cfedc5783774d8b1bf785d6947d3c8",class:"zonos--body"},e("div",{key:"973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0",class:"zonos--dialog-header"},e("div",{key:"89c82b6ff3723056d161560da22bd16a992afee7",class:"zonos--dialog-title"},e("zonos-text",{key:"bf92ef0b40ea67a492164fedb95dd68b7d023e85",type:"title"},l("Update your address")),e("zonos-button",{key:"4e7a1905c976cec396db5c34f633b383bba0d55a",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:m}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("zonos-text",{key:"47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38"},l("To ensure delivery all address details must be in Latin characters."))),e("div",{key:"28d9804f0a18f143ce541c2c511cbfa21a2a416f",class:"zonos--group"},e("zonos-text",{key:"43ec5a9fc8594d065b256952ca8e9392fba03839",class:"zonos--what-you-entered",type:"semiBoldLabel"},l("What you entered")),e("div",{key:"b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1",class:"zonos--address-display-group"},e("zonos-address-display",{key:"152c53176a46575677723ca47386e484c659927a",addressType:"shipping",currentAddress:i}),o&&e("zonos-address-display",{key:"6c7ac2b49d121c26ce45f09a1eac9ef456d45910",addressType:"billing",currentAddress:o})),e("div",{key:"2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d",class:"zonos--address-form-section"},e("zonos-text",{key:"87d3380072a049ccde71ba1b752aedd36830348b",type:"semiBoldLabel"},l("Translated address")),e("zonos-address-form",{key:"2cb36251c6549da05e272183b2c37478b4166fea",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:i,onAddressChange:s=>{this.translatedShippingAddressState=this.buildTranslateAddressState({currentAddress:i,translatedAddress:s.detail})},translatedAddress:this.translatedShippingAddressState}),o&&e("zonos-address-form",{key:"9bf5ebd6fb08851716a72c855451bfeb3ee0ed68",addressType:"billing",class:"zonos--billing-address-form",currentAddress:o,onAddressChange:s=>{this.translatedBillingAddressState=this.buildTranslateAddressState({currentAddress:o,translatedAddress:s.detail})},translatedAddress:this.translatedBillingAddressState}))),e("div",{key:"621df9c8919973b37c62aca5727bde3635086a6b",class:"zonos--group-btn"},e("div",{key:"95e9fd31418abc8e89ceef24af7cc251ee45ac93",class:"zonos--button-wrapper"},e("zonos-button",{key:"bef31fc81e7cc0f2b3f7ab875a29978b07865b6a",class:"zonos--cancel-btn",onClick:()=>this.closeDialogHandler(),variant:"subtle"},l("Cancel")),e("zonos-button",{key:"9d183153541766b421c3420681c1159ffa599682",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"sm",variant:s},l("Update address")))))))}get el(){return i(this)}static get watchers(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}}};x.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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";const k=["blue","cyan","green","orange","purple","red","gray","glass"],w=class{constructor(e){s(this,e),this.checkboxSelected=o(this,"checkboxSelected",7),this.backgroundColor="blue",this.label=void 0,this.isChecked=!1,this.isDisabled=!1,this.size=12,this.fontSize="base",this.borderStyle=void 0}onClick(){this.isDisabled||this.checkboxSelected.emit(!this.isChecked)}render(){const s=k.includes(this.backgroundColor),o=s?`var(--zonos-elements-${this.backgroundColor}-600)`:this.backgroundColor,i=s?`var(--zonos-elements-${this.backgroundColor}-200)`:z(o)?"var(--zonos-elements-gray-0)":"var(--zonos-elements-gray-800)",n=u({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return e(t,{key:"be29586ffd5ae5227614622cfb402686ff5e0583",class:p(["zonos--elements zonos--checkbox"]),style:{"--background-color":o,"--border-radius":n,"--font-family":f(),"--size":`${this.size}px`}},e("label",{key:"091c2388668a94962d7b2bde4496856805f675e8",class:p([this.isDisabled&&"disabled"])},e("input",{key:"c0f66d11f63591b03631cb1c970c0db201d435e2",checked:this.isChecked,disabled:this.isDisabled,hidden:!0,onChange:s=>{this.checkboxSelected.emit(s.target.checked)},type:"checkbox"}),e("span",{key:"ab6c4847d006a812829bd8e871520455da91c7b0",class:"checkmark-container"},e("svg",{key:"617693bef302910db463cdf95b10700b72ea8d44",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"410728b7d5edf27966e660e598f166ce8292015e","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&e("zonos-text",{key:"1b9a21e7ef15ad34684453bc25cb3744ba183cd0",size:this.fontSize},this.label)))}};w.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;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";const A=class{constructor(o){s(this,o),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight,this.iframe=null}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var s,o,e;this.iframe=(null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector("iframe"))||null,null===(e=null===(o=this.iframe)||void 0===o?void 0:o.contentWindow)||void 0===e||e.addEventListener("resize",(()=>{this.iframe&&(this.height=parseFloat(getComputedStyle(this.iframe).height))}))}render(){return this.collapsed?this.el.style.overflow="hidden":setTimeout((()=>{this.collapsed||(this.el.style.overflow="visible")}),300),e(t,{key:"514e75d41d29d70b4ca60230288ae183200b1e12",class:"zonos--elements zonos--collapse",style:{"--font-family":f(),height:this.getElementHeight()}},e("div",{key:"068aee1d13bde4c83ea8582b34844da7452c907c"},e("iframe",{key:"b22fd8ad898a098c244cb817dc6951854505efca",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),e("slot",{key:"b54783376005085e379c7b8d43218ead1bf8e8ac"})))}get el(){return i(this)}};A.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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";const C=class{constructor(e){s(this,e),this.closeDialog=o(this,"closeDialog",7),this.isMobileMode=()=>this.mobile||window.innerWidth<=768,this.closeButtonHandler=()=>{this.closeDialog.emit()},this.clickOutsideDialogHandler=s=>{s.target!==s.currentTarget||this.noClickOutside||this.closeDialog.emit()},this.open=!1,this.headerText="",this.width="460px",this.height=void 0,this.noHeader=!1,this.noBodyPadding=!1,this.noBorder=!1,this.borderStyle=void 0,this.noCloseButton=!1,this.noClickOutside=!1,this.mobile=!1,this.isLoading=!0,this.isMobile=!1}handleWindowResize(){this.isMobile=this.isMobileMode()}componentDidLoad(){this.isMobile=this.isMobileMode()}render(){document.body.style.overflow=this.open?"hidden":"auto";const s=u({overrideBorderStyle:this.borderStyle});return e(t,{key:"48eb2701a74a7973d3502fd1fdc65ce85a6d71ed",class:p(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":s,"--font-family":f(),"--height":this.height||"initial","--width":this.width}},e("div",{key:"b408d792740d8854bab8ea60bd50ce894a75a836",class:"zonos--backdrop"}),e("div",{key:"04affcf48e0b209fa8dacc74039dad536ed9cd9b","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},e("div",{key:"c615792a60b2fa51a74af265b7c944a64e9ff18d",class:"zonos--dialog"},this.isLoading&&e("div",{key:"78d3b571f75c6037fdd694b4621fb9eae48d8ce0",class:"zonos--loading"},e("zonos-spinner",{key:"bd96037d5fe1717ebeae5b1ba27b96aa9ec9253d",size:30})),(this.headerText||!this.noCloseButton)&&e("div",{key:"cc057cbed99107d7d234d08d38e67cbf0140dc66",class:"zonos--header"},this.headerText&&e("h3",{key:"587fff6b04981f1c24b44736b3b40044480f68ba",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&e("zonos-button",{key:"9a1944508996cd8ccb87f68ae175564528af3c4c",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close 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.closeButtonHandler})),e("div",{key:"b563c1939c32489b63516cd4dd14df58a32a08cf",class:p(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},e("slot",{key:"39d66d136f630afbac7ced146d3a8ac60d3c9672"})),e("slot",{key:"5bace66c84150024d0203f89fbf8f5c263cb7472",name:"dialog-footer"}))))}static get assetsDirs(){return["assets"]}};C.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--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:var(--zonos-elements-gray-0);border-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{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;border-radius:var(--zonos-elements-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";const I=class{constructor(o){s(this,o),this.titleText=void 0,this.defaultEmail=null,this.stripe=n.stripe}watchInitStripe(){if(!this.stripe||!n.stripeElements)return;const s=n.stripeLinkElement||n.stripeElements.create("linkAuthentication",{defaultValues:(this.defaultEmail?{email:this.defaultEmail}:void 0)||void 0}),o=this.el.querySelector(".zonos--link-authentication-component");o?(s.mount(o),s.on("change",(s=>{n.stripeLinkEventData=s})),n.stripeLinkElement=s):a("Cannot find container element for linkAuthenticationElement")}componentDidLoad(){this.watchInitStripe()}render(){return e(t,{key:"4a7b9eb534e938f791f70e04756aa9fb1c39f2c7",class:"zonos--link-authentication zonos--elements"},e("zonos-text",{key:"cc4fe49ed6d4bd7cec502ef739b9e835e9e26584",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"f04a438d04e6ccd608d7ff61ac300fb09da4f0ce",class:"zonos--link-authentication-component"}))}get el(){return i(this)}static get watchers(){return{stripe:["watchInitStripe"]}}};I.style=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";export{y as zonos_address,g as zonos_address_display,v as zonos_address_form,x as zonos_address_update_dialog,w as zonos_checkbox,A as zonos_collapse,C as zonos_dialog,I as zonos_link_authentication}
1
+ import{r as s,c as o,h as e,H as t,d as i}from"./p-13ddaf31.js";import{k as n,d as a,l as d,t as l}from"./p-aff5f4ca.js";import{i as r}from"./p-81a54668.js";import{i as c,c as h}from"./p-0c64dbbb.js";import{z as f,d as b}from"./p-f1962041.js";import{c as p}from"./p-b4b7f705.js";import{R as m}from"./p-08e7107d.js";import{g as u}from"./p-83cc2936.js";import{i as z}from"./p-909a331c.js";const y=class{constructor(e){s(this,e),this.invalidCharacters=o(this,"invalidCharacters",7),this.type=void 0,this.titleText=void 0,this.defaultAddress=null,this.stripe=window.Zonos.stripe,this.isDirtyAddress=!1}getStripeAddressInstance(){return"billing"===this.type?{stripeAddressElement:n.stripeBillingAddressElement,stripeAddressEventData:n.stripeBillingAddressEventData,stripeElements:n.stripeElementsForBillingAddress}:{stripeAddressElement:n.stripeAddressElement,stripeAddressEventData:n.stripeAddressEventData,stripeElements:n.stripeElements}}updateAddressEventData({event:s,type:o}){"billing"===o?n.stripeBillingAddressEventData=s:n.stripeAddressEventData=s}updateAddressElement({stripeAddressElement:s,type:o}){"shipping"!==o?n.stripeBillingAddressElement=s:n.stripeAddressElement=s}async watchInitStripe(){var s,o;this.stripe=window.Zonos.stripe;const{stripeAddressEventData:e,stripeElements:t}=this.getStripeAddressInstance();if(!this.stripe||!t)return void a("Stripe is not initialized. Couldn't load stripe element.");(null===(s=this.defaultAddress)||void 0===s?void 0:s.phone)||null===(o=this.defaultAddress)||void 0===o||delete o.phone;const i=d.shippingZoneCountries,n=i?Object.values(i).map((s=>s.code)):[],l=t.create("address",{allowedCountries:"shipping"===this.type?n:[],contacts:this.defaultAddress&&!e?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},null==e?void 0:e.value.address),{country:(null==e?void 0:e.value.address.country)||d.selectedCountryCode||"AL"}),firstName:null==e?void 0:e.value.firstName,lastName:null==e?void 0:e.value.lastName,phone:null==e?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});l.mount(this.el.querySelector(".zonos--address-component")),l.on("change",(s=>{const o=s.value;!this.isDirtyAddress&&o.address.line1.length>=3&&(this.isDirtyAddress=!0,setTimeout((()=>{if(r())this.el.scrollIntoView({behavior:"smooth",block:"end"});else{const s="shipping"===this.type?100:600,o=this.el.closest(".zonos--group"),e=this.el.getBoundingClientRect().top+s;null==o||o.scrollTo({behavior:"smooth",top:e})}}),600)),this.updateAddressEventData({event:Object.assign(Object.assign({},s),{elementMode:this.type,elementType:"address",value:Object.assign(Object.assign({},o),{firstName:o.firstName||o.name.split(" ")[0],lastName:o.lastName||o.name.split(" ")[1]})}),type:this.type})})),this.updateAddressElement({stripeAddressElement:l,type:this.type})}disconnectedCallback(){const s=this.getStripeAddressInstance().stripeAddressElement;null==s||s.destroy()}componentDidLoad(){const s=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!s&&s.value.address.line1.length>0,this.watchInitStripe()}render(){return e(t,{key:"f45a7bbe9d6b5ffac15671a862b3ad4f2eb4a87b",class:"zonos--address zonos--elements"},e("zonos-text",{key:"a9119e6e0c4e5c81a7d17ebe4d6bec925404a3dd",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"7dc12043c6e75ebabd646490c390bafdc2cd4a1d",class:"zonos--address-component"}))}get el(){return i(this)}static get watchers(){return{stripe:["watchInitStripe"]}}};y.style=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";const g=class{constructor(o){s(this,o),this.currentAddress=void 0,this.addressType=void 0}render(){var s;const{city:o,country:i,email:n,line1:a,line2:r,name:h,phone:f,postal_code:b,state:p}=this.currentAddress,m=null===(s=d.shippingZoneCountries)||void 0===s?void 0:s[i],u=({bold:s,content:o})=>{const t=c(o)?"red-600":"gray-1200";return e("zonos-text",{textColor:t,type:s?"boldLabel":"body"},o)};return e(t,{class:"zonos--address-form zonos--elements"},e("div",{class:"zonos--title"},e("zonos-text",{textColor:"gray-700",type:"smallHeader"},l("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{class:"zonos--address-group"},h&&e("div",{class:"zonos--address-line"},u({bold:!0,content:h})),n&&e("div",{class:"zonos--address-line"},u({content:n})),f&&e("div",{class:"zonos--address-line"},u({content:f})),a&&e("div",{class:"zonos--address-line"},u({content:a})),r&&e("div",{class:"zonos--address-line"},u({content:r})),e("div",{class:"zonos--address-line"},o&&u({content:o}),p&&u({content:p}),b&&u({content:b})),m&&e("div",{class:"zonos--address-line"},e("zonos-country-flag",{class:"zonos--country-flag",countryCode:m.code})," ",u({content:m.displayName}))))}};g.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--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';const v=class{constructor(e){s(this,e),this.addressChange=o(this,"addressChange",7),this.onInputChange=({key:s,value:o})=>{this.addressChange.emit(Object.assign(Object.assign({},this.localAddress),{[s]:o}))},this.currentAddress=void 0,this.translatedAddress=void 0,this.addressType=void 0,this.localAddress=this.currentAddress}watchCurrentAddress(){var s,o,e,t,i,n;const{city:a,line1:d,line2:l,name:r,postal_code:c,state:h}=this.currentAddress;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:(null===(s=this.translatedAddress.city)||void 0===s?void 0:s[a])||a,line1:(null===(o=this.translatedAddress.line1)||void 0===o?void 0:o[d])||d,line2:(null===(e=this.translatedAddress.line2)||void 0===e?void 0:e[l])||l,name:(null===(t=this.translatedAddress.name)||void 0===t?void 0:t[r])||r,postal_code:(null===(i=this.translatedAddress.postal_code)||void 0===i?void 0:i[c])||c,state:(null===(n=this.translatedAddress.state)||void 0===n?void 0:n[h])||h})}componentWillLoad(){this.watchCurrentAddress()}render(){const{city:s,country:o,line1:i,line2:n,name:a,phone:d,postal_code:r,state:h}=this.localAddress,f=a.split(" ")[0]||"",b=a.split(" ")[1]||"";return e(t,{key:"9c1ee87200d1f90e9dfac58c49aabba1777373a9",class:"zonos--address-form zonos--elements"},e("div",{key:"eec3416268ff2324fd751408552705086905423d",class:"zonos--title"},e("zonos-text",{key:"a4c254f78420dcfc712e1a83b20dd3ac9e64c460",textColor:"gray-700",type:"smallHeader"},l("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{key:"b8109545d282fb8c06a2e791c30088018d6ffec0",class:"zonos--address-group"},e("div",{key:"833a395984cd75242e5d97697fd6566f11932d1b",class:"zonos--contact"},e("zonos-text",{key:"e60f574e95162aabf6465b878fc9b16c708e8029",type:"label"},l("Contact")),e("zonos-input",{key:"24cd24a362a1bbc76d0c91718c48ae32baa20ae6",class:"zonos--form-email",inputLabel:l("Email"),inputValue:this.currentAddress.email,isDisabled:!0}),e("div",{key:"84e64ef44eb3b39ac7ab542e07d7a52a95377cae",class:"zonos--name zonos--address-row"},e("zonos-input",{key:"26621aca0d57a7fee743874b8d11af5f58c91b69",class:"zonos--form-first-name",inputLabel:l("First name"),inputValue:f,isError:c(f),onInputChange:s=>this.onInputChange({key:"name",value:`${s.detail} ${b}`})}),e("zonos-input",{key:"01e3e5038b4a4311dd5874a1213f936451dc300d",class:"zonos--form-last-name",inputLabel:l("Last name"),inputValue:b,isError:c(b),onInputChange:s=>this.onInputChange({key:"name",value:`${f} ${s.detail}`})}))),e("div",{key:"eb42dece28082ff16a453110b3208de5b44b9fdb",class:"zonos--address"},e("zonos-text",{key:"3557122c716533be7b36a8bd395ea616a7061665",type:"label"},l("Address")),e("zonos-input",{key:"bcc7d84d530f2f3a10537117eb6ef143df7cc8e2",class:"zonos--form-country",inputLabel:l("Country"),inputValue:o,isDisabled:!0}),e("zonos-input",{key:"6ce78e25151a129b69b501cf768604134a395e85",class:"zonos--form-line1",inputLabel:l("Address line 1"),inputValue:i,isError:c(i),onInputChange:s=>this.onInputChange({key:"line1",value:s.detail})}),e("zonos-input",{key:"6f7a18010e2d8131327154a31ba58544df56768c",class:"zonos--form-line2",inputLabel:l("Address line 2"),inputValue:n,isError:c(n),onInputChange:s=>this.onInputChange({key:"line2",value:s.detail})}),e("div",{key:"48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6",class:"zonos--address-row"},e("zonos-input",{key:"6decf8c430d8d25b2c555b110009da74e0ac9e5f",class:"zonos--form-city",inputLabel:l("City"),inputValue:s,isError:c(s),onInputChange:s=>this.onInputChange({key:"city",value:s.detail})}),e("zonos-input",{key:"065e1be213d3cfec7749ab32890f96b0b484a25a",class:"zonos--form-state",inputLabel:l("State/Province"),inputValue:h,isError:c(h),onInputChange:s=>this.onInputChange({key:"state",value:s.detail})})),e("zonos-input",{key:"a69244bf84c9fd007c9ad4aad2b6cc6d44420775",class:"zonos--form-postal-code",inputLabel:l("Postal code"),inputValue:r,isError:c(r),onInputChange:s=>this.onInputChange({key:"postal_code",value:s.detail})}),e("zonos-input",{key:"0bcc89de1ecc4aae8a69d74eff42dfd117ada40b",class:"zonos--form-phone",inputLabel:l("Phone number"),inputValue:d,onInputChange:s=>this.onInputChange({key:"phone",value:s.detail})}))))}static get watchers(){return{translatedAddress:["watchCurrentAddress"]}}};v.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--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";const x=class{constructor(e){s(this,e),this.closeDialog=o(this,"closeDialog",7),this.continueClicked=o(this,"continueClicked",7),this.closeDialogHandler=()=>{this.closeDialog.emit()},this.getTranslatedAddress=({currentAddress:s,translatedAddress:o})=>{var e,t,i,n,a,d;const{city:l,line1:r,line2:c,name:h,postal_code:f,state:b}=s;return{city:(null===(e=o.city)||void 0===e?void 0:e[l])||l,line1:(null===(t=o.line1)||void 0===t?void 0:t[r])||r,line2:(null===(i=o.line2)||void 0===i?void 0:i[c])||c,name:(null===(n=o.name)||void 0===n?void 0:n[h])||h,postal_code:(null===(a=o.postal_code)||void 0===a?void 0:a[f])||f,state:(null===(d=o.state)||void 0===d?void 0:d[b])||b}},this.continueClickHandler=async()=>{var s,o,e;this.continueLoading=!0;const t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null,i=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState}),n=h(Object.assign(Object.assign({},i),{country:this.shippingAddress.country})),a=t&&this.billingAddress&&h(Object.assign(Object.assign({},t),{country:this.billingAddress.country})),d=!!Object.keys(n).length,l=!!a&&!!Object.keys(a).length;if(d||l){const t=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelectorAll("zonos-address-form"),i=null==t?void 0:t[0],n=null==t?void 0:t[1],a=(null===(o=null==i?void 0:i.shadowRoot)||void 0===o?void 0:o.querySelector(".has-error"))||(null===(e=null==n?void 0:n.shadowRoot)||void 0===e?void 0:e.querySelector(".has-error"));return a&&a.scrollIntoView({behavior:"smooth",block:"center"}),void(this.continueLoading=!1)}this.continueClicked.emit({billingAddress:t,shippingAddress:i})},this.buildTranslateAddressState=({currentAddress:s,translatedAddress:o})=>{const{city:e,line1:t,line2:i,name:n,postal_code:a,state:d}=s;return{city:{[e]:o.city},line1:{[t]:o.line1},line2:{[i]:o.line2},name:{[n]:o.name},postal_code:{[a]:o.postal_code},state:{[d]:o.state}}},this.continueLoading=!1,this.dialogLoading=void 0,this.dialogOpen=!1,this.submitBtnType=void 0,this.submitBtnColor=void 0,this.isMobile=!1,this.shippingAddress=void 0,this.billingAddress=void 0,this.translatedShippingAddress=void 0,this.translatedBillingAddress=void 0,this.showErrorBanner=!1,this.translatedShippingAddressState={},this.translatedBillingAddressState={}}watchTranslatedShippingAddress(){this.translatedShippingAddressState=this.translatedShippingAddress}watchTranslatedBillingAddress(){this.translatedBillingAddressState=this.translatedBillingAddress}componentWillLoad(){this.watchTranslatedBillingAddress(),this.watchTranslatedShippingAddress()}render(){const s="#ffffff"===(this.submitBtnColor||f.appearance.colorSecondary)?"outline":this.submitBtnType||"standard",o=this.billingAddress,i=this.shippingAddress;return e(t,{key:"03535edacb348258592641baa349e9dcf14bf78c",class:p(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},e("zonos-dialog",{key:"c16871425dffe955d422ffa5b9aee1ece0da2890",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialog.emit(),open:this.dialogOpen,width:"568px"},e("div",{key:"e4fad501f7cfedc5783774d8b1bf785d6947d3c8",class:"zonos--body"},e("div",{key:"973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0",class:"zonos--dialog-header"},e("div",{key:"89c82b6ff3723056d161560da22bd16a992afee7",class:"zonos--dialog-title"},e("zonos-text",{key:"bf92ef0b40ea67a492164fedb95dd68b7d023e85",type:"title"},l("Update your address")),e("zonos-button",{key:"4e7a1905c976cec396db5c34f633b383bba0d55a",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:m}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("zonos-text",{key:"47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38"},l("To ensure delivery all address details must be in Latin characters."))),e("div",{key:"28d9804f0a18f143ce541c2c511cbfa21a2a416f",class:"zonos--group"},e("zonos-text",{key:"43ec5a9fc8594d065b256952ca8e9392fba03839",class:"zonos--what-you-entered",type:"semiBoldLabel"},l("What you entered")),e("div",{key:"b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1",class:"zonos--address-display-group"},e("zonos-address-display",{key:"152c53176a46575677723ca47386e484c659927a",addressType:"shipping",currentAddress:i}),o&&e("zonos-address-display",{key:"6c7ac2b49d121c26ce45f09a1eac9ef456d45910",addressType:"billing",currentAddress:o})),e("div",{key:"2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d",class:"zonos--address-form-section"},e("zonos-text",{key:"87d3380072a049ccde71ba1b752aedd36830348b",type:"semiBoldLabel"},l("Translated address")),e("zonos-address-form",{key:"2cb36251c6549da05e272183b2c37478b4166fea",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:i,onAddressChange:s=>{this.translatedShippingAddressState=this.buildTranslateAddressState({currentAddress:i,translatedAddress:s.detail})},translatedAddress:this.translatedShippingAddressState}),o&&e("zonos-address-form",{key:"9bf5ebd6fb08851716a72c855451bfeb3ee0ed68",addressType:"billing",class:"zonos--billing-address-form",currentAddress:o,onAddressChange:s=>{this.translatedBillingAddressState=this.buildTranslateAddressState({currentAddress:o,translatedAddress:s.detail})},translatedAddress:this.translatedBillingAddressState}))),e("div",{key:"621df9c8919973b37c62aca5727bde3635086a6b",class:"zonos--group-btn"},e("div",{key:"95e9fd31418abc8e89ceef24af7cc251ee45ac93",class:"zonos--button-wrapper"},e("zonos-button",{key:"bef31fc81e7cc0f2b3f7ab875a29978b07865b6a",class:"zonos--cancel-btn",onClick:()=>this.closeDialogHandler(),variant:"subtle"},l("Cancel")),e("zonos-button",{key:"9d183153541766b421c3420681c1159ffa599682",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"sm",variant:s},l("Update address")))))))}get el(){return i(this)}static get watchers(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}}};x.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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";const k=["blue","cyan","green","orange","purple","red","gray","glass"],w=class{constructor(e){s(this,e),this.checkboxSelected=o(this,"checkboxSelected",7),this.backgroundColor="blue",this.label=void 0,this.isChecked=!1,this.isDisabled=!1,this.size=12,this.fontSize="base",this.borderStyle=void 0}onClick(){this.isDisabled||this.checkboxSelected.emit(!this.isChecked)}render(){const s=k.includes(this.backgroundColor),o=s?`var(--zonos-elements-${this.backgroundColor}-600)`:this.backgroundColor,i=s?`var(--zonos-elements-${this.backgroundColor}-200)`:z(o)?"var(--zonos-elements-gray-0)":"var(--zonos-elements-gray-800)",n=u({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return e(t,{key:"be29586ffd5ae5227614622cfb402686ff5e0583",class:p(["zonos--elements zonos--checkbox"]),style:{"--background-color":o,"--border-radius":n,"--font-family":b(),"--size":`${this.size}px`}},e("label",{key:"091c2388668a94962d7b2bde4496856805f675e8",class:p([this.isDisabled&&"disabled"])},e("input",{key:"c0f66d11f63591b03631cb1c970c0db201d435e2",checked:this.isChecked,disabled:this.isDisabled,hidden:!0,onChange:s=>{this.checkboxSelected.emit(s.target.checked)},type:"checkbox"}),e("span",{key:"ab6c4847d006a812829bd8e871520455da91c7b0",class:"checkmark-container"},e("svg",{key:"617693bef302910db463cdf95b10700b72ea8d44",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"410728b7d5edf27966e660e598f166ce8292015e","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&e("zonos-text",{key:"1b9a21e7ef15ad34684453bc25cb3744ba183cd0",size:this.fontSize},this.label)))}};w.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;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";const A=class{constructor(o){s(this,o),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight,this.iframe=null}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var s,o,e;this.iframe=(null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector("iframe"))||null,null===(e=null===(o=this.iframe)||void 0===o?void 0:o.contentWindow)||void 0===e||e.addEventListener("resize",(()=>{this.iframe&&(this.height=parseFloat(getComputedStyle(this.iframe).height))}))}render(){return this.collapsed?this.el.style.overflow="hidden":setTimeout((()=>{this.collapsed||(this.el.style.overflow="visible")}),300),e(t,{key:"514e75d41d29d70b4ca60230288ae183200b1e12",class:"zonos--elements zonos--collapse",style:{"--font-family":b(),height:this.getElementHeight()}},e("div",{key:"068aee1d13bde4c83ea8582b34844da7452c907c"},e("iframe",{key:"b22fd8ad898a098c244cb817dc6951854505efca",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),e("slot",{key:"b54783376005085e379c7b8d43218ead1bf8e8ac"})))}get el(){return i(this)}};A.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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";const C=class{constructor(e){s(this,e),this.closeDialog=o(this,"closeDialog",7),this.isMobileMode=()=>this.mobile||window.innerWidth<=768,this.closeButtonHandler=()=>{this.closeDialog.emit()},this.clickOutsideDialogHandler=s=>{s.target!==s.currentTarget||this.noClickOutside||this.closeDialog.emit()},this.open=!1,this.headerText="",this.width="460px",this.height=void 0,this.noHeader=!1,this.noBodyPadding=!1,this.noBorder=!1,this.borderStyle=void 0,this.noCloseButton=!1,this.noClickOutside=!1,this.mobile=!1,this.isLoading=!0,this.isMobile=!1}handleWindowResize(){this.isMobile=this.isMobileMode()}componentDidLoad(){this.isMobile=this.isMobileMode()}render(){document.body.style.overflow=this.open?"hidden":"auto";const s=u({overrideBorderStyle:this.borderStyle});return e(t,{key:"48eb2701a74a7973d3502fd1fdc65ce85a6d71ed",class:p(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":s,"--font-family":b(),"--height":this.height||"initial","--width":this.width}},e("div",{key:"b408d792740d8854bab8ea60bd50ce894a75a836",class:"zonos--backdrop"}),e("div",{key:"04affcf48e0b209fa8dacc74039dad536ed9cd9b","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},e("div",{key:"c615792a60b2fa51a74af265b7c944a64e9ff18d",class:"zonos--dialog"},this.isLoading&&e("div",{key:"78d3b571f75c6037fdd694b4621fb9eae48d8ce0",class:"zonos--loading"},e("zonos-spinner",{key:"bd96037d5fe1717ebeae5b1ba27b96aa9ec9253d",size:30})),(this.headerText||!this.noCloseButton)&&e("div",{key:"cc057cbed99107d7d234d08d38e67cbf0140dc66",class:"zonos--header"},this.headerText&&e("h3",{key:"587fff6b04981f1c24b44736b3b40044480f68ba",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&e("zonos-button",{key:"9a1944508996cd8ccb87f68ae175564528af3c4c",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close 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.closeButtonHandler})),e("div",{key:"b563c1939c32489b63516cd4dd14df58a32a08cf",class:p(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},e("slot",{key:"39d66d136f630afbac7ced146d3a8ac60d3c9672"})),e("slot",{key:"5bace66c84150024d0203f89fbf8f5c263cb7472",name:"dialog-footer"}))))}static get assetsDirs(){return["assets"]}};C.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--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:var(--zonos-elements-gray-0);border-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{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;border-radius:var(--zonos-elements-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";const I=class{constructor(o){s(this,o),this.titleText=void 0,this.defaultEmail=null,this.stripe=n.stripe}watchInitStripe(){if(!this.stripe||!n.stripeElements)return;const s=n.stripeLinkElement||n.stripeElements.create("linkAuthentication",{defaultValues:(this.defaultEmail?{email:this.defaultEmail}:void 0)||void 0}),o=this.el.querySelector(".zonos--link-authentication-component");o?(s.mount(o),s.on("change",(s=>{n.stripeLinkEventData=s})),n.stripeLinkElement=s):a("Cannot find container element for linkAuthenticationElement")}componentDidLoad(){this.watchInitStripe()}render(){return e(t,{key:"4a7b9eb534e938f791f70e04756aa9fb1c39f2c7",class:"zonos--link-authentication zonos--elements"},e("zonos-text",{key:"cc4fe49ed6d4bd7cec502ef739b9e835e9e26584",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"f04a438d04e6ccd608d7ff61ac300fb09da4f0ce",class:"zonos--link-authentication-component"}))}get el(){return i(this)}static get watchers(){return{stripe:["watchInitStripe"]}}};I.style=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";export{y as zonos_address,g as zonos_address_display,v as zonos_address_form,x as zonos_address_update_dialog,w as zonos_checkbox,A as zonos_collapse,C as zonos_dialog,I as zonos_link_authentication}
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,c){function r(o){try{u(n.next(o))}catch(o){c(o)}}function i(o){try{u(n["throw"](o))}catch(o){c(o)}}function u(o){o.done?t(o.value):s(o.value).then(r,i)}u((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,s,c,r;return r={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function i(o){return function(e){return u([o,e])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,i[0]&&(t=0)),t)try{if(n=1,s&&(c=i[0]&2?s["return"]:i[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,i[1])).done)return c;if(s=0,c)i=[i[0]&2,c.value];switch(i[0]){case 0:case 1:c=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;s=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(c=t.trys,c=c.length>0&&c[c.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!c||i[1]>c[0]&&i[1]<c[3])){t.label=i[1];break}if(i[0]===6&&t.label<c[1]){t.label=c[1];c=i;break}if(c&&t.label<c[2]){t.label=c[2];t.ops.push(i);break}if(c[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];s=0}finally{n=c=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-163ff5b5.system.js","./p-ef9cbb66.system.js","./p-87badea9.system.js","./p-aaf1e517.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-79f3c4f5.system.js","./p-771fbeb3.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,s,c,r,i,u,a,h,d,l,f,z,m,k,v,p,g,b,w,y,x,C,_,O,I,A,S,j,N,H,L,B,E,M,D;return{setters:[function(o){e=o.r;t=o.h;n=o.F;s=o.H},function(o){c=o.l;r=o.a;i=o.s;u=o.b;a=o.c;h=o.d;d=o.e;l=o.i;f=o.f;z=o.g;m=o.h;k=o.j;v=o.k;p=o.m;g=o.n;b=o.t;w=o.o;y=o.p;x=o.q;C=o.r;_=o.u},function(o){O=o.z;I=o.g;A=o.m},function(o){S=o.c;j=o.s;N=o.a;H=o.t},function(o){L=o.i},function(o){B=o.c},function(o){E=o.g},function(o){M=o.i},function(o){D=o.R}],execute:function(){var P=this;var T=function(o){var e=o.key,t=o.value;return t?{key:e,value:t}:null};var G=function(o){return[T({key:"brand",value:o.itemBrand}),T({key:"material",value:o.itemMaterial}),T({key:"category",value:o.itemCategory}),T({key:"color",value:o.itemColor}),T({key:"customization",value:o.itemCustomization}),T({key:"descriptionDetailed",value:o.itemDescriptionDetailed}),T({key:"fabricContent",value:o.itemFabricContent}),T({key:"ltlClass",value:o.itemLtlClass}),T({key:"pickingLocation",value:o.itemPickingLocation}),T({key:"shipFromLocation",value:o.itemShipFromLocation}),T({key:"size",value:o.itemSize}),T({key:"status",value:o.status})].filter(Boolean)};var R=function(o){if(!o){return"POUND"}switch(o.toUpperCase()){case"KG":return"KILOGRAM";case"OZ":return"OUNCE";case"G":return"GRAM";default:return"POUND"}};var U=function(o){if(!o){return[]}var e=[];if(o.length){e.push({type:"LENGTH",unitOfMeasure:"INCH",value:o.length})}if(o.width){e.push({type:"WIDTH",unitOfMeasure:"INCH",value:o.width})}if(o.weight){e.push({type:"WEIGHT",unitOfMeasure:R(o.weightUnits),value:o.weight})}if(o.height){e.push({type:"HEIGHT",unitOfMeasure:"INCH",value:o.height})}return e};var Z=function(o){var e;var t=((e=o===null||o===void 0?void 0:o.items)===null||e===void 0?void 0:e.map((function(o){return{amount:o.unitPrice||0,attributes:G(o),countryOfOrigin:o.countryOfOrigin||undefined,currencyCode:"USD",description:o.itemDescriptionLong||"",imageUrl:o.imageURL||"",itemType:"PHYSICAL_GOOD",measurements:U(o),name:o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""}})))||[];return t};var F=function(o){if(o===void 0){o=true}if(!c.localizationLoaded){return false}if(!c.isShippableCountry){document.dispatchEvent(S("legacyCheckoutError","Unable to initiate checkout process in a country where shipping is not available"));if(o){r("Checkout: not shippable country")}return false}return true};var V=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(P,void 0,void 0,(function(){var o,s,c,r,l;var f=this;return __generator(this,(function(z){o=document.querySelector(e);s=i();if(!o&&s){c=document.createElement("button");c.style.display="none";c.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(c);t===null||t===void 0?void 0:t(s);n.disconnect();return[2]}r=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!r||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(f,void 0,void 0,(function(){var e,t,n,s,c,i,l;return __generator(this,(function(f){n=r.value;if(!n){return[2]}u(n);if(!F(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}c=new FormData(s);i=document.querySelector("input#addressLine1Input");l={address1:(e=c.get("shippingAddress.address1"))!==null&&e!==void 0?e:i&&i.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:(t=c.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){h("One or more shipping address field is missing",Object.entries(l));void j({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:O.storeId}});return[2]}d({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));n.observe(document.body,{childList:true,subtree:true})};var K='<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';var W=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";var q=W;var J=o("zonos_checkout",function(){function o(o){var t=this;e(this,o);this.onChangeLocaleListener=function(){};this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,n,s;return __generator(this,(function(c){switch(c.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||O.appearance.theme;return[4,l({overrideBorderRaidus:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?s:undefined})];case 1:c.sent();return[2]}}))}))};this.getCurrentLocalePageEnum=function(){switch(f.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.defaultAddress=null;this.forceDialogOpen=false;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.paymentError=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button";this.legacyCheckoutHiddenBtnSelector="#legacy-checkout-hidden-button";this.isLegacyCheckout=false}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void z(e);return[2]}))}))};o.prototype.closeDialogHandler=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){N("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&f.step==="finish"){m()}f.step="customer-info";k();return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:if(!window.Zonos.tempCartData)return[3,2];o=Z(window.Zonos.tempCartData);return[4,z(o)];case 1:n.sent();return[3,5];case 2:if(!O.checkoutSettings.buildCartDetail)return[3,5];r("build cart detail");return[4,O.checkoutSettings.buildCartDetail()];case 3:e=n.sent();return[4,z(e)];case 4:n.sent();n.label=5;case 5:if(!!v.clientSecret)return[3,7];return[4,p()];case 6:t=n.sent();r("stripeStoreInitCheckoutSession: ".concat(t));if(!t){return[2,false]}n.label=7;case 7:return[4,this.applyStripeTheme()];case 8:n.sent();return[2,true]}}))}))};o.prototype.attachCheckout=function(){var o=this;var e=O.checkoutSettings.placeOrderButtonSelector;r("attach checkout ".concat(e));if(!e){return}var t=document.querySelectorAll("".concat(e,", ").concat(this.domesticRedirectedBtnSelector));t.forEach((function(e){var t=e.getAttribute("data-zonos-checkout-attached");if(t){return}e.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:if(!F()){return[2]}e.preventDefault();e.stopPropagation();r("zonos checkout button clicked");v.isFetchingSession=true;this.open=true;n.label=1;case 1:n.trys.push([1,3,,4]);return[4,this.buildCartAndInit()];case 2:o=n.sent();if(!o){throw new Error("Error building cart")}N("zonos-checkout-start");void H("checkout_open");return[3,4];case 3:t=n.sent();v.isFetchingSession=false;g({messages:[b("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:b("Error creating Checkout")});return[3,4];case 4:return[2]}}))}))}));e.removeAttribute("disabled");e.setAttribute("data-zonos-checkout-attached","true");if(e.matches(o.domesticRedirectedBtnSelector)){e.dispatchEvent(S("click"));a();e.remove()}if(e.matches(o.legacyCheckoutHiddenBtnSelector)){o.isLegacyCheckout=true;e.dispatchEvent(S("click"));e.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.useLegacyQueryParam=function(){var o=new URLSearchParams(window.location.search);var e={country:o.get("country"),customerAddress1:o.get("customerAddress1"),customerAddress2:o.get("customerAddress2"),customerCity:o.get("customerCity"),customerEmail:o.get("customerEmail"),customerName:o.get("customerName"),customerPhone:o.get("customerPhone"),customerState:o.get("customerState"),customerZip:o.get("customerZip")};if(!e.customerAddress1||!e.customerCity||!e.customerName||!e.customerPhone||!e.customerState||!e.customerZip||!e.country){return}this.defaultAddress={address:{city:e.customerCity,country:e.country,line1:e.customerAddress1,line2:e.customerAddress2||"",postal_code:e.customerZip,state:e.customerState},email:e.customerEmail||"",name:e.customerName,phone:e.customerPhone}};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;var t=this;return __generator(this,(function(n){v.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;V({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){t.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});if(window.Zonos.tempCartData){this.useLegacyQueryParam()}o=setInterval((function(){var e=window.Zonos.internationalHideSelector;if(!e){clearInterval(o);return}var t=F(false);var n=document.querySelectorAll(e);if(!t){n===null||n===void 0?void 0:n.forEach((function(o){var e=o;var t=e.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(e).display;e.style.display=t||"initial"}));return}n===null||n===void 0?void 0:n.forEach((function(o){var e=o;var t=e.style.display;e.setAttribute("data-zonos-checkout-original-display",t);e.style.display="none"}))}),100);e=setInterval((function(){v.stripe=window.Zonos.stripe;t.stripe=window.Zonos.stripe;if(!t.stripe){r("waiting for stripe to be loaded");return}if(t.storybookPaymentStatusOverride){clearInterval(e);return}r("init checkout");if(t.preview||t.forceDialogOpen){void t.buildCartAndInit()}else{t.attachCheckout();var o=new MutationObserver((function(){t.attachCheckout()}));o.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){f.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.submitLoading=true;return[4,w()];case 1:t.sent();o=setInterval((function(){if(f.landedCostData||!v.isFetchingLandedCost){if(f.landedCostData){y()}e.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){y();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.paymentError=false;this.submitLoading=true;e.label=1;case 1:e.trys.push([1,3,,4]);return[4,x()];case 2:e.sent();y();return[3,4];case 3:o=e.sent();h(o);this.paymentError=true;return[3,4];case 4:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:C();if(!this.preview)return[3,2];f.step="customer-info";return[4,this.init()];case 1:n.sent();return[2];case 2:m();if(this.isLegacyCheckout&&window.Zonos.tempCartData){o=window.Zonos.tempCartData.contShoppingURL;window.location.href=o;return[2]}e=window.location.href;t=e.split("?")[0];window.history.replaceState({},document.title,t);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=L(this.mobile);void this.applyStripeTheme();r("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=L(this.mobile);void this.applyStripeTheme();r("mobile: ".concat(this.isMobile))};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=I(this.appearanceSettingsOverride.theme)}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=L(this.mobile);this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=_("selectedLocale",(function(){void o.applyStripeTheme()}));r("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){C();m();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e;var r=f.step!=="finish"&&f.step!=="error"&&!v.stripeElements||v.isFetchingSession;var i=A(O.appearance,this.appearanceSettingsOverride),u=i.colorPrimary,a=i.colorSecondary,h=i.logoUrl,d=i.style;var l=O.appearance.zonosAttribution==="ENABLED";var z=O.appearance.theme;var m=u&&M(u)?"DARK":"LIGHT";var k=this.isMobile?z:m;var p=!this.isMobile?a:undefined;var g=c.customMessages;var b=(e=g.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var w=this.getCurrentLocalePageEnum();var y=g.filter((function(o){return o.pageName===w}));var x=function(){var e=o.preview?"".concat(h,"?timestamp=").concat(Date.now()):h;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(O.organizationName," logo"),src:e,width:100}))};var C=function(){return t("zonos-v-stack",null,x(),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),y.map((function(o){return t("zonos-custom-message",{icon:K,message:o.message})})))};var _=function(){return t("div",{class:"zonos--content",style:{"--border-radius":E({overrideBorderStyle:d})}},f.step!=="finish"&&f.step!=="error"&&t(n,null,t("div",{class:"zonos--left","data-theme":k,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&C(),f.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:p}),f.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:p}),f.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:p})),t("div",{class:"zonos--right","data-theme":z},o.isMobile&&C(),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.closeDialogHandler()}}),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),t("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},t("zonos-cart-items",null),o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:K,message:b})))),t("zonos-cart-restricted-items",null),!o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:K,message:b}))))),(f.step==="finish"||f.step==="error")&&t("div",{class:"zonos--done","data-theme":z},t("div",{class:"zonos--header"},x(),t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),t("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:f.step==="error"&&!!f.error?Object.assign(Object.assign({},f.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":z,mobile:o.isMobile,slot:!o.isMobile?"dialog-footer":undefined}))};return t(s,{class:B(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?_():t("zonos-dialog",{borderStyle:d,"data-theme":z,height:"980px",isLoading:r,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},_()))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"]}},enumerable:false,configurable:true});return o}());J.style=q}}}));