@zonos/elements 1.3.27 → 1.3.29

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 (130) hide show
  1. package/dist/cjs/{cart-61caeb84.js → cart-62ff7ee7.js} +40 -40
  2. package/dist/cjs/index.cjs.js +3 -3
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{submitGtag-d3898668.js → submitGtag-a5f8eaab.js} +1 -1
  5. package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
  6. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  7. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
  9. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-elements.cjs.js +1 -1
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-hello.cjs.entry.js +30 -3
  15. package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
  16. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +31 -3
  17. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -5
  18. package/dist/collection/components/store/translationStore/strings.arabic.js +2 -2
  19. package/dist/collection/components/store/translationStore/strings.base.js +2 -2
  20. package/dist/collection/components/store/translationStore/strings.chinese.js +2 -2
  21. package/dist/collection/components/store/translationStore/strings.danish.js +2 -2
  22. package/dist/collection/components/store/translationStore/strings.dutch.js +2 -2
  23. package/dist/collection/components/store/translationStore/strings.french.js +2 -2
  24. package/dist/collection/components/store/translationStore/strings.german.js +2 -2
  25. package/dist/collection/components/store/translationStore/strings.hebrew.js +2 -2
  26. package/dist/collection/components/store/translationStore/strings.indonesian.js +2 -2
  27. package/dist/collection/components/store/translationStore/strings.italian.js +2 -2
  28. package/dist/collection/components/store/translationStore/strings.japanese.js +2 -2
  29. package/dist/collection/components/store/translationStore/strings.korean.js +2 -2
  30. package/dist/collection/components/store/translationStore/strings.norwegian.js +2 -2
  31. package/dist/collection/components/store/translationStore/strings.polish.js +2 -2
  32. package/dist/collection/components/store/translationStore/strings.portuguese.js +2 -2
  33. package/dist/collection/components/store/translationStore/strings.russian.js +2 -2
  34. package/dist/collection/components/store/translationStore/strings.spanish.js +2 -2
  35. package/dist/collection/components/store/translationStore/strings.swedish.js +2 -2
  36. package/dist/collection/components/store/translationStore/strings.turkish.js +2 -2
  37. package/dist/collection/components/store/translationStore/strings.vietnamese.js +2 -2
  38. package/dist/esm/{cart-530a8750.js → cart-b96aaa4f.js} +40 -40
  39. package/dist/esm/index.js +3 -3
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/{submitGtag-44ba0846.js → submitGtag-6e271d76.js} +1 -1
  42. package/dist/esm/zonos-address_8.entry.js +1 -1
  43. package/dist/esm/zonos-card_2.entry.js +1 -1
  44. package/dist/esm/zonos-cart-items_12.entry.js +2 -2
  45. package/dist/esm/zonos-checkout.entry.js +2 -2
  46. package/dist/esm/zonos-controller.entry.js +1 -1
  47. package/dist/esm/zonos-country-flag.entry.js +1 -1
  48. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  49. package/dist/esm/zonos-elements.js +1 -1
  50. package/dist/esm/zonos-hello-dialog.entry.js +6 -6
  51. package/dist/esm/zonos-hello.entry.js +30 -3
  52. package/dist/esm/zonos-payment.entry.js +1 -1
  53. package/dist/esm-es5/cart-b96aaa4f.js +1 -0
  54. package/dist/esm-es5/index.js +1 -1
  55. package/dist/esm-es5/loader.js +1 -1
  56. package/dist/esm-es5/{submitGtag-44ba0846.js → submitGtag-6e271d76.js} +1 -1
  57. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  58. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  59. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  60. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  61. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  62. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  63. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  64. package/dist/esm-es5/zonos-elements.js +1 -1
  65. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  66. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  67. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  68. package/dist/scripts/index.d.ts +11 -2
  69. package/dist/scripts/index.js +1 -1
  70. package/dist/scripts/loadZonos.js +1 -1
  71. package/dist/scripts/zonos.js +1 -1
  72. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +8 -0
  73. package/dist/types/components/store/translationStore/strings.arabic.d.ts +1 -1
  74. package/dist/types/components/store/translationStore/strings.base.d.ts +1 -1
  75. package/dist/types/components/store/translationStore/strings.chinese.d.ts +1 -1
  76. package/dist/types/components/store/translationStore/strings.danish.d.ts +1 -1
  77. package/dist/types/components/store/translationStore/strings.dutch.d.ts +1 -1
  78. package/dist/types/components/store/translationStore/strings.french.d.ts +1 -1
  79. package/dist/types/components/store/translationStore/strings.german.d.ts +1 -1
  80. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +1 -1
  81. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +1 -1
  82. package/dist/types/components/store/translationStore/strings.italian.d.ts +1 -1
  83. package/dist/types/components/store/translationStore/strings.japanese.d.ts +1 -1
  84. package/dist/types/components/store/translationStore/strings.korean.d.ts +1 -1
  85. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +1 -1
  86. package/dist/types/components/store/translationStore/strings.polish.d.ts +1 -1
  87. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +1 -1
  88. package/dist/types/components/store/translationStore/strings.russian.d.ts +1 -1
  89. package/dist/types/components/store/translationStore/strings.spanish.d.ts +1 -1
  90. package/dist/types/components/store/translationStore/strings.swedish.d.ts +1 -1
  91. package/dist/types/components/store/translationStore/strings.turkish.d.ts +1 -1
  92. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +1 -1
  93. package/dist/types/components/store/translationStore.d.ts +1 -1
  94. package/dist/types/types/checkout/CheckoutConfig.d.ts +2 -2
  95. package/dist/types/types/hello/HelloConfig.d.ts +10 -1
  96. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  97. package/dist/zonos-elements/index.esm.js +1 -1
  98. package/dist/zonos-elements/{p-5f580c9b.system.entry.js → p-087c83a5.system.entry.js} +1 -1
  99. package/dist/zonos-elements/{p-5d006b02.system.js → p-0e6f0bac.system.js} +1 -1
  100. package/dist/zonos-elements/{p-84f7a3a2.system.entry.js → p-10b9a681.system.entry.js} +1 -1
  101. package/dist/zonos-elements/p-1a40aaf4.system.js +1 -0
  102. package/dist/zonos-elements/{p-a5704be4.system.entry.js → p-2613b5d3.system.entry.js} +1 -1
  103. package/dist/zonos-elements/{p-094bfe56.system.entry.js → p-2cb880e7.system.entry.js} +1 -1
  104. package/dist/zonos-elements/{p-2a5a0bae.entry.js → p-4a0cf47b.entry.js} +1 -1
  105. package/dist/zonos-elements/{p-cbed004d.system.entry.js → p-4e01d1ab.system.entry.js} +1 -1
  106. package/dist/zonos-elements/{p-4eaae82e.entry.js → p-5b4c1c09.entry.js} +1 -1
  107. package/dist/zonos-elements/p-5d53f9a4.js +1 -0
  108. package/dist/zonos-elements/{p-e15ef12e.system.entry.js → p-666d1605.system.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-11f87d7d.entry.js → p-692816a7.entry.js} +1 -1
  110. package/dist/zonos-elements/p-725c2d57.entry.js +1 -0
  111. package/dist/zonos-elements/{p-35d00c30.entry.js → p-7664dec5.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-e3978982.entry.js → p-78a839b8.entry.js} +1 -1
  113. package/dist/zonos-elements/{p-37685139.entry.js → p-8c9e7980.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-c4154737.system.js → p-9b0aa65c.system.js} +1 -1
  115. package/dist/zonos-elements/p-9c32b924.entry.js +1 -0
  116. package/dist/zonos-elements/{p-ecd994c8.system.entry.js → p-9cdfb51b.system.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-687dbccc.entry.js → p-9f7c0472.entry.js} +1 -1
  118. package/dist/zonos-elements/{p-7b5a0a18.system.entry.js → p-b208fec6.system.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-bb032c2f.js → p-b468f941.js} +1 -1
  120. package/dist/zonos-elements/{p-099e229a.entry.js → p-c63a7dde.entry.js} +1 -1
  121. package/dist/zonos-elements/{p-18d04e89.system.entry.js → p-d8027710.system.entry.js} +1 -1
  122. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  123. package/dist/zonos-elements/{p-68dfcd25.system.entry.js → p-f69f1ec6.system.entry.js} +1 -1
  124. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  125. package/package.json +1 -1
  126. package/dist/esm-es5/cart-530a8750.js +0 -1
  127. package/dist/zonos-elements/p-6fe27968.entry.js +0 -1
  128. package/dist/zonos-elements/p-b4ccc72c.js +0 -1
  129. package/dist/zonos-elements/p-fb1120a2.system.js +0 -1
  130. package/dist/zonos-elements/p-fb1b98a8.entry.js +0 -1
@@ -1 +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 i(o){try{u(n.next(o))}catch(o){c(o)}}function r(o){try{u(n["throw"](o))}catch(o){c(o)}}function u(o){o.done?t(o.value):s(o.value).then(i,r)}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,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(o){return function(e){return u([o,e])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(t=0)),t)try{if(n=1,s&&(c=r[0]&2?s["return"]:r[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,r[1])).done)return c;if(s=0,c)r=[r[0]&2,c.value];switch(r[0]){case 0:case 1:c=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;s=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(c=t.trys,c=c.length>0&&c[c.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!c||r[1]>c[0]&&r[1]<c[3])){t.label=r[1];break}if(r[0]===6&&t.label<c[1]){t.label=c[1];c=r;break}if(c&&t.label<c[2]){t.label=c[2];t.ops.push(r);break}if(c[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];s=0}finally{n=c=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-fb1120a2.system.js","./p-0b538ed4.system.js","./p-c4154737.system.js","./p-aed0098c.system.js","./p-63db40b9.system.js","./p-23e7c655.system.js","./p-a8cb25de.system.js","./p-e37440ad.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,s,c,i,r,u,a,h,l,d,f,z,m,k,v,p,g,b,w,y,x,C,_,O,S,I,T,A,N,j,H,L,B,E,P;return{setters:[function(o){e=o.r;t=o.h;n=o.H;s=o.F},function(o){c=o.l;i=o.s;r=o.a;u=o.b;a=o.c;h=o.i;l=o.d;d=o.e;f=o.f;z=o.g;m=o.h;k=o.j;v=o.k;p=o.t;g=o.m;b=o.n;w=o.o;y=o.p;x=o.q},function(o){C=o.z;_=o.g;O=o.m},function(o){S=o.c;I=o.s;T=o.a;A=o.t},function(o){N=o.i},function(o){j=o.l;H=o.a},function(o){L=o.c},function(o){B=o.g},function(o){E=o.i},function(o){P=o.R}],execute:function(){var M=this;var D=function(o){var e=o.key,t=o.value;return t?{key:e,value:t}:null};var R=function(o){return[D({key:"brand",value:o.itemBrand}),D({key:"material",value:o.itemMaterial}),D({key:"category",value:o.itemCategory}),D({key:"color",value:o.itemColor}),D({key:"customization",value:o.itemCustomization}),D({key:"descriptionDetailed",value:o.itemDescriptionDetailed}),D({key:"fabricContent",value:o.itemFabricContent}),D({key:"ltlClass",value:o.itemLtlClass}),D({key:"pickingLocation",value:o.itemPickingLocation}),D({key:"shipFromLocation",value:o.itemShipFromLocation}),D({key:"size",value:o.itemSize}),D({key:"status",value:o.status})].filter(Boolean)};var U=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 G=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:U(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:R(o),countryOfOrigin:o.countryOfOrigin||undefined,currencyCode:"USD",description:o.itemDescriptionLong||"",imageUrl:o.imageURL||"",itemType:"PHYSICAL_GOOD",measurements:G(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){j("Checkout: not shippable country")}return false}return true};var K=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(M,void 0,void 0,(function(){var o,s,c,h,l;var d=this;return __generator(this,(function(f){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]}h=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!h||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(d,void 0,void 0,(function(){var e,t,n,s,c,i,l;return __generator(this,(function(d){n=h.value;if(!n){return[2]}r(n);if(!F(false)){u();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 I({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:C.storeId}});return[2]}a({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 V='<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 Y=W;var q=90*60*1e3;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)||C.appearance.theme;return[4,h({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(l.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;this.confirmDialogOpen=false;this.showSessionTimoutScreen=false;this.checkoutTimeoutInterval=null;this.inventoryCheckErrorMessage=null}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void d(e);return[2]}))}))};o.prototype.handleKeyPress=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(o.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};o.prototype.closeDialogHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(o===null||o===void 0?void 0:o.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;T("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&l.step==="finish"){f()}l.step="customer-info";z();this.clearCheckoutTimeoutInterval();(t=(e=C.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(e);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,d(o)];case 1:n.sent();return[3,5];case 2:if(!(C.checkoutSettings.buildCartDetail&&c.selectedCountryCode))return[3,5];j("build cart detail");return[4,C.checkoutSettings.buildCartDetail({countryCode:c.selectedCountryCode,currencyCode:c.targetCurrency})];case 3:e=n.sent();return[4,d(e)];case 4:n.sent();n.label=5;case 5:if(!!m.clientSecret)return[3,7];return[4,k()];case 6:t=n.sent();j("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.clearCheckoutTimeoutInterval=function(){if(this.checkoutTimeoutInterval){clearTimeout(this.checkoutTimeoutInterval);this.checkoutTimeoutInterval=null}};o.prototype.startCheckoutTimeoutInterval=function(){var o=this;if(this.preview){return}var e=new URLSearchParams(window.location.search).get("zonosCheckoutTimeout");var t=e&&!isNaN(parseInt(e,10))?parseInt(e,10):q;j("==START CHECKOUT TIMEOUT - ".concat(t,"=="));this.checkoutTimeoutInterval=setTimeout((function(){o.showSessionTimoutScreen=true}),t)};o.prototype.reloadCheckoutSession=function(){window.location.reload()};o.prototype.attachCheckout=function(){var o=this;var e=C.checkoutSettings.placeOrderButtonSelector;j("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();j("zonos checkout button clicked");m.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")}this.startCheckoutTimeoutInterval();T("zonos-checkout-start");void A("checkout_open");return[3,4];case 3:t=n.sent();m.isFetchingSession=false;v({messages:[p("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:p("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"));u();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;var e=this;return __generator(this,(function(t){m.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;K({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){e.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(){m.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){j("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(o);return}j("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else{e.attachCheckout();var t=new MutationObserver((function(){e.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(o)}),50);setTimeout((function(){clearInterval(o)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){l.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,g()];case 1:t.sent();o=setInterval((function(){if(l.landedCostData||!m.isFetchingLandedCost){if(l.landedCostData){b()}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(){b();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleInventoryCheckDialogCancel=function(){this.inventoryCheckErrorMessage=null};o.prototype.handleInventoryCheckDialogConfirm=function(){this.inventoryCheckErrorMessage=null;void this.closeDialogHandler({confirmed:true})};o.prototype.handleInventoryCheck=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){switch(t.label){case 0:o=C.checkoutSettings.onInventoryCheck;if(typeof o!=="function"){return[2,null]}return[4,o({items:l.items})];case 1:e=t.sent();return[2,e]}}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:this.paymentError=false;this.submitLoading=true;this.inventoryCheckErrorMessage=null;n.label=1;case 1:n.trys.push([1,3,,4]);o=this;return[4,this.handleInventoryCheck()];case 2:o.inventoryCheckErrorMessage=n.sent();return[3,4];case 3:e=n.sent();this.inventoryCheckErrorMessage=p("Unable to check inventory. Please try again.");return[3,4];case 4:if(this.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}n.label=5;case 5:n.trys.push([5,7,,8]);return[4,w()];case 6:n.sent();b();this.clearCheckoutTimeoutInterval();return[3,8];case 7:t=n.sent();H(t);this.paymentError=true;return[3,8];case 8: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:y();if(!this.preview)return[3,2];l.step="customer-info";return[4,this.init()];case 1:n.sent();return[2];case 2:f();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(window.history.state,document.title,t);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=N(this.mobile);void this.applyStripeTheme();j("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=N(this.mobile);void this.applyStripeTheme();j("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=_(this.appearanceSettingsOverride.theme)}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=N(this.mobile);this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=x("selectedLocale",(function(){void o.applyStripeTheme()}));j("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){y();f();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e;var i=l.step!=="finish"&&l.step!=="error"&&!m.stripeElements||m.isFetchingSession;var r=O(C.appearance,this.appearanceSettingsOverride),u=r.colorPrimary,a=r.colorSecondary,h=r.logoUrl,d=r.style;var f=C.appearance.zonosAttribution==="ENABLED";var z=C.appearance.theme;var k=u&&E(u)?"DARK":"LIGHT";var v=this.isMobile?z:k;var g=!this.isMobile?a:undefined;var b=c.customMessages;var w=(e=b.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var y=this.getCurrentLocalePageEnum();var x=b.filter((function(o){return o.pageName===y}));var _=function(){var e=o.preview?"".concat(h,"?timestamp=").concat(Date.now()):h;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(C.organizationName," logo"),src:e,width:100}))};var S=function(){return t("zonos-v-stack",null,_(),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),x.map((function(o){return t("zonos-custom-message",{icon:V,message:o.message})})))};var I=function(){if(o.showSessionTimoutScreen){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:p("Your checkout session has expired. Please reload the page to continue."),restStateTitle:p("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return o.reloadCheckoutSession()},variant:"primary"},p("Reload")))}return t("div",{class:"zonos--content",style:{"--border-radius":B({overrideBorderStyle:d})}},l.step!=="finish"&&l.step!=="error"&&t(s,null,t("div",{class:"zonos--left","data-theme":v,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&S(),l.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:g}),l.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:g}),l.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:g})),t("div",{class:"zonos--right","data-theme":z},o.isMobile&&S(),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),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:V,message:w})))),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:V,message:w}))))),(l.step==="finish"||l.step==="error")&&t("div",{class:"zonos--done","data-theme":z},t("div",{class:"zonos--header"},_(),t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),t("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:l.step==="error"&&!!l.error?Object.assign(Object.assign({},l.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(n,{class:L(["zonos--checkout zonos--elements",f&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?I():t("zonos-dialog",{borderStyle:d,"data-theme":z,height:"980px",isLoading:i,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},I()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:p("Don't close"),dialogConfirmBtnText:p("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:p("Would you like to close checkout and return to the site?"),dialogTitle:p("Are you sure?"),onCancelClicked:function(){o.confirmDialogOpen=false},onConfirmClicked:function(){return o.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:p("Return to cart"),dialogIntent:"danger",dialogOpen:!!this.inventoryCheckErrorMessage,dialogSubtitle:this.inventoryCheckErrorMessage,dialogTitle:p("Couldn't place order"),dialogType:"alert",onCancelClicked:function(){o.handleInventoryCheckDialogCancel()},onConfirmClicked:function(){return o.handleInventoryCheckDialogConfirm()}}))};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=Y}}}));
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 i(o){try{u(n.next(o))}catch(o){c(o)}}function r(o){try{u(n["throw"](o))}catch(o){c(o)}}function u(o){o.done?t(o.value):s(o.value).then(i,r)}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,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(o){return function(e){return u([o,e])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(t=0)),t)try{if(n=1,s&&(c=r[0]&2?s["return"]:r[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,r[1])).done)return c;if(s=0,c)r=[r[0]&2,c.value];switch(r[0]){case 0:case 1:c=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;s=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(c=t.trys,c=c.length>0&&c[c.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!c||r[1]>c[0]&&r[1]<c[3])){t.label=r[1];break}if(r[0]===6&&t.label<c[1]){t.label=c[1];c=r;break}if(c&&t.label<c[2]){t.label=c[2];t.ops.push(r);break}if(c[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];s=0}finally{n=c=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-1a40aaf4.system.js","./p-0b538ed4.system.js","./p-9b0aa65c.system.js","./p-aed0098c.system.js","./p-63db40b9.system.js","./p-23e7c655.system.js","./p-a8cb25de.system.js","./p-e37440ad.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,s,c,i,r,u,a,h,l,d,f,z,m,k,v,p,g,b,w,y,x,C,_,O,S,I,T,A,N,j,H,L,B,E,P;return{setters:[function(o){e=o.r;t=o.h;n=o.H;s=o.F},function(o){c=o.l;i=o.s;r=o.a;u=o.b;a=o.c;h=o.i;l=o.d;d=o.e;f=o.f;z=o.g;m=o.h;k=o.j;v=o.k;p=o.t;g=o.m;b=o.n;w=o.o;y=o.p;x=o.q},function(o){C=o.z;_=o.g;O=o.m},function(o){S=o.c;I=o.s;T=o.a;A=o.t},function(o){N=o.i},function(o){j=o.l;H=o.a},function(o){L=o.c},function(o){B=o.g},function(o){E=o.i},function(o){P=o.R}],execute:function(){var M=this;var D=function(o){var e=o.key,t=o.value;return t?{key:e,value:t}:null};var R=function(o){return[D({key:"brand",value:o.itemBrand}),D({key:"material",value:o.itemMaterial}),D({key:"category",value:o.itemCategory}),D({key:"color",value:o.itemColor}),D({key:"customization",value:o.itemCustomization}),D({key:"descriptionDetailed",value:o.itemDescriptionDetailed}),D({key:"fabricContent",value:o.itemFabricContent}),D({key:"ltlClass",value:o.itemLtlClass}),D({key:"pickingLocation",value:o.itemPickingLocation}),D({key:"shipFromLocation",value:o.itemShipFromLocation}),D({key:"size",value:o.itemSize}),D({key:"status",value:o.status})].filter(Boolean)};var U=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 G=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:U(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:R(o),countryOfOrigin:o.countryOfOrigin||undefined,currencyCode:"USD",description:o.itemDescriptionLong||"",imageUrl:o.imageURL||"",itemType:"PHYSICAL_GOOD",measurements:G(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){j("Checkout: not shippable country")}return false}return true};var K=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(M,void 0,void 0,(function(){var o,s,c,h,l;var d=this;return __generator(this,(function(f){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]}h=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!h||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(d,void 0,void 0,(function(){var e,t,n,s,c,i,l;return __generator(this,(function(d){n=h.value;if(!n){return[2]}r(n);if(!F(false)){u();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 I({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:C.storeId}});return[2]}a({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 V='<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 Y=W;var q=90*60*1e3;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)||C.appearance.theme;return[4,h({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(l.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;this.confirmDialogOpen=false;this.showSessionTimoutScreen=false;this.checkoutTimeoutInterval=null;this.inventoryCheckErrorMessage=null}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void d(e);return[2]}))}))};o.prototype.handleKeyPress=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(o.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};o.prototype.closeDialogHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(o===null||o===void 0?void 0:o.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;T("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&l.step==="finish"){f()}l.step="customer-info";z();this.clearCheckoutTimeoutInterval();(t=(e=C.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(e);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,d(o)];case 1:n.sent();return[3,5];case 2:if(!(C.checkoutSettings.buildCartDetail&&c.selectedCountryCode))return[3,5];j("build cart detail");return[4,C.checkoutSettings.buildCartDetail({countryCode:c.selectedCountryCode,currencyCode:c.targetCurrency})];case 3:e=n.sent();return[4,d(e)];case 4:n.sent();n.label=5;case 5:if(!!m.clientSecret)return[3,7];return[4,k()];case 6:t=n.sent();j("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.clearCheckoutTimeoutInterval=function(){if(this.checkoutTimeoutInterval){clearTimeout(this.checkoutTimeoutInterval);this.checkoutTimeoutInterval=null}};o.prototype.startCheckoutTimeoutInterval=function(){var o=this;if(this.preview){return}var e=new URLSearchParams(window.location.search).get("zonosCheckoutTimeout");var t=e&&!isNaN(parseInt(e,10))?parseInt(e,10):q;j("==START CHECKOUT TIMEOUT - ".concat(t,"=="));this.checkoutTimeoutInterval=setTimeout((function(){o.showSessionTimoutScreen=true}),t)};o.prototype.reloadCheckoutSession=function(){window.location.reload()};o.prototype.attachCheckout=function(){var o=this;var e=C.checkoutSettings.placeOrderButtonSelector;j("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();j("zonos checkout button clicked");m.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")}this.startCheckoutTimeoutInterval();T("zonos-checkout-start");void A("checkout_open");return[3,4];case 3:t=n.sent();m.isFetchingSession=false;v({messages:[p("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:p("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"));u();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;var e=this;return __generator(this,(function(t){m.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;K({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){e.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(){m.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){j("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(o);return}j("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else{e.attachCheckout();var t=new MutationObserver((function(){e.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(o)}),50);setTimeout((function(){clearInterval(o)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){l.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,g()];case 1:t.sent();o=setInterval((function(){if(l.landedCostData||!m.isFetchingLandedCost){if(l.landedCostData){b()}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(){b();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleInventoryCheckDialogCancel=function(){this.inventoryCheckErrorMessage=null};o.prototype.handleInventoryCheckDialogConfirm=function(){this.inventoryCheckErrorMessage=null;void this.closeDialogHandler({confirmed:true})};o.prototype.handleInventoryCheck=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){switch(t.label){case 0:o=C.checkoutSettings.onInventoryCheck;if(typeof o!=="function"){return[2,null]}return[4,o({items:l.items})];case 1:e=t.sent();return[2,e]}}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:this.paymentError=false;this.submitLoading=true;this.inventoryCheckErrorMessage=null;n.label=1;case 1:n.trys.push([1,3,,4]);o=this;return[4,this.handleInventoryCheck()];case 2:o.inventoryCheckErrorMessage=n.sent();return[3,4];case 3:e=n.sent();this.inventoryCheckErrorMessage=p("Unable to check inventory. Please try again.");return[3,4];case 4:if(this.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}n.label=5;case 5:n.trys.push([5,7,,8]);return[4,w()];case 6:n.sent();b();this.clearCheckoutTimeoutInterval();return[3,8];case 7:t=n.sent();H(t);this.paymentError=true;return[3,8];case 8: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:y();if(!this.preview)return[3,2];l.step="customer-info";return[4,this.init()];case 1:n.sent();return[2];case 2:f();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(window.history.state,document.title,t);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=N(this.mobile);void this.applyStripeTheme();j("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=N(this.mobile);void this.applyStripeTheme();j("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=_(this.appearanceSettingsOverride.theme)}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=N(this.mobile);this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=x("selectedLocale",(function(){void o.applyStripeTheme()}));j("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){y();f();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e;var i=l.step!=="finish"&&l.step!=="error"&&!m.stripeElements||m.isFetchingSession;var r=O(C.appearance,this.appearanceSettingsOverride),u=r.colorPrimary,a=r.colorSecondary,h=r.logoUrl,d=r.style;var f=C.appearance.zonosAttribution==="ENABLED";var z=C.appearance.theme;var k=u&&E(u)?"DARK":"LIGHT";var v=this.isMobile?z:k;var g=!this.isMobile?a:undefined;var b=c.customMessages;var w=(e=b.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var y=this.getCurrentLocalePageEnum();var x=b.filter((function(o){return o.pageName===y}));var _=function(){var e=o.preview?"".concat(h,"?timestamp=").concat(Date.now()):h;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(C.organizationName," logo"),src:e,width:100}))};var S=function(){return t("zonos-v-stack",null,_(),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),x.map((function(o){return t("zonos-custom-message",{icon:V,message:o.message})})))};var I=function(){if(o.showSessionTimoutScreen){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:p("Your checkout session has expired. Please reload the page to continue."),restStateTitle:p("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return o.reloadCheckoutSession()},variant:"primary"},p("Reload")))}return t("div",{class:"zonos--content",style:{"--border-radius":B({overrideBorderStyle:d})}},l.step!=="finish"&&l.step!=="error"&&t(s,null,t("div",{class:"zonos--left","data-theme":v,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&S(),l.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:g}),l.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:g}),l.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:g})),t("div",{class:"zonos--right","data-theme":z},o.isMobile&&S(),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),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:V,message:w})))),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:V,message:w}))))),(l.step==="finish"||l.step==="error")&&t("div",{class:"zonos--done","data-theme":z},t("div",{class:"zonos--header"},_(),t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),t("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:l.step==="error"&&!!l.error?Object.assign(Object.assign({},l.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(n,{class:L(["zonos--checkout zonos--elements",f&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?I():t("zonos-dialog",{borderStyle:d,"data-theme":z,height:"980px",isLoading:i,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},I()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:p("Don't close"),dialogConfirmBtnText:p("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:p("Would you like to close checkout and return to the site?"),dialogTitle:p("Are you sure?"),onCancelClicked:function(){o.confirmDialogOpen=false},onConfirmClicked:function(){return o.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:p("Return to cart"),dialogIntent:"danger",dialogOpen:!!this.inventoryCheckErrorMessage,dialogSubtitle:this.inventoryCheckErrorMessage,dialogTitle:p("Couldn't place order"),dialogType:"alert",onCancelClicked:function(){o.handleInventoryCheckDialogCancel()},onConfirmClicked:function(){return o.handleInventoryCheckDialogConfirm()}}))};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=Y}}}));
@@ -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,a){function s(o){try{l(n.next(o))}catch(o){a(o)}}function r(o){try{l(n["throw"](o))}catch(o){a(o)}}function l(o){o.done?t(o.value):i(o.value).then(s,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(t=0)),t)try{if(n=1,i&&(a=r[0]&2?i["return"]:r[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;if(i=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=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(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){t.label=r[1];break}if(r[0]===6&&t.label<a[1]){t.label=a[1];a=r;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(r);break}if(a[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-fb1120a2.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(o){"use strict";var e,t,n,i,a,s,r,l,d,h,c;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.H},function(o){a=o.l;s=o.B;r=o.t},function(o){l=o.z},function(o){d=o.c},function(o){h=o.f},function(o){c=o.g},function(){},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=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var b='<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 m='<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 v='<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 p='<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 w=":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 z=w;var x=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.hasTaxId=function(){var o;return(o=a.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.isNoThresholdCountry=function(o){if(!o||!n.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=a.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?s({amount:o.dutyDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?r("Spend [threshold] duty free",{threshold:e}):r("Duties will apply to all orders")};this.getTaxMessage=function(){var o=a.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?s({amount:o.vatTaxDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?r("Spend [threshold] tax free",{threshold:e}):r("Taxes will apply to all orders")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[r("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:s({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){return[r("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders",{percentage:"".concat(o.vatTaxRate*100,"%")}),"".concat(r("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(u({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:r("Learn more.")}))]};this.getNewZealandDutyTaxMessge=function(o){return[r("[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({amount:o.vatTaxDeminimus})})]};this.getAdditionalDutyTaxMessage=function(){if(!a.countryLandedCost){return null}if(!n.hasTaxId()){return null}switch(a.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(a.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=a.selectedCountryCode;var s=this.getDutyMessage();var u=this.getTaxMessage();var w=this.getAdditionalDutyTaxMessage();var z=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var x=this.dialogRef&&f(this.dialogRef);var y=a.customMessages;var C=r("Welcome to [storeName]!",{storeName:l.organizationName});var k=((e=y.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||r("Know about duties and taxes before you buy. Shop with confidence!");var H=h(k);var L=this.getCurrentPageEnum();var V=y.filter((function(o){return o.pageName===L}));return n(i,{key:"bb2b080aaba7b85599b7e6bcb7cabee70863070f",class:"zonos--elements"},n("div",{key:"aabdbd8c4b47f759396d1a56fac426570385768d","aria-hidden":"true",class:d(["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:"d9189f1ced79d3d3fd11c99ea1407e7b83a2573b"},n("div",{key:"83ac2ab3583935ececea8be98ab64559d802725a",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"4f36dea145e751d63a2d0df3f472ffe674fbb580",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:p}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"e8a7cebe4ca88da80b974e3a3536714fe4da47c1",spacing:24},n("zonos-country-flag",{key:"e02c72135b9c7e9e533fc46c8f4b286ba1cb1b63",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"7d199c0a5f465fe1640e690d2712f11a80e1f378",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"97bf6611bd485ace8ad9b94c3520148ae0d1eab0",type:"boldSubheader"},C),n("zonos-text",{key:"c1e524bf689f34aed978f350676ffa957724176f",innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{key:"81a2fabb2f6c2d853f2f6619f7c6829754d80a59",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:"29ba8b81746a696ca43b88daa89a7c85af5a2b34",spacing:"12px"},n("zonos-v-stack",{key:"8f4e79efe07a4c7c1b493178c952bfe61a151f0c",spacing:12},n("div",{key:"a17eda2b103d376f7ca8a9b528d613195b3a1fe7",class:"zonos--flex-message"},n("zonos-icon",{key:"13c828d956198211a1fbda77840f8b91692d1582","aria-label":"Duty de minimis",content:m}),n("zonos-text",{key:"c38511e16905f169b821d0cd8d98dee80a7c1de1"},s)),n("div",{key:"9b3165d870419732d4be1421336326f8d4e98547",class:"zonos--flex-message"},n("zonos-icon",{key:"46248b95b97a3ec74ffc038dda29ca74a1e700c2","aria-label":"Tax de minimis",content:v}),n("zonos-text",{key:"1d698d83f9fa43746de870553d1ba1c09389aefb"},u)),w===null||w===void 0?void 0:w.map((function(o){return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:b}),n("zonos-text",{innerHTML:o}))})))),V.map((function(o){return n("zonos-custom-message",{icon:g,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"fcc21cc1e8b3de45af03c64ffc95dc2ab6f57bf3",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"bbf019b27e6da7aa3256f14bf928aae26ca92f54"},n("zonos-country-select",{key:"a70d55e1872ec626e8446866dbad3aafca69790c",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"77f63941fcbb3bc0c668a61aa48ca2e60b8addeb"},n("zonos-language-select",{key:"57a4d06c098662b00c3587f3b2290552dc04f2fe",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}());x.style=z}}}));
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-d99232c5.system.js","./p-1a40aaf4.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(o){"use strict";var e,t,n,i,s,a,r,l,d,h,c;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.H},function(o){s=o.l;a=o.B;r=o.t},function(o){l=o.z},function(o){d=o.c},function(o){h=o.f},function(o){c=o.g},function(){},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=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};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="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 v='<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 p='<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 w=":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 z=w;var x=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.hasTaxId=function(){var o;return(o=s.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.isNoThresholdCountry=function(o){if(!o||!n.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=s.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?a({amount:o.dutyDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?r("Spend [threshold] duty free",{threshold:e}):r("Duties will apply to all orders")};this.getTaxMessage=function(){var o=s.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?a({amount:o.vatTaxDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?r("Spend [threshold] tax free",{threshold:e}):r("Taxes will apply to all orders")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[r("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:a({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){return[r("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders",{percentage:"".concat(o.vatTaxRate*100,"%")}),"".concat(r("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(u({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:r("Learn more.")}))]};this.getNewZealandDutyTaxMessge=function(o){return[r("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:a({amount:o.vatTaxDeminimus})})]};this.getAdditionalDutyTaxMessage=function(){if(!s.countryLandedCost){return null}if(!n.hasTaxId()){return null}switch(s.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(s.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(s.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(s.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=s.selectedCountryCode;var a=this.getDutyMessage();var u=this.getTaxMessage();var w=this.getAdditionalDutyTaxMessage();var z=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var x=this.dialogRef&&f(this.dialogRef);var y=s.customMessages;var C=r("Welcome to [storeName]",{storeName:l.organizationName});var k=((e=y.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||r("Know about duties and taxes before you buy. Shop with confidence!");var H=h(k);var L=this.getCurrentPageEnum();var V=y.filter((function(o){return o.pageName===L}));return n(i,{key:"1194b1466981cf8ba04d726eff3ba34b19510258",class:"zonos--elements"},n("div",{key:"ffea099f72ff3f42ddbd5b5947a5b8ca0f3d206d","aria-hidden":"true",class:d(["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:"7396d7cd91c69f77d5f2f4ae9a088b1a763c6988"},n("div",{key:"aedfda83797a58fc2a0432a89503cbc7774d5c8b",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"0c9ad53d902ce7c45cdf9192dbe8ea7f9f46f7d4",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:p}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"9a359684275e946fc26bdc6ea7b8a371bf49dea5",spacing:24},n("zonos-country-flag",{key:"ca230fb4426ecb39febb0972d9a6ce15435c4e1d",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"17bbc6a70143a9165b8f088b5b2ea1e6e69622ed",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"33c66273d9fd8330ee4cf2bfcdf5b454a89e0ae0",type:"boldSubheader"},C),n("zonos-text",{key:"57cfdcd587ab62fad99016a389771d3a169ad297",innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{key:"28b9b9e7967e81ca50bc4d0cfe45c9545a8b9dde",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:"94ef9064b4e523c3f0fc9cd50142da36f003006d",spacing:"12px"},n("zonos-v-stack",{key:"01b3550b5b080d106eaecedf78b13275e01ae159",spacing:12},n("div",{key:"19b1ba3e12dab87250d3ad19a5dc8e13b6f871d6",class:"zonos--flex-message"},n("zonos-icon",{key:"9773bf4ad57752437a367c2093de0737693bf588","aria-label":"Duty de minimis",content:b}),n("zonos-text",{key:"4c75d971f37db399e6f4332a6c92b53758629b6b"},a)),n("div",{key:"52640f51d3664582d7bb3c26f2d2d17d82ad856e",class:"zonos--flex-message"},n("zonos-icon",{key:"9afe9273e6b19aada01018152a64973449b87094","aria-label":"Tax de minimis",content:v}),n("zonos-text",{key:"b2481af13570471cc2907c48b54c7039ec31e92c"},u)),w===null||w===void 0?void 0:w.map((function(o){return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:m}),n("zonos-text",{innerHTML:o}))})))),V.map((function(o){return n("zonos-custom-message",{icon:g,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"a6b2d31ee922db13cf9987a823e99d6088c392b0",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"21d187502c3f0ccef0c351f09aa943566228944f"},n("zonos-country-select",{key:"3dbd522e8a5004c2a1ed766ba92c9d0387f845d8",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"686d8bba48fefd49bf2bf15dc295fb79b9cd5299"},n("zonos-language-select",{key:"22ba1b42ec7ba1808fd806ad3529a377d34b4ac8",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}());x.style=z}}}));
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,d as i}from"./p-ce347974.js";import{l as e}from"./p-b4ccc72c.js";import{d as a}from"./p-5821856c.js";import{c as n}from"./p-b4b7f705.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const h=class{constructor(s){t(this,s),this.countryCode=e.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=a();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
1
+ import{r as t,h as s,H as o,d as i}from"./p-ce347974.js";import{l as a}from"./p-5d53f9a4.js";import{d as e}from"./p-5821856c.js";import{c as n}from"./p-b4b7f705.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const h=class{constructor(s){t(this,s),this.countryCode=a.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=e();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
@@ -1 +1 @@
1
- System.register(["./p-d99232c5.system.js","./p-fb1120a2.system.js","./p-63db40b9.system.js","./p-0b538ed4.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(n){"use strict";var t,e,s,o,a,c;return{setters:[function(n){t=n.r;e=n.h;s=n.H;o=n.d},function(n){a=n.h},function(n){c=n.a},function(){},function(){},function(){}],execute:function(){var m=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}";var i=m;var p=n("zonos_payment",function(){function n(n){t(this,n);this.titleText=undefined;this.stripe=a.stripe;this.stripeElements=a.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var t=this.el.querySelector(".zonos--payment-component");if(!t){c("Cannot find container element for paymentElement");return}n.mount(t);n.on("change",(function(n){a.stripePaymentEventData=n}));a.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return e(s,{key:"abebca876eac8bd507fcbdb1c029d2ed0f3b749a",class:"zonos--payment zonos--elements"},this.titleText&&e("zonos-text",{key:"142257f2052337206dbb70e70c87b5207f2bd97a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"c55bbaea79a291e45d8ed37d556529365de89e9f",class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());p.style=i}}}));
1
+ System.register(["./p-d99232c5.system.js","./p-1a40aaf4.system.js","./p-63db40b9.system.js","./p-0b538ed4.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(n){"use strict";var t,e,s,o,a,c;return{setters:[function(n){t=n.r;e=n.h;s=n.H;o=n.d},function(n){a=n.h},function(n){c=n.a},function(){},function(){},function(){}],execute:function(){var m=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}";var i=m;var p=n("zonos_payment",function(){function n(n){t(this,n);this.titleText=undefined;this.stripe=a.stripe;this.stripeElements=a.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var t=this.el.querySelector(".zonos--payment-component");if(!t){c("Cannot find container element for paymentElement");return}n.mount(t);n.on("change",(function(n){a.stripePaymentEventData=n}));a.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return e(s,{key:"abebca876eac8bd507fcbdb1c029d2ed0f3b749a",class:"zonos--payment zonos--elements"},this.titleText&&e("zonos-text",{key:"142257f2052337206dbb70e70c87b5207f2bd97a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"c55bbaea79a291e45d8ed37d556529365de89e9f",class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());p.style=i}}}));