@zonos/elements 1.3.25 → 1.3.27
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-ab3b679e.js → cart-61caeb84.js} +472 -168
- package/dist/cjs/{getBorderRadius-ea0984bb.js → getBorderRadius-074b46ef.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -54
- package/dist/cjs/{isDarkColor-b14d5752.js → isDarkColor-371a3b1a.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-1471da9f.js → submitGtag-d3898668.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +6 -6
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +29 -12
- package/dist/cjs/zonos-checkout.cjs.entry.js +52 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +61 -24
- package/dist/cjs/zonos-hello.cjs.entry.js +19 -12
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-3958bbeb.js → zonosStore-4c6c85da.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +20 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +49 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +8 -8
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +15 -8
- 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 +54 -20
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/hello/localization.js +9 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +23 -8
- package/dist/collection/components/store/translationStore/strings.base.js +23 -8
- package/dist/collection/components/store/translationStore/strings.chinese.js +23 -8
- package/dist/collection/components/store/translationStore/strings.danish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.dutch.js +23 -8
- package/dist/collection/components/store/translationStore/strings.french.js +23 -8
- package/dist/collection/components/store/translationStore/strings.german.js +23 -8
- package/dist/collection/components/store/translationStore/strings.hebrew.js +23 -8
- package/dist/collection/components/store/translationStore/strings.indonesian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.italian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.japanese.js +23 -8
- package/dist/collection/components/store/translationStore/strings.korean.js +23 -8
- package/dist/collection/components/store/translationStore/strings.norwegian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.polish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.portuguese.js +23 -8
- package/dist/collection/components/store/translationStore/strings.russian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.spanish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.swedish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.turkish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +23 -8
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/wrapStringWithLink.js +3 -0
- package/dist/collection/scripts/_zonosBase.js +0 -51
- package/dist/esm/{cart-564ab33a.js → cart-530a8750.js} +472 -168
- package/dist/esm/{getBorderRadius-5e5a5800.js → getBorderRadius-947c24de.js} +1 -1
- package/dist/esm/index.js +3 -54
- package/dist/esm/{isDarkColor-5185b62c.js → isDarkColor-f8324c10.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-90ebe7d0.js → submitGtag-44ba0846.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +6 -6
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_12.entry.js +29 -12
- package/dist/esm/zonos-checkout.entry.js +52 -6
- package/dist/esm/zonos-controller.entry.js +5 -5
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +6 -6
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +61 -24
- package/dist/esm/zonos-hello.entry.js +19 -12
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +5 -5
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-8b9ea19c.js → zonosStore-ba9e541e.js} +1 -0
- package/dist/esm-es5/cart-530a8750.js +1 -0
- package/dist/esm-es5/{getBorderRadius-5e5a5800.js → getBorderRadius-947c24de.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-5185b62c.js → isDarkColor-f8324c10.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-90ebe7d0.js → submitGtag-44ba0846.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-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-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-8b9ea19c.js → zonosStore-ba9e541e.js} +1 -1
- package/dist/scripts/index.d.ts +52 -6
- 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-finish/zonos-checkout-finish.d.ts +2 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
- package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +2 -2
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -1
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +8 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.base.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.danish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.french.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.german.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.italian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.korean.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.polish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.russian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +22 -7
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/wrapStringWithLink.d.ts +4 -0
- package/dist/types/components.d.ts +4 -4
- package/dist/types/scripts/_zonosBase.d.ts +0 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +40 -0
- package/dist/types/types/hello/HelloConfig.d.ts +9 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-088d6460.system.entry.js → p-01304a58.system.entry.js} +1 -1
- package/dist/zonos-elements/p-094bfe56.system.entry.js +1 -0
- package/dist/zonos-elements/{p-474719c5.entry.js → p-099e229a.entry.js} +1 -1
- package/dist/zonos-elements/{p-be14323b.system.js → p-0b538ed4.system.js} +1 -1
- package/dist/zonos-elements/{p-ba066673.entry.js → p-11f87d7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-1e2fbb1d.system.entry.js → p-13454044.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8b58cf8.system.entry.js → p-18d04e89.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b79753bb.system.entry.js → p-27d648c3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-87c4a2af.entry.js → p-2a5a0bae.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c0859b5.entry.js → p-2aa72606.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf9dca26.js → p-31b3d26b.js} +1 -1
- package/dist/zonos-elements/{p-c0ddef11.entry.js → p-3541e6dd.entry.js} +1 -1
- package/dist/zonos-elements/{p-b7e4a6b0.entry.js → p-35d00c30.entry.js} +1 -1
- package/dist/zonos-elements/{p-aaba6f75.entry.js → p-37685139.entry.js} +1 -1
- package/dist/zonos-elements/{p-d6796b73.system.entry.js → p-3dc59d89.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4eaae82e.entry.js +1 -0
- package/dist/zonos-elements/{p-f3feed11.entry.js → p-5441b729.entry.js} +1 -1
- package/dist/zonos-elements/{p-c53cef11.js → p-5821856c.js} +1 -1
- package/dist/zonos-elements/{p-0ea19a4d.entry.js → p-5857ad65.entry.js} +1 -1
- package/dist/zonos-elements/p-5d006b02.system.js +1 -0
- package/dist/zonos-elements/{p-f1223c14.system.entry.js → p-5f580c9b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-687dbccc.entry.js +1 -0
- package/dist/zonos-elements/p-68dfcd25.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1752853e.entry.js → p-699a5376.entry.js} +1 -1
- package/dist/zonos-elements/p-6fe27968.entry.js +1 -0
- package/dist/zonos-elements/{p-5992c6fb.system.entry.js → p-73ba4398.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84791c5c.entry.js → p-75ba695c.entry.js} +1 -1
- package/dist/zonos-elements/{p-4d36edfd.system.entry.js → p-7b5a0a18.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b76a929.system.entry.js → p-84f7a3a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b45db572.system.entry.js → p-8f8baabf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a5e9d372.js → p-9a1c0d02.js} +1 -1
- package/dist/zonos-elements/p-a5704be4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-33b054d9.system.js → p-a8cb25de.system.js} +1 -1
- package/dist/zonos-elements/{p-02a01106.system.entry.js → p-a90393e0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8e83577.system.entry.js → p-acfb9be6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b4ccc72c.js +1 -0
- package/dist/zonos-elements/{p-9912a954.js → p-bb032c2f.js} +1 -1
- package/dist/zonos-elements/{p-bfc30599.entry.js → p-bb5a9eaa.entry.js} +1 -1
- package/dist/zonos-elements/{p-d7e6cad0.system.entry.js → p-c0fcc0fa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c4154737.system.js +1 -0
- package/dist/zonos-elements/{p-7fa5a6ea.entry.js → p-c4e38b85.entry.js} +1 -1
- package/dist/zonos-elements/{p-07fe47f2.system.entry.js → p-cbed004d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c8705ac.entry.js → p-d4724ac8.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-e2301200.system.entry.js → p-e15ef12e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8853e051.system.js → p-e37440ad.system.js} +1 -1
- package/dist/zonos-elements/{p-6b2a2f68.entry.js → p-e3978982.entry.js} +1 -1
- package/dist/zonos-elements/{p-a164ea90.system.entry.js → p-ecd994c8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fb1120a2.system.js +1 -0
- package/dist/zonos-elements/p-fb1b98a8.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-564ab33a.js +0 -1
- package/dist/zonos-elements/p-233c2599.system.entry.js +0 -1
- package/dist/zonos-elements/p-2619fe29.system.js +0 -1
- package/dist/zonos-elements/p-63b0aef9.system.entry.js +0 -1
- package/dist/zonos-elements/p-6ed78fba.entry.js +0 -1
- package/dist/zonos-elements/p-9a0c5589.system.entry.js +0 -1
- package/dist/zonos-elements/p-b44de1c3.entry.js +0 -1
- package/dist/zonos-elements/p-c2688c49.system.js +0 -1
- package/dist/zonos-elements/p-d170253b.entry.js +0 -1
- package/dist/zonos-elements/p-e2bdba42.system.js +0 -1
- package/dist/zonos-elements/p-e815af26.entry.js +0 -1
- package/dist/zonos-elements/p-fc4f1e0c.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function a(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 r(o){try{l(n["throw"](o))}catch(o){i(o)}}function l(o){o.done?t(o.value):a(o.value).then(s,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(t=0)),t)try{if(n=1,a&&(i=r[0]&2?a["return"]:r[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;if(a=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;a=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){t.label=r[1];break}if(r[0]===6&&t.label<i[1]){t.label=i[1];i=r;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(r);break}if(i[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];a=0}finally{n=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-3b46f3c3.js";import{B as currencyFormat,t as translate,l as localizationStore}from"./cart-564ab33a.js";import{z as zonosStore}from"./zonosStore-8b9ea19c.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"./logError-c456c092.js";import"./isDarkColor-5185b62c.js";import"./getBorderRadius-5e5a5800.js";var getHasMoreSpaceAbove=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};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 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(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var ZonosHelloDialogStyle0=zonosHelloDialogCss;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.getDutyMessage=function(){var o=localizationStore.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?currencyFormat({amount:o.dutyDeminimus}):null;return e?"".concat(translate("Spend")," ").concat(e," ").concat(translate("duty free")):translate("Duties will apply to all orders")};this.getTaxMessage=function(){var o=localizationStore.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?currencyFormat({amount:o.vatTaxDeminimus}):null;return e?"".concat(translate("Spend")," ").concat(e," ").concat(translate("tax free")):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){return translate("[percentage] GST due on any order above [threshold].",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:currencyFormat({amount:o.vatTaxDeminimus})})};this.getNewZealandDutyTaxMessge=function(o){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.getAdditionalDutyTaxMessage=function(){if(!localizationStore.countryLandedCost){return null}if(!localizationStore.countryLandedCost.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.getDutyMessage();var a=this.getTaxMessage();var i=this.getAdditionalDutyTaxMessage();var s=this.animateFromLeftOverride||this.dialogRef&&getHasMoreSpaceOnRight(this.dialogRef);var r=this.dialogRef&&getHasMoreSpaceAbove(this.dialogRef);var l=localizationStore.customMessages;var c=translate("Welcome to [storeName]!",{storeName:zonosStore.organizationName});var d=((e=l.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 f=formatStringWithLinks(d);var u=this.getCurrentPageEnum();var g=l.filter((function(o){return o.pageName===u}));return h(Host,{key:"354758888accf5c5f44e321cc36f3126fe161596",class:"zonos--elements"},h("div",{key:"b6e9ef3ac53035b578f1ccb6940e04561a6c7362","aria-hidden":"true",class:classes(["zonos--hello-dialog",s&&"zonos--hello-dialog-animate-from-left",r&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&h("div",{key:"cba389a7107bf0505743237a7e61e27988955a44"},h("div",{key:"3cef5f247dca70671ad0c304f29980f7147cf21c",class:"zonos--hello-dialog-content"},h("zonos-button",{key:"013764140f25f64ab52f4588a50b5148f4b170d0",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:"099dc23581474e5167cfa8bd90be9987b3caa47f",spacing:24},h("zonos-country-flag",{key:"c545313157e3a488433619292306419588e20e50",class:"zonos--hello-country-flag",countryCode:t}),h("zonos-v-stack",{key:"f8be1b95571b28be7ed4fc3caee5d13177845150",class:"zonos--hello-dialog-header",spacing:4},h("zonos-text",{key:"9ac86d0f247cecd0bfa19ffc041eee89bd19b168",type:"boldSubheader"},c),h("zonos-text",{key:"3234c9640aa1d484c6dcb78e7e3bf43e3545d67e",innerHTML:f,textColor:"gray-800"})),h("zonos-v-stack",{key:"2f090b934ede76c8400b7891b6caa391e1f039b0",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:"e7ec890c1673b4025e650ed737ee4ba0e37ceb5d",spacing:"12px"},h("zonos-v-stack",{key:"a09bc2634da2795a4f0e2ef8b66680db9b0e403d",spacing:12},h("div",{key:"2182aac10dc9b654b81234188cf0ef4decb2328a",class:"zonos--flex-message"},h("zonos-icon",{key:"362807633b9a55a4438e95a9150c4c80f5bd836b","aria-label":"Duty de minimis",content:ImportIcon}),h("zonos-text",{key:"10bbbd399a255ad3a593b246d4b8b475e1c089e1"},n)),h("div",{key:"451c58a91d38413cc295a377e08ffa9947411112",class:"zonos--flex-message"},h("zonos-icon",{key:"2eceeced9d2b0ab482c94b8edd768134ba936d2d","aria-label":"Tax de minimis",content:MoneyIcon}),h("zonos-text",{key:"f4284b8e56522de93d5ca1160103ca2fac85250e"},a)),i&&h("div",{key:"f9f0a09a1a7bfa85b2a70f843aabea7961250141",class:"zonos--flex-message"},h("zonos-icon",{key:"147ee865b2708d662c185e4fe5d4dba7f099c310","aria-label":"Low value order shipping restriction",content:BagIcon}),h("zonos-text",{key:"ccb671b31672ebfd41369a9b0fda8e49ed3739cc"},i)))),g.map((function(o){return h("zonos-custom-message",{icon:MessageIcon,message:o.message})}))))),h("zonos-hello-dialog-footer",{key:"16b584281762c987d375b15e5cd3b5784fce5cd4",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&h("div",{key:"1122d535ce9bf451aa823726764a1a662c0378df"},h("zonos-country-select",{key:"73c417e435dcbb15be72879ecde8271cb5cc01a1",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&h("div",{key:"4555dcf5260fa976458f6d612efce72a39564abf"},h("zonos-language-select",{key:"c19ca73913d2b026976acc36c1d9eb68bf90f07c",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 a(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 r(o){try{l(n["throw"](o))}catch(o){i(o)}}function l(o){o.done?t(o.value):a(o.value).then(s,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(t=0)),t)try{if(n=1,a&&(i=r[0]&2?a["return"]:r[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;if(a=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;a=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){t.label=r[1];break}if(r[0]===6&&t.label<i[1]){t.label=i[1];i=r;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(r);break}if(i[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];a=0}finally{n=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-3b46f3c3.js";import{l as localizationStore,B as currencyFormat,t as translate}from"./cart-530a8750.js";import{z as zonosStore}from"./zonosStore-ba9e541e.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"./logError-c456c092.js";import"./isDarkColor-f8324c10.js";import"./getBorderRadius-947c24de.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 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(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var ZonosHelloDialogStyle0=zonosHelloDialogCss;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.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){return[translate("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders",{percentage:"".concat(o.vatTaxRate*100,"%")}),"".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.")}))]};this.getNewZealandDutyTaxMessge=function(o){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.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.getDutyMessage();var a=this.getTaxMessage();var i=this.getAdditionalDutyTaxMessage();var s=this.animateFromLeftOverride||this.dialogRef&&getHasMoreSpaceOnRight(this.dialogRef);var r=this.dialogRef&&getHasMoreSpaceAbove(this.dialogRef);var l=localizationStore.customMessages;var c=translate("Welcome to [storeName]!",{storeName:zonosStore.organizationName});var d=((e=l.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 f=formatStringWithLinks(d);var u=this.getCurrentPageEnum();var g=l.filter((function(o){return o.pageName===u}));return h(Host,{key:"bb2b080aaba7b85599b7e6bcb7cabee70863070f",class:"zonos--elements"},h("div",{key:"aabdbd8c4b47f759396d1a56fac426570385768d","aria-hidden":"true",class:classes(["zonos--hello-dialog",s&&"zonos--hello-dialog-animate-from-left",r&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&h("div",{key:"d9189f1ced79d3d3fd11c99ea1407e7b83a2573b"},h("div",{key:"83ac2ab3583935ececea8be98ab64559d802725a",class:"zonos--hello-dialog-content"},h("zonos-button",{key:"4f36dea145e751d63a2d0df3f472ffe674fbb580",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:"e8a7cebe4ca88da80b974e3a3536714fe4da47c1",spacing:24},h("zonos-country-flag",{key:"e02c72135b9c7e9e533fc46c8f4b286ba1cb1b63",class:"zonos--hello-country-flag",countryCode:t}),h("zonos-v-stack",{key:"7d199c0a5f465fe1640e690d2712f11a80e1f378",class:"zonos--hello-dialog-header",spacing:4},h("zonos-text",{key:"97bf6611bd485ace8ad9b94c3520148ae0d1eab0",type:"boldSubheader"},c),h("zonos-text",{key:"c1e524bf689f34aed978f350676ffa957724176f",innerHTML:f,textColor:"gray-800"})),h("zonos-v-stack",{key:"81a2fabb2f6c2d853f2f6619f7c6829754d80a59",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:"29ba8b81746a696ca43b88daa89a7c85af5a2b34",spacing:"12px"},h("zonos-v-stack",{key:"8f4e79efe07a4c7c1b493178c952bfe61a151f0c",spacing:12},h("div",{key:"a17eda2b103d376f7ca8a9b528d613195b3a1fe7",class:"zonos--flex-message"},h("zonos-icon",{key:"13c828d956198211a1fbda77840f8b91692d1582","aria-label":"Duty de minimis",content:ImportIcon}),h("zonos-text",{key:"c38511e16905f169b821d0cd8d98dee80a7c1de1"},n)),h("div",{key:"9b3165d870419732d4be1421336326f8d4e98547",class:"zonos--flex-message"},h("zonos-icon",{key:"46248b95b97a3ec74ffc038dda29ca74a1e700c2","aria-label":"Tax de minimis",content:MoneyIcon}),h("zonos-text",{key:"1d698d83f9fa43746de870553d1ba1c09389aefb"},a)),i===null||i===void 0?void 0:i.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}))})))),g.map((function(o){return h("zonos-custom-message",{icon:MessageIcon,message:o.message})}))))),h("zonos-hello-dialog-footer",{key:"fcc21cc1e8b3de45af03c64ffc95dc2ab6f57bf3",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&h("div",{key:"bbf019b27e6da7aa3256f14bf928aae26ca92f54"},h("zonos-country-select",{key:"a70d55e1872ec626e8446866dbad3aafca69790c",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&h("div",{key:"77f63941fcbb3bc0c668a61aa48ca2e60b8addeb"},h("zonos-language-select",{key:"57a4d06c098662b00c3587f3b2290552dc04f2fe",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}();ZonosHelloDialog.style=ZonosHelloDialogStyle0;export{ZonosHelloDialog as zonos_hello_dialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,r){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?t(e.value):n(e.value).then(s,a)}l((r=r.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,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(e){return function(o){return l([e,o])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=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++;n=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=o.call(e,t)}catch(e){a=[6,e];n=0}finally{r=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-3b46f3c3.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-8b9ea19c.js";import{r as handleFetch,l as localizationStore,u as isValidSelector,t as translate,w as getZCountryUrlParam,x as setZCountryUrlParam,y as currencyDisplay,z as currencyConvertAndFormat,A as currencyConvert,B as currencyFormat}from"./cart-564ab33a.js";import{c as classes}from"./classes-0d95c529.js";import{a as logError,l as log}from"./logError-c456c092.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import"./isDarkColor-5185b62c.js";import"./getBorderRadius-5e5a5800.js";var root=_root;var now$1=function(){return root.Date.now()};var now_1=now$1;var reWhitespace=/\s/;function trimmedEndIndex$1(e){var o=e.length;while(o--&&reWhitespace.test(e.charAt(o))){}return o}var _trimmedEndIndex=trimmedEndIndex$1;var trimmedEndIndex=_trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim$1(e){return e?e.slice(0,trimmedEndIndex(e)+1).replace(reTrimStart,""):e}var _baseTrim=baseTrim$1;var baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1;var symbolTag="[object Symbol]";function isSymbol$1(e){return typeof e=="symbol"||isObjectLike(e)&&baseGetTag(e)==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(e){if(typeof e=="number"){return e}if(isSymbol(e)){return NAN}if(isObject$1(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=isObject$1(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=baseTrim(e);var t=reIsBinary.test(e);return t||reIsOctal.test(e)?freeParseInt(e.slice(2),t?2:8):reIsBadHex.test(e)?NAN:+e}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(e,o,t){var r,n,i,s,a,l,h=0,d=false,u=false,c=true;if(typeof e!="function"){throw new TypeError(FUNC_ERROR_TEXT)}o=toNumber(o)||0;if(isObject(t)){d=!!t.leading;u="maxWait"in t;i=u?nativeMax(toNumber(t.maxWait)||0,o):i;c="trailing"in t?!!t.trailing:c}function f(o){var t=r,i=n;r=n=undefined;h=o;s=e.apply(i,t);return s}function m(e){h=e;a=setTimeout(z,o);return d?f(e):s}function g(e){var t=e-l,r=e-h,n=o-t;return u?nativeMin(n,i-r):n}function v(e){var t=e-l,r=e-h;return l===undefined||t>=o||t<0||u&&r>=i}function z(){var e=now();if(v(e)){return w(e)}a=setTimeout(z,g(e))}function w(e){a=undefined;if(c&&r){return f(e)}r=n=undefined;return s}function p(){if(a!==undefined){clearTimeout(a)}h=0;r=l=n=a=undefined}function b(){return a===undefined?s:w(now())}function x(){var e=now(),t=v(e);r=arguments;n=this;l=e;if(t){if(a===undefined){return m(l)}if(u){clearTimeout(a);a=setTimeout(z,o);return f(l)}}if(a===undefined){a=setTimeout(z,o)}return s}x.cancel=p;x.flush=b;return x}var debounce_1=debounce;var checkItemRestrictions=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o,t,r,n,i,s;var a=e.items,l=e.shipFrom,h=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");r={items:a,shipFrom:l,shipTo:h};return[4,handleFetch(t,{body:r,method:"POST"})];case 1:n=e.sent(),i=n.errors,s=n.json;if(i.length||!s){logError("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,s.filter(Boolean)]}}))}))};var detectItemRestrictions=function(e){return __awaiter(void 0,void 0,void 0,(function(){var o,t,r,n;return __generator(this,(function(i){switch(i.label){case 0:if(!e.length){return[2,[]]}o=localizationStore.selectedCountryCode;if(!o){logError("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:o})];case 1:r=i.sent();n=r.map((function(e){var o;var r=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:r})}));return[2,n]}}))}))};var matchUrlPattern=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var getCurrentHelloLocalePage=function(){var e=zonosStore.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,r=e.productDetailUrlPattern,n=e.productListUrlPattern;if(matchUrlPattern(o)){return"cart"}if(matchUrlPattern(r)){return"productDetail"}if(matchUrlPattern(n)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var getProductsOnPage=function(){var e,o;var t=zonosStore.helloSettings,r=t.productAddToCartElementSelector,n=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!n){logError("Hello Could not check item restrictions - must provide title and description selectors.")}var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];var l=n&&isValidSelector(n)&&document.querySelectorAll(n)||[];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&&r&&isValidSelector(r)&&document.querySelectorAll(r)||[];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 u=[];for(var c=0;c<a.length;c++){var f=a[c];var m=l[c];var g=d[c];if(f&&m){var v={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=f.textContent)===null||o===void 0?void 0:o.trim())||""};u.push(v)}}return u};var zonosHelloCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var RESIZE_DEBOUNCE_DELAY_MS=500;var ZonosHello=function(){function e(e){var o=this;registerInstance(this,e);this.getHelloPeekMessage=function(e){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&o.allRestrictedItems.length){var r=translate("click to learn more");var n=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(n," - ").concat(r)}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:e})}};this.enableShowPeekMessage=function(){if(o.peekMessage){o.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){switch(r.label){case 0:o=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!o||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(e)];case 1:t=r.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){o.peekMessage=o.getHelloPeekMessage(zonosStore.organizationName);var e=zonosStore.helloSettings,t=e.peekMessageBehavior,r=e.peekMessageDelay;var n=r*1e3;if(t==="ENABLED"){setTimeout((function(){o.enableShowPeekMessage();var e=o.allRestrictedItems.some((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){o.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),n)}};this.disableAddToCartButtons=function(){if(o.productsOnPage.length){o.productsOnPage.forEach((function(e){var t,r;var n=o.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(n){(t=e.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(r=e.cartButtonNode)===null||r===void 0?void 0:r.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(o,void 0,void 0,(function(){var e,o;var t,r;var n=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=getProductsOnPage();e=this.productsOnPage.filter((function(e){return!n.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=i.sent();(t=this.allRestrictedItems).push.apply(t,o);(r=this.allFoundProducts).push.apply(r,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var e=zonosStore.helloSettings.productTitleElementSelector;if(e){var t=getProductsOnPage();if(o.allFoundProducts.length!==t.length&&window.location.href===o.initialUrl){if(!o.allFoundProducts.length){return}void o.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(o.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void o.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){o.watchProductCountChange();setInterval((function(){if(window.location.href!==o.initialUrl){var e=o.initialUrl&&new URL(o.initialUrl);var t=e&&getZCountryUrlParam(e.searchParams);if(t!==localizationStore.selectedCountryCode){o.allFoundProducts=[];o.allRestrictedItems=[];o.productsOnPage=[]}o.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var r=new URL(window.location.href);var n=getZCountryUrlParam(r.searchParams);if(!n){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void o.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){o.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=o.helloRef&&getComputedStyle(o.helloRef).position;if(o.helloRef&&e==="relative"){var t=getHasMoreSpaceOnRight(o.helloRef);return t}};this.isShippableCountry=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return false}if(!localizationStore.isShippableCountry){if(e){log("Hello: not shippable country")}return false}return true};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=[]}e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){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]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,currencyConvertAndFormat(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,currencyConvert(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,currencyFormat({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){debounce_1(this.render.bind(this),RESIZE_DEBOUNCE_DELAY_MS)};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};e.prototype.render=function(){var e=this;var o,t;var r=(o=zonosStore.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return new RegExp(e).test(window.location.href)}));if(r){log("Hello is excluded on this url","warn");return null}var n=localizationStore.selectedCountryCode;var i=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var s=window.innerWidth<768;var a=this.animateFromLeftOverride||s&&i.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var l=i.includes("TOP");var d=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride);var u=d.theme;var c=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var f=this.isShippableCountry()&&!!n;return h(Host,{class:"zonos--hello zonos--elements","data-theme":u},f&&h("div",{class:"zonos--hello-wrapper"},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"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),n&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:n}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:c,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}();ZonosHello.style=ZonosHelloStyle0;export{ZonosHello as zonos_hello};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,r){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?t(e.value):n(e.value).then(s,a)}l((r=r.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,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(e){return function(o){return l([e,o])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=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++;n=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=o.call(e,t)}catch(e){a=[6,e];n=0}finally{r=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-3b46f3c3.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-ba9e541e.js";import{r as handleFetch,l as localizationStore,u as isValidSelector,t as translate,w as getZCountryUrlParam,x as setZCountryUrlParam,y as currencyDisplay,z as currencyConvertAndFormat,A as currencyConvert,B as currencyFormat}from"./cart-530a8750.js";import{c as classes}from"./classes-0d95c529.js";import{a as logError,l as log}from"./logError-c456c092.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import"./isDarkColor-f8324c10.js";import"./getBorderRadius-947c24de.js";var root=_root;var now$1=function(){return root.Date.now()};var now_1=now$1;var reWhitespace=/\s/;function trimmedEndIndex$1(e){var o=e.length;while(o--&&reWhitespace.test(e.charAt(o))){}return o}var _trimmedEndIndex=trimmedEndIndex$1;var trimmedEndIndex=_trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim$1(e){return e?e.slice(0,trimmedEndIndex(e)+1).replace(reTrimStart,""):e}var _baseTrim=baseTrim$1;var baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1;var symbolTag="[object Symbol]";function isSymbol$1(e){return typeof e=="symbol"||isObjectLike(e)&&baseGetTag(e)==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(e){if(typeof e=="number"){return e}if(isSymbol(e)){return NAN}if(isObject$1(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=isObject$1(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=baseTrim(e);var t=reIsBinary.test(e);return t||reIsOctal.test(e)?freeParseInt(e.slice(2),t?2:8):reIsBadHex.test(e)?NAN:+e}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(e,o,t){var r,n,i,s,a,l,d=0,h=false,u=false,c=true;if(typeof e!="function"){throw new TypeError(FUNC_ERROR_TEXT)}o=toNumber(o)||0;if(isObject(t)){h=!!t.leading;u="maxWait"in t;i=u?nativeMax(toNumber(t.maxWait)||0,o):i;c="trailing"in t?!!t.trailing:c}function f(o){var t=r,i=n;r=n=undefined;d=o;s=e.apply(i,t);return s}function m(e){d=e;a=setTimeout(z,o);return h?f(e):s}function g(e){var t=e-l,r=e-d,n=o-t;return u?nativeMin(n,i-r):n}function v(e){var t=e-l,r=e-d;return l===undefined||t>=o||t<0||u&&r>=i}function z(){var e=now();if(v(e)){return w(e)}a=setTimeout(z,g(e))}function w(e){a=undefined;if(c&&r){return f(e)}r=n=undefined;return s}function p(){if(a!==undefined){clearTimeout(a)}d=0;r=l=n=a=undefined}function b(){return a===undefined?s:w(now())}function x(){var e=now(),t=v(e);r=arguments;n=this;l=e;if(t){if(a===undefined){return m(l)}if(u){clearTimeout(a);a=setTimeout(z,o);return f(l)}}if(a===undefined){a=setTimeout(z,o)}return s}x.cancel=p;x.flush=b;return x}var debounce_1=debounce;var checkItemRestrictions=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o,t,r,n,i,s;var a=e.items,l=e.shipFrom,d=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");r={items:a,shipFrom:l,shipTo:d};return[4,handleFetch(t,{body:r,method:"POST"})];case 1:n=e.sent(),i=n.errors,s=n.json;if(i.length||!s){logError("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,s.filter(Boolean)]}}))}))};var detectItemRestrictions=function(e){return __awaiter(void 0,void 0,void 0,(function(){var o,t,r,n;return __generator(this,(function(i){switch(i.label){case 0:if(!e.length){return[2,[]]}o=localizationStore.selectedCountryCode;if(!o){logError("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:o})];case 1:r=i.sent();n=r.map((function(e){var o;var r=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:r})}));return[2,n]}}))}))};var matchUrlPattern=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var getCurrentHelloLocalePage=function(){var e=zonosStore.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,r=e.productDetailUrlPattern,n=e.productListUrlPattern;if(matchUrlPattern(o)){return"cart"}if(matchUrlPattern(r)){return"productDetail"}if(matchUrlPattern(n)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var getProductsOnPage=function(){var e,o;var t=zonosStore.helloSettings,r=t.productAddToCartElementSelector,n=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!n){logError("Hello Could not check item restrictions - must provide title and description selectors.")}var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];var l=n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(a.length!==l.length){logError("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var h=d&&r&&isValidSelector(r)&&document.querySelectorAll(r)||[];if(d&&h.length!==l.length){logError('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var u=[];for(var c=0;c<a.length;c++){var f=a[c];var m=l[c];var g=h[c];if(f&&m){var v={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=f.textContent)===null||o===void 0?void 0:o.trim())||""};u.push(v)}}return u};var zonosHelloCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var RESIZE_DEBOUNCE_DELAY_MS=500;var ZonosHello=function(){function e(e){var o=this;registerInstance(this,e);this.getHelloPeekMessage=function(e){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&o.allRestrictedItems.length){var r=translate("click to learn more");var n=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(n," - ").concat(r)}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:e})}};this.enableShowPeekMessage=function(){if(o.peekMessage){o.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){switch(r.label){case 0:o=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!o||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(e)];case 1:t=r.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){o.peekMessage=o.getHelloPeekMessage(zonosStore.organizationName);var e=zonosStore.helloSettings,t=e.peekMessageBehavior,r=e.peekMessageDelay;var n=r*1e3;if(t==="ENABLED"){setTimeout((function(){o.enableShowPeekMessage();var e=o.allRestrictedItems.some((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){o.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),n)}};this.disableAddToCartButtons=function(){if(o.productsOnPage.length){o.productsOnPage.forEach((function(e){var t,r;var n=o.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(n){(t=e.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(r=e.cartButtonNode)===null||r===void 0?void 0:r.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(o,void 0,void 0,(function(){var e,o;var t,r;var n=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=getProductsOnPage();e=this.productsOnPage.filter((function(e){return!n.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=i.sent();(t=this.allRestrictedItems).push.apply(t,o);(r=this.allFoundProducts).push.apply(r,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var e=zonosStore.helloSettings.productTitleElementSelector;if(e){var t=getProductsOnPage();if(o.allFoundProducts.length!==t.length&&window.location.href===o.initialUrl){if(!o.allFoundProducts.length){return}void o.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(o.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void o.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){o.watchProductCountChange();setInterval((function(){if(window.location.href!==o.initialUrl){var e=o.initialUrl&&new URL(o.initialUrl);var t=e&&getZCountryUrlParam(e.searchParams);if(t!==localizationStore.selectedCountryCode){o.allFoundProducts=[];o.allRestrictedItems=[];o.productsOnPage=[]}o.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var r=new URL(window.location.href);var n=getZCountryUrlParam(r.searchParams);if(!n){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void o.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){o.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=o.helloRef&&getComputedStyle(o.helloRef).position;if(o.helloRef&&e==="relative"){var t=getHasMoreSpaceOnRight(o.helloRef);return t}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return false}var o=zonosStore.helloSettings.showForCountries;if(e){if(!localizationStore.isShippableCountry){log("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return localizationStore.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.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=[]}e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){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]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,currencyConvertAndFormat(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,currencyConvert(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,currencyFormat({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){debounce_1(this.render.bind(this),RESIZE_DEBOUNCE_DELAY_MS)};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};e.prototype.render=function(){var e=this;var o,t;var r=(o=zonosStore.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return new RegExp(e).test(window.location.href)}));if(r){log("Hello is excluded on this url","warn");return null}var n=localizationStore.selectedCountryCode;var i=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var s=window.innerWidth<768;var a=this.animateFromLeftOverride||s&&i.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var l=i.includes("TOP");var d=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride);var u=d.theme;var c=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var f=this.shouldRenderHello()&&!!n;return h(Host,{class:"zonos--hello zonos--elements","data-theme":u},f&&h("div",{class:"zonos--hello-wrapper"},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"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),n&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:n}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:c,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}();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-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,d as getElement}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-ba9e541e.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-947c24de.js";var zonosInputCss=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{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(--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(--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(--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:"f2bf9e34ef694f026eceed1327603659bbd4c5a4",class:classes(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--border-radius":getBorderRadius(),"--font-family":zonosStoreFontFamily()}},h("div",{key:"0fe9066fc683f6a683c494209fa29b10c0076dc5",class:classes(["zonos--label-wrapper",this.isDisabled&&"disabled"])},h("input",{key:"f185418ddc6a83e829a9d2dd44a021288f00d4d5",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:"3d4ab801e27af15d819b17db226f0d5f719ac903",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,a as getAssetPath,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-
|
|
1
|
+
import{r as registerInstance,h,a as getAssetPath,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-ba9e541e.js";import{c as classes}from"./classes-0d95c529.js";var zonosLogoCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--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:"c790c72d413c586a873c5046a1aee797c1f0af36",class:classes(["zonos--elements zonos--logo"]),style:{"--filter-color":o,"--font-family":zonosStoreFontFamily(),"--width":this.width}},h("img",{key:"68efd2097a0d8488308de0b50bef30cc67deb6fa",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(t,o,n,i){function s(t){return t instanceof n?t:new n((function(o){o(t)}))}return new(n||(n=Promise))((function(n,e){function r(t){try{c(i.next(t))}catch(t){e(t)}}function a(t){try{c(i["throw"](t))}catch(t){e(t)}}function c(t){t.done?n(t.value):s(t.value).then(r,a)}c((i=i.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var n={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},i,s,e,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(o){return c([t,o])}}function c(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(n=0)),n)try{if(i=1,s&&(e=a[0]&2?s["return"]:a[0]?s["throw"]||((e=s["return"])&&e.call(s),0):s.next)&&!(e=e.call(s,a[1])).done)return e;if(s=0,e)a=[a[0]&2,e.value];switch(a[0]){case 0:case 1:e=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(e=n.trys,e=e.length>0&&e[e.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!e||a[1]>e[0]&&a[1]<e[3])){n.label=a[1];break}if(a[0]===6&&n.label<e[1]){n.label=e[1];e=a;break}if(e&&n.label<e[2]){n.label=e[2];n.ops.push(a);break}if(e[2])n.ops.pop();n.trys.pop();continue}a=o.call(t,n)}catch(t){a=[6,t];s=0}finally{i=e=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,o,n){if(n||arguments.length===2)for(var i=0,s=o.length,e;i<s;i++){if(e||!(i in o)){if(!e)e=Array.prototype.slice.call(o,0,i);e[i]=o[i]}}return t.concat(e||Array.prototype.slice.call(o))};import{r as registerInstance,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,o,n,i){function s(t){return t instanceof n?t:new n((function(o){o(t)}))}return new(n||(n=Promise))((function(n,e){function r(t){try{c(i.next(t))}catch(t){e(t)}}function a(t){try{c(i["throw"](t))}catch(t){e(t)}}function c(t){t.done?n(t.value):s(t.value).then(r,a)}c((i=i.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var n={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},i,s,e,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(o){return c([t,o])}}function c(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(n=0)),n)try{if(i=1,s&&(e=a[0]&2?s["return"]:a[0]?s["throw"]||((e=s["return"])&&e.call(s),0):s.next)&&!(e=e.call(s,a[1])).done)return e;if(s=0,e)a=[a[0]&2,e.value];switch(a[0]){case 0:case 1:e=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(e=n.trys,e=e.length>0&&e[e.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!e||a[1]>e[0]&&a[1]<e[3])){n.label=a[1];break}if(a[0]===6&&n.label<e[1]){n.label=e[1];e=a;break}if(e&&n.label<e[2]){n.label=e[2];n.ops.push(a);break}if(e[2])n.ops.pop();n.trys.pop();continue}a=o.call(t,n)}catch(t){a=[6,t];s=0}finally{i=e=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,o,n){if(n||arguments.length===2)for(var i=0,s=o.length,e;i<s;i++){if(e||!(i in o)){if(!e)e=Array.prototype.slice.call(o,0,i);e[i]=o[i]}}return t.concat(e||Array.prototype.slice.call(o))};import{r as registerInstance,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-ba9e541e.js";import{c as classes}from"./classes-0d95c529.js";var zonosNotificationCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999;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(--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 t(t){registerInstance(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var o,n;var i=this;return __generator(this,(function(s){o="id-".concat(Math.random().toString(36).substring(2,9));n=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[n],false);setTimeout((function(){i.updateTransitionClass({id:o,transitionClass:"show"})}),50);setTimeout((function(){i.removeNotification(o)}),n.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var o=t.id,n=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===o){return Object.assign(Object.assign({},t),{transitionClass:n})}return t}))};t.prototype.removeNotification=function(t){var o=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){o.notificationArray=o.notificationArray.filter((function(o){return o.id!==t}))}),300)};t.prototype.render=function(){var t=this;return h(Host,{key:"17c08c90c6c1dfade4e43451c196127a0f53429e",class:classes(["zonos--elements zonos--notification"]),style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"6624419d86a5c7518539069dbc5c9d7c08262c75",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(){t.removeNotification(o.id)}},h("zonos-text",{textColor:"gray-0"},o.message))}))))};return t}();ZonosNotification.style=ZonosNotificationStyle0;export{ZonosNotification as zonos_notification};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,d as getElement}from"./index-3b46f3c3.js";import{h as stripeStore}from"./cart-
|
|
1
|
+
import{r as registerInstance,h,H as Host,d as getElement}from"./index-3b46f3c3.js";import{h as stripeStore}from"./cart-530a8750.js";import{a as logError}from"./logError-c456c092.js";import"./zonosStore-ba9e541e.js";import"./isDarkColor-f8324c10.js";import"./getBorderRadius-947c24de.js";var zonosPaymentCss=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}";var 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:"abebca876eac8bd507fcbdb1c029d2ed0f3b749a",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{key:"142257f2052337206dbb70e70c87b5207f2bd97a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"c55bbaea79a291e45d8ed37d556529365de89e9f",class:"zonos--payment-component"}))};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;export{ZonosPayment as zonos_payment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-ba9e541e.js";import{c as classes}from"./classes-0d95c529.js";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(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--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 o(o){registerInstance(this,o);this.handleOnClose=function(){};this.label=""}o.prototype.render=function(){var o=this;return h(Host,{key:"aee08db0e889bd5a5b9084180f6ee038c120a3b2",class:"zonos--elements",style:{"--font-family":zonosStoreFontFamily()}},h("zonos-v-stack",{key:"565a273f0037418387c0868c74943c3325ab6c35",class:"zonos--select-dialog-header-wrapper",spacing:8},h("div",{key:"0d994f27c948e49c092d016a0f1d6e453f80f00a",class:"zonos--select-dialog-header"},h("zonos-text",{key:"ee7bb796e921b2a14fa6201c8f17d0dfd9f3a3c2",type:"boldLabel"},this.label),h("zonos-button",{key:"0e3a6c9c2cc4b67a51015b2fb7345c47a0e5ef23",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close select dialog",content:RemoveIcon,size:20}),noBackground:true,onClick:function(){return o.handleOnClose()}})),h("slot",{key:"ad9fb089fa4a571a5443431c0d686b4804d25b0a"})))};return o}();ZonosSelectDialogHeader.style=ZonosSelectDialogHeaderStyle0;var zonosVStackCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .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:"9b7115624d2e27b1c6da58ac16f6059d5cad71a9",style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"bd3ccd8700897292fd1a9ad40825c851a484fcf2",class:classes(["vstack"]),style:{"grid-row-gap":"".concat(this.spacing,"px")}},h("slot",{key:"1c6fe3e6dc8eda9461eb90180535c9bd563a1840"})))};return o}();VStack.style=ZonosVStackStyle0;export{ZonosSelectDialogHeader as zonos_select_dialog_header,VStack as zonos_v_stack};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily,z as zonosStore}from"./zonosStore-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily,z as zonosStore}from"./zonosStore-ba9e541e.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-947c24de.js";import{i as isColorVariable}from"./isColorVariable-82457bef.js";var zonosShippingRichRadioCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";var ZonosShippingRichRadioStyle0=zonosShippingRichRadioCss;var ZonosShippingRichRadio=function(){function o(o){var i=this;registerInstance(this,o);this.radioSelected=createEvent(this,"radioSelected",7);this.handleRichRadioSelect=function(o){var s;i.selectedItem=o;(s=i.radioSelected)===null||s===void 0?void 0:s.emit(o)};this.getRadioItemStyleVariables=function(){var o=i.borderColor||zonosStore.appearance.colorSecondary;var s=isColorVariable(o)?"var(--zonos-elements-".concat(o,")"):o;return{"--border-radius":getBorderRadius({overrideBorderStyle:i.borderStyle}),"--selected-border-color":s||"unset"}};this.items=undefined;this.borderColor=undefined;this.borderStyle=undefined;this.theme=undefined;this.initialSelectedValue=undefined;this.selectedItem=null}o.prototype.componentWillLoad=function(){var o=this;if(this.initialSelectedValue){this.selectedItem=this.items.find((function(i){return i.value===o.initialSelectedValue}))||null}};o.prototype.render=function(){var o=this;var i;return h(Host,{key:"48381df130f6021b73c543c7244a71e7b1e8cd05",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--font-family":zonosStoreFontFamily()})},(i=this.items)===null||i===void 0?void 0:i.map((function(i){var s;var e=((s=o.selectedItem)===null||s===void 0?void 0:s.value)===i.value;return h("div",{"aria-hidden":"true",class:classes(["zonos--shipping-rich-radio-item",e&&"selected"]),onClick:function(){return o.handleRichRadioSelect(i)}},h("input",{checked:e,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:i.value}),h("div",{class:"zonos--shipping-info"},h("div",{class:"zonos--shipping-detail"},h("zonos-text",{class:"zonos--shipping-label",type:"label"},i.label),(i.sublabel||i.caption)&&h("div",{class:"zonos--sub-detail"},i.sublabel&&h("zonos-text",{textColor:"gray-800"},i.sublabel),i.caption&&h("zonos-text",{textColor:"gray-600"},i.caption))),h("zonos-text",{type:"semiBoldLabel"},i.price)))})))};return o}();ZonosShippingRichRadio.style=ZonosShippingRichRadioStyle0;export{ZonosShippingRichRadio as zonos_shipping_rich_radio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-3b46f3c3.js";import{d as zonosStoreFontFamily}from"./zonosStore-ba9e541e.js";import{c as classes}from"./classes-0d95c529.js";import{i as isColorVariable}from"./isColorVariable-82457bef.js";var textOptions={pageHeader:{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",weight:900},secondaryPageHeader:{label:'Secondary Page Header (3XL) • 34px, 500 "Medium"',size:"3xl",tag:"h2",weight:500},header:{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},descriptionHeader:{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},title:{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",weight:600},boldSubheader:{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:700},semiBoldSubheader:{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",weight:600},subheader:{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:500},boldLabel:{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:700},semiBoldLabel:{label:"Semi Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:600},label:{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:500},body:{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",weight:400},smallHeader:{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",weight:600},caption:{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",weight:400},hintText:{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",weight:400}};var zonosTextCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--zonos-elements-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--zonos-elements-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--zonos-elements-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--zonos-elements-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--zonos-elements-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--zonos-elements-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--zonos-elements-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";var ZonosTextStyle0=zonosTextCss;var ZonosText=function(){function e(e){registerInstance(this,e);this.textColor="gray-1200";this.size=undefined;this.type="body";this.weight=undefined;this.ready=false}e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){e.ready=true}),100)};e.prototype.render=function(){var e=textOptions.body,t=e.size,s=e.tag,o=e.weight;var n=textOptions[this.type],a=n.size,i=n.tag,l=n.weight;var r=this.size||a||t;var z=this.weight||l||o;var x=i||s;var g=isColorVariable(this.textColor)?"var(--zonos-elements-".concat(this.textColor,")"):this.textColor;var m=function(){switch(x){case"h2":return h("h2",null,h("slot",null));case"h3":return h("h3",null,h("slot",null));case"h4":return h("h4",null,h("slot",null));case"h5":return h("h5",null,h("slot",null));case"span":default:return h("span",null,h("slot",null))}};return h(Host,{class:classes(["zonos--elements","zonos--text-size-".concat(r),"zonos--text-weight-".concat(z)]),style:{"--color":g,"--font-family":zonosStoreFontFamily()}},m())};return e}();ZonosText.style=ZonosTextStyle0;export{ZonosText as zonos_text};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(e,r,a){if(a||arguments.length===2)for(var t=0,n=r.length,s;t<n;t++){if(s||!(t in r)){if(!s)s=Array.prototype.slice.call(r,0,t);s[t]=r[t]}}return e.concat(s||Array.prototype.slice.call(r))};import{g as getRenderingRef,f as forceUpdate}from"./index-3b46f3c3.js";var appendToMap=function(e,r,a){var t=e.get(r);if(!t){e.set(r,[a])}else if(!t.includes(a)){t.push(a)}};var debounce=function(e,r){var a;return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}if(a){clearTimeout(a)}a=setTimeout((function(){a=0;e.apply(void 0,t)}),r)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var r=0,a=e.keys();r<a.length;r++){var t=a[r];e.set(t,e.get(t).filter(isConnected))}}),2e3);var stencilSubscription=function(){if(typeof getRenderingRef!=="function"){return{}}var e=new Map;return{dispose:function(){return e.clear()},get:function(r){var a=getRenderingRef();if(a){appendToMap(e,r,a)}},set:function(r){var a=e.get(r);if(a){e.set(r,a.filter(forceUpdate))}cleanupElements(e)},reset:function(){e.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(e)}}};var unwrap=function(e){return typeof e==="function"?e():e};var createObservableMap=function(e,r){if(r===void 0){r=function(e,r){return e!==r}}var a=unwrap(e);var t=new Map(Object.entries(a!==null&&a!==void 0?a:{}));var n={dispose:[],get:[],set:[],reset:[]};var s=function(){var r;t=new Map(Object.entries((r=unwrap(e))!==null&&r!==void 0?r:{}));n.reset.forEach((function(e){return e()}))};var i=function(){n.dispose.forEach((function(e){return e()}));s()};var o=function(e){n.get.forEach((function(r){return r(e)}));return t.get(e)};var c=function(e,a){var s=t.get(e);if(r(a,s,e)){t.set(e,a);n.set.forEach((function(r){return r(e,a,s)}))}};var u=typeof Proxy==="undefined"?{}:new Proxy(a,{get:function(e,r){return o(r)},ownKeys:function(e){return Array.from(t.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,r){return t.has(r)},set:function(e,r,a){c(r,a);return true}});var v=function(e,r){n[e].push(r);return function(){removeFromArray(n[e],r)}};var f=function(r,a){var t=v("set",(function(e,t){if(e===r){a(t)}}));var n=v("reset",(function(){return a(unwrap(e)[r])}));return function(){t();n()}};var l=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var a=e.reduce((function(e,r){if(r.set){e.push(v("set",r.set))}if(r.get){e.push(v("get",r.get))}if(r.reset){e.push(v("reset",r.reset))}if(r.dispose){e.push(v("dispose",r.dispose))}return e}),[]);return function(){return a.forEach((function(e){return e()}))}};var $=function(e){var r=t.get(e);n.set.forEach((function(a){return a(e,r,r)}))};return{state:u,get:o,set:c,on:v,onChange:f,use:l,dispose:i,reset:s,forceUpdate:$}};var removeFromArray=function(e,r){var a=e.indexOf(r);if(a>=0){e[a]=e[e.length-1];e.length--}};var createStore=function(e,r){var a=createObservableMap(e,r);a.use(stencilSubscription());return a};var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function listCacheClear$1(){this.__data__=[];this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(e,r){return e===r||e!==e&&r!==r}var eq_1=eq$4;var eq$3=eq_1;function assocIndexOf$4(e,r){var a=e.length;while(a--){if(eq$3(e[a][0],r)){return a}}return-1}var _assocIndexOf=assocIndexOf$4;var assocIndexOf$3=_assocIndexOf;var arrayProto=Array.prototype;var splice=arrayProto.splice;function listCacheDelete$1(e){var r=this.__data__,a=assocIndexOf$3(r,e);if(a<0){return false}var t=r.length-1;if(a==t){r.pop()}else{splice.call(r,a,1)}--this.size;return true}var _listCacheDelete=listCacheDelete$1;var assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var r=this.__data__,a=assocIndexOf$2(r,e);return a<0?undefined:r[a][1]}var _listCacheGet=listCacheGet$1;var assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1;var assocIndexOf=_assocIndexOf;function listCacheSet$1(e,r){var a=this.__data__,t=assocIndexOf(a,e);if(t<0){++this.size;a.push([e,r])}else{a[t][1]=r}return this}var _listCacheSet=listCacheSet$1;var listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}ListCache$4.prototype.clear=listCacheClear;ListCache$4.prototype["delete"]=listCacheDelete;ListCache$4.prototype.get=listCacheGet;ListCache$4.prototype.has=listCacheHas;ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4;var ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3;this.size=0}var _stackClear=stackClear$1;function stackDelete$1(e){var r=this.__data__,a=r["delete"](e);this.size=r.size;return a}var _stackDelete=stackDelete$1;function stackGet$1(e){return this.__data__.get(e)}var _stackGet=stackGet$1;function stackHas$1(e){return this.__data__.has(e)}var _stackHas=stackHas$1;var freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var _freeGlobal=freeGlobal$1;var freeGlobal=_freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root$4=freeGlobal||freeSelf||Function("return this")();var _root=root$4;var root$3=_root;var Symbol$2=root$3.Symbol;var _Symbol=Symbol$2;var Symbol$1=_Symbol;var objectProto$a=Object.prototype;var hasOwnProperty$8=objectProto$a.hasOwnProperty;var nativeObjectToString$1=objectProto$a.toString;var symToStringTag$1=Symbol$1?Symbol$1.toStringTag:undefined;function getRawTag$1(e){var r=hasOwnProperty$8.call(e,symToStringTag$1),a=e[symToStringTag$1];try{e[symToStringTag$1]=undefined;var t=true}catch(e){}var n=nativeObjectToString$1.call(e);if(t){if(r){e[symToStringTag$1]=a}else{delete e[symToStringTag$1]}}return n}var _getRawTag=getRawTag$1;var objectProto$9=Object.prototype;var nativeObjectToString=objectProto$9.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1;var Symbol=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString;var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=Symbol?Symbol.toStringTag:undefined;function baseGetTag$4(e){if(e==null){return e===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$4;function isObject$7(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var isObject_1=isObject$7;var baseGetTag$3=_baseGetTag,isObject$6=isObject_1;var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$3(e){if(!isObject$6(e)){return false}var r=baseGetTag$3(e);return r==funcTag$1||r==genTag||r==asyncTag||r==proxyTag}var isFunction_1=isFunction$3;var root$2=_root;var coreJsData$1=root$2["__core-js_shared__"];var _coreJsData=coreJsData$1;var coreJsData=_coreJsData;var maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1;var funcProto$2=Function.prototype;var funcToString$2=funcProto$2.toString;function toSource$1(e){if(e!=null){try{return funcToString$2.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1;var isFunction$2=isFunction_1,isMasked=_isMasked,isObject$5=isObject_1,toSource=_toSource;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var funcProto$1=Function.prototype,objectProto$8=Object.prototype;var funcToString$1=funcProto$1.toString;var hasOwnProperty$7=objectProto$8.hasOwnProperty;var reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$7).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){if(!isObject$5(e)||isMasked(e)){return false}var r=isFunction$2(e)?reIsNative:reIsHostCtor;return r.test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,r){return e==null?undefined:e[r]}var _getValue=getValue$1;var baseIsNative=_baseIsNative,getValue=_getValue;function getNative$3(e,r){var a=getValue(e,r);return baseIsNative(a)?a:undefined}var _getNative=getNative$3;var getNative$2=_getNative,root$1=_root;var Map$3=getNative$2(root$1,"Map");var _Map=Map$3;var getNative$1=_getNative;var nativeCreate$4=getNative$1(Object,"create");var _nativeCreate=nativeCreate$4;var nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{};this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var r=this.has(e)&&delete this.__data__[e];this.size-=r?1:0;return r}var _hashDelete=hashDelete$1;var nativeCreate$2=_nativeCreate;var HASH_UNDEFINED$1="__lodash_hash_undefined__";var objectProto$7=Object.prototype;var hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashGet$1(e){var r=this.__data__;if(nativeCreate$2){var a=r[e];return a===HASH_UNDEFINED$1?undefined:a}return hasOwnProperty$6.call(r,e)?r[e]:undefined}var _hashGet=hashGet$1;var nativeCreate$1=_nativeCreate;var objectProto$6=Object.prototype;var hasOwnProperty$5=objectProto$6.hasOwnProperty;function hashHas$1(e){var r=this.__data__;return nativeCreate$1?r[e]!==undefined:hasOwnProperty$5.call(r,e)}var _hashHas=hashHas$1;var nativeCreate=_nativeCreate;var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,r){var a=this.__data__;this.size+=this.has(e)?0:1;a[e]=nativeCreate&&r===undefined?HASH_UNDEFINED:r;return this}var _hashSet=hashSet$1;var hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}Hash$1.prototype.clear=hashClear;Hash$1.prototype["delete"]=hashDelete;Hash$1.prototype.get=hashGet;Hash$1.prototype.has=hashHas;Hash$1.prototype.set=hashSet;var _Hash=Hash$1;var Hash=_Hash,ListCache$2=_ListCache,Map$2=_Map;function mapCacheClear$1(){this.size=0;this.__data__={hash:new Hash,map:new(Map$2||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var _isKeyable=isKeyable$1;var isKeyable=_isKeyable;function getMapData$4(e,r){var a=e.__data__;return isKeyable(r)?a[typeof r=="string"?"string":"hash"]:a.map}var _getMapData=getMapData$4;var getMapData$3=_getMapData;function mapCacheDelete$1(e){var r=getMapData$3(this,e)["delete"](e);this.size-=r?1:0;return r}var _mapCacheDelete=mapCacheDelete$1;var getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1;var getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1;var getMapData=_getMapData;function mapCacheSet$1(e,r){var a=getMapData(this,e),t=a.size;a.set(e,r);this.size+=a.size==t?0:1;return this}var _mapCacheSet=mapCacheSet$1;var mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}MapCache$1.prototype.clear=mapCacheClear;MapCache$1.prototype["delete"]=mapCacheDelete;MapCache$1.prototype.get=mapCacheGet;MapCache$1.prototype.has=mapCacheHas;MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1;var ListCache$1=_ListCache,Map$1=_Map,MapCache=_MapCache;var LARGE_ARRAY_SIZE=200;function stackSet$1(e,r){var a=this.__data__;if(a instanceof ListCache$1){var t=a.__data__;if(!Map$1||t.length<LARGE_ARRAY_SIZE-1){t.push([e,r]);this.size=++a.size;return this}a=this.__data__=new MapCache(t)}a.set(e,r);this.size=a.size;return this}var _stackSet=stackSet$1;var ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$1(e){var r=this.__data__=new ListCache(e);this.size=r.size}Stack$1.prototype.clear=stackClear;Stack$1.prototype["delete"]=stackDelete;Stack$1.prototype.get=stackGet;Stack$1.prototype.has=stackHas;Stack$1.prototype.set=stackSet;var _Stack=Stack$1;var getNative=_getNative;var defineProperty$2=function(){try{var e=getNative(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var _defineProperty=defineProperty$2;var defineProperty$1=_defineProperty;function baseAssignValue$3(e,r,a){if(r=="__proto__"&&defineProperty$1){defineProperty$1(e,r,{configurable:true,enumerable:true,value:a,writable:true})}else{e[r]=a}}var _baseAssignValue=baseAssignValue$3;var baseAssignValue$2=_baseAssignValue,eq$2=eq_1;function assignMergeValue$2(e,r,a){if(a!==undefined&&!eq$2(e[r],a)||a===undefined&&!(r in e)){baseAssignValue$2(e,r,a)}}var _assignMergeValue=assignMergeValue$2;function createBaseFor$1(e){return function(r,a,t){var n=-1,s=Object(r),i=t(r),o=i.length;while(o--){var c=i[e?o:++n];if(a(s[c],c,s)===false){break}}return r}}var _createBaseFor=createBaseFor$1;var createBaseFor=_createBaseFor;var baseFor$1=createBaseFor();var _baseFor=baseFor$1;var _cloneBuffer={exports:{}};(function(e,r){var a=_root;var t=r&&!r.nodeType&&r;var n=t&&"object"=="object"&&e&&!e.nodeType&&e;var s=n&&n.exports===t;var i=s?a.Buffer:undefined,o=i?i.allocUnsafe:undefined;function c(e,r){if(r){return e.slice()}var a=e.length,t=o?o(a):new e.constructor(a);e.copy(t);return t}e.exports=c})(_cloneBuffer,_cloneBuffer.exports);var root=_root;var Uint8Array$1=root.Uint8Array;var _Uint8Array=Uint8Array$1;var Uint8Array=_Uint8Array;function cloneArrayBuffer$1(e){var r=new e.constructor(e.byteLength);new Uint8Array(r).set(new Uint8Array(e));return r}var _cloneArrayBuffer=cloneArrayBuffer$1;var cloneArrayBuffer=_cloneArrayBuffer;function cloneTypedArray$1(e,r){var a=r?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var _cloneTypedArray=cloneTypedArray$1;function copyArray$1(e,r){var a=-1,t=e.length;r||(r=Array(t));while(++a<t){r[a]=e[a]}return r}var _copyArray=copyArray$1;var isObject$4=isObject_1;var objectCreate=Object.create;var baseCreate$1=function(){function e(){}return function(r){if(!isObject$4(r)){return{}}if(objectCreate){return objectCreate(r)}e.prototype=r;var a=new e;e.prototype=undefined;return a}}();var _baseCreate=baseCreate$1;function overArg$1(e,r){return function(a){return e(r(a))}}var _overArg=overArg$1;var overArg=_overArg;var getPrototype$2=overArg(Object.getPrototypeOf,Object);var _getPrototype=getPrototype$2;var objectProto$5=Object.prototype;function isPrototype$2(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||objectProto$5;return e===a}var _isPrototype=isPrototype$2;var baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype$1=_isPrototype;function initCloneObject$1(e){return typeof e.constructor=="function"&&!isPrototype$1(e)?baseCreate(getPrototype$1(e)):{}}var _initCloneObject=initCloneObject$1;function isObjectLike$5(e){return e!=null&&typeof e=="object"}var isObjectLike_1=isObjectLike$5;var baseGetTag$2=_baseGetTag,isObjectLike$4=isObjectLike_1;var argsTag$1="[object Arguments]";function baseIsArguments$1(e){return isObjectLike$4(e)&&baseGetTag$2(e)==argsTag$1}var _baseIsArguments=baseIsArguments$1;var baseIsArguments=_baseIsArguments,isObjectLike$3=isObjectLike_1;var objectProto$4=Object.prototype;var hasOwnProperty$4=objectProto$4.hasOwnProperty;var propertyIsEnumerable=objectProto$4.propertyIsEnumerable;var isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike$3(e)&&hasOwnProperty$4.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")};var isArguments_1=isArguments$2;var isArray$2=Array.isArray;var isArray_1=isArray$2;var MAX_SAFE_INTEGER$1=9007199254740991;function isLength$2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER$1}var isLength_1=isLength$2;var isFunction$1=isFunction_1,isLength$1=isLength_1;function isArrayLike$3(e){return e!=null&&isLength$1(e.length)&&!isFunction$1(e)}var isArrayLike_1=isArrayLike$3;var isArrayLike$2=isArrayLike_1,isObjectLike$2=isObjectLike_1;function isArrayLikeObject$1(e){return isObjectLike$2(e)&&isArrayLike$2(e)}var isArrayLikeObject_1=isArrayLikeObject$1;var isBuffer$2={exports:{}};function stubFalse(){return false}var stubFalse_1=stubFalse;(function(e,r){var a=_root,t=stubFalse_1;var n=r&&!r.nodeType&&r;var s=n&&"object"=="object"&&e&&!e.nodeType&&e;var i=s&&s.exports===n;var o=i?a.Buffer:undefined;var c=o?o.isBuffer:undefined;var u=c||t;e.exports=u})(isBuffer$2,isBuffer$2.exports);var baseGetTag$1=_baseGetTag,getPrototype=_getPrototype,isObjectLike$1=isObjectLike_1;var objectTag$1="[object Object]";var funcProto=Function.prototype,objectProto$3=Object.prototype;var funcToString=funcProto.toString;var hasOwnProperty$3=objectProto$3.hasOwnProperty;var objectCtorString=funcToString.call(Object);function isPlainObject$1(e){if(!isObjectLike$1(e)||baseGetTag$1(e)!=objectTag$1){return false}var r=getPrototype(e);if(r===null){return true}var a=hasOwnProperty$3.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&funcToString.call(a)==objectCtorString}var isPlainObject_1=isPlainObject$1;var baseGetTag=_baseGetTag,isLength=isLength_1,isObjectLike=isObjectLike_1;var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;function baseIsTypedArray$1(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(e){return function(r){return e(r)}}var _baseUnary=baseUnary$1;var _nodeUtil={exports:{}};(function(e,r){var a=_freeGlobal;var t=r&&!r.nodeType&&r;var n=t&&"object"=="object"&&e&&!e.nodeType&&e;var s=n&&n.exports===t;var i=s&&a.process;var o=function(){try{var e=n&&n.require&&n.require("util").types;if(e){return e}return i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o})(_nodeUtil,_nodeUtil.exports);var baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtil.exports;var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;var isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;var isTypedArray_1=isTypedArray$2;function safeGet$2(e,r){if(r==="constructor"&&typeof e[r]==="function"){return}if(r=="__proto__"){return}return e[r]}var _safeGet=safeGet$2;var baseAssignValue$1=_baseAssignValue,eq$1=eq_1;var objectProto$2=Object.prototype;var hasOwnProperty$2=objectProto$2.hasOwnProperty;function assignValue$1(e,r,a){var t=e[r];if(!(hasOwnProperty$2.call(e,r)&&eq$1(t,a))||a===undefined&&!(r in e)){baseAssignValue$1(e,r,a)}}var _assignValue=assignValue$1;var assignValue=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$1(e,r,a,t){var n=!a;a||(a={});var s=-1,i=r.length;while(++s<i){var o=r[s];var c=t?t(a[o],e[o],o,a,e):undefined;if(c===undefined){c=e[o]}if(n){baseAssignValue(a,o,c)}else{assignValue(a,o,c)}}return a}var _copyObject=copyObject$1;function baseTimes$1(e,r){var a=-1,t=Array(e);while(++a<e){t[a]=r(a)}return t}var _baseTimes=baseTimes$1;var MAX_SAFE_INTEGER=9007199254740991;var reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$2(e,r){var a=typeof e;r=r==null?MAX_SAFE_INTEGER:r;return!!r&&(a=="number"||a!="symbol"&&reIsUint.test(e))&&(e>-1&&e%1==0&&e<r)}var _isIndex=isIndex$2;var baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$1=isArray_1,isBuffer$1=isBuffer$2.exports,isIndex$1=_isIndex,isTypedArray$1=isTypedArray_1;var objectProto$1=Object.prototype;var hasOwnProperty$1=objectProto$1.hasOwnProperty;function arrayLikeKeys$1(e,r){var a=isArray$1(e),t=!a&&isArguments$1(e),n=!a&&!t&&isBuffer$1(e),s=!a&&!t&&!n&&isTypedArray$1(e),i=a||t||n||s,o=i?baseTimes(e.length,String):[],c=o.length;for(var u in e){if((r||hasOwnProperty$1.call(e,u))&&!(i&&(u=="length"||n&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||isIndex$1(u,c)))){o.push(u)}}return o}var _arrayLikeKeys=arrayLikeKeys$1;function nativeKeysIn$1(e){var r=[];if(e!=null){for(var a in Object(e)){r.push(a)}}return r}var _nativeKeysIn=nativeKeysIn$1;var isObject$3=isObject_1,isPrototype=_isPrototype,nativeKeysIn=_nativeKeysIn;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseKeysIn$1(e){if(!isObject$3(e)){return nativeKeysIn(e)}var r=isPrototype(e),a=[];for(var t in e){if(!(t=="constructor"&&(r||!hasOwnProperty.call(e,t)))){a.push(t)}}return a}var _baseKeysIn=baseKeysIn$1;var arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$1=isArrayLike_1;function keysIn$2(e){return isArrayLike$1(e)?arrayLikeKeys(e,true):baseKeysIn(e)}var keysIn_1=keysIn$2;var copyObject=_copyObject,keysIn$1=keysIn_1;function toPlainObject$1(e){return copyObject(e,keysIn$1(e))}var toPlainObject_1=toPlainObject$1;var assignMergeValue$1=_assignMergeValue,cloneBuffer=_cloneBuffer.exports,cloneTypedArray=_cloneTypedArray,copyArray=_copyArray,initCloneObject=_initCloneObject,isArguments=isArguments_1,isArray=isArray_1,isArrayLikeObject=isArrayLikeObject_1,isBuffer=isBuffer$2.exports,isFunction=isFunction_1,isObject$2=isObject_1,isPlainObject=isPlainObject_1,isTypedArray=isTypedArray_1,safeGet$1=_safeGet,toPlainObject=toPlainObject_1;function baseMergeDeep$1(e,r,a,t,n,s,i){var o=safeGet$1(e,a),c=safeGet$1(r,a),u=i.get(c);if(u){assignMergeValue$1(e,a,u);return}var v=s?s(o,c,a+"",e,r,i):undefined;var f=v===undefined;if(f){var l=isArray(c),$=!l&&isBuffer(c),g=!l&&!$&&isTypedArray(c);v=c;if(l||$||g){if(isArray(o)){v=o}else if(isArrayLikeObject(o)){v=copyArray(o)}else if($){f=false;v=cloneBuffer(c,true)}else if(g){f=false;v=cloneTypedArray(c,true)}else{v=[]}}else if(isPlainObject(c)||isArguments(c)){v=o;if(isArguments(o)){v=toPlainObject(o)}else if(!isObject$2(o)||isFunction(o)){v=initCloneObject(c)}}else{f=false}}if(f){i.set(c,v);n(v,c,t,s,i);i["delete"](c)}assignMergeValue$1(e,a,v)}var _baseMergeDeep=baseMergeDeep$1;var Stack=_Stack,assignMergeValue=_assignMergeValue,baseFor=_baseFor,baseMergeDeep=_baseMergeDeep,isObject$1=isObject_1,keysIn=keysIn_1,safeGet=_safeGet;function baseMerge$1(e,r,a,t,n){if(e===r){return}baseFor(r,(function(s,i){n||(n=new Stack);if(isObject$1(s)){baseMergeDeep(e,r,i,a,baseMerge$1,t,n)}else{var o=t?t(safeGet(e,i),s,i+"",e,r,n):undefined;if(o===undefined){o=s}assignMergeValue(e,i,o)}}),keysIn)}var _baseMerge=baseMerge$1;function identity$2(e){return e}var identity_1=identity$2;function apply$1(e,r,a){switch(a.length){case 0:return e.call(r);case 1:return e.call(r,a[0]);case 2:return e.call(r,a[0],a[1]);case 3:return e.call(r,a[0],a[1],a[2])}return e.apply(r,a)}var _apply=apply$1;var apply=_apply;var nativeMax=Math.max;function overRest$1(e,r,a){r=nativeMax(r===undefined?e.length-1:r,0);return function(){var t=arguments,n=-1,s=nativeMax(t.length-r,0),i=Array(s);while(++n<s){i[n]=t[r+n]}n=-1;var o=Array(r+1);while(++n<r){o[n]=t[n]}o[r]=a(i);return apply(e,this,o)}}var _overRest=overRest$1;function constant$1(e){return function(){return e}}var constant_1=constant$1;var constant=constant_1,defineProperty=_defineProperty,identity$1=identity_1;var baseSetToString$1=!defineProperty?identity$1:function(e,r){return defineProperty(e,"toString",{configurable:true,enumerable:false,value:constant(r),writable:true})};var _baseSetToString=baseSetToString$1;var HOT_COUNT=800,HOT_SPAN=16;var nativeNow=Date.now;function shortOut$1(e){var r=0,a=0;return function(){var t=nativeNow(),n=HOT_SPAN-(t-a);a=t;if(n>0){if(++r>=HOT_COUNT){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var _shortOut=shortOut$1;var baseSetToString=_baseSetToString,shortOut=_shortOut;var setToString$1=shortOut(baseSetToString);var _setToString=setToString$1;var identity=identity_1,overRest=_overRest,setToString=_setToString;function baseRest$1(e,r){return setToString(overRest(e,r,identity),e+"")}var _baseRest=baseRest$1;var eq=eq_1,isArrayLike=isArrayLike_1,isIndex=_isIndex,isObject=isObject_1;function isIterateeCall$1(e,r,a){if(!isObject(a)){return false}var t=typeof r;if(t=="number"?isArrayLike(a)&&isIndex(r,a.length):t=="string"&&r in a){return eq(a[r],e)}return false}var _isIterateeCall=isIterateeCall$1;var baseRest=_baseRest,isIterateeCall=_isIterateeCall;function createAssigner$1(e){return baseRest((function(r,a){var t=-1,n=a.length,s=n>1?a[n-1]:undefined,i=n>2?a[2]:undefined;s=e.length>3&&typeof s=="function"?(n--,s):undefined;if(i&&isIterateeCall(a[0],a[1],i)){s=n<3?undefined:s;n=1}r=Object(r);while(++t<n){var o=a[t];if(o){e(r,o,t,s)}}return r}))}var _createAssigner=createAssigner$1;var baseMerge=_baseMerge,createAssigner=_createAssigner;var merge=createAssigner((function(e,r,a){baseMerge(e,r,a)}));var merge_1=merge;var mergeConfig=function(e,r){var a=[];for(var t=2;t<arguments.length;t++){a[t-2]=arguments[t]}var n=__spreadArray([e,r],a,true).filter(Boolean);return merge_1.apply(null,n)};var _e=createStore((function(){return{appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{allowedCharacterSets:"ALL",analyticsProviders:[],orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED"},loadedConfig:false,organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:""}})),zonosStoreDispose=_e.dispose,reset=_e.reset,zonosStore=_e.state;var savedZonosSettings=null;var getZonosStoreTheme=function(e){if(e==="SYSTEM"){return window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT"}return e};var zonosStoreInitSetting=function(e){var r=e.overrideSettings,a=e.zonosSettings;var t,n,s,i;reset();if(a){savedZonosSettings=a}var o=mergeConfig(zonosStore.appearance,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.appearanceSettings)||(a===null||a===void 0?void 0:a.appearanceSettings)||null,r===null||r===void 0?void 0:r.appearance);if(o.theme==="SYSTEM"){o.theme=getZonosStoreTheme(o.theme)}zonosStore.appearance=o;zonosStore.checkoutSettings=mergeConfig(zonosStore.checkoutSettings,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.checkoutSettings)||(a===null||a===void 0?void 0:a.checkoutSettings)||null,r===null||r===void 0?void 0:r.checkoutSettings);zonosStore.helloSettings=mergeConfig(zonosStore.helloSettings,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.helloSettings)||(a===null||a===void 0?void 0:a.helloSettings)||null,r===null||r===void 0?void 0:r.helloSettings);zonosStore.loadedConfig=true;zonosStore.organizationId=((t=a===null||a===void 0?void 0:a.organization)===null||t===void 0?void 0:t.id)||"";zonosStore.organizationName=((n=a===null||a===void 0?void 0:a.organization)===null||n===void 0?void 0:n.name)||"";zonosStore.storeId=((i=(s=a===null||a===void 0?void 0:a.organization)===null||s===void 0?void 0:s.references)===null||i===void 0?void 0:i.storeId)||null;zonosStore.currencyConverter=r===null||r===void 0?void 0:r.currencyConverter;zonosStore.onCountryChange=r===null||r===void 0?void 0:r.onCountryChange;zonosStore.overrideCurrencyFormat=r===null||r===void 0?void 0:r.overrideCurrencyFormat};var zonosStoreFontFamily=function(){var e=zonosStore.appearance.fontFamily||"Inter";return e};export{_root as _,commonjsGlobal as a,zonosStoreInitSetting as b,createStore as c,zonosStoreFontFamily as d,_baseGetTag as e,isObject_1 as f,getZonosStoreTheme as g,isObjectLike_1 as i,mergeConfig as m,zonosStore as z};
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(e,r,a){if(a||arguments.length===2)for(var t=0,n=r.length,s;t<n;t++){if(s||!(t in r)){if(!s)s=Array.prototype.slice.call(r,0,t);s[t]=r[t]}}return e.concat(s||Array.prototype.slice.call(r))};import{g as getRenderingRef,f as forceUpdate}from"./index-3b46f3c3.js";var appendToMap=function(e,r,a){var t=e.get(r);if(!t){e.set(r,[a])}else if(!t.includes(a)){t.push(a)}};var debounce=function(e,r){var a;return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}if(a){clearTimeout(a)}a=setTimeout((function(){a=0;e.apply(void 0,t)}),r)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var r=0,a=e.keys();r<a.length;r++){var t=a[r];e.set(t,e.get(t).filter(isConnected))}}),2e3);var stencilSubscription=function(){if(typeof getRenderingRef!=="function"){return{}}var e=new Map;return{dispose:function(){return e.clear()},get:function(r){var a=getRenderingRef();if(a){appendToMap(e,r,a)}},set:function(r){var a=e.get(r);if(a){e.set(r,a.filter(forceUpdate))}cleanupElements(e)},reset:function(){e.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(e)}}};var unwrap=function(e){return typeof e==="function"?e():e};var createObservableMap=function(e,r){if(r===void 0){r=function(e,r){return e!==r}}var a=unwrap(e);var t=new Map(Object.entries(a!==null&&a!==void 0?a:{}));var n={dispose:[],get:[],set:[],reset:[]};var s=function(){var r;t=new Map(Object.entries((r=unwrap(e))!==null&&r!==void 0?r:{}));n.reset.forEach((function(e){return e()}))};var i=function(){n.dispose.forEach((function(e){return e()}));s()};var o=function(e){n.get.forEach((function(r){return r(e)}));return t.get(e)};var c=function(e,a){var s=t.get(e);if(r(a,s,e)){t.set(e,a);n.set.forEach((function(r){return r(e,a,s)}))}};var u=typeof Proxy==="undefined"?{}:new Proxy(a,{get:function(e,r){return o(r)},ownKeys:function(e){return Array.from(t.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,r){return t.has(r)},set:function(e,r,a){c(r,a);return true}});var v=function(e,r){n[e].push(r);return function(){removeFromArray(n[e],r)}};var f=function(r,a){var t=v("set",(function(e,t){if(e===r){a(t)}}));var n=v("reset",(function(){return a(unwrap(e)[r])}));return function(){t();n()}};var l=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var a=e.reduce((function(e,r){if(r.set){e.push(v("set",r.set))}if(r.get){e.push(v("get",r.get))}if(r.reset){e.push(v("reset",r.reset))}if(r.dispose){e.push(v("dispose",r.dispose))}return e}),[]);return function(){return a.forEach((function(e){return e()}))}};var $=function(e){var r=t.get(e);n.set.forEach((function(a){return a(e,r,r)}))};return{state:u,get:o,set:c,on:v,onChange:f,use:l,dispose:i,reset:s,forceUpdate:$}};var removeFromArray=function(e,r){var a=e.indexOf(r);if(a>=0){e[a]=e[e.length-1];e.length--}};var createStore=function(e,r){var a=createObservableMap(e,r);a.use(stencilSubscription());return a};var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function listCacheClear$1(){this.__data__=[];this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(e,r){return e===r||e!==e&&r!==r}var eq_1=eq$4;var eq$3=eq_1;function assocIndexOf$4(e,r){var a=e.length;while(a--){if(eq$3(e[a][0],r)){return a}}return-1}var _assocIndexOf=assocIndexOf$4;var assocIndexOf$3=_assocIndexOf;var arrayProto=Array.prototype;var splice=arrayProto.splice;function listCacheDelete$1(e){var r=this.__data__,a=assocIndexOf$3(r,e);if(a<0){return false}var t=r.length-1;if(a==t){r.pop()}else{splice.call(r,a,1)}--this.size;return true}var _listCacheDelete=listCacheDelete$1;var assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var r=this.__data__,a=assocIndexOf$2(r,e);return a<0?undefined:r[a][1]}var _listCacheGet=listCacheGet$1;var assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1;var assocIndexOf=_assocIndexOf;function listCacheSet$1(e,r){var a=this.__data__,t=assocIndexOf(a,e);if(t<0){++this.size;a.push([e,r])}else{a[t][1]=r}return this}var _listCacheSet=listCacheSet$1;var listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}ListCache$4.prototype.clear=listCacheClear;ListCache$4.prototype["delete"]=listCacheDelete;ListCache$4.prototype.get=listCacheGet;ListCache$4.prototype.has=listCacheHas;ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4;var ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3;this.size=0}var _stackClear=stackClear$1;function stackDelete$1(e){var r=this.__data__,a=r["delete"](e);this.size=r.size;return a}var _stackDelete=stackDelete$1;function stackGet$1(e){return this.__data__.get(e)}var _stackGet=stackGet$1;function stackHas$1(e){return this.__data__.has(e)}var _stackHas=stackHas$1;var freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var _freeGlobal=freeGlobal$1;var freeGlobal=_freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root$4=freeGlobal||freeSelf||Function("return this")();var _root=root$4;var root$3=_root;var Symbol$2=root$3.Symbol;var _Symbol=Symbol$2;var Symbol$1=_Symbol;var objectProto$a=Object.prototype;var hasOwnProperty$8=objectProto$a.hasOwnProperty;var nativeObjectToString$1=objectProto$a.toString;var symToStringTag$1=Symbol$1?Symbol$1.toStringTag:undefined;function getRawTag$1(e){var r=hasOwnProperty$8.call(e,symToStringTag$1),a=e[symToStringTag$1];try{e[symToStringTag$1]=undefined;var t=true}catch(e){}var n=nativeObjectToString$1.call(e);if(t){if(r){e[symToStringTag$1]=a}else{delete e[symToStringTag$1]}}return n}var _getRawTag=getRawTag$1;var objectProto$9=Object.prototype;var nativeObjectToString=objectProto$9.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1;var Symbol=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString;var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=Symbol?Symbol.toStringTag:undefined;function baseGetTag$4(e){if(e==null){return e===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$4;function isObject$7(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var isObject_1=isObject$7;var baseGetTag$3=_baseGetTag,isObject$6=isObject_1;var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$3(e){if(!isObject$6(e)){return false}var r=baseGetTag$3(e);return r==funcTag$1||r==genTag||r==asyncTag||r==proxyTag}var isFunction_1=isFunction$3;var root$2=_root;var coreJsData$1=root$2["__core-js_shared__"];var _coreJsData=coreJsData$1;var coreJsData=_coreJsData;var maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1;var funcProto$2=Function.prototype;var funcToString$2=funcProto$2.toString;function toSource$1(e){if(e!=null){try{return funcToString$2.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1;var isFunction$2=isFunction_1,isMasked=_isMasked,isObject$5=isObject_1,toSource=_toSource;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var funcProto$1=Function.prototype,objectProto$8=Object.prototype;var funcToString$1=funcProto$1.toString;var hasOwnProperty$7=objectProto$8.hasOwnProperty;var reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$7).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){if(!isObject$5(e)||isMasked(e)){return false}var r=isFunction$2(e)?reIsNative:reIsHostCtor;return r.test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,r){return e==null?undefined:e[r]}var _getValue=getValue$1;var baseIsNative=_baseIsNative,getValue=_getValue;function getNative$3(e,r){var a=getValue(e,r);return baseIsNative(a)?a:undefined}var _getNative=getNative$3;var getNative$2=_getNative,root$1=_root;var Map$3=getNative$2(root$1,"Map");var _Map=Map$3;var getNative$1=_getNative;var nativeCreate$4=getNative$1(Object,"create");var _nativeCreate=nativeCreate$4;var nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{};this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var r=this.has(e)&&delete this.__data__[e];this.size-=r?1:0;return r}var _hashDelete=hashDelete$1;var nativeCreate$2=_nativeCreate;var HASH_UNDEFINED$1="__lodash_hash_undefined__";var objectProto$7=Object.prototype;var hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashGet$1(e){var r=this.__data__;if(nativeCreate$2){var a=r[e];return a===HASH_UNDEFINED$1?undefined:a}return hasOwnProperty$6.call(r,e)?r[e]:undefined}var _hashGet=hashGet$1;var nativeCreate$1=_nativeCreate;var objectProto$6=Object.prototype;var hasOwnProperty$5=objectProto$6.hasOwnProperty;function hashHas$1(e){var r=this.__data__;return nativeCreate$1?r[e]!==undefined:hasOwnProperty$5.call(r,e)}var _hashHas=hashHas$1;var nativeCreate=_nativeCreate;var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,r){var a=this.__data__;this.size+=this.has(e)?0:1;a[e]=nativeCreate&&r===undefined?HASH_UNDEFINED:r;return this}var _hashSet=hashSet$1;var hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}Hash$1.prototype.clear=hashClear;Hash$1.prototype["delete"]=hashDelete;Hash$1.prototype.get=hashGet;Hash$1.prototype.has=hashHas;Hash$1.prototype.set=hashSet;var _Hash=Hash$1;var Hash=_Hash,ListCache$2=_ListCache,Map$2=_Map;function mapCacheClear$1(){this.size=0;this.__data__={hash:new Hash,map:new(Map$2||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var _isKeyable=isKeyable$1;var isKeyable=_isKeyable;function getMapData$4(e,r){var a=e.__data__;return isKeyable(r)?a[typeof r=="string"?"string":"hash"]:a.map}var _getMapData=getMapData$4;var getMapData$3=_getMapData;function mapCacheDelete$1(e){var r=getMapData$3(this,e)["delete"](e);this.size-=r?1:0;return r}var _mapCacheDelete=mapCacheDelete$1;var getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1;var getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1;var getMapData=_getMapData;function mapCacheSet$1(e,r){var a=getMapData(this,e),t=a.size;a.set(e,r);this.size+=a.size==t?0:1;return this}var _mapCacheSet=mapCacheSet$1;var mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}MapCache$1.prototype.clear=mapCacheClear;MapCache$1.prototype["delete"]=mapCacheDelete;MapCache$1.prototype.get=mapCacheGet;MapCache$1.prototype.has=mapCacheHas;MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1;var ListCache$1=_ListCache,Map$1=_Map,MapCache=_MapCache;var LARGE_ARRAY_SIZE=200;function stackSet$1(e,r){var a=this.__data__;if(a instanceof ListCache$1){var t=a.__data__;if(!Map$1||t.length<LARGE_ARRAY_SIZE-1){t.push([e,r]);this.size=++a.size;return this}a=this.__data__=new MapCache(t)}a.set(e,r);this.size=a.size;return this}var _stackSet=stackSet$1;var ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$1(e){var r=this.__data__=new ListCache(e);this.size=r.size}Stack$1.prototype.clear=stackClear;Stack$1.prototype["delete"]=stackDelete;Stack$1.prototype.get=stackGet;Stack$1.prototype.has=stackHas;Stack$1.prototype.set=stackSet;var _Stack=Stack$1;var getNative=_getNative;var defineProperty$2=function(){try{var e=getNative(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var _defineProperty=defineProperty$2;var defineProperty$1=_defineProperty;function baseAssignValue$3(e,r,a){if(r=="__proto__"&&defineProperty$1){defineProperty$1(e,r,{configurable:true,enumerable:true,value:a,writable:true})}else{e[r]=a}}var _baseAssignValue=baseAssignValue$3;var baseAssignValue$2=_baseAssignValue,eq$2=eq_1;function assignMergeValue$2(e,r,a){if(a!==undefined&&!eq$2(e[r],a)||a===undefined&&!(r in e)){baseAssignValue$2(e,r,a)}}var _assignMergeValue=assignMergeValue$2;function createBaseFor$1(e){return function(r,a,t){var n=-1,s=Object(r),i=t(r),o=i.length;while(o--){var c=i[e?o:++n];if(a(s[c],c,s)===false){break}}return r}}var _createBaseFor=createBaseFor$1;var createBaseFor=_createBaseFor;var baseFor$1=createBaseFor();var _baseFor=baseFor$1;var _cloneBuffer={exports:{}};(function(e,r){var a=_root;var t=r&&!r.nodeType&&r;var n=t&&"object"=="object"&&e&&!e.nodeType&&e;var s=n&&n.exports===t;var i=s?a.Buffer:undefined,o=i?i.allocUnsafe:undefined;function c(e,r){if(r){return e.slice()}var a=e.length,t=o?o(a):new e.constructor(a);e.copy(t);return t}e.exports=c})(_cloneBuffer,_cloneBuffer.exports);var root=_root;var Uint8Array$1=root.Uint8Array;var _Uint8Array=Uint8Array$1;var Uint8Array=_Uint8Array;function cloneArrayBuffer$1(e){var r=new e.constructor(e.byteLength);new Uint8Array(r).set(new Uint8Array(e));return r}var _cloneArrayBuffer=cloneArrayBuffer$1;var cloneArrayBuffer=_cloneArrayBuffer;function cloneTypedArray$1(e,r){var a=r?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var _cloneTypedArray=cloneTypedArray$1;function copyArray$1(e,r){var a=-1,t=e.length;r||(r=Array(t));while(++a<t){r[a]=e[a]}return r}var _copyArray=copyArray$1;var isObject$4=isObject_1;var objectCreate=Object.create;var baseCreate$1=function(){function e(){}return function(r){if(!isObject$4(r)){return{}}if(objectCreate){return objectCreate(r)}e.prototype=r;var a=new e;e.prototype=undefined;return a}}();var _baseCreate=baseCreate$1;function overArg$1(e,r){return function(a){return e(r(a))}}var _overArg=overArg$1;var overArg=_overArg;var getPrototype$2=overArg(Object.getPrototypeOf,Object);var _getPrototype=getPrototype$2;var objectProto$5=Object.prototype;function isPrototype$2(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||objectProto$5;return e===a}var _isPrototype=isPrototype$2;var baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype$1=_isPrototype;function initCloneObject$1(e){return typeof e.constructor=="function"&&!isPrototype$1(e)?baseCreate(getPrototype$1(e)):{}}var _initCloneObject=initCloneObject$1;function isObjectLike$5(e){return e!=null&&typeof e=="object"}var isObjectLike_1=isObjectLike$5;var baseGetTag$2=_baseGetTag,isObjectLike$4=isObjectLike_1;var argsTag$1="[object Arguments]";function baseIsArguments$1(e){return isObjectLike$4(e)&&baseGetTag$2(e)==argsTag$1}var _baseIsArguments=baseIsArguments$1;var baseIsArguments=_baseIsArguments,isObjectLike$3=isObjectLike_1;var objectProto$4=Object.prototype;var hasOwnProperty$4=objectProto$4.hasOwnProperty;var propertyIsEnumerable=objectProto$4.propertyIsEnumerable;var isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike$3(e)&&hasOwnProperty$4.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")};var isArguments_1=isArguments$2;var isArray$2=Array.isArray;var isArray_1=isArray$2;var MAX_SAFE_INTEGER$1=9007199254740991;function isLength$2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER$1}var isLength_1=isLength$2;var isFunction$1=isFunction_1,isLength$1=isLength_1;function isArrayLike$3(e){return e!=null&&isLength$1(e.length)&&!isFunction$1(e)}var isArrayLike_1=isArrayLike$3;var isArrayLike$2=isArrayLike_1,isObjectLike$2=isObjectLike_1;function isArrayLikeObject$1(e){return isObjectLike$2(e)&&isArrayLike$2(e)}var isArrayLikeObject_1=isArrayLikeObject$1;var isBuffer$2={exports:{}};function stubFalse(){return false}var stubFalse_1=stubFalse;(function(e,r){var a=_root,t=stubFalse_1;var n=r&&!r.nodeType&&r;var s=n&&"object"=="object"&&e&&!e.nodeType&&e;var i=s&&s.exports===n;var o=i?a.Buffer:undefined;var c=o?o.isBuffer:undefined;var u=c||t;e.exports=u})(isBuffer$2,isBuffer$2.exports);var baseGetTag$1=_baseGetTag,getPrototype=_getPrototype,isObjectLike$1=isObjectLike_1;var objectTag$1="[object Object]";var funcProto=Function.prototype,objectProto$3=Object.prototype;var funcToString=funcProto.toString;var hasOwnProperty$3=objectProto$3.hasOwnProperty;var objectCtorString=funcToString.call(Object);function isPlainObject$1(e){if(!isObjectLike$1(e)||baseGetTag$1(e)!=objectTag$1){return false}var r=getPrototype(e);if(r===null){return true}var a=hasOwnProperty$3.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&funcToString.call(a)==objectCtorString}var isPlainObject_1=isPlainObject$1;var baseGetTag=_baseGetTag,isLength=isLength_1,isObjectLike=isObjectLike_1;var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;function baseIsTypedArray$1(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(e){return function(r){return e(r)}}var _baseUnary=baseUnary$1;var _nodeUtil={exports:{}};(function(e,r){var a=_freeGlobal;var t=r&&!r.nodeType&&r;var n=t&&"object"=="object"&&e&&!e.nodeType&&e;var s=n&&n.exports===t;var i=s&&a.process;var o=function(){try{var e=n&&n.require&&n.require("util").types;if(e){return e}return i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o})(_nodeUtil,_nodeUtil.exports);var baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtil.exports;var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;var isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;var isTypedArray_1=isTypedArray$2;function safeGet$2(e,r){if(r==="constructor"&&typeof e[r]==="function"){return}if(r=="__proto__"){return}return e[r]}var _safeGet=safeGet$2;var baseAssignValue$1=_baseAssignValue,eq$1=eq_1;var objectProto$2=Object.prototype;var hasOwnProperty$2=objectProto$2.hasOwnProperty;function assignValue$1(e,r,a){var t=e[r];if(!(hasOwnProperty$2.call(e,r)&&eq$1(t,a))||a===undefined&&!(r in e)){baseAssignValue$1(e,r,a)}}var _assignValue=assignValue$1;var assignValue=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$1(e,r,a,t){var n=!a;a||(a={});var s=-1,i=r.length;while(++s<i){var o=r[s];var c=t?t(a[o],e[o],o,a,e):undefined;if(c===undefined){c=e[o]}if(n){baseAssignValue(a,o,c)}else{assignValue(a,o,c)}}return a}var _copyObject=copyObject$1;function baseTimes$1(e,r){var a=-1,t=Array(e);while(++a<e){t[a]=r(a)}return t}var _baseTimes=baseTimes$1;var MAX_SAFE_INTEGER=9007199254740991;var reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$2(e,r){var a=typeof e;r=r==null?MAX_SAFE_INTEGER:r;return!!r&&(a=="number"||a!="symbol"&&reIsUint.test(e))&&(e>-1&&e%1==0&&e<r)}var _isIndex=isIndex$2;var baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$1=isArray_1,isBuffer$1=isBuffer$2.exports,isIndex$1=_isIndex,isTypedArray$1=isTypedArray_1;var objectProto$1=Object.prototype;var hasOwnProperty$1=objectProto$1.hasOwnProperty;function arrayLikeKeys$1(e,r){var a=isArray$1(e),t=!a&&isArguments$1(e),n=!a&&!t&&isBuffer$1(e),s=!a&&!t&&!n&&isTypedArray$1(e),i=a||t||n||s,o=i?baseTimes(e.length,String):[],c=o.length;for(var u in e){if((r||hasOwnProperty$1.call(e,u))&&!(i&&(u=="length"||n&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||isIndex$1(u,c)))){o.push(u)}}return o}var _arrayLikeKeys=arrayLikeKeys$1;function nativeKeysIn$1(e){var r=[];if(e!=null){for(var a in Object(e)){r.push(a)}}return r}var _nativeKeysIn=nativeKeysIn$1;var isObject$3=isObject_1,isPrototype=_isPrototype,nativeKeysIn=_nativeKeysIn;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseKeysIn$1(e){if(!isObject$3(e)){return nativeKeysIn(e)}var r=isPrototype(e),a=[];for(var t in e){if(!(t=="constructor"&&(r||!hasOwnProperty.call(e,t)))){a.push(t)}}return a}var _baseKeysIn=baseKeysIn$1;var arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$1=isArrayLike_1;function keysIn$2(e){return isArrayLike$1(e)?arrayLikeKeys(e,true):baseKeysIn(e)}var keysIn_1=keysIn$2;var copyObject=_copyObject,keysIn$1=keysIn_1;function toPlainObject$1(e){return copyObject(e,keysIn$1(e))}var toPlainObject_1=toPlainObject$1;var assignMergeValue$1=_assignMergeValue,cloneBuffer=_cloneBuffer.exports,cloneTypedArray=_cloneTypedArray,copyArray=_copyArray,initCloneObject=_initCloneObject,isArguments=isArguments_1,isArray=isArray_1,isArrayLikeObject=isArrayLikeObject_1,isBuffer=isBuffer$2.exports,isFunction=isFunction_1,isObject$2=isObject_1,isPlainObject=isPlainObject_1,isTypedArray=isTypedArray_1,safeGet$1=_safeGet,toPlainObject=toPlainObject_1;function baseMergeDeep$1(e,r,a,t,n,s,i){var o=safeGet$1(e,a),c=safeGet$1(r,a),u=i.get(c);if(u){assignMergeValue$1(e,a,u);return}var v=s?s(o,c,a+"",e,r,i):undefined;var f=v===undefined;if(f){var l=isArray(c),$=!l&&isBuffer(c),g=!l&&!$&&isTypedArray(c);v=c;if(l||$||g){if(isArray(o)){v=o}else if(isArrayLikeObject(o)){v=copyArray(o)}else if($){f=false;v=cloneBuffer(c,true)}else if(g){f=false;v=cloneTypedArray(c,true)}else{v=[]}}else if(isPlainObject(c)||isArguments(c)){v=o;if(isArguments(o)){v=toPlainObject(o)}else if(!isObject$2(o)||isFunction(o)){v=initCloneObject(c)}}else{f=false}}if(f){i.set(c,v);n(v,c,t,s,i);i["delete"](c)}assignMergeValue$1(e,a,v)}var _baseMergeDeep=baseMergeDeep$1;var Stack=_Stack,assignMergeValue=_assignMergeValue,baseFor=_baseFor,baseMergeDeep=_baseMergeDeep,isObject$1=isObject_1,keysIn=keysIn_1,safeGet=_safeGet;function baseMerge$1(e,r,a,t,n){if(e===r){return}baseFor(r,(function(s,i){n||(n=new Stack);if(isObject$1(s)){baseMergeDeep(e,r,i,a,baseMerge$1,t,n)}else{var o=t?t(safeGet(e,i),s,i+"",e,r,n):undefined;if(o===undefined){o=s}assignMergeValue(e,i,o)}}),keysIn)}var _baseMerge=baseMerge$1;function identity$2(e){return e}var identity_1=identity$2;function apply$1(e,r,a){switch(a.length){case 0:return e.call(r);case 1:return e.call(r,a[0]);case 2:return e.call(r,a[0],a[1]);case 3:return e.call(r,a[0],a[1],a[2])}return e.apply(r,a)}var _apply=apply$1;var apply=_apply;var nativeMax=Math.max;function overRest$1(e,r,a){r=nativeMax(r===undefined?e.length-1:r,0);return function(){var t=arguments,n=-1,s=nativeMax(t.length-r,0),i=Array(s);while(++n<s){i[n]=t[r+n]}n=-1;var o=Array(r+1);while(++n<r){o[n]=t[n]}o[r]=a(i);return apply(e,this,o)}}var _overRest=overRest$1;function constant$1(e){return function(){return e}}var constant_1=constant$1;var constant=constant_1,defineProperty=_defineProperty,identity$1=identity_1;var baseSetToString$1=!defineProperty?identity$1:function(e,r){return defineProperty(e,"toString",{configurable:true,enumerable:false,value:constant(r),writable:true})};var _baseSetToString=baseSetToString$1;var HOT_COUNT=800,HOT_SPAN=16;var nativeNow=Date.now;function shortOut$1(e){var r=0,a=0;return function(){var t=nativeNow(),n=HOT_SPAN-(t-a);a=t;if(n>0){if(++r>=HOT_COUNT){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var _shortOut=shortOut$1;var baseSetToString=_baseSetToString,shortOut=_shortOut;var setToString$1=shortOut(baseSetToString);var _setToString=setToString$1;var identity=identity_1,overRest=_overRest,setToString=_setToString;function baseRest$1(e,r){return setToString(overRest(e,r,identity),e+"")}var _baseRest=baseRest$1;var eq=eq_1,isArrayLike=isArrayLike_1,isIndex=_isIndex,isObject=isObject_1;function isIterateeCall$1(e,r,a){if(!isObject(a)){return false}var t=typeof r;if(t=="number"?isArrayLike(a)&&isIndex(r,a.length):t=="string"&&r in a){return eq(a[r],e)}return false}var _isIterateeCall=isIterateeCall$1;var baseRest=_baseRest,isIterateeCall=_isIterateeCall;function createAssigner$1(e){return baseRest((function(r,a){var t=-1,n=a.length,s=n>1?a[n-1]:undefined,i=n>2?a[2]:undefined;s=e.length>3&&typeof s=="function"?(n--,s):undefined;if(i&&isIterateeCall(a[0],a[1],i)){s=n<3?undefined:s;n=1}r=Object(r);while(++t<n){var o=a[t];if(o){e(r,o,t,s)}}return r}))}var _createAssigner=createAssigner$1;var baseMerge=_baseMerge,createAssigner=_createAssigner;var merge=createAssigner((function(e,r,a){baseMerge(e,r,a)}));var merge_1=merge;var mergeConfig=function(e,r){var a=[];for(var t=2;t<arguments.length;t++){a[t-2]=arguments[t]}var n=__spreadArray([e,r],a,true).filter(Boolean);return merge_1.apply(null,n)};var _e=createStore((function(){return{appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{allowedCharacterSets:"ALL",analyticsProviders:[],orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",showForCountries:"ONLY_SHIPPABLE"},loadedConfig:false,organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:""}})),zonosStoreDispose=_e.dispose,reset=_e.reset,zonosStore=_e.state;var savedZonosSettings=null;var getZonosStoreTheme=function(e){if(e==="SYSTEM"){return window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT"}return e};var zonosStoreInitSetting=function(e){var r=e.overrideSettings,a=e.zonosSettings;var t,n,s,i;reset();if(a){savedZonosSettings=a}var o=mergeConfig(zonosStore.appearance,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.appearanceSettings)||(a===null||a===void 0?void 0:a.appearanceSettings)||null,r===null||r===void 0?void 0:r.appearance);if(o.theme==="SYSTEM"){o.theme=getZonosStoreTheme(o.theme)}zonosStore.appearance=o;zonosStore.checkoutSettings=mergeConfig(zonosStore.checkoutSettings,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.checkoutSettings)||(a===null||a===void 0?void 0:a.checkoutSettings)||null,r===null||r===void 0?void 0:r.checkoutSettings);zonosStore.helloSettings=mergeConfig(zonosStore.helloSettings,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.helloSettings)||(a===null||a===void 0?void 0:a.helloSettings)||null,r===null||r===void 0?void 0:r.helloSettings);zonosStore.loadedConfig=true;zonosStore.organizationId=((t=a===null||a===void 0?void 0:a.organization)===null||t===void 0?void 0:t.id)||"";zonosStore.organizationName=((n=a===null||a===void 0?void 0:a.organization)===null||n===void 0?void 0:n.name)||"";zonosStore.storeId=((i=(s=a===null||a===void 0?void 0:a.organization)===null||s===void 0?void 0:s.references)===null||i===void 0?void 0:i.storeId)||null;zonosStore.currencyConverter=r===null||r===void 0?void 0:r.currencyConverter;zonosStore.onCountryChange=r===null||r===void 0?void 0:r.onCountryChange;zonosStore.overrideCurrencyFormat=r===null||r===void 0?void 0:r.overrideCurrencyFormat};var zonosStoreFontFamily=function(){var e=zonosStore.appearance.fontFamily||"Inter";return e};export{_root as _,commonjsGlobal as a,zonosStoreInitSetting as b,createStore as c,zonosStoreFontFamily as d,_baseGetTag as e,isObject_1 as f,getZonosStoreTheme as g,isObjectLike_1 as i,mergeConfig as m,zonosStore as z};
|