@zonos/elements 1.3.32 → 1.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-d07e8ea1.js → cart-11b47252.js} +3 -2
- package/dist/cjs/index.cjs.js +12 -5
- package/dist/cjs/{submitGtag-f1aeac3e.js → submitGtag-3a1d091e.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_2.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
- package/dist/collection/components/main/zonos-controller.js +2 -1
- package/dist/collection/components/store/hello/localization.js +3 -2
- package/dist/collection/scripts/_zonosBase.js +8 -1
- package/dist/esm/{cart-a90aa9ae.js → cart-22ba08ec.js} +3 -2
- package/dist/esm/index.js +12 -5
- package/dist/esm/{submitGtag-849e2bc9.js → submitGtag-1435eec8.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +5 -3
- package/dist/esm/zonos-controller.entry.js +3 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_2.entry.js +1 -1
- package/dist/esm-es5/{cart-a90aa9ae.js → cart-22ba08ec.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{submitGtag-849e2bc9.js → submitGtag-1435eec8.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +5 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-41ef293d.js → p-11672829.js} +1 -1
- package/dist/zonos-elements/{p-16ab16f9.system.entry.js → p-28e6963b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-93e493ce.entry.js → p-35604380.entry.js} +1 -1
- package/dist/zonos-elements/{p-7a6dcfa2.entry.js → p-36bb4360.entry.js} +1 -1
- package/dist/zonos-elements/{p-cc965417.entry.js → p-3b95a9a3.entry.js} +1 -1
- package/dist/zonos-elements/p-450eb8ff.system.js +1 -0
- package/dist/zonos-elements/{p-b6c515e1.system.entry.js → p-478357b0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-21b61106.system.entry.js → p-56152835.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8aadefbb.entry.js → p-6f589755.entry.js} +1 -1
- package/dist/zonos-elements/{p-1eab7a86.entry.js → p-74bd6150.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ba86711.system.js → p-7624013b.system.js} +1 -1
- package/dist/zonos-elements/{p-2d6d0d57.js → p-84997f2e.js} +1 -1
- package/dist/zonos-elements/{p-38a90e86.system.entry.js → p-88129ef9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-af0d3ca0.system.entry.js → p-95d52a24.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6de51a79.system.entry.js → p-a0b17e0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-344ce057.entry.js → p-b5825bb7.entry.js} +1 -1
- package/dist/zonos-elements/{p-85503e70.system.entry.js → p-b8a4b345.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-672e80e5.system.entry.js → p-cdb53aaf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-057380ad.system.js → p-dafa2b79.system.js} +1 -1
- package/dist/zonos-elements/p-ddb1cfe2.entry.js +1 -0
- package/dist/zonos-elements/{p-da787898.system.entry.js → p-dec21ca2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9d599745.entry.js → p-e09df465.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-717faabd.system.entry.js → p-eb566457.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6f04e132.entry.js → p-fa7e2a01.entry.js} +1 -1
- package/dist/zonos-elements/{p-e344cb12.entry.js → p-fe296307.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-8b771620.entry.js +0 -1
- package/dist/zonos-elements/p-ca8fb99c.system.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,s,t){function n(e){return e instanceof s?e:new s((function(o){o(e)}))}return new(s||(s=Promise))((function(s,i){function a(e){try{d(t.next(e))}catch(e){i(e)}}function r(e){try{d(t["throw"](e))}catch(e){i(e)}}function d(e){e.done?s(e.value):n(e.value).then(a,r)}d((t=t.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(o){return d([e,o])}}function d(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(s=0)),s)try{if(t=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:s.label++;return{value:r[1],done:false};case 5:s.label++;n=r[1];r=[0];continue;case 7:r=s.ops.pop();s.trys.pop();continue;default:if(!(i=s.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){s=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(r[0]===6&&s.label<i[1]){s.label=i[1];i=r;break}if(i&&s.label<i[2]){s.label=i[2];s.ops.push(r);break}if(i[2])s.ops.pop();s.trys.pop();continue}r=o.call(e,s)}catch(e){r=[6,e];n=0}finally{t=i=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-057380ad.system.js","./p-aed0098c.system.js","./p-63db40b9.system.js","./p-2670438c.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-2770ba48.system.js","./p-a8cb25de.system.js","./p-e37440ad.system.js"],(function(e){"use strict";var o,s,t,n,i,a,r,d,l,c,h,f,u,b,p,m,v,z;return{setters:[function(e){o=e.r;s=e.c;t=e.h;n=e.H;i=e.d},function(e){a=e.h;r=e.l;d=e.t},function(e){l=e.i},function(e){c=e.a},function(e){h=e.i;f=e.c},function(e){u=e.z;b=e.d},function(e){p=e.c},function(e){m=e.R},function(e){v=e.g},function(e){z=e.i}],execute:function(){var y=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var g=y;var x=e("zonos_address",function(){function e(e){o(this,e);this.invalidCharacters=s(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=false}e.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}}return{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}};e.prototype.updateAddressEventData=function(e){var o=e.event,s=e.type;switch(s){case"billing":a.stripeBillingAddressEventData=o;break;default:a.stripeAddressEventData=o;break}};e.prototype.updateAddressElement=function(e){var o=e.stripeAddressElement,s=e.type;if(s==="shipping"){a.stripeAddressElement=o;return}a.stripeBillingAddressElement=o};e.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,s,t,n,i,a,d,h;var f=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;s=this.getStripeAddressInstance(),t=s.stripeAddressEventData,n=s.stripeElements;if(!this.stripe||!n){c("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(e=this.defaultAddress)===null||e===void 0?void 0:e.phone;if(!i){(o=this.defaultAddress)===null||o===void 0?true:delete o.phone}a=r.shippingZoneCountries;d=a?Object.values(a).map((function(e){return e.code})):[];h=n.create("address",{allowedCountries:this.type==="shipping"?d:[],contacts:this.defaultAddress&&!t?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:(t===null||t===void 0?void 0:t.value.address.country)||r.selectedCountryCode||"AL"}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});h.mount(this.el.querySelector(".zonos--address-component"));h.on("change",(function(e){var o=e.value;if(!f.isDirtyAddress&&o.address.line1.length>=3){f.isDirtyAddress=true;setTimeout((function(){if(l()){f.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var e=f.type==="shipping"?100:600;var o=f.el.closest(".zonos--group");var s=f.el.getBoundingClientRect().top+e;o===null||o===void 0?void 0:o.scrollTo({behavior:"smooth",top:s})}}),600)}f.updateAddressEventData({event:Object.assign(Object.assign({},e),{elementMode:f.type,elementType:"address",value:Object.assign(Object.assign({},o),{firstName:o.firstName||o.name.split(" ")[0],lastName:o.lastName||o.name.split(" ")[1]})}),type:f.type})}));this.updateAddressElement({stripeAddressElement:h,type:this.type});return[2]}))}))};e.prototype.disconnectedCallback=function(){var e=this.getStripeAddressInstance().stripeAddressElement;e===null||e===void 0?void 0:e.destroy()};e.prototype.componentDidLoad=function(){var e=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!e&&e.value.address.line1.length>0;void this.watchInitStripe()};e.prototype.render=function(){return t(n,{key:"c8b22844b640cf67016bedac346ee2876822fb91",class:"zonos--address zonos--elements"},t("zonos-text",{key:"79a688fbb8915ef11897939bd568d696b3632b6a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),t("div",{key:"71468dc23512c3e228dd9ce7d6df6593ba01ad0b",class:"zonos--address-component"}))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return e}());x.style=g;var k=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';var w=k;var j=e("zonos_address_display",function(){function e(e){o(this,e);this.currentAddress=undefined;this.addressType=undefined}e.prototype.render=function(){var e;var o=this.currentAddress,s=o.city,i=o.country,a=o.email,l=o.line1,c=o.line2,f=o.name,u=o.phone,b=o.postal_code,p=o.state;var m=(e=r.shippingZoneCountries)===null||e===void 0?void 0:e[i];var v=function(e){var o=e.bold,s=e.content;var n=h(s)?"red-600":"gray-1200";return t("zonos-text",{textColor:n,type:o?"boldLabel":"body"},s)};return t(n,{class:"zonos--address-form zonos--elements"},t("div",{class:"zonos--title"},t("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?d("Shipping"):d("Billing"))),t("div",{class:"zonos--address-group"},f&&t("div",{class:"zonos--address-line"},v({bold:true,content:f})),a&&t("div",{class:"zonos--address-line"},v({content:a})),u&&t("div",{class:"zonos--address-line"},v({content:u})),l&&t("div",{class:"zonos--address-line"},v({content:l})),c&&t("div",{class:"zonos--address-line"},v({content:c})),t("div",{class:"zonos--address-line"},s&&v({content:s}),p&&v({content:p}),b&&v({content:b})),m&&t("div",{class:"zonos--address-line"},t("zonos-country-flag",{class:"zonos--country-flag",countryCode:m.code})," ",v({content:m.displayName}))))};return e}());j.style=w;var C=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";var I=C;var A=e("zonos_address_form",function(){function e(e){var t=this;o(this,e);this.addressChange=s(this,"addressChange",7);this.onInputChange=function(e){var o;var s=e.key,n=e.value;t.addressChange.emit(Object.assign(Object.assign({},t.localAddress),(o={},o[s]=n,o)))};this.currentAddress=undefined;this.translatedAddress=undefined;this.addressType=undefined;this.localAddress=this.currentAddress}e.prototype.watchCurrentAddress=function(){var e,o,s,t,n,i;var a=this.currentAddress,r=a.city,d=a.line1,l=a.line2,c=a.name,h=a.postal_code,f=a.state;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:((e=this.translatedAddress.city)===null||e===void 0?void 0:e[r])||r,line1:((o=this.translatedAddress.line1)===null||o===void 0?void 0:o[d])||d,line2:((s=this.translatedAddress.line2)===null||s===void 0?void 0:s[l])||l,name:((t=this.translatedAddress.name)===null||t===void 0?void 0:t[c])||c,postal_code:((n=this.translatedAddress.postal_code)===null||n===void 0?void 0:n[h])||h,state:((i=this.translatedAddress.state)===null||i===void 0?void 0:i[f])||f})};e.prototype.componentWillLoad=function(){this.watchCurrentAddress()};e.prototype.render=function(){var e=this;var o=this.localAddress,s=o.city,i=o.country,a=o.line1,r=o.line2,l=o.name,c=o.phone,f=o.postal_code,u=o.state;var b=l.split(" ")[0]||"";var p=l.split(" ")[1]||"";return t(n,{key:"9c1ee87200d1f90e9dfac58c49aabba1777373a9",class:"zonos--address-form zonos--elements"},t("div",{key:"eec3416268ff2324fd751408552705086905423d",class:"zonos--title"},t("zonos-text",{key:"a4c254f78420dcfc712e1a83b20dd3ac9e64c460",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?d("Shipping"):d("Billing"))),t("div",{key:"b8109545d282fb8c06a2e791c30088018d6ffec0",class:"zonos--address-group"},t("div",{key:"833a395984cd75242e5d97697fd6566f11932d1b",class:"zonos--contact"},t("zonos-text",{key:"e60f574e95162aabf6465b878fc9b16c708e8029",type:"label"},d("Contact")),t("zonos-input",{key:"24cd24a362a1bbc76d0c91718c48ae32baa20ae6",class:"zonos--form-email",inputLabel:d("Email"),inputValue:this.currentAddress.email,isDisabled:true}),t("div",{key:"84e64ef44eb3b39ac7ab542e07d7a52a95377cae",class:"zonos--name zonos--address-row"},t("zonos-input",{key:"26621aca0d57a7fee743874b8d11af5f58c91b69",class:"zonos--form-first-name",inputLabel:d("First name"),inputValue:b,isError:h(b),onInputChange:function(o){return e.onInputChange({key:"name",value:"".concat(o.detail," ").concat(p)})}}),t("zonos-input",{key:"01e3e5038b4a4311dd5874a1213f936451dc300d",class:"zonos--form-last-name",inputLabel:d("Last name"),inputValue:p,isError:h(p),onInputChange:function(o){return e.onInputChange({key:"name",value:"".concat(b," ").concat(o.detail)})}}))),t("div",{key:"eb42dece28082ff16a453110b3208de5b44b9fdb",class:"zonos--address"},t("zonos-text",{key:"3557122c716533be7b36a8bd395ea616a7061665",type:"label"},d("Address")),t("zonos-input",{key:"bcc7d84d530f2f3a10537117eb6ef143df7cc8e2",class:"zonos--form-country",inputLabel:d("Country"),inputValue:i,isDisabled:true}),t("zonos-input",{key:"6ce78e25151a129b69b501cf768604134a395e85",class:"zonos--form-line1",inputLabel:d("Address line 1"),inputValue:a,isError:h(a),onInputChange:function(o){return e.onInputChange({key:"line1",value:o.detail})}}),t("zonos-input",{key:"6f7a18010e2d8131327154a31ba58544df56768c",class:"zonos--form-line2",inputLabel:d("Address line 2"),inputValue:r,isError:h(r),onInputChange:function(o){return e.onInputChange({key:"line2",value:o.detail})}}),t("div",{key:"48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6",class:"zonos--address-row"},t("zonos-input",{key:"6decf8c430d8d25b2c555b110009da74e0ac9e5f",class:"zonos--form-city",inputLabel:d("City"),inputValue:s,isError:h(s),onInputChange:function(o){return e.onInputChange({key:"city",value:o.detail})}}),t("zonos-input",{key:"065e1be213d3cfec7749ab32890f96b0b484a25a",class:"zonos--form-state",inputLabel:d("State/Province"),inputValue:u,isError:h(u),onInputChange:function(o){return e.onInputChange({key:"state",value:o.detail})}})),t("zonos-input",{key:"a69244bf84c9fd007c9ad4aad2b6cc6d44420775",class:"zonos--form-postal-code",inputLabel:d("Postal code"),inputValue:f,isError:h(f),onInputChange:function(o){return e.onInputChange({key:"postal_code",value:o.detail})}}),t("zonos-input",{key:"0bcc89de1ecc4aae8a69d74eff42dfd117ada40b",class:"zonos--form-phone",inputLabel:d("Phone number"),inputValue:c,onInputChange:function(o){return e.onInputChange({key:"phone",value:o.detail})}}))))};Object.defineProperty(e,"watchers",{get:function(){return{translatedAddress:["watchCurrentAddress"]}},enumerable:false,configurable:true});return e}());A.style=I;var _=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";var O=_;var L=e("zonos_address_update_dialog",function(){function e(e){var t=this;o(this,e);this.closeDialog=s(this,"closeDialog",7);this.continueClicked=s(this,"continueClicked",7);this.closeDialogHandler=function(){t.closeDialog.emit()};this.getTranslatedAddress=function(e){var o=e.currentAddress,s=e.translatedAddress;var t,n,i,a,r,d;var l=o.city,c=o.line1,h=o.line2,f=o.name,u=o.postal_code,b=o.state;return{city:((t=s.city)===null||t===void 0?void 0:t[l])||l,line1:((n=s.line1)===null||n===void 0?void 0:n[c])||c,line2:((i=s.line2)===null||i===void 0?void 0:i[h])||h,name:((a=s.name)===null||a===void 0?void 0:a[f])||f,postal_code:((r=s.postal_code)===null||r===void 0?void 0:r[u])||u,state:((d=s.state)===null||d===void 0?void 0:d[b])||b}};this.continueClickHandler=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,s,t,n,i,a,r,d,l,c,h,u;return __generator(this,(function(b){this.continueLoading=true;t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});i=f(Object.assign(Object.assign({},n),{country:this.shippingAddress.country}));a=t&&this.billingAddress&&f(Object.assign(Object.assign({},t),{country:this.billingAddress.country}));r=!!Object.keys(i).length;d=!!a&&!!Object.keys(a).length;if(r||d){l=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("zonos-address-form");c=l===null||l===void 0?void 0:l[0];h=l===null||l===void 0?void 0:l[1];u=((o=c===null||c===void 0?void 0:c.shadowRoot)===null||o===void 0?void 0:o.querySelector(".has-error"))||((s=h===null||h===void 0?void 0:h.shadowRoot)===null||s===void 0?void 0:s.querySelector(".has-error"));if(u){u.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2]}this.continueClicked.emit({billingAddress:t,shippingAddress:n});return[2]}))}))};this.buildTranslateAddressState=function(e){var o,s,t,n,i,a;var r=e.currentAddress,d=e.translatedAddress;var l=r.city,c=r.line1,h=r.line2,f=r.name,u=r.postal_code,b=r.state;return{city:(o={},o[l]=d.city,o),line1:(s={},s[c]=d.line1,s),line2:(t={},t[h]=d.line2,t),name:(n={},n[f]=d.name,n),postal_code:(i={},i[u]=d.postal_code,i),state:(a={},a[b]=d.state,a)}};this.continueLoading=false;this.dialogLoading=undefined;this.dialogOpen=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.isMobile=false;this.shippingAddress=undefined;this.billingAddress=undefined;this.translatedShippingAddress=undefined;this.translatedBillingAddress=undefined;this.showErrorBanner=false;this.translatedShippingAddressState={};this.translatedBillingAddressState={}}e.prototype.watchTranslatedShippingAddress=function(){this.translatedShippingAddressState=this.translatedShippingAddress};e.prototype.watchTranslatedBillingAddress=function(){this.translatedBillingAddressState=this.translatedBillingAddress};e.prototype.componentWillLoad=function(){this.watchTranslatedBillingAddress();this.watchTranslatedShippingAddress()};e.prototype.render=function(){var e=this;var o=this.submitBtnColor||u.appearance.colorSecondary;var s=o==="#ffffff"?"outline":this.submitBtnType||"standard";var i=this.billingAddress;var a=this.shippingAddress;return t(n,{key:"03535edacb348258592641baa349e9dcf14bf78c",class:p(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},t("zonos-dialog",{key:"c16871425dffe955d422ffa5b9aee1ece0da2890",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialog.emit()},open:this.dialogOpen,width:"568px"},t("div",{key:"e4fad501f7cfedc5783774d8b1bf785d6947d3c8",class:"zonos--body"},t("div",{key:"973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0",class:"zonos--dialog-header"},t("div",{key:"89c82b6ff3723056d161560da22bd16a992afee7",class:"zonos--dialog-title"},t("zonos-text",{key:"bf92ef0b40ea67a492164fedb95dd68b7d023e85",type:"title"},d("Update your address")),t("zonos-button",{key:"4e7a1905c976cec396db5c34f633b383bba0d55a",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:m}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),t("zonos-text",{key:"47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38"},d("To ensure delivery all address details must be in Latin characters."))),t("div",{key:"28d9804f0a18f143ce541c2c511cbfa21a2a416f",class:"zonos--group"},t("zonos-text",{key:"43ec5a9fc8594d065b256952ca8e9392fba03839",class:"zonos--what-you-entered",type:"semiBoldLabel"},d("What you entered")),t("div",{key:"b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1",class:"zonos--address-display-group"},t("zonos-address-display",{key:"152c53176a46575677723ca47386e484c659927a",addressType:"shipping",currentAddress:a}),i&&t("zonos-address-display",{key:"6c7ac2b49d121c26ce45f09a1eac9ef456d45910",addressType:"billing",currentAddress:i})),t("div",{key:"2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d",class:"zonos--address-form-section"},t("zonos-text",{key:"87d3380072a049ccde71ba1b752aedd36830348b",type:"semiBoldLabel"},d("Translated address")),t("zonos-address-form",{key:"2cb36251c6549da05e272183b2c37478b4166fea",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:a,onAddressChange:function(o){var s=o.detail;e.translatedShippingAddressState=e.buildTranslateAddressState({currentAddress:a,translatedAddress:s})},translatedAddress:this.translatedShippingAddressState}),i&&t("zonos-address-form",{key:"9bf5ebd6fb08851716a72c855451bfeb3ee0ed68",addressType:"billing",class:"zonos--billing-address-form",currentAddress:i,onAddressChange:function(o){var s=o.detail;e.translatedBillingAddressState=e.buildTranslateAddressState({currentAddress:i,translatedAddress:s})},translatedAddress:this.translatedBillingAddressState}))),t("div",{key:"621df9c8919973b37c62aca5727bde3635086a6b",class:"zonos--group-btn"},t("div",{key:"95e9fd31418abc8e89ceef24af7cc251ee45ac93",class:"zonos--button-wrapper"},t("zonos-button",{key:"bef31fc81e7cc0f2b3f7ab875a29978b07865b6a",class:"zonos--cancel-btn",onClick:function(){return e.closeDialogHandler()},variant:"subtle"},d("Cancel")),t("zonos-button",{key:"9d183153541766b421c3420681c1159ffa599682",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return e.continueClickHandler()},size:"sm",variant:s},d("Update address")))))))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}},enumerable:false,configurable:true});return e}());L.style=O;var E=["blue","cyan","green","orange","purple","red","gray","glass"];var B=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var S=B;var T=e("zonos_checkbox",function(){function e(e){o(this,e);this.checkboxSelected=s(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}e.prototype.onClick=function(){if(this.isDisabled){return}this.checkboxSelected.emit(!this.isChecked)};e.prototype.render=function(){var e=this;var o=E.includes(this.backgroundColor);var s=o?"var(--zonos-elements-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var i=o?"var(--zonos-elements-".concat(this.backgroundColor,"-200)"):!z(s)?"var(--zonos-elements-gray-800)":"var(--zonos-elements-gray-0)";var a=v({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return t(n,{key:"bf51dd642e88096e874d78023a29dd68239e8d3a",class:p(["zonos--elements zonos--checkbox"]),style:{"--background-color":s,"--border-radius":a,"--font-family":b(),"--size":"".concat(this.size,"px")}},t("label",{key:"3598c9f21285304499aaafbab5226d619ecf4e69",class:p([this.isDisabled&&"disabled"])},t("input",{key:"277507f643404e6e44191c2d715b70f38fc6af85",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(o){e.checkboxSelected.emit(o.target.checked)},type:"checkbox"}),t("span",{key:"3f0fd0d458e8cf660fa883ceaa241e3397829548",class:"checkmark-container"},t("svg",{key:"0d654744bea5b5696ddcf3778a155fb622022f1e",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"cc19837ee088feb7053fdaeaea0d1213cbc60775","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&t("zonos-text",{key:"cb85d59651f67a33126d37c3ebfb1e8a91b457fe",size:this.fontSize},this.label)))};return e}());T.style=S;var V=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var D=V;var P=e("zonos_collapse",function(){function e(e){o(this,e);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}e.prototype.getElementHeight=function(){var e="".concat(this.height,"px");var o="".concat(this.collapseSize,"px");return this.collapsed?o:e};e.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};e.prototype.componentDidRender=function(){var e=this;var o,s,t;this.iframe=((o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelector("iframe"))||null;(t=(s=this.iframe)===null||s===void 0?void 0:s.contentWindow)===null||t===void 0?void 0:t.addEventListener("resize",(function(){if(!e.iframe){return}e.height=parseFloat(getComputedStyle(e.iframe).height)}))};e.prototype.render=function(){var e=this;if(!this.collapsed){setTimeout((function(){if(!e.collapsed){e.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return t(n,{key:"7cc2167ab3dab1a975d141f3c58d3c5982c1645a",class:"zonos--elements zonos--collapse",style:{"--font-family":b(),height:this.getElementHeight()}},t("div",{key:"1b791702f95066643ac82402a9fcff19b0fcc706"},t("iframe",{key:"08f678a4ce92f5600c584e329e3039bc4588ff3a",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),t("slot",{key:"83119f9ba9764c46fa7d1dd7b4c0b08c49033607"})))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());P.style=D;var M='<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 N=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--min-height, auto);height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var Z=N;var F=e("zonos_dialog",function(){function e(e){var t=this;o(this,e);this.closeDialog=s(this,"closeDialog",7);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){if(!t.open){return}t.closeDialog.emit()};this.clickOutsideDialogHandler=function(e){if(e.target===e.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.minHeight=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}e.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.closeButtonHandler()}};e.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};e.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var e=v({overrideBorderStyle:this.borderStyle});return t(n,{key:"9478fd5dd572bc1a677146025485b74321700fba",class:p(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":e,"--font-family":b(),"--height":this.height||"initial","--min-height":this.minHeight||"500px","--width":this.width}},t("div",{key:"4bc8f62202bbae238d07536f3234bdc00c6d689f",class:"zonos--backdrop"}),t("div",{key:"da80cf2a9b0a19e4e42062a57fed91ecfe6c0bcf","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},t("div",{key:"7bbaacf6fbb5ff70db62246254f007006146324e",class:"zonos--dialog"},this.isLoading&&t("div",{key:"c65e9205d105456072b4c3c7549dce937dd7f8ec",class:"zonos--loading"},t("zonos-spinner",{key:"ac3667841a42f0ae55831a449c07bdfadc976971",size:30})),(this.headerText||!this.noCloseButton)&&t("div",{key:"9e2c9ec2c4a9be64169f2f6b6473bc16516fbff1",class:"zonos--header"},this.headerText&&t("h3",{key:"0b2086b13d7cfc14901527afbb087c40eb76895d",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&t("zonos-button",{key:"2d2b55e65e965071f6422665eaa8be7991450a93",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close dialog",content:M}),noBackground:true,onClick:this.closeButtonHandler,variant:"subtle"})),t("div",{key:"aedb5b3b307a5a04f9b806c927679d0e0c0de711",class:p(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},t("slot",{key:"5f55d5771bc62a54865ee3bf8a25f571bfd7fbd1"})),t("slot",{key:"95053c3ebf850f1f9796163122f9224f4190d1c9",name:"dialog-footer"}))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}());F.style=Z;var H=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";var R=H;var U=e("zonos_link_authentication",function(){function e(e){o(this,e);this.titleText=undefined;this.defaultEmail=null;this.stripe=a.stripe}e.prototype.watchInitStripe=function(){if(!this.stripe||!a.stripeElements){return}var e=this.defaultEmail?{email:this.defaultEmail}:undefined;var o=a.stripeLinkElement||a.stripeElements.create("linkAuthentication",{defaultValues:e||undefined});var s=this.el.querySelector(".zonos--link-authentication-component");if(!s){c("Cannot find container element for linkAuthenticationElement");return}o.mount(s);o.on("change",(function(e){a.stripeLinkEventData=e}));a.stripeLinkElement=o};e.prototype.componentDidLoad=function(){this.watchInitStripe()};e.prototype.render=function(){return t(n,{key:"715d58ba37c753ac4890aabf3b6979a759a5594a",class:"zonos--link-authentication zonos--elements"},t("zonos-text",{key:"1394e448a080a21522e91a62c8886d49c3616e59",class:"zonos--title",type:"semiBoldLabel"},this.titleText),t("div",{key:"417bc27477776220acfdc9d9f76acd91fd14c1ca",class:"zonos--link-authentication-component"}))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return e}());U.style=R}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,s,t){function n(e){return e instanceof s?e:new s((function(o){o(e)}))}return new(s||(s=Promise))((function(s,i){function a(e){try{d(t.next(e))}catch(e){i(e)}}function r(e){try{d(t["throw"](e))}catch(e){i(e)}}function d(e){e.done?s(e.value):n(e.value).then(a,r)}d((t=t.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(o){return d([e,o])}}function d(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(s=0)),s)try{if(t=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:s.label++;return{value:r[1],done:false};case 5:s.label++;n=r[1];r=[0];continue;case 7:r=s.ops.pop();s.trys.pop();continue;default:if(!(i=s.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){s=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(r[0]===6&&s.label<i[1]){s.label=i[1];i=r;break}if(i&&s.label<i[2]){s.label=i[2];s.ops.push(r);break}if(i[2])s.ops.pop();s.trys.pop();continue}r=o.call(e,s)}catch(e){r=[6,e];n=0}finally{t=i=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-dafa2b79.system.js","./p-aed0098c.system.js","./p-63db40b9.system.js","./p-2670438c.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js","./p-2770ba48.system.js","./p-a8cb25de.system.js","./p-e37440ad.system.js"],(function(e){"use strict";var o,s,t,n,i,a,r,d,l,c,h,f,u,b,p,m,v,z;return{setters:[function(e){o=e.r;s=e.c;t=e.h;n=e.H;i=e.d},function(e){a=e.h;r=e.l;d=e.t},function(e){l=e.i},function(e){c=e.a},function(e){h=e.i;f=e.c},function(e){u=e.z;b=e.d},function(e){p=e.c},function(e){m=e.R},function(e){v=e.g},function(e){z=e.i}],execute:function(){var y=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var g=y;var x=e("zonos_address",function(){function e(e){o(this,e);this.invalidCharacters=s(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=false}e.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}}return{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}};e.prototype.updateAddressEventData=function(e){var o=e.event,s=e.type;switch(s){case"billing":a.stripeBillingAddressEventData=o;break;default:a.stripeAddressEventData=o;break}};e.prototype.updateAddressElement=function(e){var o=e.stripeAddressElement,s=e.type;if(s==="shipping"){a.stripeAddressElement=o;return}a.stripeBillingAddressElement=o};e.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,s,t,n,i,a,d,h;var f=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;s=this.getStripeAddressInstance(),t=s.stripeAddressEventData,n=s.stripeElements;if(!this.stripe||!n){c("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(e=this.defaultAddress)===null||e===void 0?void 0:e.phone;if(!i){(o=this.defaultAddress)===null||o===void 0?true:delete o.phone}a=r.shippingZoneCountries;d=a?Object.values(a).map((function(e){return e.code})):[];h=n.create("address",{allowedCountries:this.type==="shipping"?d:[],contacts:this.defaultAddress&&!t?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:(t===null||t===void 0?void 0:t.value.address.country)||r.selectedCountryCode||"AL"}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});h.mount(this.el.querySelector(".zonos--address-component"));h.on("change",(function(e){var o=e.value;if(!f.isDirtyAddress&&o.address.line1.length>=3){f.isDirtyAddress=true;setTimeout((function(){if(l()){f.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var e=f.type==="shipping"?100:600;var o=f.el.closest(".zonos--group");var s=f.el.getBoundingClientRect().top+e;o===null||o===void 0?void 0:o.scrollTo({behavior:"smooth",top:s})}}),600)}f.updateAddressEventData({event:Object.assign(Object.assign({},e),{elementMode:f.type,elementType:"address",value:Object.assign(Object.assign({},o),{firstName:o.firstName||o.name.split(" ")[0],lastName:o.lastName||o.name.split(" ")[1]})}),type:f.type})}));this.updateAddressElement({stripeAddressElement:h,type:this.type});return[2]}))}))};e.prototype.disconnectedCallback=function(){var e=this.getStripeAddressInstance().stripeAddressElement;e===null||e===void 0?void 0:e.destroy()};e.prototype.componentDidLoad=function(){var e=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!e&&e.value.address.line1.length>0;void this.watchInitStripe()};e.prototype.render=function(){return t(n,{key:"c8b22844b640cf67016bedac346ee2876822fb91",class:"zonos--address zonos--elements"},t("zonos-text",{key:"79a688fbb8915ef11897939bd568d696b3632b6a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),t("div",{key:"71468dc23512c3e228dd9ce7d6df6593ba01ad0b",class:"zonos--address-component"}))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return e}());x.style=g;var k=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';var w=k;var j=e("zonos_address_display",function(){function e(e){o(this,e);this.currentAddress=undefined;this.addressType=undefined}e.prototype.render=function(){var e;var o=this.currentAddress,s=o.city,i=o.country,a=o.email,l=o.line1,c=o.line2,f=o.name,u=o.phone,b=o.postal_code,p=o.state;var m=(e=r.shippingZoneCountries)===null||e===void 0?void 0:e[i];var v=function(e){var o=e.bold,s=e.content;var n=h(s)?"red-600":"gray-1200";return t("zonos-text",{textColor:n,type:o?"boldLabel":"body"},s)};return t(n,{class:"zonos--address-form zonos--elements"},t("div",{class:"zonos--title"},t("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?d("Shipping"):d("Billing"))),t("div",{class:"zonos--address-group"},f&&t("div",{class:"zonos--address-line"},v({bold:true,content:f})),a&&t("div",{class:"zonos--address-line"},v({content:a})),u&&t("div",{class:"zonos--address-line"},v({content:u})),l&&t("div",{class:"zonos--address-line"},v({content:l})),c&&t("div",{class:"zonos--address-line"},v({content:c})),t("div",{class:"zonos--address-line"},s&&v({content:s}),p&&v({content:p}),b&&v({content:b})),m&&t("div",{class:"zonos--address-line"},t("zonos-country-flag",{class:"zonos--country-flag",countryCode:m.code})," ",v({content:m.displayName}))))};return e}());j.style=w;var C=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";var I=C;var A=e("zonos_address_form",function(){function e(e){var t=this;o(this,e);this.addressChange=s(this,"addressChange",7);this.onInputChange=function(e){var o;var s=e.key,n=e.value;t.addressChange.emit(Object.assign(Object.assign({},t.localAddress),(o={},o[s]=n,o)))};this.currentAddress=undefined;this.translatedAddress=undefined;this.addressType=undefined;this.localAddress=this.currentAddress}e.prototype.watchCurrentAddress=function(){var e,o,s,t,n,i;var a=this.currentAddress,r=a.city,d=a.line1,l=a.line2,c=a.name,h=a.postal_code,f=a.state;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:((e=this.translatedAddress.city)===null||e===void 0?void 0:e[r])||r,line1:((o=this.translatedAddress.line1)===null||o===void 0?void 0:o[d])||d,line2:((s=this.translatedAddress.line2)===null||s===void 0?void 0:s[l])||l,name:((t=this.translatedAddress.name)===null||t===void 0?void 0:t[c])||c,postal_code:((n=this.translatedAddress.postal_code)===null||n===void 0?void 0:n[h])||h,state:((i=this.translatedAddress.state)===null||i===void 0?void 0:i[f])||f})};e.prototype.componentWillLoad=function(){this.watchCurrentAddress()};e.prototype.render=function(){var e=this;var o=this.localAddress,s=o.city,i=o.country,a=o.line1,r=o.line2,l=o.name,c=o.phone,f=o.postal_code,u=o.state;var b=l.split(" ")[0]||"";var p=l.split(" ")[1]||"";return t(n,{key:"9c1ee87200d1f90e9dfac58c49aabba1777373a9",class:"zonos--address-form zonos--elements"},t("div",{key:"eec3416268ff2324fd751408552705086905423d",class:"zonos--title"},t("zonos-text",{key:"a4c254f78420dcfc712e1a83b20dd3ac9e64c460",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?d("Shipping"):d("Billing"))),t("div",{key:"b8109545d282fb8c06a2e791c30088018d6ffec0",class:"zonos--address-group"},t("div",{key:"833a395984cd75242e5d97697fd6566f11932d1b",class:"zonos--contact"},t("zonos-text",{key:"e60f574e95162aabf6465b878fc9b16c708e8029",type:"label"},d("Contact")),t("zonos-input",{key:"24cd24a362a1bbc76d0c91718c48ae32baa20ae6",class:"zonos--form-email",inputLabel:d("Email"),inputValue:this.currentAddress.email,isDisabled:true}),t("div",{key:"84e64ef44eb3b39ac7ab542e07d7a52a95377cae",class:"zonos--name zonos--address-row"},t("zonos-input",{key:"26621aca0d57a7fee743874b8d11af5f58c91b69",class:"zonos--form-first-name",inputLabel:d("First name"),inputValue:b,isError:h(b),onInputChange:function(o){return e.onInputChange({key:"name",value:"".concat(o.detail," ").concat(p)})}}),t("zonos-input",{key:"01e3e5038b4a4311dd5874a1213f936451dc300d",class:"zonos--form-last-name",inputLabel:d("Last name"),inputValue:p,isError:h(p),onInputChange:function(o){return e.onInputChange({key:"name",value:"".concat(b," ").concat(o.detail)})}}))),t("div",{key:"eb42dece28082ff16a453110b3208de5b44b9fdb",class:"zonos--address"},t("zonos-text",{key:"3557122c716533be7b36a8bd395ea616a7061665",type:"label"},d("Address")),t("zonos-input",{key:"bcc7d84d530f2f3a10537117eb6ef143df7cc8e2",class:"zonos--form-country",inputLabel:d("Country"),inputValue:i,isDisabled:true}),t("zonos-input",{key:"6ce78e25151a129b69b501cf768604134a395e85",class:"zonos--form-line1",inputLabel:d("Address line 1"),inputValue:a,isError:h(a),onInputChange:function(o){return e.onInputChange({key:"line1",value:o.detail})}}),t("zonos-input",{key:"6f7a18010e2d8131327154a31ba58544df56768c",class:"zonos--form-line2",inputLabel:d("Address line 2"),inputValue:r,isError:h(r),onInputChange:function(o){return e.onInputChange({key:"line2",value:o.detail})}}),t("div",{key:"48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6",class:"zonos--address-row"},t("zonos-input",{key:"6decf8c430d8d25b2c555b110009da74e0ac9e5f",class:"zonos--form-city",inputLabel:d("City"),inputValue:s,isError:h(s),onInputChange:function(o){return e.onInputChange({key:"city",value:o.detail})}}),t("zonos-input",{key:"065e1be213d3cfec7749ab32890f96b0b484a25a",class:"zonos--form-state",inputLabel:d("State/Province"),inputValue:u,isError:h(u),onInputChange:function(o){return e.onInputChange({key:"state",value:o.detail})}})),t("zonos-input",{key:"a69244bf84c9fd007c9ad4aad2b6cc6d44420775",class:"zonos--form-postal-code",inputLabel:d("Postal code"),inputValue:f,isError:h(f),onInputChange:function(o){return e.onInputChange({key:"postal_code",value:o.detail})}}),t("zonos-input",{key:"0bcc89de1ecc4aae8a69d74eff42dfd117ada40b",class:"zonos--form-phone",inputLabel:d("Phone number"),inputValue:c,onInputChange:function(o){return e.onInputChange({key:"phone",value:o.detail})}}))))};Object.defineProperty(e,"watchers",{get:function(){return{translatedAddress:["watchCurrentAddress"]}},enumerable:false,configurable:true});return e}());A.style=I;var _=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";var O=_;var L=e("zonos_address_update_dialog",function(){function e(e){var t=this;o(this,e);this.closeDialog=s(this,"closeDialog",7);this.continueClicked=s(this,"continueClicked",7);this.closeDialogHandler=function(){t.closeDialog.emit()};this.getTranslatedAddress=function(e){var o=e.currentAddress,s=e.translatedAddress;var t,n,i,a,r,d;var l=o.city,c=o.line1,h=o.line2,f=o.name,u=o.postal_code,b=o.state;return{city:((t=s.city)===null||t===void 0?void 0:t[l])||l,line1:((n=s.line1)===null||n===void 0?void 0:n[c])||c,line2:((i=s.line2)===null||i===void 0?void 0:i[h])||h,name:((a=s.name)===null||a===void 0?void 0:a[f])||f,postal_code:((r=s.postal_code)===null||r===void 0?void 0:r[u])||u,state:((d=s.state)===null||d===void 0?void 0:d[b])||b}};this.continueClickHandler=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,s,t,n,i,a,r,d,l,c,h,u;return __generator(this,(function(b){this.continueLoading=true;t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});i=f(Object.assign(Object.assign({},n),{country:this.shippingAddress.country}));a=t&&this.billingAddress&&f(Object.assign(Object.assign({},t),{country:this.billingAddress.country}));r=!!Object.keys(i).length;d=!!a&&!!Object.keys(a).length;if(r||d){l=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("zonos-address-form");c=l===null||l===void 0?void 0:l[0];h=l===null||l===void 0?void 0:l[1];u=((o=c===null||c===void 0?void 0:c.shadowRoot)===null||o===void 0?void 0:o.querySelector(".has-error"))||((s=h===null||h===void 0?void 0:h.shadowRoot)===null||s===void 0?void 0:s.querySelector(".has-error"));if(u){u.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2]}this.continueClicked.emit({billingAddress:t,shippingAddress:n});return[2]}))}))};this.buildTranslateAddressState=function(e){var o,s,t,n,i,a;var r=e.currentAddress,d=e.translatedAddress;var l=r.city,c=r.line1,h=r.line2,f=r.name,u=r.postal_code,b=r.state;return{city:(o={},o[l]=d.city,o),line1:(s={},s[c]=d.line1,s),line2:(t={},t[h]=d.line2,t),name:(n={},n[f]=d.name,n),postal_code:(i={},i[u]=d.postal_code,i),state:(a={},a[b]=d.state,a)}};this.continueLoading=false;this.dialogLoading=undefined;this.dialogOpen=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.isMobile=false;this.shippingAddress=undefined;this.billingAddress=undefined;this.translatedShippingAddress=undefined;this.translatedBillingAddress=undefined;this.showErrorBanner=false;this.translatedShippingAddressState={};this.translatedBillingAddressState={}}e.prototype.watchTranslatedShippingAddress=function(){this.translatedShippingAddressState=this.translatedShippingAddress};e.prototype.watchTranslatedBillingAddress=function(){this.translatedBillingAddressState=this.translatedBillingAddress};e.prototype.componentWillLoad=function(){this.watchTranslatedBillingAddress();this.watchTranslatedShippingAddress()};e.prototype.render=function(){var e=this;var o=this.submitBtnColor||u.appearance.colorSecondary;var s=o==="#ffffff"?"outline":this.submitBtnType||"standard";var i=this.billingAddress;var a=this.shippingAddress;return t(n,{key:"03535edacb348258592641baa349e9dcf14bf78c",class:p(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},t("zonos-dialog",{key:"c16871425dffe955d422ffa5b9aee1ece0da2890",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialog.emit()},open:this.dialogOpen,width:"568px"},t("div",{key:"e4fad501f7cfedc5783774d8b1bf785d6947d3c8",class:"zonos--body"},t("div",{key:"973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0",class:"zonos--dialog-header"},t("div",{key:"89c82b6ff3723056d161560da22bd16a992afee7",class:"zonos--dialog-title"},t("zonos-text",{key:"bf92ef0b40ea67a492164fedb95dd68b7d023e85",type:"title"},d("Update your address")),t("zonos-button",{key:"4e7a1905c976cec396db5c34f633b383bba0d55a",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:m}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),t("zonos-text",{key:"47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38"},d("To ensure delivery all address details must be in Latin characters."))),t("div",{key:"28d9804f0a18f143ce541c2c511cbfa21a2a416f",class:"zonos--group"},t("zonos-text",{key:"43ec5a9fc8594d065b256952ca8e9392fba03839",class:"zonos--what-you-entered",type:"semiBoldLabel"},d("What you entered")),t("div",{key:"b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1",class:"zonos--address-display-group"},t("zonos-address-display",{key:"152c53176a46575677723ca47386e484c659927a",addressType:"shipping",currentAddress:a}),i&&t("zonos-address-display",{key:"6c7ac2b49d121c26ce45f09a1eac9ef456d45910",addressType:"billing",currentAddress:i})),t("div",{key:"2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d",class:"zonos--address-form-section"},t("zonos-text",{key:"87d3380072a049ccde71ba1b752aedd36830348b",type:"semiBoldLabel"},d("Translated address")),t("zonos-address-form",{key:"2cb36251c6549da05e272183b2c37478b4166fea",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:a,onAddressChange:function(o){var s=o.detail;e.translatedShippingAddressState=e.buildTranslateAddressState({currentAddress:a,translatedAddress:s})},translatedAddress:this.translatedShippingAddressState}),i&&t("zonos-address-form",{key:"9bf5ebd6fb08851716a72c855451bfeb3ee0ed68",addressType:"billing",class:"zonos--billing-address-form",currentAddress:i,onAddressChange:function(o){var s=o.detail;e.translatedBillingAddressState=e.buildTranslateAddressState({currentAddress:i,translatedAddress:s})},translatedAddress:this.translatedBillingAddressState}))),t("div",{key:"621df9c8919973b37c62aca5727bde3635086a6b",class:"zonos--group-btn"},t("div",{key:"95e9fd31418abc8e89ceef24af7cc251ee45ac93",class:"zonos--button-wrapper"},t("zonos-button",{key:"bef31fc81e7cc0f2b3f7ab875a29978b07865b6a",class:"zonos--cancel-btn",onClick:function(){return e.closeDialogHandler()},variant:"subtle"},d("Cancel")),t("zonos-button",{key:"9d183153541766b421c3420681c1159ffa599682",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return e.continueClickHandler()},size:"sm",variant:s},d("Update address")))))))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}},enumerable:false,configurable:true});return e}());L.style=O;var E=["blue","cyan","green","orange","purple","red","gray","glass"];var B=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var S=B;var T=e("zonos_checkbox",function(){function e(e){o(this,e);this.checkboxSelected=s(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}e.prototype.onClick=function(){if(this.isDisabled){return}this.checkboxSelected.emit(!this.isChecked)};e.prototype.render=function(){var e=this;var o=E.includes(this.backgroundColor);var s=o?"var(--zonos-elements-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var i=o?"var(--zonos-elements-".concat(this.backgroundColor,"-200)"):!z(s)?"var(--zonos-elements-gray-800)":"var(--zonos-elements-gray-0)";var a=v({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return t(n,{key:"bf51dd642e88096e874d78023a29dd68239e8d3a",class:p(["zonos--elements zonos--checkbox"]),style:{"--background-color":s,"--border-radius":a,"--font-family":b(),"--size":"".concat(this.size,"px")}},t("label",{key:"3598c9f21285304499aaafbab5226d619ecf4e69",class:p([this.isDisabled&&"disabled"])},t("input",{key:"277507f643404e6e44191c2d715b70f38fc6af85",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(o){e.checkboxSelected.emit(o.target.checked)},type:"checkbox"}),t("span",{key:"3f0fd0d458e8cf660fa883ceaa241e3397829548",class:"checkmark-container"},t("svg",{key:"0d654744bea5b5696ddcf3778a155fb622022f1e",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"cc19837ee088feb7053fdaeaea0d1213cbc60775","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&t("zonos-text",{key:"cb85d59651f67a33126d37c3ebfb1e8a91b457fe",size:this.fontSize},this.label)))};return e}());T.style=S;var V=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var D=V;var P=e("zonos_collapse",function(){function e(e){o(this,e);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}e.prototype.getElementHeight=function(){var e="".concat(this.height,"px");var o="".concat(this.collapseSize,"px");return this.collapsed?o:e};e.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};e.prototype.componentDidRender=function(){var e=this;var o,s,t;this.iframe=((o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelector("iframe"))||null;(t=(s=this.iframe)===null||s===void 0?void 0:s.contentWindow)===null||t===void 0?void 0:t.addEventListener("resize",(function(){if(!e.iframe){return}e.height=parseFloat(getComputedStyle(e.iframe).height)}))};e.prototype.render=function(){var e=this;if(!this.collapsed){setTimeout((function(){if(!e.collapsed){e.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return t(n,{key:"7cc2167ab3dab1a975d141f3c58d3c5982c1645a",class:"zonos--elements zonos--collapse",style:{"--font-family":b(),height:this.getElementHeight()}},t("div",{key:"1b791702f95066643ac82402a9fcff19b0fcc706"},t("iframe",{key:"08f678a4ce92f5600c584e329e3039bc4588ff3a",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),t("slot",{key:"83119f9ba9764c46fa7d1dd7b4c0b08c49033607"})))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());P.style=D;var M='<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 N=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--min-height, auto);height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var Z=N;var F=e("zonos_dialog",function(){function e(e){var t=this;o(this,e);this.closeDialog=s(this,"closeDialog",7);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){if(!t.open){return}t.closeDialog.emit()};this.clickOutsideDialogHandler=function(e){if(e.target===e.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.minHeight=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}e.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.closeButtonHandler()}};e.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};e.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var e=v({overrideBorderStyle:this.borderStyle});return t(n,{key:"9478fd5dd572bc1a677146025485b74321700fba",class:p(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":e,"--font-family":b(),"--height":this.height||"initial","--min-height":this.minHeight||"500px","--width":this.width}},t("div",{key:"4bc8f62202bbae238d07536f3234bdc00c6d689f",class:"zonos--backdrop"}),t("div",{key:"da80cf2a9b0a19e4e42062a57fed91ecfe6c0bcf","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},t("div",{key:"7bbaacf6fbb5ff70db62246254f007006146324e",class:"zonos--dialog"},this.isLoading&&t("div",{key:"c65e9205d105456072b4c3c7549dce937dd7f8ec",class:"zonos--loading"},t("zonos-spinner",{key:"ac3667841a42f0ae55831a449c07bdfadc976971",size:30})),(this.headerText||!this.noCloseButton)&&t("div",{key:"9e2c9ec2c4a9be64169f2f6b6473bc16516fbff1",class:"zonos--header"},this.headerText&&t("h3",{key:"0b2086b13d7cfc14901527afbb087c40eb76895d",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&t("zonos-button",{key:"2d2b55e65e965071f6422665eaa8be7991450a93",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close dialog",content:M}),noBackground:true,onClick:this.closeButtonHandler,variant:"subtle"})),t("div",{key:"aedb5b3b307a5a04f9b806c927679d0e0c0de711",class:p(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},t("slot",{key:"5f55d5771bc62a54865ee3bf8a25f571bfd7fbd1"})),t("slot",{key:"95053c3ebf850f1f9796163122f9224f4190d1c9",name:"dialog-footer"}))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}());F.style=Z;var H=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";var R=H;var U=e("zonos_link_authentication",function(){function e(e){o(this,e);this.titleText=undefined;this.defaultEmail=null;this.stripe=a.stripe}e.prototype.watchInitStripe=function(){if(!this.stripe||!a.stripeElements){return}var e=this.defaultEmail?{email:this.defaultEmail}:undefined;var o=a.stripeLinkElement||a.stripeElements.create("linkAuthentication",{defaultValues:e||undefined});var s=this.el.querySelector(".zonos--link-authentication-component");if(!s){c("Cannot find container element for linkAuthenticationElement");return}o.mount(s);o.on("change",(function(e){a.stripeLinkEventData=e}));a.stripeLinkElement=o};e.prototype.componentDidLoad=function(){this.watchInitStripe()};e.prototype.render=function(){return t(n,{key:"715d58ba37c753ac4890aabf3b6979a759a5594a",class:"zonos--link-authentication zonos--elements"},t("zonos-text",{key:"1394e448a080a21522e91a62c8886d49c3616e59",class:"zonos--title",type:"semiBoldLabel"},this.titleText),t("div",{key:"417bc27477776220acfdc9d9f76acd91fd14c1ca",class:"zonos--link-authentication-component"}))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return e}());U.style=R}}}));
|