@zonos/elements 1.3.138 → 1.3.140
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-efd80d55.js → cart-e1b59d03.js} +280 -41
- package/dist/cjs/index.cjs.js +12 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-50e03778.js → paypal-86cc51e4.js} +13 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +10 -10
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +94 -26
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +19 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +24 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +23 -11
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +11 -4
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/paypal.js +14 -1
- package/dist/collection/components/store/checkout/stripe.js +9 -0
- package/dist/collection/components/store/hello/localization.js +3 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +11 -2
- package/dist/collection/components/store/translationStore/strings.base.js +11 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +11 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +11 -2
- package/dist/collection/components/store/translationStore/strings.french.js +11 -2
- package/dist/collection/components/store/translationStore/strings.german.js +11 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +11 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +11 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +11 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +11 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +11 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/getCheckoutSession.js +14 -0
- package/dist/collection/components/utils/resetToSelectedTab.js +17 -0
- package/dist/collection/components/utils/validateCheckoutSession.js +39 -0
- package/dist/collection/scripts/_zonosBase.js +5 -6
- package/dist/esm/{cart-f0bf7202.js → cart-709f053f.js} +281 -43
- package/dist/esm/index.js +12 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-65d40ba3.js → paypal-77a60c44.js} +13 -1
- package/dist/esm/zonos-address_7.entry.js +10 -10
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +4 -4
- package/dist/esm/zonos-cart-items_13.entry.js +94 -26
- package/dist/esm/zonos-checkout.entry.js +5 -3
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +9 -9
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +4 -4
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/cart-709f053f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/paypal-77a60c44.js +17 -0
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-component.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_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.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/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +6 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +10 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getCheckoutSession.d.ts +9 -0
- package/dist/types/components/utils/resetToSelectedTab.d.ts +12 -0
- package/dist/types/components/utils/validateCheckoutSession.d.ts +9 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +5 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +112 -0
- package/dist/types/types/generated/graphql.internal.types.ts +102 -1
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-bbd5119f.entry.js → p-00d4bff1.entry.js} +1 -1
- package/dist/zonos-elements/p-010f5797.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7b34be6e.system.entry.js → p-01ad5be8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-856bf7a4.entry.js → p-04a6a167.entry.js} +1 -1
- package/dist/zonos-elements/{p-b500f0d1.system.entry.js → p-0aee2e4c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0c027d2e.entry.js +1 -0
- package/dist/zonos-elements/{p-59d0f69b.system.entry.js → p-1c4ff7b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1af0a800.system.entry.js → p-22d69480.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d2a77699.system.entry.js → p-25c7e4fa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-26b24d0b.system.js +1 -0
- package/dist/zonos-elements/{p-ba26fc96.system.entry.js → p-289ded20.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9c4e557.entry.js → p-35b8dcde.entry.js} +1 -1
- package/dist/zonos-elements/{p-acae88db.entry.js → p-3a26cae5.entry.js} +1 -1
- package/dist/zonos-elements/{p-1360c4b5.system.entry.js → p-3dd503fd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-24488838.system.entry.js → p-4319600a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1393d259.system.entry.js → p-461624ce.system.entry.js} +1 -1
- package/dist/zonos-elements/p-49e4ca08.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e44ab8b8.entry.js → p-5c32689e.entry.js} +1 -1
- package/dist/zonos-elements/{p-47efac28.system.entry.js → p-64a04391.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6b0aa1bb.system.js +17 -0
- package/dist/zonos-elements/{p-22d099fb.system.entry.js → p-7a60deef.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84df573a.entry.js → p-7acf6802.entry.js} +1 -1
- package/dist/zonos-elements/{p-f9f48476.entry.js → p-7ef573f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-37a127fc.entry.js → p-8368a79e.entry.js} +1 -1
- package/dist/zonos-elements/{p-5775cd68.system.entry.js → p-87ed2e17.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ac0f941.system.entry.js → p-896ab1ed.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c48e735d.system.entry.js → p-896d62a4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8f9affb3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-234b3f74.entry.js → p-9589bd08.entry.js} +1 -1
- package/dist/zonos-elements/{p-22e2f162.entry.js → p-9b59704a.entry.js} +1 -1
- package/dist/zonos-elements/p-a58731ec.system.js +1 -0
- package/dist/zonos-elements/{p-bad5200e.entry.js → p-ad1d6ea2.entry.js} +1 -1
- package/dist/zonos-elements/{p-b9e4e410.entry.js → p-ad4bc6a2.entry.js} +1 -1
- package/dist/zonos-elements/p-afffdfc2.js +1 -0
- package/dist/zonos-elements/{p-4ab4ba81.entry.js → p-b832ec52.entry.js} +1 -1
- package/dist/zonos-elements/{p-f0ce4d90.entry.js → p-b9efc660.entry.js} +1 -1
- package/dist/zonos-elements/p-be2feba6.entry.js +1 -0
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-a0cc4dd2.entry.js → p-cd1fd09e.entry.js} +1 -1
- package/dist/zonos-elements/{p-52a5bd4c.system.entry.js → p-cf72603f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d35376d3.js +17 -0
- package/dist/zonos-elements/{p-95f26bc3.entry.js → p-d633ced9.entry.js} +1 -1
- package/dist/zonos-elements/p-e6c31531.entry.js +1 -0
- package/dist/zonos-elements/{p-de020c11.system.entry.js → p-ee1e1d94.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-be468605.system.entry.js → p-f07c01c5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8880d648.entry.js → p-f2867195.entry.js} +1 -1
- package/dist/zonos-elements/{p-b088f65a.entry.js → p-f8ca3e71.entry.js} +1 -1
- package/dist/zonos-elements/{p-c0719959.system.entry.js → p-ffe4a999.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +2 -1
- package/dist/esm-es5/cart-f0bf7202.js +0 -1
- package/dist/esm-es5/paypal-65d40ba3.js +0 -17
- package/dist/zonos-elements/p-09636917.js +0 -1
- package/dist/zonos-elements/p-128b1b70.system.entry.js +0 -1
- package/dist/zonos-elements/p-31a776aa.system.entry.js +0 -1
- package/dist/zonos-elements/p-4628832d.system.js +0 -1
- package/dist/zonos-elements/p-58983c97.entry.js +0 -1
- package/dist/zonos-elements/p-6e24b0cf.system.js +0 -17
- package/dist/zonos-elements/p-845ad2b8.js +0 -17
- package/dist/zonos-elements/p-8e25910c.entry.js +0 -1
- package/dist/zonos-elements/p-b6005449.system.entry.js +0 -1
- package/dist/zonos-elements/p-c5bff157.entry.js +0 -1
- package/dist/zonos-elements/p-e309e4a3.system.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,i){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):n(e.value).then(r,a)}l((i=i.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return l([e,o])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{p as promiseResolve,b as bootstrapLazy}from"./index-86b8247e.js";export{s as setNonce}from"./index-86b8247e.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var patchBrowser=function(){var e=import.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return promiseResolve(o)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,globalScripts()];case 1:o.sent();return[2,bootstrapLazy(JSON.parse('[["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"open":["handleOpenChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["zonos-tooltip",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["zonos-toggle",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["zonos-collapse",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-card",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-input",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["zonos-notification_3",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-v-stack",[[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-button_3",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-language-select_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["zonos-country-select_4",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["zonos-address_7",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}]]],["zonos-cart-items_13",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"showErrorBanner":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e)]}}))}))}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,i){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):n(e.value).then(s,a)}l((i=i.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(o){return l([e,o])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(i=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];n=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{p as promiseResolve,b as bootstrapLazy}from"./index-86b8247e.js";export{s as setNonce}from"./index-86b8247e.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var patchBrowser=function(){var e=import.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return promiseResolve(o)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,globalScripts()];case 1:o.sent();return[2,bootstrapLazy(JSON.parse('[["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"open":["handleOpenChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["zonos-tooltip",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["zonos-toggle",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["zonos-collapse",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-card",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-input",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["zonos-notification_3",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-v-stack",[[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-button_3",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-language-select_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["zonos-country-select_4",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["zonos-address_7",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}]]],["zonos-cart-items_13",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"showErrorBanner":[32],"hasStripePaymentError":[32]},null,{"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e)]}}))}))}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function r(o){try{l(n.next(o))}catch(o){a(o)}}function s(o){try{l(n["throw"](o))}catch(o){a(o)}}function l(o){o.done?t(o.value):i(o.value).then(r,s)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(o){return function(e){return l([o,e])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,s[0]&&(t=0)),t)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){t.label=s[1];break}if(s[0]===6&&t.label<a[1]){t.label=a[1];a=s;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(s);break}if(a[2])t.ops.pop();t.trys.pop();continue}s=e.call(o,t)}catch(o){s=[6,o];i=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-86b8247e.js";import{q as translate,l as localizationStore,I as currencyFormat}from"./cart-f0bf7202.js";import{z as zonosStore}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";import{f as formatStringWithLinks}from"./formatStringWithLinks-9e819405.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import"./handleFetch-22cb914b.js";import"./isDarkColor-c6924924.js";import"./getBorderRadius-bdd709e7.js";var getHasMoreSpaceAbove=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var wrapStringWithLink=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 BagIcon='<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 ImportIcon='<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 InclusivePricingIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var MessageIcon='<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 MoneyIcon='<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 RemoveIcon='<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 zonosHelloDialogCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 ZonosHelloDialogStyle0=zonosHelloDialogCss;var dutyTaxMessage_AU_lowValueGST="".concat(translate("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:translate("Learn more.")}));var ZonosHelloDialog=function(){function o(o){var e=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(e.dialogRef)&&e.isOpen){e.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(zonosStore.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(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=localizationStore.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.hasInclusivePrices=function(){var o;return((o=localizationStore.inclusivePricing)===null||o===void 0?void 0:o.status)==="ENABLED"};this.isNoThresholdCountry=function(o){if(!o||!e.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=localizationStore.countryLandedCost;var t=(o===null||o===void 0?void 0:o.dutyDeminimus)?currencyFormat({amount:o.dutyDeminimus}):null;return t&&!e.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?translate("Spend [threshold] duty free.",{threshold:t}):translate("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=localizationStore.countryLandedCost;var t=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?currencyFormat({amount:o.vatTaxDeminimus}):null;return t&&!e.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?translate("Spend [threshold] tax free.",{threshold:t}):translate("Taxes will apply to all orders.")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[translate("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:currencyFormat({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(e.hasInclusivePrices()){return[dutyTaxMessage_AU_lowValueGST]}return[translate("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:"".concat(o.vatTaxRate*100,"%")}),dutyTaxMessage_AU_lowValueGST]};this.getNewZealandDutyTaxMessge=function(o){if(e.hasInclusivePrices()){return null}return[translate("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:currencyFormat({amount:o.vatTaxDeminimus})})]};this.getInclusivePriceMessage=function(){var o=localizationStore.inclusivePricing;if((o===null||o===void 0?void 0:o.status)!=="ENABLED"){return null}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return translate("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"){return translate("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return translate("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return translate("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"){return translate("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"){return translate("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.")}if(o.fee.status==="INCLUDED"){return translate("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.")}return null};this.getAdditionalDutyTaxMessage=function(){if(!localizationStore.countryLandedCost){return null}if(!e.hasTaxId()){return null}switch(localizationStore.countryLandedCost.countryCode){case"GB":return e.getUkDutyTaxMessage(localizationStore.countryLandedCost);case"AU":return e.getAustraliaDutyTaxMessage(localizationStore.countryLandedCost);case"NZ":return e.getNewZealandDutyTaxMessge(localizationStore.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=localizationStore.selectedCountryCode;var n=this.hasInclusivePrices();var i=this.getInclusivePriceMessage();var a=this.getDutyMessage();var r=this.getTaxMessage();var s=this.getAdditionalDutyTaxMessage();var l=this.animateFromLeftOverride||this.dialogRef&&getHasMoreSpaceOnRight(this.dialogRef);var d=this.dialogRef&&getHasMoreSpaceAbove(this.dialogRef);var c=localizationStore.customMessages;var u=translate("Welcome to [storeName]",{storeName:zonosStore.organizationName});var f=((e=c.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||translate("Know about duties and taxes before you buy. Shop with confidence!");var g=formatStringWithLinks(f);var m=this.getCurrentPageEnum();var b=c.filter((function(o){return o.pageName===m}));return h(Host,{key:"7ff123654399aee05fd295c108e01d924a8964e5",class:"zonos--elements"},h("div",{key:"316720cc18d1b9fbbf86cbfcde1f25106b1197e8",class:classes(["zonos--hello-dialog",l&&"zonos--hello-dialog-animate-from-left",d&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&h("div",{key:"29a0018c2c8eb7fdde938e432ea783517d364ea8"},h("div",{key:"a882452996503ddb4feb3e431eaf9cc14dc2ff34",class:"zonos--hello-dialog-content"},h("zonos-button",{key:"2c656e792daa59c0ce5770d71a779de270a8adc8",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),h("zonos-v-stack",{key:"1dd3473645c5581fee41da086a478b6eb6f3104e",spacing:24},h("zonos-country-flag",{key:"57bdcb6b5e2044b65868a53e91220b7eea5c389e",class:"zonos--hello-country-flag",countryCode:t}),h("zonos-v-stack",{key:"8f01898edbd5c30771a2c8d12e0919f6b41cc96c",class:"zonos--hello-dialog-header",spacing:4},h("zonos-text",{key:"75728fcc40efe82ff58e767b3c3c9f60f96f37b2",type:"boldSubheader"},u),h("zonos-text",{key:"b82ebf2adacbb72637064b04957846ee79f10bd5",innerHTML:g,textColor:"gray-800"})),h("zonos-v-stack",{key:"7a0ae96961883e1a55248d4163da3bed2e76d077",spacing:8},this.restrictedItems.map((function(o){var e;return o&&h("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return h("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),h("zonos-card",{key:"d6a1f8270f3b6c69febc04224e6a0fa7ada5e07a",spacing:"12px"},h("zonos-v-stack",{key:"209eac48b847c3ac4c7e8eb9df35c95416d89536",spacing:12},n?h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis",content:InclusivePricingIcon}),h("zonos-text",null,i)):h(Fragment,null,h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis",content:ImportIcon}),h("zonos-text",null,a)),h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax de minimis",content:MoneyIcon}),h("zonos-text",null,r))),s===null||s===void 0?void 0:s.map((function(o){return h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:BagIcon}),h("zonos-text",{innerHTML:o}))})))),b.map((function(o){return h("zonos-custom-message",{icon:MessageIcon,message:o.message})}))))),h("zonos-hello-dialog-footer",{key:"e9444ec1c3c3616712faeba92734b4275d373da1",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&h("div",{key:"a612e3daa6de5e5f73422ed8ebed8b3a682c3c46"},h("zonos-country-select",{key:"b45c18d7feaf95e74da6e0540ea28325a24d287b",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&h("div",{key:"e50779d3c0e3c83587ae445e9ded8e108f893e31"},h("zonos-language-select",{key:"b502cef6095a0e9a57b3c81fa354ca3614060878",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}();ZonosHelloDialog.style=ZonosHelloDialogStyle0;export{ZonosHelloDialog as zonos_hello_dialog};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function r(o){try{l(n.next(o))}catch(o){a(o)}}function s(o){try{l(n["throw"](o))}catch(o){a(o)}}function l(o){o.done?t(o.value):i(o.value).then(r,s)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(o){return function(e){return l([o,e])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,s[0]&&(t=0)),t)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){t.label=s[1];break}if(s[0]===6&&t.label<a[1]){t.label=a[1];a=s;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(s);break}if(a[2])t.ops.pop();t.trys.pop();continue}s=e.call(o,t)}catch(o){s=[6,o];i=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-86b8247e.js";import{q as translate,l as localizationStore,J as currencyFormat}from"./cart-709f053f.js";import{z as zonosStore}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";import{f as formatStringWithLinks}from"./formatStringWithLinks-9e819405.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import"./handleFetch-22cb914b.js";import"./isDarkColor-c6924924.js";import"./getBorderRadius-bdd709e7.js";var getHasMoreSpaceAbove=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var wrapStringWithLink=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 BagIcon='<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 ImportIcon='<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 InclusivePricingIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var MessageIcon='<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 MoneyIcon='<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 RemoveIcon='<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 zonosHelloDialogCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 ZonosHelloDialogStyle0=zonosHelloDialogCss;var dutyTaxMessage_AU_lowValueGST="".concat(translate("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:translate("Learn more.")}));var ZonosHelloDialog=function(){function o(o){var e=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(e.dialogRef)&&e.isOpen){e.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(zonosStore.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(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=localizationStore.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.hasInclusivePrices=function(){var o;return((o=localizationStore.inclusivePricing)===null||o===void 0?void 0:o.status)==="ENABLED"};this.isNoThresholdCountry=function(o){if(!o||!e.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=localizationStore.countryLandedCost;var t=(o===null||o===void 0?void 0:o.dutyDeminimus)?currencyFormat({amount:o.dutyDeminimus}):null;return t&&!e.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?translate("Spend [threshold] duty free.",{threshold:t}):translate("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=localizationStore.countryLandedCost;var t=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?currencyFormat({amount:o.vatTaxDeminimus}):null;return t&&!e.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?translate("Spend [threshold] tax free.",{threshold:t}):translate("Taxes will apply to all orders.")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[translate("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:currencyFormat({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(e.hasInclusivePrices()){return[dutyTaxMessage_AU_lowValueGST]}return[translate("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:"".concat(o.vatTaxRate*100,"%")}),dutyTaxMessage_AU_lowValueGST]};this.getNewZealandDutyTaxMessge=function(o){if(e.hasInclusivePrices()){return null}return[translate("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:currencyFormat({amount:o.vatTaxDeminimus})})]};this.getInclusivePriceMessage=function(){var o=localizationStore.inclusivePricing;if((o===null||o===void 0?void 0:o.status)!=="ENABLED"){return null}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return translate("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"){return translate("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return translate("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return translate("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"){return translate("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"){return translate("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.")}if(o.fee.status==="INCLUDED"){return translate("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.")}return null};this.getAdditionalDutyTaxMessage=function(){if(!localizationStore.countryLandedCost){return null}if(!e.hasTaxId()){return null}switch(localizationStore.countryLandedCost.countryCode){case"GB":return e.getUkDutyTaxMessage(localizationStore.countryLandedCost);case"AU":return e.getAustraliaDutyTaxMessage(localizationStore.countryLandedCost);case"NZ":return e.getNewZealandDutyTaxMessge(localizationStore.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=localizationStore.selectedCountryCode;var n=this.hasInclusivePrices();var i=this.getInclusivePriceMessage();var a=this.getDutyMessage();var r=this.getTaxMessage();var s=this.getAdditionalDutyTaxMessage();var l=this.animateFromLeftOverride||this.dialogRef&&getHasMoreSpaceOnRight(this.dialogRef);var d=this.dialogRef&&getHasMoreSpaceAbove(this.dialogRef);var c=localizationStore.customMessages;var u=translate("Welcome to [storeName]",{storeName:zonosStore.organizationName});var f=((e=c.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||translate("Know about duties and taxes before you buy. Shop with confidence!");var g=formatStringWithLinks(f);var m=this.getCurrentPageEnum();var b=c.filter((function(o){return o.pageName===m}));return h(Host,{key:"25f0055cadd0b38a8374cdb0c981124d569ae9df",class:"zonos--elements"},h("div",{key:"7c04c71c7926d0bc64499f9c124464087d19570d",class:classes(["zonos--hello-dialog",l&&"zonos--hello-dialog-animate-from-left",d&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&h("div",{key:"b4ad9c5eb5893ecd553b1bed056810bd8d69c3ca"},h("div",{key:"bd442c14e751180b3dded8d415662eb456b5b5fd",class:"zonos--hello-dialog-content"},h("zonos-button",{key:"2d0f6d48e91c1897ca6ab442e8bff7efefd76920",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),h("zonos-v-stack",{key:"eb19103741ccbced87f11d800a8c9439f692fcfd",spacing:24},h("zonos-country-flag",{key:"50f7375b30576d69bb751de6b6ba6565f34e83aa",class:"zonos--hello-country-flag",countryCode:t}),h("zonos-v-stack",{key:"4e5eb35029bbafa1343d4b7b911dadfa77074be0",class:"zonos--hello-dialog-header",spacing:4},h("zonos-text",{key:"fc62525f1442ddb2ad98b8b4f5a4e874586ffa55",type:"boldSubheader"},u),h("zonos-text",{key:"b85a16aacba64bdc477102d87e76071312395128",innerHTML:g,textColor:"gray-800"})),h("zonos-v-stack",{key:"9cff07928aeadaccdb5d9c906125f603281d3bb1",spacing:8},this.restrictedItems.map((function(o){var e;return o&&h("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return h("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),h("zonos-card",{key:"e3a98411ec2be35dfbe3e9a2a5945851697da7ad",spacing:"12px"},h("zonos-v-stack",{key:"09cd2bbbb94e819a272f3ef415bb9ace37111f04",spacing:12},n?h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis",content:InclusivePricingIcon}),h("zonos-text",null,i)):h(Fragment,null,h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis",content:ImportIcon}),h("zonos-text",null,a)),h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax de minimis",content:MoneyIcon}),h("zonos-text",null,r))),s===null||s===void 0?void 0:s.map((function(o){return h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:BagIcon}),h("zonos-text",{innerHTML:o}))})))),b.map((function(o){return h("zonos-custom-message",{icon:MessageIcon,message:o.message})}))))),h("zonos-hello-dialog-footer",{key:"443975bc6a4355f49cde5513aa494f700e1eee98",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&h("div",{key:"a55ed373839ed80b449b9f6271ea19cf15124843"},h("zonos-country-select",{key:"e8fa0c5c6f36ebe67b84f692ad10a9a84305eba5",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&h("div",{key:"7bd9d8836c876049d190aaa1bbf3ddea04139090"},h("zonos-language-select",{key:"15002ebf92828cd52881f30ddb639f704d074462",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}();ZonosHelloDialog.style=ZonosHelloDialogStyle0;export{ZonosHelloDialog as zonos_hello_dialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function r(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function s(o){try{l(n.next(o))}catch(o){i(o)}}function a(o){try{l(n["throw"](o))}catch(o){i(o)}}function l(o){o.done?t(o.value):r(o.value).then(s,a)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(e){return l([o,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;r=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];r=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{_ as _root,e as _baseGetTag,i as isObjectLike_1,f as isObject_1,z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-c493c4fe.js";import{l as localizationStore,C as isValidSelector,q as translate,r as getZCountryUrlParam,E as setZCountryUrlParam,F as currencyDisplay,G as currencyConvertAndFormat,H as currencyConvert,I as currencyFormat}from"./cart-f0bf7202.js";import{c as classes}from"./classes-0d95c529.js";import{h as handleFetch,a as logError,l as log}from"./handleFetch-22cb914b.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import"./isDarkColor-c6924924.js";import"./getBorderRadius-bdd709e7.js";var root=_root;var now$1=function(){return root.Date.now()};var now_1=now$1;var reWhitespace=/\s/;function trimmedEndIndex$1(o){var e=o.length;while(e--&&reWhitespace.test(o.charAt(e))){}return e}var _trimmedEndIndex=trimmedEndIndex$1;var trimmedEndIndex=_trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim$1(o){return o?o.slice(0,trimmedEndIndex(o)+1).replace(reTrimStart,""):o}var _baseTrim=baseTrim$1;var baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1;var symbolTag="[object Symbol]";function isSymbol$1(o){return typeof o=="symbol"||isObjectLike(o)&&baseGetTag(o)==symbolTag}var isSymbol_1=isSymbol$1;var baseTrim=_baseTrim,isObject$1=isObject_1,isSymbol=isSymbol_1;var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber$1(o){if(typeof o=="number"){return o}if(isSymbol(o)){return NAN}if(isObject$1(o)){var e=typeof o.valueOf=="function"?o.valueOf():o;o=isObject$1(e)?e+"":e}if(typeof o!="string"){return o===0?o:+o}o=baseTrim(o);var t=reIsBinary.test(o);return t||reIsOctal.test(o)?freeParseInt(o.slice(2),t?2:8):reIsBadHex.test(o)?NAN:+o}var toNumber_1=toNumber$1;var isObject=isObject_1,now=now_1,toNumber=toNumber_1;var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max,nativeMin=Math.min;function debounce(o,e,t){var n,r,i,s,a,l,h=0,d=false,c=false,u=true;if(typeof o!="function"){throw new TypeError(FUNC_ERROR_TEXT)}e=toNumber(e)||0;if(isObject(t)){d=!!t.leading;c="maxWait"in t;i=c?nativeMax(toNumber(t.maxWait)||0,e):i;u="trailing"in t?!!t.trailing:u}function f(e){var t=n,i=r;n=r=undefined;h=e;s=o.apply(i,t);return s}function m(o){h=o;a=setTimeout(w,e);return d?f(o):s}function g(o){var t=o-l,n=o-h,r=e-t;return c?nativeMin(r,i-n):r}function v(o){var t=o-l,n=o-h;return l===undefined||t>=e||t<0||c&&n>=i}function w(){var o=now();if(v(o)){return z(o)}a=setTimeout(w,g(o))}function z(o){a=undefined;if(u&&n){return f(o)}n=r=undefined;return s}function p(){if(a!==undefined){clearTimeout(a)}h=0;n=l=r=a=undefined}function b(){return a===undefined?s:z(now())}function x(){var o=now(),t=v(o);n=arguments;r=this;l=o;if(t){if(a===undefined){return m(l)}if(c){clearTimeout(a);a=setTimeout(w,e);return f(l)}}if(a===undefined){a=setTimeout(w,e)}return s}x.cancel=p;x.flush=b;return x}var debounce_1=debounce;var checkItemRestrictions=function(o){return __awaiter(void 0,[o],void 0,(function(o){var e,t,n,r,i;var s=o.items,a=o.shipFrom,l=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:a,shipTo:l};return[4,handleFetch("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),r=n.errors,i=n.json;if(r.length||!i){logError("Error fetching item restrictions: ".concat((e=r.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,i.filter(Boolean)]}}))}))};var detectItemRestrictions=function(o){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:if(!o.length){return[2,[]]}e=localizationStore.selectedCountryCode;if(!e){logError("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:e})];case 1:n=i.sent();r=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,r]}}))}))};var matchUrlPattern=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var getCurrentHelloLocalePage=function(){var o=zonosStore.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,r=o.productListUrlPattern;if(matchUrlPattern(e)){return"cart"}if(matchUrlPattern(n)){return"productDetail"}if(matchUrlPattern(r)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var getProductsOnPage=function(){var o,e;var t=zonosStore.helloSettings,n=t.productAddToCartElementSelector,r=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!r){logError("Hello could not check item restrictions - must provide title and description selectors.")}var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];var l=r&&isValidSelector(r)&&document.querySelectorAll(r)||[];if(a.length!==l.length){logError("Hello could not check item restrictions - Title and description selectors do not match");return[]}var h=s==="RESTRICT_AND_BLOCK";var d=h&&n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(h&&d.length!==l.length){logError('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var u=0;u<a.length;u++){var f=a[u];var m=l[u];var g=d[u];if(f&&m){var v={cartButtonNode:g||null,description:((o=m.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=f.textContent)===null||e===void 0?void 0:e.trim())||""};c.push(v)}}return c};var zonosHelloCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 .zonos--hello-dialog-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)>.zonos--hello-message{border-right:none}: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-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}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.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-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.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-widget-float.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-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.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-float.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-widget-float.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-widget-float.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-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var ZonosHello=function(){function o(o){var e=this;registerInstance(this,o);this.getHelloPeekMessage=function(o){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&e.allRestrictedItems.length){var n=translate("click to learn more");var r=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(r," - ").concat(n)}switch(zonosStore.currentHelloPage){case"cart":return translate("Prepay duties and taxes at checkout");case"productList":case"productDetail":return translate("See duty and tax thresholds");default:return translate("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(e.peekMessage){e.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!e||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){e.peekMessage=e.getHelloPeekMessage(zonosStore.organizationName);var o=zonosStore.helloSettings,t=o.peekMessageBehavior,n=o.peekMessageDelay;var r=n*1e3;if(t==="ENABLED"){setTimeout((function(){e.enableShowPeekMessage();var o=e.allRestrictedItems.some((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){e.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),r)}};this.disableAddToCartButtons=function(){if(e.productsOnPage.length){e.productsOnPage.forEach((function(o){var t,n;var r=e.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(r){(t=o.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t,n;var r=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=getProductsOnPage();o=this.productsOnPage.filter((function(o){return!r.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=i.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var o=zonosStore.helloSettings.productTitleElementSelector;if(o){var t=getProductsOnPage();if(e.allFoundProducts.length!==t.length&&window.location.href===e.initialUrl){if(!e.allFoundProducts.length){return}void e.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o=new MutationObserver(e.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var o=new MutationObserver((function(){return void e.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){e.watchProductCountChange();setInterval((function(){if(window.location.href!==e.initialUrl){var o=e.initialUrl&&new URL(e.initialUrl);var t=o&&getZCountryUrlParam(o.searchParams);if(t!==localizationStore.selectedCountryCode){e.allFoundProducts=[];e.allRestrictedItems=[];e.productsOnPage=[]}e.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var n=new URL(window.location.href);var r=getZCountryUrlParam(n.searchParams);if(!r){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void e.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){e.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=e.helloRef&&getComputedStyle(e.helloRef).position;if(e.helloRef&&o==="relative"){var t=getHasMoreSpaceOnRight(e.helloRef);return t}};this.shouldRenderHello=function(o){if(o===void 0){o=true}if(!localizationStore.localizationLoaded){return false}var e=zonosStore.helloSettings.showForCountries;if(o){if(!localizationStore.isShippableCountry){log("Hello: not shippable country - Show for countries: ".concat(e))}}if(e==="ONLY_SHIPPABLE"){return localizationStore.isShippableCountry}if(e==="ALL"){return true}return e===null||e===void 0?void 0:e.includes(localizationStore.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=zonosStore.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false}o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,localizationStore.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(zonosStore.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!localizationStore.exchangeRate){log("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}currencyDisplay();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvertAndFormat(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvert(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyFormat({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,r;if(this.isHelloWidgetRendered){return}if(localizationStore.selectedCountryCode&&typeof zonosStore.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((r=(n=zonosStore.helloSettings).onInitSuccess)===null||r===void 0?void 0:r.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var e=zonosStore.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var r=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:r,shouldFloat:!!o}}default:case!t:{var i=!zonosStore.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop();var r=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:r,shouldFloat:i}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,t;var n=(e=zonosStore.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return new RegExp(o).test(window.location.href)}));if(n){log("Hello is excluded on this url","warn");return null}var r=localizationStore.selectedCountryCode,i=localizationStore.targetCurrency;var s=this.getHelloLocation(),a=s.isOnLeft,l=s.isOnTop,d=s.shouldFloat;var c=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null);var u=c.theme;var f=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var m=this.shouldRenderHello()&&!!r;if(m&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:r,currencyCode:i})}return h(Host,{class:"zonos--hello zonos--elements","data-theme":u},m&&h("div",{class:classes(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},h("button",{class:classes(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",a&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",l&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)}},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),r&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:r}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}();ZonosHello.style=ZonosHelloStyle0;export{ZonosHello as zonos_hello};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function r(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function s(o){try{l(n.next(o))}catch(o){i(o)}}function a(o){try{l(n["throw"](o))}catch(o){i(o)}}function l(o){o.done?t(o.value):r(o.value).then(s,a)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(e){return l([o,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;r=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];r=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{_ as _root,e as _baseGetTag,i as isObjectLike_1,f as isObject_1,z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-c493c4fe.js";import{l as localizationStore,D as isValidSelector,q as translate,r as getZCountryUrlParam,F as setZCountryUrlParam,G as currencyDisplay,H as currencyConvertAndFormat,I as currencyConvert,J as currencyFormat}from"./cart-709f053f.js";import{c as classes}from"./classes-0d95c529.js";import{h as handleFetch,a as logError,l as log}from"./handleFetch-22cb914b.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import"./isDarkColor-c6924924.js";import"./getBorderRadius-bdd709e7.js";var root=_root;var now$1=function(){return root.Date.now()};var now_1=now$1;var reWhitespace=/\s/;function trimmedEndIndex$1(o){var e=o.length;while(e--&&reWhitespace.test(o.charAt(e))){}return e}var _trimmedEndIndex=trimmedEndIndex$1;var trimmedEndIndex=_trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim$1(o){return o?o.slice(0,trimmedEndIndex(o)+1).replace(reTrimStart,""):o}var _baseTrim=baseTrim$1;var baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1;var symbolTag="[object Symbol]";function isSymbol$1(o){return typeof o=="symbol"||isObjectLike(o)&&baseGetTag(o)==symbolTag}var isSymbol_1=isSymbol$1;var baseTrim=_baseTrim,isObject$1=isObject_1,isSymbol=isSymbol_1;var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber$1(o){if(typeof o=="number"){return o}if(isSymbol(o)){return NAN}if(isObject$1(o)){var e=typeof o.valueOf=="function"?o.valueOf():o;o=isObject$1(e)?e+"":e}if(typeof o!="string"){return o===0?o:+o}o=baseTrim(o);var t=reIsBinary.test(o);return t||reIsOctal.test(o)?freeParseInt(o.slice(2),t?2:8):reIsBadHex.test(o)?NAN:+o}var toNumber_1=toNumber$1;var isObject=isObject_1,now=now_1,toNumber=toNumber_1;var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max,nativeMin=Math.min;function debounce(o,e,t){var n,r,i,s,a,l,h=0,d=false,c=false,u=true;if(typeof o!="function"){throw new TypeError(FUNC_ERROR_TEXT)}e=toNumber(e)||0;if(isObject(t)){d=!!t.leading;c="maxWait"in t;i=c?nativeMax(toNumber(t.maxWait)||0,e):i;u="trailing"in t?!!t.trailing:u}function f(e){var t=n,i=r;n=r=undefined;h=e;s=o.apply(i,t);return s}function m(o){h=o;a=setTimeout(w,e);return d?f(o):s}function g(o){var t=o-l,n=o-h,r=e-t;return c?nativeMin(r,i-n):r}function v(o){var t=o-l,n=o-h;return l===undefined||t>=e||t<0||c&&n>=i}function w(){var o=now();if(v(o)){return z(o)}a=setTimeout(w,g(o))}function z(o){a=undefined;if(u&&n){return f(o)}n=r=undefined;return s}function p(){if(a!==undefined){clearTimeout(a)}h=0;n=l=r=a=undefined}function b(){return a===undefined?s:z(now())}function x(){var o=now(),t=v(o);n=arguments;r=this;l=o;if(t){if(a===undefined){return m(l)}if(c){clearTimeout(a);a=setTimeout(w,e);return f(l)}}if(a===undefined){a=setTimeout(w,e)}return s}x.cancel=p;x.flush=b;return x}var debounce_1=debounce;var checkItemRestrictions=function(o){return __awaiter(void 0,[o],void 0,(function(o){var e,t,n,r,i;var s=o.items,a=o.shipFrom,l=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:a,shipTo:l};return[4,handleFetch("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),r=n.errors,i=n.json;if(r.length||!i){logError("Error fetching item restrictions: ".concat((e=r.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,i.filter(Boolean)]}}))}))};var detectItemRestrictions=function(o){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:if(!o.length){return[2,[]]}e=localizationStore.selectedCountryCode;if(!e){logError("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:e})];case 1:n=i.sent();r=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,r]}}))}))};var matchUrlPattern=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var getCurrentHelloLocalePage=function(){var o=zonosStore.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,r=o.productListUrlPattern;if(matchUrlPattern(e)){return"cart"}if(matchUrlPattern(n)){return"productDetail"}if(matchUrlPattern(r)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var getProductsOnPage=function(){var o,e;var t=zonosStore.helloSettings,n=t.productAddToCartElementSelector,r=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!r){logError("Hello could not check item restrictions - must provide title and description selectors.")}var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];var l=r&&isValidSelector(r)&&document.querySelectorAll(r)||[];if(a.length!==l.length){logError("Hello could not check item restrictions - Title and description selectors do not match");return[]}var h=s==="RESTRICT_AND_BLOCK";var d=h&&n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(h&&d.length!==l.length){logError('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var u=0;u<a.length;u++){var f=a[u];var m=l[u];var g=d[u];if(f&&m){var v={cartButtonNode:g||null,description:((o=m.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=f.textContent)===null||e===void 0?void 0:e.trim())||""};c.push(v)}}return c};var zonosHelloCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 .zonos--hello-dialog-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)>.zonos--hello-message{border-right:none}: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-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}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.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-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.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-widget-float.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-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.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-float.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-widget-float.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-widget-float.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-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var ZonosHello=function(){function o(o){var e=this;registerInstance(this,o);this.getHelloPeekMessage=function(o){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&e.allRestrictedItems.length){var n=translate("click to learn more");var r=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(r," - ").concat(n)}switch(zonosStore.currentHelloPage){case"cart":return translate("Prepay duties and taxes at checkout");case"productList":case"productDetail":return translate("See duty and tax thresholds");default:return translate("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(e.peekMessage){e.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!e||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){e.peekMessage=e.getHelloPeekMessage(zonosStore.organizationName);var o=zonosStore.helloSettings,t=o.peekMessageBehavior,n=o.peekMessageDelay;var r=n*1e3;if(t==="ENABLED"){setTimeout((function(){e.enableShowPeekMessage();var o=e.allRestrictedItems.some((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){e.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),r)}};this.disableAddToCartButtons=function(){if(e.productsOnPage.length){e.productsOnPage.forEach((function(o){var t,n;var r=e.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(r){(t=o.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t,n;var r=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=getProductsOnPage();o=this.productsOnPage.filter((function(o){return!r.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=i.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var o=zonosStore.helloSettings.productTitleElementSelector;if(o){var t=getProductsOnPage();if(e.allFoundProducts.length!==t.length&&window.location.href===e.initialUrl){if(!e.allFoundProducts.length){return}void e.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o=new MutationObserver(e.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var o=new MutationObserver((function(){return void e.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){e.watchProductCountChange();setInterval((function(){if(window.location.href!==e.initialUrl){var o=e.initialUrl&&new URL(e.initialUrl);var t=o&&getZCountryUrlParam(o.searchParams);if(t!==localizationStore.selectedCountryCode){e.allFoundProducts=[];e.allRestrictedItems=[];e.productsOnPage=[]}e.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var n=new URL(window.location.href);var r=getZCountryUrlParam(n.searchParams);if(!r){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void e.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){e.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=e.helloRef&&getComputedStyle(e.helloRef).position;if(e.helloRef&&o==="relative"){var t=getHasMoreSpaceOnRight(e.helloRef);return t}};this.shouldRenderHello=function(o){if(o===void 0){o=true}if(!localizationStore.localizationLoaded){return false}var e=zonosStore.helloSettings.showForCountries;if(o){if(!localizationStore.isShippableCountry){log("Hello: not shippable country - Show for countries: ".concat(e))}}if(e==="ONLY_SHIPPABLE"){return localizationStore.isShippableCountry}if(e==="ALL"){return true}return e===null||e===void 0?void 0:e.includes(localizationStore.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=zonosStore.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false}o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,localizationStore.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(zonosStore.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!localizationStore.exchangeRate){log("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}currencyDisplay();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvertAndFormat(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvert(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyFormat({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,r;if(this.isHelloWidgetRendered){return}if(localizationStore.selectedCountryCode&&typeof zonosStore.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((r=(n=zonosStore.helloSettings).onInitSuccess)===null||r===void 0?void 0:r.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var e=zonosStore.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var r=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:r,shouldFloat:!!o}}default:case!t:{var i=!zonosStore.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop();var r=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:r,shouldFloat:i}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,t;var n=(e=zonosStore.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return o&&new RegExp(o).test(window.location.href)}));if(n){log("Hello is excluded on this url","warn");return null}var r=localizationStore.selectedCountryCode,i=localizationStore.targetCurrency;var s=this.getHelloLocation(),a=s.isOnLeft,l=s.isOnTop,d=s.shouldFloat;var c=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null);var u=c.theme;var f=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var m=this.shouldRenderHello()&&!!r;if(m&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:r,currencyCode:i})}return h(Host,{class:"zonos--hello zonos--elements","data-theme":u},m&&h("div",{class:classes(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},h("button",{class:classes(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",a&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",l&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)}},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),r&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:r}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}();ZonosHello.style=ZonosHelloStyle0;export{ZonosHello as zonos_hello};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,d as getElement}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-bdd709e7.js";var zonosInputCss=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{margin:1px;}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var ZonosInputStyle0=zonosInputCss;var ZonosInput=function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);this.inputValue="";this.inputLabel=undefined;this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,d as getElement}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-bdd709e7.js";var zonosInputCss=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{margin:1px;}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var ZonosInputStyle0=zonosInputCss;var ZonosInput=function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);this.inputValue="";this.inputLabel=undefined;this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return h(Host,{key:"87c0f3819db82f5b731ec02f1dda30888131989a",class:classes(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"0eb35699b27eb262797a599441877b5600d989f0",class:classes(["zonos--label-wrapper",this.isDisabled&&"disabled"])},h("input",{key:"75973f2c81e28a0007b047375ead0c5e6f055a14",class:classes(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:function(t){var e=t.target;o.inputChange.emit(e.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),h("label",{key:"23ee9731bfef0417522714dc48a97949eecad145",class:"zonos--floated-label","data-label":this.inputLabel})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"]}},enumerable:false,configurable:true});return o}();ZonosInput.style=ZonosInputStyle0;export{ZonosInput as zonos_input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{U as localizationStoreUpdateSelectedLocale,q as translate,l as localizationStore}from"./cart-709f053f.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{l as languages}from"./ILanguage-cd6acb72.js";import"./handleFetch-22cb914b.js";import"./isDarkColor-c6924924.js";import"./getBorderRadius-bdd709e7.js";var GreenCheckDuotoneIcon='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var zonosLanguageSelectCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var ZonosLanguageSelectStyle0=zonosLanguageSelectCss;var ZonosLanguageSelect=function(){function e(e){var o=this;registerInstance(this,e);this.languageSelected=function(e){void localizationStoreUpdateSelectedLocale(e);o.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var o=localizationStore.selectedLocale;return h(Host,{key:"cc711dba7371852eab6e20994389ae3b95bb3be7",class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"47135e2b7363a3179139a7b8e23cb22435ce3299",class:"zonos--language-select"},h("zonos-select-dialog-header",{key:"3bf830e585fa6478f560c57dfa978721af47ad19",handleOnClose:function(){return e.handleOnClose()},label:translate("Select a language")}),h("div",{key:"f693b231755087ec849f5a759b2dc43e2695b24f",class:"zonos--language-select-content"},languages.map((function(t){return h("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(t.code)}},h("zonos-text",{textColor:"gray-800"},t.translatedLabel),t.code===o&&h("zonos-icon",{content:GreenCheckDuotoneIcon,size:16}))})))))};return e}();ZonosLanguageSelect.style=ZonosLanguageSelectStyle0;var RemoveIcon='<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 zonosSelectDialogHeaderCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var ZonosSelectDialogHeaderStyle0=zonosSelectDialogHeaderCss;var ZonosSelectDialogHeader=function(){function e(e){registerInstance(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return h(Host,{key:"15035421483b079dde47eeb3ddcb4dcc6edffae4",class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("zonos-v-stack",{key:"bf1bbdb1bb8a62841616893d8e9005002772adc4",class:"zonos--select-dialog-header-wrapper",spacing:8},h("div",{key:"a2593795816ceb851489c386231a1b90e6dd6261",class:"zonos--select-dialog-header"},h("zonos-text",{key:"e91d4a54ac0deb073c30272c5e9626168fea52b7",type:"boldLabel"},this.label),h("zonos-button",{key:"e8fdf75686b33e9958f64925ddf95fb5c89d74bb",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close select dialog",content:RemoveIcon,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),h("slot",{key:"ede6d09a4f6900419bf16df0ca8a2b79882bf266"})))};return e}();ZonosSelectDialogHeader.style=ZonosSelectDialogHeaderStyle0;export{ZonosLanguageSelect as zonos_language_select,ZonosSelectDialogHeader as zonos_select_dialog_header};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";var zonosLinkCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";var ZonosLinkStyle0=zonosLinkCss;var ZonosLink=function(){function o(o){registerInstance(this,o);this.href="";this.rel=undefined;this.target=undefined;this.linkTitle=undefined}o.prototype.render=function(){return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";var zonosLinkCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";var ZonosLinkStyle0=zonosLinkCss;var ZonosLink=function(){function o(o){registerInstance(this,o);this.href="";this.rel=undefined;this.target=undefined;this.linkTitle=undefined}o.prototype.render=function(){return h(Host,{key:"41f0a757a334338631250764599ac99e28c41ed2",class:"zonos--elements"},h("a",{key:"b6e84f40141e8de85d005c05426f885f242ffc53",href:this.href,rel:this.rel,target:this.target,title:this.linkTitle},h("slot",{key:"dd5ed33f163d7958fb7806992e003d2279ee1f5b"})))};return o}();ZonosLink.style=ZonosLinkStyle0;export{ZonosLink as zonos_link};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as getAssetPath,H as Host}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";var zonosLogoCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";var ZonosLogoStyle0=zonosLogoCss;var ZonosLogo=function(){function o(o){registerInstance(this,o);this.theme="LIGHT";this.width="auto"}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,h,a as getAssetPath,H as Host}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";var zonosLogoCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";var ZonosLogoStyle0=zonosLogoCss;var ZonosLogo=function(){function o(o){registerInstance(this,o);this.theme="LIGHT";this.width="auto"}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return h(Host,{key:"00a2d8c27b70f329813b6a3c1547c82b2e7cf725",class:classes(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":zonosStoreFontFamily(),"--zonos--width":this.width}},h("img",{key:"e994199d3178a1198a1f0a1b132fae75bef47ce7",alt:"Zonos Logo",src:getAssetPath("./assets/ZonosLogo.png")}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosLogo.style=ZonosLogoStyle0;export{ZonosLogo as zonos_logo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,o,t,a){function e(n){return n instanceof t?n:new t((function(o){o(n)}))}return new(t||(t=Promise))((function(t,s){function i(n){try{c(a.next(n))}catch(n){s(n)}}function r(n){try{c(a["throw"](n))}catch(n){s(n)}}function c(n){n.done?t(n.value):e(n.value).then(i,r)}c((a=a.apply(n,o||[])).next())}))};var __generator=this&&this.__generator||function(n,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,e,s,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(n){return function(o){return c([n,o])}}function c(r){if(a)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(t=0)),t)try{if(a=1,e&&(s=r[0]&2?e["return"]:r[0]?e["throw"]||((s=e["return"])&&s.call(e),0):e.next)&&!(s=s.call(e,r[1])).done)return s;if(e=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++;e=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=o.call(n,t)}catch(n){r=[6,n];e=0}finally{a=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,o,t){if(t||arguments.length===2)for(var a=0,e=o.length,s;a<e;a++){if(s||!(a in o)){if(!s)s=Array.prototype.slice.call(o,0,a);s[a]=o[a]}}return n.concat(s||Array.prototype.slice.call(o))};import{r as registerInstance,h,H as Host,d as getElement,c as createEvent}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-bdd709e7.js";import{f as stripeStore}from"./cart-f0bf7202.js";import{a as logError,l as log}from"./handleFetch-22cb914b.js";import{d as paypalStoreInitButtons}from"./paypal-65d40ba3.js";import"./isDarkColor-c6924924.js";var zonosNotificationCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var ZonosNotificationStyle0=zonosNotificationCss;var ZonosNotification=function(){function n(n){registerInstance(this,n);this.notificationArray=[]}n.prototype.showNotification=function(n){return __awaiter(this,void 0,void 0,(function(){var o,t;var a=this;return __generator(this,(function(e){o="id-".concat(Math.random().toString(36).substring(2,9));t=Object.assign(Object.assign({},n),{id:o,timeout:n.timeout||5e3,transitionClass:"",type:n.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[t],false);setTimeout((function(){a.updateTransitionClass({id:o,transitionClass:"show"})}),50);setTimeout((function(){a.removeNotification(o)}),t.timeout);return[2]}))}))};n.prototype.updateTransitionClass=function(n){var o=n.id,t=n.transitionClass;this.notificationArray=this.notificationArray.map((function(n){if(n.id===o){return Object.assign(Object.assign({},n),{transitionClass:t})}return n}))};n.prototype.removeNotification=function(n){var o=this;this.updateTransitionClass({id:n,transitionClass:""});setTimeout((function(){o.notificationArray=o.notificationArray.filter((function(o){return o.id!==n}))}),300)};n.prototype.render=function(){var n=this;return h(Host,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:classes(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((function(o){return h("div",{"aria-hidden":"true",class:classes(["zonos--notification-item",o.type,o.transitionClass]),key:o.id,onClick:function(){n.removeNotification(o.id)}},h("zonos-text",{textColor:"gray-0"},o.message))}))))};return n}();ZonosNotification.style=ZonosNotificationStyle0;var zonosPaymentCss=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";var ZonosPaymentStyle0=zonosPaymentCss;var ZonosPayment=function(){function n(n){registerInstance(this,n);this.titleText=undefined;this.stripe=stripeStore.stripe;this.stripeElements=stripeStore.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=stripeStore.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var o=this.el.querySelector(".zonos--payment-component");if(!o){logError("Cannot find container element for paymentElement");return}n.mount(o);n.on("change",(function(n){stripeStore.stripePaymentEventData=n}));stripeStore.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return h(Host,{key:"8688b2ce3087fb2265b1b84229a3af6f6cba39e6",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{key:"7b6bc40043d7d14e55faa7e60b85cdc60d56d00a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"39df45805f365e761f0001c075f94e0bdf99fabb",class:"zonos--payment-component"}),h("div",{key:"a9e7d56ba2b0050926121e3ab8a61cbace9a6a14",class:"zonos--payment-paypal-container"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}();ZonosPayment.style=ZonosPaymentStyle0;var zonosPaypalPaymentCss=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";var ZonosPaypalPaymentStyle0=zonosPaypalPaymentCss;var ZonosPaypalPayment=function(){function n(n){registerInstance(this,n);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);this.paypalSessionFail=createEvent(this,"paypalSessionFail",7)}n.prototype.loadPaypal=function(){return __awaiter(this,void 0,void 0,(function(){var n,o;var t=this;return __generator(this,(function(a){if(!window.Zonos.paypal){log("Paypal is not available");return[2]}n=paypalStoreInitButtons({onPaypalFail:function(){log("onPaypalFail");t.paypalSessionFail.emit()},onPaypalSessionDone:function(n){var o=n.orderId;log("onPaypalSessionDone","info",{orderId:o});t.paypalSessionDone.emit({orderId:o})}});if(!(n===null||n===void 0?void 0:n.length)){log("There are no paypal buttons available");return[2]}o=this.el.querySelector(".zonos--payment-paypal-container");if(!o){log("Cannot find container element for paypal buttons");return[2]}n.forEach((function(n){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,n.render(o)];case 1:t.sent();return[2]}}))}))}));return[2]}))}))};n.prototype.componentDidLoad=function(){void this.loadPaypal()};n.prototype.render=function(){return h(Host,{key:"6bfc962de500edbb105b7eb899711e48def78167",class:"zonos--paypal-payment zonos--elements"},h("div",{key:"92d1b1c416f5e233c54e50d47129be375ef0a68b",class:"zonos--payment-paypal-container"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return n}();ZonosPaypalPayment.style=ZonosPaypalPaymentStyle0;export{ZonosNotification as zonos_notification,ZonosPayment as zonos_payment,ZonosPaypalPayment as zonos_paypal_payment};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,o,t,a){function e(n){return n instanceof t?n:new t((function(o){o(n)}))}return new(t||(t=Promise))((function(t,s){function i(n){try{c(a.next(n))}catch(n){s(n)}}function r(n){try{c(a["throw"](n))}catch(n){s(n)}}function c(n){n.done?t(n.value):e(n.value).then(i,r)}c((a=a.apply(n,o||[])).next())}))};var __generator=this&&this.__generator||function(n,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,e,s,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(n){return function(o){return c([n,o])}}function c(r){if(a)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(t=0)),t)try{if(a=1,e&&(s=r[0]&2?e["return"]:r[0]?e["throw"]||((s=e["return"])&&s.call(e),0):e.next)&&!(s=s.call(e,r[1])).done)return s;if(e=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++;e=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=o.call(n,t)}catch(n){r=[6,n];e=0}finally{a=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,o,t){if(t||arguments.length===2)for(var a=0,e=o.length,s;a<e;a++){if(s||!(a in o)){if(!s)s=Array.prototype.slice.call(o,0,a);s[a]=o[a]}}return n.concat(s||Array.prototype.slice.call(o))};import{r as registerInstance,h,H as Host,d as getElement,c as createEvent}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-bdd709e7.js";import{f as stripeStore}from"./cart-709f053f.js";import{a as logError,l as log}from"./handleFetch-22cb914b.js";import{d as paypalStoreInitButtons}from"./paypal-77a60c44.js";import"./isDarkColor-c6924924.js";var zonosNotificationCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var ZonosNotificationStyle0=zonosNotificationCss;var ZonosNotification=function(){function n(n){registerInstance(this,n);this.notificationArray=[]}n.prototype.showNotification=function(n){return __awaiter(this,void 0,void 0,(function(){var o,t;var a=this;return __generator(this,(function(e){o="id-".concat(Math.random().toString(36).substring(2,9));t=Object.assign(Object.assign({},n),{id:o,timeout:n.timeout||5e3,transitionClass:"",type:n.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[t],false);setTimeout((function(){a.updateTransitionClass({id:o,transitionClass:"show"})}),50);setTimeout((function(){a.removeNotification(o)}),t.timeout);return[2]}))}))};n.prototype.updateTransitionClass=function(n){var o=n.id,t=n.transitionClass;this.notificationArray=this.notificationArray.map((function(n){if(n.id===o){return Object.assign(Object.assign({},n),{transitionClass:t})}return n}))};n.prototype.removeNotification=function(n){var o=this;this.updateTransitionClass({id:n,transitionClass:""});setTimeout((function(){o.notificationArray=o.notificationArray.filter((function(o){return o.id!==n}))}),300)};n.prototype.render=function(){var n=this;return h(Host,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:classes(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((function(o){return h("div",{"aria-hidden":"true",class:classes(["zonos--notification-item",o.type,o.transitionClass]),key:o.id,onClick:function(){n.removeNotification(o.id)}},h("zonos-text",{textColor:"gray-0"},o.message))}))))};return n}();ZonosNotification.style=ZonosNotificationStyle0;var zonosPaymentCss=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";var ZonosPaymentStyle0=zonosPaymentCss;var ZonosPayment=function(){function n(n){registerInstance(this,n);this.titleText=undefined;this.stripe=stripeStore.stripe;this.stripeElements=stripeStore.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=stripeStore.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var o=this.el.querySelector(".zonos--payment-component");if(!o){logError("Cannot find container element for paymentElement");return}n.mount(o);n.on("change",(function(n){stripeStore.stripePaymentEventData=n}));stripeStore.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return h(Host,{key:"ee5ea97f737cce6dd2ad3d90797545e38a979820",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{key:"5473d3bce1d842cba3a3e2c156fc31a70ee6b7f6",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"087268368f53116ce125b337eb2f99bf4cc7fa94",class:"zonos--payment-component"}),h("div",{key:"5987aa638084ac3635c522d3067b451b8a96a6e7",class:"zonos--payment-paypal-container"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}();ZonosPayment.style=ZonosPaymentStyle0;var zonosPaypalPaymentCss=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";var ZonosPaypalPaymentStyle0=zonosPaypalPaymentCss;var ZonosPaypalPayment=function(){function n(n){registerInstance(this,n);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);this.paypalSessionFail=createEvent(this,"paypalSessionFail",7)}n.prototype.loadPaypal=function(){return __awaiter(this,void 0,void 0,(function(){var n,o;var t=this;return __generator(this,(function(a){if(!window.Zonos.paypal){log("Paypal is not available");return[2]}n=paypalStoreInitButtons({onPaypalFail:function(){log("onPaypalFail");t.paypalSessionFail.emit()},onPaypalSessionDone:function(n){var o=n.orderId;log("onPaypalSessionDone","info",{orderId:o});t.paypalSessionDone.emit({orderId:o})}});if(!(n===null||n===void 0?void 0:n.length)){log("There are no paypal buttons available");return[2]}o=this.el.querySelector(".zonos--payment-paypal-container");if(!o){log("Cannot find container element for paypal buttons");return[2]}n.forEach((function(n){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,n.render(o)];case 1:t.sent();return[2]}}))}))}));return[2]}))}))};n.prototype.componentDidLoad=function(){void this.loadPaypal()};n.prototype.render=function(){return h(Host,{key:"00f9e39b2a69f5da6799301b76571fe31ad2b3db",class:"zonos--paypal-payment zonos--elements"},h("div",{key:"4977e93ec49ab8deca29c69072ea5fa0fc1c145b",class:"zonos--payment-paypal-container"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return n}();ZonosPaypalPayment.style=ZonosPaypalPaymentStyle0;export{ZonosNotification as zonos_notification,ZonosPayment as zonos_payment,ZonosPaypalPayment as zonos_paypal_payment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";var zonosToggleCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .wrapper{position:relative;border-radius:6px;background-color:var(--zonos-elements-gray-50);display:-ms-flexbox;display:flex}:host .zonos--toggle-selected-slider{z-index:1;position:absolute;background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}:host .zonos--option{background:transparent;border:0;z-index:2;cursor:pointer;padding:4px 12px;border-radius:6px;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-size:var(--zonos-elements-font-size-base);font-weight:500;color:var(--zonos-elements-text-color-secondary)}:host .zonos--option:focus{outline:none}:host .zonos--option:hover:not(.selected){color:var(--zonos-elements-text-color)}:host .zonos--option.selected{color:var(--zonos-elements-text-color);background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}";var ZonosToggleStyle0=zonosToggleCss;var ZonosToggle=function(){function o(o){registerInstance(this,o);this.toggleChanged=createEvent(this,"toggleChanged",7);this.options=[];this.value=undefined}o.prototype.render=function(){var o=this;return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";var zonosToggleCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .wrapper{position:relative;border-radius:6px;background-color:var(--zonos-elements-gray-50);display:-ms-flexbox;display:flex}:host .zonos--toggle-selected-slider{z-index:1;position:absolute;background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}:host .zonos--option{background:transparent;border:0;z-index:2;cursor:pointer;padding:4px 12px;border-radius:6px;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-size:var(--zonos-elements-font-size-base);font-weight:500;color:var(--zonos-elements-text-color-secondary)}:host .zonos--option:focus{outline:none}:host .zonos--option:hover:not(.selected){color:var(--zonos-elements-text-color)}:host .zonos--option.selected{color:var(--zonos-elements-text-color);background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}";var ZonosToggleStyle0=zonosToggleCss;var ZonosToggle=function(){function o(o){registerInstance(this,o);this.toggleChanged=createEvent(this,"toggleChanged",7);this.options=[];this.value=undefined}o.prototype.render=function(){var o=this;return h(Host,{key:"318787cdd63c418c3ff8c3090a56485c7746a225",class:classes(["zonos--elements zonos--toggle"]),style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"f91f378b5f3b0114ccec5972fb93fd17093bb016",class:"wrapper"},this.options.map((function(s){var t=s.value===o.value;return h("button",{class:classes(["zonos--option",t&&"selected"]),key:s.value,onClick:function(){o.toggleChanged.emit(s.value)}},s.label)}))))};return o}();ZonosToggle.style=ZonosToggleStyle0;export{ZonosToggle as zonos_toggle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{c as classes}from"./classes-0d95c529.js";var zonosTooltipCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:12px;background-color:var(--zonos-elements-gray-1000);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--zonos-elements-radius-4);z-index:100;-webkit-box-shadow:var(--zonos-elements-v3-shadow-large);box-shadow:var(--zonos-elements-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosTooltipStyle0=zonosTooltipCss;var ZonosTooltip=function(){function o(o){registerInstance(this,o);this.label="";this.subtitle="";this.showTooltip=false}o.prototype.render=function(){var o=this;return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{c as classes}from"./classes-0d95c529.js";var zonosTooltipCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:12px;background-color:var(--zonos-elements-gray-1000);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--zonos-elements-radius-4);z-index:100;-webkit-box-shadow:var(--zonos-elements-v3-shadow-large);box-shadow:var(--zonos-elements-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosTooltipStyle0=zonosTooltipCss;var ZonosTooltip=function(){function o(o){registerInstance(this,o);this.label="";this.subtitle="";this.showTooltip=false}o.prototype.render=function(){var o=this;return h(Host,{key:"7ddbd67ee8737db3bb449e4b0e3bb7aa201750e8",class:"zonos--elements"},h("div",{key:"d1389e596398fef4610e2682a06f9025bb3cb755",class:"zonos--tooltip",onMouseEnter:function(){return o.showTooltip=true},onMouseLeave:function(){return o.showTooltip=false}},h("slot",{key:"33cb09297417473b1c609258007dcdb600aba5ab"}),h("div",{key:"dd02d87b040708d7998a3a5ca7be217c37a35625",class:classes([this.showTooltip&&"zonos--show-tooltip","zonos--tooltip-content"])},h("zonos-text",{key:"8252086536ddf4e91547c5c9c26042bfe5e2d7b2",size:"s",textColor:"gray-0",type:"boldLabel"},this.label),h("zonos-text",{key:"b795a982ba2ea7f0388aa578168021cf32ef5f95",size:"xs",textColor:"gray-0"},this.subtitle))))};return o}();ZonosTooltip.style=ZonosTooltipStyle0;export{ZonosTooltip as zonos_tooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";var zonosVStackCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";var ZonosVStackStyle0=zonosVStackCss;var VStack=function(){function o(o){registerInstance(this,o);this.spacing=24}o.prototype.render=function(){return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-86b8247e.js";import{d as zonosStoreFontFamily}from"./zonosStore-c493c4fe.js";import{c as classes}from"./classes-0d95c529.js";var zonosVStackCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";var ZonosVStackStyle0=zonosVStackCss;var VStack=function(){function o(o){registerInstance(this,o);this.spacing=24}o.prototype.render=function(){return h(Host,{key:"4d2a0ea6c3c427e04bb9bca7ac0d035bd2c7143e",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"6ea72ff37210b0d719fd15506bd78810658d59ac",class:classes(["vstack"]),style:{"grid-row-gap":"".concat(this.spacing,"px")}},h("slot",{key:"fa0abf999f3737852cb181b7678a89ce6b52a471"})))};return o}();VStack.style=ZonosVStackStyle0;export{VStack as zonos_v_stack};
|