@zonos/elements 1.3.33 → 1.3.34-alpha.0
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-11b47252.js → cart-42cc98d9.js} +0 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{submitGtag-3a1d091e.js → submitGtag-09f2e437.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 +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- 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/store/hello/localization.js +0 -1
- package/dist/esm/{cart-22ba08ec.js → cart-b9f15a63.js} +0 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{submitGtag-1435eec8.js → submitGtag-8b52cfdd.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 +2 -2
- package/dist/esm/zonos-controller.entry.js +1 -1
- 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-22ba08ec.js → cart-b9f15a63.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{submitGtag-1435eec8.js → submitGtag-8b52cfdd.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.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-ddb1cfe2.entry.js → p-09f89949.entry.js} +1 -1
- package/dist/zonos-elements/p-0a07379c.system.js +1 -0
- package/dist/zonos-elements/{p-35604380.entry.js → p-0f58c8ab.entry.js} +1 -1
- package/dist/zonos-elements/{p-e09df465.entry.js → p-1a67d86d.entry.js} +1 -1
- package/dist/zonos-elements/{p-3b95a9a3.entry.js → p-1b33ed3b.entry.js} +1 -1
- package/dist/zonos-elements/{p-56152835.system.entry.js → p-210f3405.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cdb53aaf.system.entry.js → p-27538d28.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-36bb4360.entry.js → p-290bd010.entry.js} +1 -1
- package/dist/zonos-elements/{p-88129ef9.system.entry.js → p-3143bbf8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-11672829.js → p-3bc94271.js} +1 -1
- package/dist/zonos-elements/{p-6f589755.entry.js → p-4c49eb9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-b5825bb7.entry.js → p-4ff5c708.entry.js} +1 -1
- package/dist/zonos-elements/{p-dafa2b79.system.js → p-679e42d8.system.js} +1 -1
- package/dist/zonos-elements/{p-fe296307.entry.js → p-6a42fa2a.entry.js} +1 -1
- package/dist/zonos-elements/{p-74bd6150.entry.js → p-6f51a7ee.entry.js} +1 -1
- package/dist/zonos-elements/{p-dec21ca2.system.entry.js → p-7a3bf998.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-478357b0.system.entry.js → p-829bac92.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa7e2a01.entry.js → p-83e265cf.entry.js} +1 -1
- package/dist/zonos-elements/{p-28e6963b.system.entry.js → p-9b525aaa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-95d52a24.system.entry.js → p-af5fc5f7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84997f2e.js → p-b5f769ba.js} +1 -1
- package/dist/zonos-elements/{p-7624013b.system.js → p-b65cc2cf.system.js} +1 -1
- package/dist/zonos-elements/{p-eb566457.system.entry.js → p-c84f90b9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-b8a4b345.system.entry.js → p-f64ac752.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a0b17e0b.system.entry.js → p-fdf79bff.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-450eb8ff.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-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}}}));
|
|
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-679e42d8.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 +1 @@
|
|
|
1
|
-
import{r as o,c as t,h as n,H as e}from"./p-ce347974.js";import{r as i,u as s,h as r,v as a,a as c}from"./p-
|
|
1
|
+
import{r as o,c as t,h as n,H as e}from"./p-ce347974.js";import{r as i,u as s,h as r,v as a,a as c}from"./p-b5f769ba.js";import{z as l,b as d,d as h}from"./p-5821856c.js";import{a as u,l as m}from"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const p=o=>{const t=document.querySelector(o);if(!document.querySelector("zonos-hello")&&t){const o=document.createElement("zonos-hello");return t.appendChild(o),!0}return!1},f=async o=>{const{anchorElementSelector:t}=o,n=(({position:o="bottom-right"})=>{const t=".zonos--hello-mobile-wrapper";if(document.querySelector(t))return t;const n=document.createElement("div");return n.className="zonos--hello-mobile-wrapper",n.style.position="fixed","top-right"===o&&(n.style.top="72px",n.style.right="24px"),"top-left"===o&&(n.style.top="72px",n.style.left="24px"),"bottom-right"===o&&(n.style.bottom="72px",n.style.right="24px"),"bottom-left"===o&&(n.style.bottom="72px",n.style.left="24px"),n.style.zIndex="2147483007",document.body.appendChild(n),t})({position:"bottom-right"}),e=t||n;if(e&&s(e)){if(m("Hello init complete"),!p(e)){const o=new MutationObserver((()=>{p(e)&&o.disconnect()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{o.disconnect(),p(n)}),1e3)}}else u(`Selector anchorElementSelector "${o.anchorElementSelector}" is not a valid selector.`)},w=class{constructor(n){o(this,n),this.stripeInitEvent=t(this,"stripeInitEvent",7),this.config=void 0,this.zonosApiKey=void 0}async initCheckoutElement(o){var t;o?(r.stripe=o,(t=l.checkoutSettings).placeOrderButtonSelector&&(s(t.placeOrderButtonSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const o=document.createElement("zonos-checkout");document.body.appendChild(o)}})():u(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),m("init checkout element")):m("Stripe is not loaded yet - cannot init checkout element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const o=document.createElement("zonos-notification");document.body.appendChild(o)}async setupGoogleFont(o){var t,n;const e=o||h();if("Inter"===e){if(!o)return;m("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:o})}const{errors:s,json:r}=await i(`https://v1.route.js.zonos.com/api/zonos-elements/get-font-detail?family=${e}`);s.length>0||!r?m(`Failed to load font ${e}`,"warn"):(null===(n=(t=window.Zonos).injectSupportGoogleFont)||void 0===n||n.call(t,r.fontUrl),o&&(m(`[FONT] ${o} font override applied`),l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:o})))}handleLocationChange(){f(l.helloSettings)}initHistoryListener(){const o=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),o.apply(this,arguments)};const t=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)}}async componentWillLoad(){this.initHistoryListener(),l.zonosApiKey=this.zonosApiKey,(async()=>{var o,t;const{errors:n,json:e}=await(async()=>{const{errors:o,json:t}=await i("https://v1.route.js.zonos.com/api/zonos-elements/zonos-settings");return o.length?(u("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null}):{errors:[],json:t}})();if("403"===(null===(o=n[0])||void 0===o?void 0:o.type.toString()))return void m("Failed to load zonos settings. This domain may not have access","warn");this.initZonosNotification();const s=Object.assign(Object.assign({},this.config),{subscriptionStatus:void 0});d({overrideSettings:s,zonosSettings:e}),this.setupGoogleFont(),l.helloSettings&&f(l.helloSettings),await a();const r=(null===(t=null==e?void 0:e.checkoutSettings)||void 0===t?void 0:t.externalServiceTokens.find((o=>"STRIPE_PUBLISHABLE_TOKEN"===o.type)))||null;if(r&&this.stripeInitEvent){if("INACTIVE"===l.checkoutSettings.subscriptionStatus)return m('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void m("zonos controller loaded");if("DISABLED"===l.checkoutSettings.visibilityStatus)return m("=== Checkout is disabled by store owner ===","warn"),void m("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:r.token}),m("zonos controller loaded")}else m("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(o){const t=document.querySelector("zonos-notification");t?t.showNotification(o):m("Failed to show notification - zonos-notification not found","warn")}async overrideConfig(o){d({overrideSettings:o,zonosSettings:null})}async overrideCountry(o){m(`Override country code to ${o}`),c(o)}async getAppearanceSetting(){return l.appearance}async updateOrganizationName(o){l.organizationName=o}render(){return n(e,{key:"d7af0426a1f93b8ec8b37ef73babe045bc2a7624",class:"zonos--elements"})}};w.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";export{w as zonos_controller}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?t(o.value):i(o.value).then(a,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-dafa2b79.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,c,h,d;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){c=o.c},function(o){h=o.f},function(o){d=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 g='<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 b='<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&&d(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:"af2c46bcc413205d644a2b94ee2ff568d3d004f2",class:"zonos--elements"},n("div",{key:"67a563de9e702e370d057ee3cc45bc0c14feedc5","aria-hidden":"true",class:c(["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:"412a8d2f4c01e4ff216feb92a979be5987bcd8c7"},n("div",{key:"b2921acfc77c6a402a14256a6f1c28607f6533e7",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"aa623c0533a5f852dab7f0f98d6dc26f62ef899a",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:"4fdac9331a5b2506a5ca1c7c1b6bfecf822bfcd9",spacing:24},n("zonos-country-flag",{key:"57afef45e0bebe9bdfa715306f6ec2c30aca8dc1",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"954b970c82fd631efadbd9c916e8bad78f0e1321",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"cde98a9636e6150d6cab009970938a0cf61bc05a",type:"boldSubheader"},C),n("zonos-text",{key:"b63fc79317f23854737c1f2dd2cbde38f3841f2a",innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{key:"e115a03222d2271b358c3f1ae3feb938bafcdbef",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:"6f5ef13c8ce1171b99c148f43f491ced8f29cd57",spacing:"12px"},n("zonos-v-stack",{key:"816a373a6dcf69976279af51f09d136f18c6b4a8",spacing:12},n("div",{key:"51fc31937cb4885c7a98ee5fbc0755a00158f172",class:"zonos--flex-message"},n("zonos-icon",{key:"bc659d649b3a7f046225270870e7ae31597027f4","aria-label":"Duty de minimis",content:g}),n("zonos-text",{key:"e63ce2eb6f381718ca26962c7429f266bf8cf8d9"},a)),n("div",{key:"6f49eac81be52709ad8f35c04cccd7d2fec03b7a",class:"zonos--flex-message"},n("zonos-icon",{key:"d95f29c3c42480c89a34e831740cfdbb3d64c058","aria-label":"Tax de minimis",content:v}),n("zonos-text",{key:"c226092fef030070af3af1d45debab989fb4f1b7"},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:b,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"32739e817940a937b59380197934ced91f2afc50",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"be58e393680370837ae35d5d4f85f77cf9620db2"},n("zonos-country-select",{key:"bc5c7e086513a44f817e5769acf2ca382b01fcc4",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"7cbee089b9661602bb23e5e2821030d04891f18a"},n("zonos-language-select",{key:"55d654b2b339cfd83e3fe9814d914a382a891af3",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-679e42d8.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,c,h,d;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){c=o.c},function(o){h=o.f},function(o){d=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 g='<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 b='<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&&d(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:"af2c46bcc413205d644a2b94ee2ff568d3d004f2",class:"zonos--elements"},n("div",{key:"67a563de9e702e370d057ee3cc45bc0c14feedc5","aria-hidden":"true",class:c(["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:"412a8d2f4c01e4ff216feb92a979be5987bcd8c7"},n("div",{key:"b2921acfc77c6a402a14256a6f1c28607f6533e7",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"aa623c0533a5f852dab7f0f98d6dc26f62ef899a",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:"4fdac9331a5b2506a5ca1c7c1b6bfecf822bfcd9",spacing:24},n("zonos-country-flag",{key:"57afef45e0bebe9bdfa715306f6ec2c30aca8dc1",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"954b970c82fd631efadbd9c916e8bad78f0e1321",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"cde98a9636e6150d6cab009970938a0cf61bc05a",type:"boldSubheader"},C),n("zonos-text",{key:"b63fc79317f23854737c1f2dd2cbde38f3841f2a",innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{key:"e115a03222d2271b358c3f1ae3feb938bafcdbef",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:"6f5ef13c8ce1171b99c148f43f491ced8f29cd57",spacing:"12px"},n("zonos-v-stack",{key:"816a373a6dcf69976279af51f09d136f18c6b4a8",spacing:12},n("div",{key:"51fc31937cb4885c7a98ee5fbc0755a00158f172",class:"zonos--flex-message"},n("zonos-icon",{key:"bc659d649b3a7f046225270870e7ae31597027f4","aria-label":"Duty de minimis",content:g}),n("zonos-text",{key:"e63ce2eb6f381718ca26962c7429f266bf8cf8d9"},a)),n("div",{key:"6f49eac81be52709ad8f35c04cccd7d2fec03b7a",class:"zonos--flex-message"},n("zonos-icon",{key:"d95f29c3c42480c89a34e831740cfdbb3d64c058","aria-label":"Tax de minimis",content:v}),n("zonos-text",{key:"c226092fef030070af3af1d45debab989fb4f1b7"},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:b,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"32739e817940a937b59380197934ced91f2afc50",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"be58e393680370837ae35d5d4f85f77cf9620db2"},n("zonos-country-select",{key:"bc5c7e086513a44f817e5769acf2ca382b01fcc4",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"7cbee089b9661602bb23e5e2821030d04891f18a"},n("zonos-language-select",{key:"55d654b2b339cfd83e3fe9814d914a382a891af3",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 o,d as n,l as t}from"./p-
|
|
1
|
+
import{r as o,d as n,l as t}from"./p-b5f769ba.js";import{z as e}from"./p-5821856c.js";import{l as s}from"./p-eaa335e1.js";const a=async(s,a)=>{var i,r;if((window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||(null===(i=window.Zonos)||void 0===i?void 0:i.zonosQaUrl)||(null===(r=window.Zonos)||void 0===r?void 0:r.debug))&&!window.Zonos.zonosConversionTest)return;const d=n.checkoutSessionId;if(!d)return;const w={checkoutSessionId:d,countryCode:t.selectedCountryCode,eventName:s,metadata:a,organizationId:e.organizationId};await o("https://v1.route.js.zonos.com/api/zonos-elements/track-conversion-event",{body:w,method:"POST"})},i=()=>{var o;return null===(o=window.Zonos.zonosApiKey)||void 0===o?void 0:o.includes("test")},r=(o,n)=>new CustomEvent(o,{detail:n}),d=async({endpoint:n,errors:t,metadata:e})=>{const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,a={endpoint:n,errors:t,metadata:Object.assign({href:window.location.href,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},e)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:a,method:"POST"})},w=o=>{const n=e.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));n&&"DISABLED"!==(null==n?void 0:n.status)&&"function"==typeof window.gtag&&(s("Zonos submits gtag event","log",o),window.gtag("event",o,{}))};export{w as a,r as c,i as g,d as s,a as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e,H as t}from"./p-ce347974.js";import{_ as s,e as i,i as n,f as r,z as l,g as a,m as h}from"./p-5821856c.js";import{r as d,l as c,u as m,t as p,w as u,x as f,y as g,z,A as w,B as b}from"./p-84997f2e.js";import{c as v}from"./p-b4b7f705.js";import{a as x,l as y}from"./p-eaa335e1.js";import{g as k}from"./p-5883217a.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";var C=s,L=/\s/,T=/^\s+/,E=i,S=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&L.test(o.charAt(e)););return e}(o)+1).replace(T,""):o},j=r,I=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,A=/^0o[0-7]+$/i,B=parseInt,X=r,N=function(){return C.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||S(o)&&"[object Symbol]"==E(o)}(o))return NaN;if(j(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=j(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=O.test(o);return t||A.test(o)?B(o.slice(2),t?2:8):I.test(o)?NaN:+o},P=Math.max,R=Math.min,M=function(o,e,t){var s,i,n,r,l,a,h=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function u(o){var t=o-a;return void 0===a||t>=e||t<0||c&&o-h>=n}function f(){var o=N();if(u(o))return g(o);l=setTimeout(f,function(o){var t=e-(o-a);return c?R(t,n-(o-h)):t}(o))}function g(o){return l=void 0,m&&s?p(o):(s=i=void 0,r)}function z(){var o=N(),t=u(o);if(s=arguments,i=this,a=o,t){if(void 0===l)return function(o){return h=o,l=setTimeout(f,e),d?p(o):r}(a);if(c)return clearTimeout(l),l=setTimeout(f,e),p(a)}return void 0===l&&(l=setTimeout(f,e)),r}return e=H(e)||0,X(t)&&(d=!!t.leading,n=(c="maxWait"in t)?P(H(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=a=i=l=void 0},z.flush=function(){return void 0===l?r:g(N())},z};const F=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},$=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=l.helloSettings;i&&s||x("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&m(i)&&document.querySelectorAll(i)||[],a=s&&m(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return x("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&m(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},U=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===l.currentHelloPage||"productList"===l.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===l.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(l.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return p("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==l.currentHelloPage&&"productList"!==l.currentHelloPage||"DISABLED"===l.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=c;if(!e)return x("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await d("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(l.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=l.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=$();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=M((()=>{const{productTitleElementSelector:o}=l.helloSettings;if(o){const o=$();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&u(o.searchParams))!==c.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,l.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=l.helloSettings;return F(o)?"cart":F(t)?"productDetail":F(s)?"productList":F(e)?"home":""})();const e=new URL(window.location.href);if(!u(e.searchParams))return void f(c.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!c.localizationLoaded)return!1;const{showForCountries:e}=l.helloSettings;return o&&(c.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?c.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(c.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=l.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&l.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==l.helloSettings.currencyBehavior&&(c.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return z(o)}async convert(o){return w(o)}async format(o){return b({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){M(this.render.bind(this),500)}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||c.selectedCountryCode&&"function"==typeof l.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=l.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=a(this.appearanceSettingsOverride.theme))}render(){var o,s;if(null===(o=l.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=c,r=this.mobileLocationOverride||l.helloSettings.mobileLocation,a=window.innerWidth<768,d=this.animateFromLeftOverride||a&&r.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,m=r.includes("TOP"),p=h(l.appearance,this.appearanceSettingsOverride),{theme:u}=p,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(l.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":u},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:v(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:v(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:p,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};U.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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";export{U as zonos_hello}
|
|
1
|
+
import{r as o,h as e,H as t}from"./p-ce347974.js";import{_ as s,e as i,i as n,f as r,z as l,g as a,m as h}from"./p-5821856c.js";import{r as d,l as c,u as m,t as p,w as u,x as f,y as g,z,A as w,B as b}from"./p-b5f769ba.js";import{c as v}from"./p-b4b7f705.js";import{a as x,l as y}from"./p-eaa335e1.js";import{g as k}from"./p-5883217a.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";var C=s,L=/\s/,T=/^\s+/,E=i,S=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&L.test(o.charAt(e)););return e}(o)+1).replace(T,""):o},j=r,I=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,A=/^0o[0-7]+$/i,B=parseInt,X=r,N=function(){return C.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||S(o)&&"[object Symbol]"==E(o)}(o))return NaN;if(j(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=j(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=O.test(o);return t||A.test(o)?B(o.slice(2),t?2:8):I.test(o)?NaN:+o},P=Math.max,R=Math.min,M=function(o,e,t){var s,i,n,r,l,a,h=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function u(o){var t=o-a;return void 0===a||t>=e||t<0||c&&o-h>=n}function f(){var o=N();if(u(o))return g(o);l=setTimeout(f,function(o){var t=e-(o-a);return c?R(t,n-(o-h)):t}(o))}function g(o){return l=void 0,m&&s?p(o):(s=i=void 0,r)}function z(){var o=N(),t=u(o);if(s=arguments,i=this,a=o,t){if(void 0===l)return function(o){return h=o,l=setTimeout(f,e),d?p(o):r}(a);if(c)return clearTimeout(l),l=setTimeout(f,e),p(a)}return void 0===l&&(l=setTimeout(f,e)),r}return e=H(e)||0,X(t)&&(d=!!t.leading,n=(c="maxWait"in t)?P(H(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=a=i=l=void 0},z.flush=function(){return void 0===l?r:g(N())},z};const F=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},$=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=l.helloSettings;i&&s||x("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&m(i)&&document.querySelectorAll(i)||[],a=s&&m(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return x("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&m(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},U=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===l.currentHelloPage||"productList"===l.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===l.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(l.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return p("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==l.currentHelloPage&&"productList"!==l.currentHelloPage||"DISABLED"===l.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=c;if(!e)return x("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await d("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(l.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=l.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=$();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=M((()=>{const{productTitleElementSelector:o}=l.helloSettings;if(o){const o=$();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&u(o.searchParams))!==c.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,l.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=l.helloSettings;return F(o)?"cart":F(t)?"productDetail":F(s)?"productList":F(e)?"home":""})();const e=new URL(window.location.href);if(!u(e.searchParams))return void f(c.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!c.localizationLoaded)return!1;const{showForCountries:e}=l.helloSettings;return o&&(c.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?c.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(c.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=l.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&l.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==l.helloSettings.currencyBehavior&&(c.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return z(o)}async convert(o){return w(o)}async format(o){return b({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){M(this.render.bind(this),500)}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||c.selectedCountryCode&&"function"==typeof l.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=l.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=a(this.appearanceSettingsOverride.theme))}render(){var o,s;if(null===(o=l.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=c,r=this.mobileLocationOverride||l.helloSettings.mobileLocation,a=window.innerWidth<768,d=this.animateFromLeftOverride||a&&r.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,m=r.includes("TOP"),p=h(l.appearance,this.appearanceSettingsOverride),{theme:u}=p,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(l.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":u},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:v(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:v(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:p,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};U.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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";export{U as zonos_hello}
|