@zonos/elements 1.3.218 → 1.3.220
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/buildCartItemsByTempCart-309fcebf.js +28 -0
- package/dist/cjs/{cart-c54d05ce.js → cart-9a9ae4b9.js} +90 -47
- package/dist/cjs/cleanHtmlMarkdown-577d0a77.js +999 -0
- package/dist/cjs/index.cjs.js +19 -9
- package/dist/cjs/isCollectMobileTablet-7a9413e3.js +175 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/localization-0169b27d.js +738 -0
- package/dist/cjs/{paypal-d36b5dd1.js → paypal-9ee374a0.js} +12 -8
- package/dist/cjs/placeTestOrder-0dfff170.js +93 -0
- package/dist/cjs/{localization-ab7e1902.js → translationStore-0c67178f.js} +1023 -734
- package/dist/cjs/zonos-address_11.cjs.entry.js +116 -74
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-banner.cjs.entry.js → zonos-banner_2.cjs.entry.js} +40 -0
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-cart-items_14.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +70 -1292
- package/dist/cjs/zonos-checkout.cjs.entry.js +25 -48
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +92 -0
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +811 -0
- package/dist/cjs/zonos-collect.cjs.entry.js +468 -0
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +168 -0
- package/dist/cjs/zonos-controller.cjs.entry.js +84 -28
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +11 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +23 -5
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +34 -33
- package/dist/cjs/zonos-hello.cjs.entry.js +8 -7
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -5
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -1
- package/dist/collection/components/checkout/zonos-collect/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/assets/empty-item.jpeg +0 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.css +60 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +39 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/RemoveIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/SuccessIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.css +90 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +405 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/chevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/globe.svg +3 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosWordmark.svg +7 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.css +152 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +164 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronUpIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.css +109 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +194 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/CheckmarkLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +98 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +369 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.css +71 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +151 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.css +78 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +115 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +349 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +547 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.css +38 -0
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +63 -0
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/assets/RemoveLineIcon.svg +3 -0
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.css +40 -0
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +102 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +8 -5
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-text/zonos-text.css +1 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +91 -25
- package/dist/collection/components/paypal/zonos-paypal-payment.js +13 -2
- package/dist/collection/components/store/checkout/cart.js +36 -15
- package/dist/collection/components/store/checkout/collect.js +160 -0
- package/dist/collection/components/store/checkout/paypal.js +4 -2
- package/dist/collection/components/store/checkout/stripe.js +31 -12
- package/dist/collection/components/store/translationStore/strings.arabic.js +51 -0
- package/dist/collection/components/store/translationStore/strings.base.js +51 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +51 -0
- package/dist/collection/components/store/translationStore/strings.french.js +51 -0
- package/dist/collection/components/store/translationStore/strings.german.js +51 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +51 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +51 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +51 -0
- package/dist/collection/components/store/translationStore.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +35 -18
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -4
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +9 -1
- package/dist/collection/components/utils/checkout/initCollect.js +15 -0
- package/dist/collection/components/utils/checkout/isCollectMobileTablet.js +10 -0
- package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -1
- package/dist/collection/components/utils/renderFallback.js +7 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +5 -1
- package/dist/collection/scripts/_zonosBase.js +7 -1
- package/dist/collection/types/checkout/api/PartyInfo.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +113 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/buildCartItemsByTempCart-c4488f73.js +26 -0
- package/dist/esm/{cart-bb0ee971.js → cart-b2dd578c.js} +68 -27
- package/dist/esm/cleanHtmlMarkdown-b5b18743.js +997 -0
- package/dist/esm/index.js +19 -9
- package/dist/esm/isCollectMobileTablet-7f9a5e2b.js +168 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/localization-d7125e4e.js +719 -0
- package/dist/esm/{paypal-bd4520eb.js → paypal-555bbf1e.js} +7 -4
- package/dist/esm/placeTestOrder-2d67c1a9.js +90 -0
- package/dist/esm/{localization-d8326254.js → translationStore-13502f49.js} +1023 -718
- package/dist/esm/zonos-address_11.entry.js +85 -43
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/{zonos-banner.entry.js → zonos-banner_2.entry.js} +40 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/{zonos-cart-items_14.entry.js → zonos-cart-items_12.entry.js} +20 -1240
- package/dist/esm/zonos-checkout.entry.js +6 -29
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +86 -0
- package/dist/esm/zonos-collect-finish_6.entry.js +802 -0
- package/dist/esm/zonos-collect.entry.js +464 -0
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-confirm-dialog_2.entry.js +163 -0
- package/dist/esm/zonos-controller.entry.js +84 -28
- package/dist/esm/zonos-country-flag.entry.js +2 -1
- package/dist/esm/zonos-country-select_4.entry.js +11 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +23 -5
- package/dist/esm/zonos-hello-dialog.entry.js +6 -5
- package/dist/esm/zonos-hello.entry.js +2 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +6 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +9 -6
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +1 -0
- package/dist/esm-es5/cart-b2dd578c.js +1 -0
- package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isCollectMobileTablet-7f9a5e2b.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-d7125e4e.js +1 -0
- package/dist/esm-es5/paypal-555bbf1e.js +17 -0
- package/dist/esm-es5/placeTestOrder-2d67c1a9.js +1 -0
- package/dist/esm-es5/translationStore-13502f49.js +1 -0
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -0
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -0
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -0
- package/dist/esm-es5/zonos-collect.entry.js +1 -0
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -0
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +470 -2
- 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-collect/zonos-collect-cart-items/zonos-collect-cart-items.d.ts +4 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +50 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.d.ts +25 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.d.ts +29 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.d.ts +62 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.d.ts +22 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.d.ts +10 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect.d.ts +86 -0
- package/dist/types/components/common/zonos-h-stack/zonos-h-stack.d.ts +9 -0
- package/dist/types/components/common/zonos-skeleton/zonos-skeleton.d.ts +17 -0
- package/dist/types/components/main/zonos-controller.d.ts +5 -0
- package/dist/types/components/paypal/zonos-paypal-payment.d.ts +3 -0
- package/dist/types/components/store/checkout/cart.d.ts +23 -3
- package/dist/types/components/store/checkout/collect.d.ts +21 -0
- package/dist/types/components/store/checkout/paypal.d.ts +4 -3
- package/dist/types/components/store/checkout/stripe.d.ts +6 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +51 -0
- package/dist/types/components/store/translationStore.d.ts +2 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +1 -2
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +3 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/initCollect.d.ts +1 -0
- package/dist/types/components/utils/checkout/isCollectMobileTablet.d.ts +4 -0
- package/dist/types/components/utils/renderFallback.d.ts +6 -0
- package/dist/types/components.d.ts +401 -2
- package/dist/types/scripts/_zonosBase.d.ts +5 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +9 -1
- package/dist/types/types/checkout/api/CreateParty.d.ts +24 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +6 -1
- package/dist/types/types/checkout/api/PartyInfo.d.ts +24 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +616 -5
- package/dist/types/types/generated/graphql.internal.types.ts +626 -6
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-7b5de646.entry.js → p-02667a58.entry.js} +1 -1
- package/dist/zonos-elements/p-031d646e.system.js +1 -0
- package/dist/zonos-elements/p-0e07e1d6.entry.js +1 -0
- package/dist/zonos-elements/p-0ef2a242.js +1 -0
- package/dist/zonos-elements/p-126087a2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c7d5d45d.entry.js → p-14f9bc8c.entry.js} +1 -1
- package/dist/zonos-elements/p-27d9abab.js +1 -0
- package/dist/zonos-elements/p-2813d72e.system.js +1 -0
- package/dist/zonos-elements/p-295d9c07.system.entry.js +1 -0
- package/dist/zonos-elements/p-29c80a34.js +1 -0
- package/dist/zonos-elements/p-2a6c964d.js +1 -0
- package/dist/zonos-elements/p-2b3c7c77.system.entry.js +1 -0
- package/dist/zonos-elements/p-2b8897d1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-544c173a.system.entry.js → p-30432622.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3462e9e4.system.entry.js +1 -0
- package/dist/zonos-elements/p-372c2fc5.entry.js +1 -0
- package/dist/zonos-elements/p-3c1b1be1.system.entry.js +1 -0
- package/dist/zonos-elements/p-40a4266f.js +1 -0
- package/dist/zonos-elements/{p-47ffacd8.system.entry.js → p-421dfb66.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-288761b1.system.entry.js → p-4f8563ad.system.entry.js} +1 -1
- package/dist/zonos-elements/p-52d35358.system.entry.js +1 -0
- package/dist/zonos-elements/p-567f7de7.entry.js +1 -0
- package/dist/zonos-elements/p-5d9410da.entry.js +1 -0
- package/dist/zonos-elements/p-637b22ee.system.entry.js +1 -0
- package/dist/zonos-elements/p-63a42823.entry.js +1 -0
- package/dist/zonos-elements/p-69451a50.system.js +1 -0
- package/dist/zonos-elements/p-6b3a0874.entry.js +1 -0
- package/dist/zonos-elements/p-73c1e91f.js +1 -0
- package/dist/zonos-elements/p-759ef3ca.entry.js +1 -0
- package/dist/zonos-elements/p-79d8c3f3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3f31901f.entry.js → p-7c4e7651.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c45cd15.entry.js → p-7d2d2c94.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ac8bfbb.system.entry.js → p-7e5bd9af.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7ecbb2cb.entry.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/p-82e88a33.system.js +1 -0
- package/dist/zonos-elements/p-849b47aa.entry.js +1 -0
- package/dist/zonos-elements/p-8dd47520.system.entry.js +1 -0
- package/dist/zonos-elements/p-932600b7.js +1 -0
- package/dist/zonos-elements/p-960e0ab1.system.entry.js +1 -0
- package/dist/zonos-elements/p-9c5b8239.system.js +1 -0
- package/dist/zonos-elements/{p-d55aec11.system.entry.js → p-9fdd3264.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a08a005d.entry.js +1 -0
- package/dist/zonos-elements/p-a10de7fb.entry.js +1 -0
- package/dist/zonos-elements/p-a49b5e7f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-62813488.entry.js → p-a5b0a636.entry.js} +1 -1
- package/dist/zonos-elements/p-a61a9b65.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d6fa2dc2.entry.js → p-a77ed1b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-eeb01de6.system.entry.js → p-a800965d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b2ae8eb7.system.js +1 -0
- package/dist/zonos-elements/p-b3d5bcf9.entry.js +1 -0
- package/dist/zonos-elements/{p-da4c01da.system.entry.js → p-b669050d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b9e9b82f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-714c28b1.system.entry.js → p-ba18c5f5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bbf48b31.entry.js +1 -0
- package/dist/zonos-elements/{p-77666360.entry.js → p-c4b3c878.entry.js} +1 -1
- package/dist/zonos-elements/p-c7b57886.js +17 -0
- package/dist/zonos-elements/p-c803753e.entry.js +1 -0
- package/dist/zonos-elements/{p-e640e8b8.entry.js → p-cbb01de9.entry.js} +1 -1
- package/dist/zonos-elements/p-ce15d62d.system.js +1 -0
- package/dist/zonos-elements/p-d291e964.system.entry.js +1 -0
- package/dist/zonos-elements/p-d3485a03.system.js +1 -0
- package/dist/zonos-elements/{p-59eaebe3.system.entry.js → p-de626806.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e5388438.system.entry.js +1 -0
- package/dist/zonos-elements/p-e77b6e42.entry.js +1 -0
- package/dist/zonos-elements/p-ea8aff21.system.js +17 -0
- package/dist/zonos-elements/{p-7ab62a26.system.entry.js → p-eb6a35ce.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-92cc26b7.system.entry.js → p-ee6f8c02.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a98b1e8d.entry.js → p-efa6203f.entry.js} +1 -1
- package/dist/zonos-elements/{p-edc77ea1.entry.js → p-f4fa8720.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebaaaee9.entry.js → p-fa90adb8.entry.js} +1 -1
- package/dist/zonos-elements/p-fe7e2dc4.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-card.cjs.entry.js +0 -49
- package/dist/esm/zonos-card.entry.js +0 -45
- package/dist/esm-es5/cart-bb0ee971.js +0 -1
- package/dist/esm-es5/localization-d8326254.js +0 -1
- package/dist/esm-es5/paypal-bd4520eb.js +0 -17
- package/dist/esm-es5/zonos-banner.entry.js +0 -1
- package/dist/esm-es5/zonos-card.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +0 -1
- package/dist/zonos-elements/p-043f57e8.system.entry.js +0 -1
- package/dist/zonos-elements/p-0631d2b9.js +0 -1
- package/dist/zonos-elements/p-0a6ac265.system.js +0 -1
- package/dist/zonos-elements/p-0f041dc5.system.entry.js +0 -1
- package/dist/zonos-elements/p-1432a217.system.entry.js +0 -1
- package/dist/zonos-elements/p-1b51b738.system.entry.js +0 -1
- package/dist/zonos-elements/p-3a1513ae.system.entry.js +0 -1
- package/dist/zonos-elements/p-3b8d11dd.entry.js +0 -1
- package/dist/zonos-elements/p-4333afcb.entry.js +0 -1
- package/dist/zonos-elements/p-4d0d89da.system.entry.js +0 -1
- package/dist/zonos-elements/p-5dd9cb44.system.entry.js +0 -1
- package/dist/zonos-elements/p-605a21ac.entry.js +0 -1
- package/dist/zonos-elements/p-674981ad.system.js +0 -1
- package/dist/zonos-elements/p-6d090b53.entry.js +0 -1
- package/dist/zonos-elements/p-73c8c551.system.entry.js +0 -1
- package/dist/zonos-elements/p-795d223d.entry.js +0 -1
- package/dist/zonos-elements/p-8218ff62.system.entry.js +0 -1
- package/dist/zonos-elements/p-82f80c8a.entry.js +0 -1
- package/dist/zonos-elements/p-88f7256d.js +0 -1
- package/dist/zonos-elements/p-8b083884.entry.js +0 -1
- package/dist/zonos-elements/p-a449940d.entry.js +0 -1
- package/dist/zonos-elements/p-a5a4ad2f.entry.js +0 -1
- package/dist/zonos-elements/p-a5d45585.system.entry.js +0 -1
- package/dist/zonos-elements/p-a751e819.system.entry.js +0 -1
- package/dist/zonos-elements/p-ad556be6.entry.js +0 -1
- package/dist/zonos-elements/p-b4792af0.entry.js +0 -1
- package/dist/zonos-elements/p-b9ff6458.entry.js +0 -1
- package/dist/zonos-elements/p-d3dbae8c.system.js +0 -1
- package/dist/zonos-elements/p-ebb9b902.system.js +0 -17
- package/dist/zonos-elements/p-ef1ce617.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef75da6f.js +0 -17
- package/dist/zonos-elements/p-f3dbe934.entry.js +0 -1
- package/dist/zonos-elements/p-f741407e.system.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-5fc34563.system.js","./p-9d863a3b.system.js","./p-23e7c655.system.js","./p-e63b8b24.system.js","./p-5a2dd041.system.js"],(function(e){"use strict";var o,s,t,r,a,n;return{setters:[function(e){o=e.r;s=e.h;t=e.H},function(e){r=e.f},function(e){a=e.c},function(e){n=e.g},function(){}],execute:function(){var i=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{border-radius:var(--zonos-elements-radius-10);padding:16px;background:var(--zonos-elements-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:0px;grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:4px}:host(.info){background-color:var(--zonos-elements-blue-100);border:1px solid var(--zonos-elements-blue-200)}:host(.success){background-color:var(--zonos-elements-green-100);border:1px solid var(--zonos-elements-green-200)}:host(.error){background-color:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host(.warning){background-color:var(--zonos-elements-orange-100);border:1px solid var(--zonos-elements-orange-200)}';var l=i;var d=e("zonos_banner",function(){function e(e){var s=this;o(this,e);this.hasContent=false;this.handleSlotChange=function(){s.hasContent=true}}e.prototype.render=function(){var e=this;var o=function(o){var t=o.color;var r="var(--zonos-elements-".concat(t,"-800)");var n="var(--zonos-elements-".concat(t,"-300)");var i=[e.bannerTitle,s("slot",{onSlotchange:e.handleSlotChange})].filter(Boolean),l=i[0],d=i[1];var c=t==="gray"?"gray-1000":"".concat(t,"-800");return s("div",{class:a(["zonos--container"])},s("div",{class:"zonos--icon-wrapper"},s("svg",{color:r,fill:"none",height:"20",viewBox:"0 0 24 24",width:"20",xmlns:"https://www.w3.org/2000/svg"},s("path",{"clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z","data-is-secondary-color":"true",fill:n,"fill-rule":"evenodd"}),s("path",{"clip-rule":"evenodd",d:"M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z",fill:"currentColor","fill-rule":"evenodd"}))),s("div",{class:"zonos--header-wrapper"},s("zonos-text",{textColor:c,type:"label",weight:600},l)),d&&s("div",{class:"zonos--content-wrapper"},s("zonos-text",{textColor:c},d)))};var n=a(["zonos--elements zonos--banner",this.intent]);var i=r();switch(this.intent){case"error":return s(t,{class:n,style:{"--zonos--font-family":i}},o({color:"red"}));case"info":return s(t,{class:n,style:{"--zonos--font-family":i}},o({color:"blue"}));case"success":return s(t,{class:n,style:{"--zonos--font-family":i}},o({color:"green"}));case"warning":return s(t,{class:n,style:{"--zonos--font-family":i}},o({color:"orange"}));default:return s(t,{class:n,style:{"--zonos--font-family":i}},o({color:"gray"}))}};return e}());d.style=l;var c=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var h=c;var f=e("zonos_card",function(){function e(e){o(this,e);this.borderRadius=6;this.spacing="24px"}e.prototype.render=function(){var e=this.backgroundColor?"var(--zonos-elements-".concat(this.backgroundColor,")"):"transparent";var o=n({customRoundRadius:"".concat(this.borderRadius,"px"),overrideBorderStyle:"ROUNDED"});return s(t,{key:"9423d1472ed313f50c5f4ecc61251025ac6083ed",style:{"--zonos--font-family":r()}},s("div",{key:"7d2506d2fa9297dce93676bd09dd854a84f27db3",class:a(["styled-card"]),style:{"--zonos--background-color":e,"--zonos--border-radius":o,padding:this.spacing}},this.label&&s("header",{key:"81e381540ecbd5c398e5cabf6626d701569e16e5",class:"card-header",style:{padding:this.spacing}},s("zonos-text",{key:"7929725b31dec41dbab855daa3bd7ae97fb00eb3",type:"subheader"},this.label),s("h-stack",{key:"c69fe767e575b3aaf824eb355d7bb35e395ba77a",spacing:8},this.actions)),s("slot",{key:"ada30bc1760b957a817e0982e46f3def97974297"}),(this.footerActions||this.footerContent)&&s("footer",{key:"854c3d583cb293f5c064af87e839641a5201c900",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},s("div",{key:"0a799500938f8d04a8551134b21fe18a05f93de0"},this.footerContent),s("h-stack",{key:"927b51384452ab01b28da02c9a83256ab7dc6991",spacing:8},this.footerActions))))};return e}());f.style=h}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=t=>{const e=t.items.map((t=>({amount:t.amount,attributes:t.attributes||[],countryOfOrigin:t.countryOfOrigin||void 0,currencyCode:t.currencyCode,description:t.description||"",imageUrl:t.imageUrl||"",itemType:t.itemType||"PHYSICAL_GOOD",measurements:t.measurements||[],name:t.name||t.description||"",productId:t.productId||"",quantity:t.quantity||0,sku:t.sku||""})))||[];return{adjustments:t.adjustments,cartItems:e}};export{t as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e,c as t}from"./p-7ce093aa.js";import{s as o,l as n,f as s,b as r}from"./p-40a4266f.js";import{t as i}from"./p-27d9abab.js";import{l as a,f as d,h as l,g as c,a as u,s as m,d as p,b as v,j as h}from"./p-a8a312b2.js";import{i as y}from"./p-56e0ed65.js";import{g}from"./p-2b9c124d.js";const w=({firstName:e,lastName:t,name:o})=>{var n;if(!o&&!e&&!t)return{firstName:"",lastName:""};const s=(null==o?void 0:o.split(/\s+/))||[];return{firstName:(null==e?void 0:e.trim())||(null===(n=s[0])||void 0===n?void 0:n.trim())||"",lastName:(null==t?void 0:t.trim())||s.slice(1).join(" ").trim()||""}},f=({currentAddress:e,translatedAddress:t})=>{var o,n,s,r,i,a;const{city:d,country:l,line1:c,line2:u,postal_code:m,state:p}=e.value.address,v=e.value.name||[e.value.firstName,e.value.lastName].join(" ");return{city:(null===(o=t.city)||void 0===o?void 0:o[d])||d,country:l,line1:(null===(n=t.line1)||void 0===n?void 0:n[c])||c,line2:(null===(s=t.line2)||void 0===s?void 0:s[u||""])||u||"",name:(null===(r=t.name)||void 0===r?void 0:r[v])||v,phone:e.value.phone||"",postal_code:(null===(i=t.postal_code)||void 0===i?void 0:i[m])||m,state:(null===(a=t.state)||void 0===a?void 0:a[p])||p}},b=e=>{var t;const n="1"===new URLSearchParams(window.location.search).get("zonosE2ETest"),s=P.stripeLinkEventData,r=P.stripeAddressEventData,i=P.stripeShippingSameAsBilling?P.stripeAddressEventData:P.stripeBillingAddressEventData;if(!r||!i)throw new Error("Missing stripe address data");const a=f({currentAddress:r,translatedAddress:P.translatedAddress.address}),{firstName:d,lastName:l}=w({name:a.name}),c=f({currentAddress:i,translatedAddress:P.translatedAddress.address}),{firstName:u,lastName:m}=w({name:c.name});return{billingAddress:{addressLine1:c.line1,addressLine2:c.line2||"",city:c.city,country:c.country,postalCode:c.postal_code,state:c.state},billingContact:{firstName:u,lastName:m,phone:c.phone},cartCurrencyCode:null===(t=ne.items[0])||void 0===t?void 0:t.currencyCode,cartId:e,checkoutSessionId:o.checkoutSessionId||"",contact:{companyName:P.companyName,email:null==s?void 0:s.value.email,firstName:d,lastName:l,phone:a.phone},isTest:!!n,landedCostAdjustments:ne.promoCode?[{amount:0,productId:null,promoCode:ne.promoCode,sku:null,type:"PROMO_CODE"}]:[],shipToTaxId:P.taxId,shippingAddress:{addressLine1:a.line1,addressLine2:a.line2,city:a.city,country:a.country,postalCode:a.postal_code,state:a.state}}},S=()=>{const e="1"===new URLSearchParams(window.location.search).get("zonosE2ETest"),t=P.stripeLinkEventData,n=P.stripeAddressEventData,s=P.stripeShippingSameAsBilling?P.stripeAddressEventData:P.stripeBillingAddressEventData;if(a({stripeAddressData:n,stripeBillingAddressData:s},"info"),!n||!s)throw new Error("Missing stripe address data");const r=f({currentAddress:n,translatedAddress:P.translatedAddress.address}),{firstName:i,lastName:d}=w({name:r.name}),l=f({currentAddress:s,translatedAddress:P.translatedAddress.address}),{firstName:c,lastName:u}=w({name:l.name}),m=ne.adjustments.map((e=>({amount:e.amount,name:e.description||null,productId:e.productId,sku:e.sku,type:e.type}))),p=ne.promoCode?[{amount:0,productId:null,promoCode:ne.promoCode,sku:null,type:"PROMO_CODE"},...m]:m;return{billingAddress:{addressLine1:l.line1,addressLine2:l.line2||"",city:l.city,country:l.country,postalCode:l.postal_code,state:l.state},billingContact:{firstName:c,lastName:u,phone:l.phone},checkoutSessionId:o.checkoutSessionId||"",contact:{companyName:P.companyName,email:null==t?void 0:t.value.email,firstName:i,lastName:d,phone:r.phone},isTest:e,items:ne.items,landedCostAdjustments:p,shipToTaxId:P.taxId,shippingAddress:{addressLine1:r.line1,addressLine2:r.line2,city:r.city,country:r.country,postalCode:r.postal_code,state:r.state}}};const C=async t=>{const o=window.Zonos.cartId;if(!o)return await(async t=>{var o;const n=e.checkoutSettings.buildLandedCost;if(n){const e=await(async e=>{var t,o,n,s,r;const i=S(),a=await e({billingAddress:i.billingAddress,billingContact:i.billingContact,checkoutSessionId:i.checkoutSessionId,contact:i.contact,landedCostAdjustments:i.landedCostAdjustments,publicCredential:window.Zonos.zonosApiKey||"",shippingAddress:i.shippingAddress,zonosApiRoute:d.vercel});if(!a||!(null===(t=a.checkoutSessionWorkflow)||void 0===t?void 0:t.length)&&(null===(o=a.errors)||void 0===o?void 0:o.length))throw new Error(`Failed to build landed cost: ${(null===(s=null===(n=null==a?void 0:a.errors)||void 0===n?void 0:n[0])||void 0===s?void 0:s.message)||"Unknown error"}`);const{errors:c,json:u}=await l("/api/zonos-elements/validate-landed-cost",{body:a,headers:{"Content-Type":"application/json"},method:"POST"});if(!u||c.length)throw new Error(`Invalid landed cost object: ${(null===(r=c.find(Boolean))||void 0===r?void 0:r.message)||"Unknown error"}`);return a})(n);return e}const{errors:s,json:r}=await l("/api/zonos-elements/calculate-landed-cost",{body:S(),method:"POST",signal:null==t?void 0:t.signal});if(s.length||!r){if("The user aborted a request."===(null===(o=s[0])||void 0===o?void 0:o.message))throw new Error("The landed cost calculation request was aborted to initiate a new one.");if(s.forEach((e=>{console.warn(`Error calculating landed cost: ${e.message}`)})),!r)throw new Error("Failed to calculate landed cost");return r}return r})(t);const n=await(async({abortController:e,cartId:t})=>{var o,n,s,r,i;const{errors:a,json:d}=await l("/api/zonos-elements/cart-calculate-landed-cost",{body:b(t),method:"POST",signal:null==e?void 0:e.signal});if(a.length||!d){const e="string"==typeof(null===(o=a[0])||void 0===o?void 0:o.message)&&("The user aborted a request."===(null===(n=a[0])||void 0===n?void 0:n.message)||(null===(s=a[0])||void 0===s?void 0:s.message.includes("signal is aborted"))||(null===(r=a[0])||void 0===r?void 0:r.message.includes("The operation was aborted"))||(null===(i=a[0])||void 0===i?void 0:i.message.includes("Fetch is aborted")));throw new Error(e?"The landed cost calculation request was aborted to initiate a new one.":"Failed to calculate landed cost")}return d})({abortController:t,cartId:o}),{cartWorkflow:s}=n,r=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(o[n[s]]=e[n[s]])}return o}(n,["cartWorkflow"]);return Object.assign(Object.assign({},r),{itemCreateWorkflow:s.items})},O=async({checkoutSessionId:t,eventName:o,metadata:s})=>{var r,i;const a=Date.now(),d=[...window.Zonos.trackEventLogs];window.Zonos.trackEventLogs.push({checkoutSessionId:t,eventCreated:a,eventName:o});const v=window.location.href.includes("zonos.com")&&!window.location.href.includes("checkout.zonos.com")||!!(null===(r=window.Zonos)||void 0===r?void 0:r.zonosQaUrl)||!!(null===(i=window.Zonos)||void 0===i?void 0:i.debug);if((c()||u()||v)&&!window.Zonos.zonosConversionTest)return;const h=n.selectedCountryCode,y=e.organizationId;if(!t)return void m({endpoint:"trackConversionEventMetric",errors:[`Event "${o}" - No checkout session id found`],metadata:{allLogs:p,checkoutSessionId:t,eventName:o,metadata:s,organizationId:y,trackEventLogs:d}});y||m({endpoint:"trackConversionEventMetric",errors:[`Event "${o}" - No organization id found`],metadata:{allLogs:p,checkoutSessionId:t,eventName:o,metadata:s,organizationId:y,trackEventLogs:d}});const g={checkoutSessionId:t,countryCode:h,eventCreated:a,eventName:o,metadata:Object.assign(Object.assign({},s),{trackEventLogs:d}),organizationId:y};await l("/api/zonos-elements/track-conversion-event",{body:g,method:"POST"})},A=({address:e,invalidAdddressList:t})=>{if(!e)return;if(!t)return;const o={};return t.city&&(o.city=e.city),t.line1&&(o.line1=e.line1),t.line2&&(o.line2=e.line2),t.postal_code&&(o.postal_code=e.postal_code),t.state&&(o.state=e.state),t.name&&(o.name=e.name),Object.keys(o).length?o:void 0},k=e=>e.sort(((e,t)=>e.amount-t.amount)),I=async()=>{var e;const{errors:t,json:n}=await(async()=>{if(!o.checkoutSessionId)return{errors:[{message:"No checkout session id found"}],json:null};const e=new URLSearchParams;e.set("checkoutSessionId",o.checkoutSessionId);const{errors:t,json:n}=await l(`/api/zonos-elements/get-checkout-session?${e.toString()}`);return{errors:t,json:n}})();return t.length||!n?(v("Failed to retrieve checkout session info before confirming payment ",t),m({endpoint:"validateCheckoutSession",errors:t.map((e=>e.message)),metadata:{allLogs:p}}),{errorMessage:i("Unable to retrieve the checkout session at the moment. Please try again or contact our support team."),valid:!1}):(null===(e=n.checkoutSession.landedCost)||void 0===e?void 0:e.id)?{errorMessage:"",valid:!0}:(v("Landed cost is not found in the checkout session before confirming payment."),m({endpoint:"validateCheckoutSession",errors:["No landed cost found before confirming payment"],metadata:{allLogs:p}}),{errorMessage:i('No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.'),valid:!1})},N=({theme:t})=>{const o={".AccordionItem":{color:"var(--colorText)"},".AccordionItem--selected":{color:"var(--colorText)"},".Action":{color:"var(--colorText)"},".Input":{boxShadow:"none",fontSize:e.appearance.fontSizeInputValue?`${e.appearance.fontSizeInputValue}px`:void 0,padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"},".Label--resting":{fontSize:e.appearance.fontSizeInputLabel?`${e.appearance.fontSizeInputLabel}px`:void 0},".PickerItem--highlight":{boxShadow:"0 0 0 2px var(--colorBackground)"},".PickerItem--highlight:hover":{backgroundColor:"var(--colorBackground)",boxShadow:"none"},".PickerItem--new":{color:"var(--colorText)"},".Tab--selected":{borderStyle:"solid",borderWidth:"1px"}};return"DARK"===t?Object.assign(Object.assign({},o),{".Action":Object.assign(Object.assign({},o[".Action"]),{color:"white"}),".PickerItem--new":Object.assign(Object.assign({},o[".PickerItem--new"]),{color:"white"})}):o},j=({borderStyle:e,theme:t})=>"DARK"===t?{borderRadius:g({overrideBorderStyle:e}),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"}:{borderRadius:g({overrideBorderStyle:e}),iconMenuColor:"var(--colorText)",iconMenuHoverColor:"var(--colorText)"},{onChange:T,reset:E,state:P}=t((()=>({checkoutSettlementCurrency:"USD",clientSecret:sessionStorage.getItem("zonos--client-secret")||"",companyName:"",companyNameUsedWhenAsyncAddressUpdate:"",customAddressErrors:{city:"",firstName:"",lastName:"",line1:"",phone:"",postalCode:"",showError:!1,state:""},customBillingAddressErrors:{city:"",firstName:"",lastName:"",line1:"",phone:"",postalCode:"",showError:!1,state:""},customErrorMessage:null,customerProfile:null,fetchingLandedCostAbortController:null,hasPaymentError:!1,isFetchingLandedCost:!1,isFetchingSession:!1,partyBillingId:null,partyShippingId:null,shouldInventoryRefund:!1,shouldRenderPayInUsdButton:!1,skipPaymentIntent:"0"!==new URLSearchParams(window.location.search).get("skipPaymentIntent"),stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenAsyncAddressUpdate:null,stripeAddressUsedWhenFetchingLC:null,stripeAddressUsedWhenValidatingAddress:null,stripeBillingAddressElement:null,stripeBillingAddressEventData:null,stripeBillingAddressUsedWhenAsyncAddressUpdate:null,stripeBillingAddressUsedWhenFetchingLC:null,stripeBillingAddressUsedWhenValidatingAddress:null,stripeCustomerSessionClientSecret:null,stripeElements:null,stripeElementsForBillingAddress:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null,stripeShippingSameAsBilling:!0,taxId:"",taxIdUsedWhenAsyncAddressUpdate:"",translatedAddress:{address:{},billingAddress:{},firstName:{},lastName:{},name:{}}}))),L=()=>{window.sessionStorage.removeItem("zonos--bigcommerce-domestic-checkout-shipping")},D=e=>{window.sessionStorage.setItem("zonos--bigcommerce-domestic-checkout-shipping",JSON.stringify(e))},x=()=>{const e=window.sessionStorage.getItem("zonos--bigcommerce-domestic-checkout-shipping");return h(e)},R=async t=>{var o,s;const r=P.clientSecret;if(!P.stripe)return void a("Skip. Stripe is not initialized");const i=(({clientSecret:t,overrideBorderRadius:o,overridePrimaryColor:s,overrideSecondaryColor:r,overrideTheme:i,paypalEnabled:a})=>{const d=s||e.appearance.colorPrimary,l=r||e.appearance.colorSecondary,c=d&&y(d)?"night":"flat",u="DARK"===i?"night":"flat",m=a?["external_paypal"]:[];return{appearance:{labels:"floating",rules:Object.assign({},N({theme:i||"LIGHT"})),theme:i?u:c,variables:Object.assign(Object.assign({},j({borderStyle:o,theme:"LIGHT"})),{colorPrimary:l})},clientSecret:t||void 0,customerSessionClientSecret:P.stripeCustomerSessionClientSecret||void 0,externalPaymentMethodTypes:[...m],locale:n.selectedLocale}})({clientSecret:r,overrideBorderRadius:null==t?void 0:t.overrideBorderRadius,overridePrimaryColor:null==t?void 0:t.overridePrimaryColor,overrideSecondaryColor:null==t?void 0:t.overrideSecondaryColor,overrideTheme:null==t?void 0:t.overrideTheme,paypalEnabled:null==t?void 0:t.paypalEnabled}),d=JSON.stringify(i)===JSON.stringify(P.stripeElementsOptions);if(!P.stripeElements||!P.stripeElementsForBillingAddress)return P.stripeElementsForBillingAddress=null===(o=P.stripe)||void 0===o?void 0:o.elements(i),a("Stripe elements for billing address initialized"),P.stripeElements=null===(s=P.stripe)||void 0===s?void 0:s.elements(i),P.stripeElementsOptions=i,void a("Stripe elements initialized");d||(P.stripeElements.update(i),P.stripeElementsForBillingAddress.update(i),P.stripeElementsOptions=i,P.stripeElements.fetchUpdates()),a("Stripe elements updated")},_=()=>{sessionStorage.removeItem("zonos--client-secret"),E(),P.stripe=window.Zonos.stripe},z=({address:e,firstName:t,lastName:n,name:s,phone:r})=>{const{firstName:i,lastName:a}=w({firstName:t,lastName:n,name:s});return i&&a||m({endpoint:"PARTY_CREATE_NO_NAME_FOUND",errors:["No name found"],metadata:{allLogs:p,cartId:window.Zonos.cartId,checkoutSessionId:o.checkoutSessionId,firstName:t,lastName:n,name:s}}),r||m({endpoint:"PARTY_CREATE_NO_PHONE_FOUND",errors:["No phone found"],metadata:{allLogs:p,cartId:window.Zonos.cartId,checkoutSessionId:o.checkoutSessionId,phone:r}}),{city:e.city,country:e.country,firstName:i,lastName:a,line1:e.line1,line2:e.line2,phone:r||"",postal_code:e.postal_code,state:e.state}},U=async()=>{var e,t,n,s;if(!(null===(e=P.stripeAddressEventData)||void 0===e?void 0:e.complete)||!P.stripeShippingSameAsBilling&&!(null===(t=P.stripeBillingAddressEventData)||void 0===t?void 0:t.complete)||!P.stripeBillingAddressEventData)return{partiesCreated:!1};if(!ne.landedCostData)return{partiesCreated:!1};const r=null===(n=ne.landedCostData.find(Boolean))||void 0===n?void 0:n.landedCost.rootId;if(!r)return m({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:p,cartId:window.Zonos.cartId,checkoutSessionId:o.checkoutSessionId}}),{partiesCreated:!1};const i=(()=>{var e,t,o,n,s,r;const i=JSON.stringify(null===(e=P.stripeLinkUsedWhenFetchingLC)||void 0===e?void 0:e.value)!==JSON.stringify(null===(t=P.stripeLinkEventData)||void 0===t?void 0:t.value),a=JSON.stringify(null===(o=P.stripeAddressUsedWhenAsyncAddressUpdate)||void 0===o?void 0:o.value)!==JSON.stringify(null===(n=P.stripeAddressEventData)||void 0===n?void 0:n.value),d=!P.stripeShippingSameAsBilling&&JSON.stringify(null===(s=P.stripeBillingAddressUsedWhenAsyncAddressUpdate)||void 0===s?void 0:s.value)!==JSON.stringify(null===(r=P.stripeBillingAddressEventData)||void 0===r?void 0:r.value);return i||a||d||P.taxIdUsedWhenAsyncAddressUpdate!==P.taxId||P.companyNameUsedWhenAsyncAddressUpdate!==P.companyName})();if(!i)return{partiesCreated:!1};const a=z({address:P.stripeAddressEventData.value.address,firstName:P.stripeAddressEventData.value.firstName,lastName:P.stripeAddressEventData.value.lastName,name:P.stripeAddressEventData.value.name,phone:P.stripeAddressEventData.value.phone}),d=P.stripeShippingSameAsBilling?a:z({address:P.stripeBillingAddressEventData.value.address,firstName:P.stripeBillingAddressEventData.value.firstName,lastName:P.stripeBillingAddressEventData.value.lastName,name:P.stripeBillingAddressEventData.value.name,phone:P.stripeBillingAddressEventData.value.phone}),c="1"===new URLSearchParams(window.location.search).get("zonosE2ETest"),{errors:u,json:h}=await l("/api/zonos-elements/create-parties",{body:{address:a,billingAddress:d,companyName:P.companyName,email:(null===(s=P.stripeLinkEventData)||void 0===s?void 0:s.value.email)||"",isTest:c,rootId:r,taxId:P.taxId},method:"POST"});return u.length||!h?(v("Error occurs when creating parties",JSON.stringify(u,null,2)),m({endpoint:"PF_PARTY_CREATE_FAILED",errors:["Failed to create parties"],metadata:{allLogs:p,cartId:window.Zonos.cartId,checkoutSessionId:o.checkoutSessionId,errors:u,json:h}}),{partiesCreated:!1}):(P.companyNameUsedWhenAsyncAddressUpdate=P.companyName,P.stripeAddressUsedWhenAsyncAddressUpdate=P.stripeAddressEventData,P.stripeBillingAddressUsedWhenAsyncAddressUpdate=P.stripeBillingAddressEventData,P.taxIdUsedWhenAsyncAddressUpdate=P.taxId,P.partyBillingId=h.billToPartyId,P.partyShippingId=h.shipToPartyId,{partiesCreated:!0})},B=e=>({countryCode:e.address.country,postalCode:e.address.postal_code,state:e.address.state}),F=async t=>{var n,s,r,i;const d=(null==t?void 0:t.retries)||0,l=!!(null==t?void 0:t.applyingPromocode),c=(()=>{var e;const t=ne.landedCostData&&(null===(e=ne.landedCostData.find(Boolean))||void 0===e?void 0:e.subtotals.items)!==ne.subtotal,o=(()=>{var e,t;const o=JSON.stringify(null===(e=P.stripeLinkUsedWhenFetchingLC)||void 0===e?void 0:e.value)!==JSON.stringify(null===(t=P.stripeLinkEventData)||void 0===t?void 0:t.value),n=P.stripeAddressEventData&&JSON.stringify(B(P.stripeAddressEventData.value))!==JSON.stringify(P.stripeAddressUsedWhenFetchingLC),s=!P.stripeShippingSameAsBilling&&P.stripeBillingAddressEventData&&JSON.stringify(B(P.stripeBillingAddressEventData.value))!==JSON.stringify(P.stripeBillingAddressUsedWhenFetchingLC);return o||n||s})();return a("isPrefetchInfoOutdated","info",{isAddressOutdated:o}),!ne.landedCostData&&!P.isFetchingLandedCost||o||t})();if(!(()=>{var t,o,n,s;const r=!!(null===(t=P.stripeLinkEventData)||void 0===t?void 0:t.complete),i=!!(null===(o=P.stripeAddressEventData)||void 0===o?void 0:o.complete),a=P.stripeShippingSameAsBilling?i:!!(null===(n=P.stripeBillingAddressEventData)||void 0===n?void 0:n.complete),d=(t=>{var o,n;const s=null===(o=e.genericSettings)||void 0===o?void 0:o.countryFields,r=null===(n=e.genericSettings)||void 0===n?void 0:n.stripeCountryFieldLabels;return"stripe"===ne.addressFormRenderType&&(r&&t in r?r[t]:null)||(s&&t in s?s[t]:null)})((null===(s=P.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)||"US");return!!(i&&a&&r)||(d&&P.stripeAddressEventData?r&&P.stripeAddressEventData.value.firstName&&P.stripeAddressEventData.value.lastName&&P.stripeAddressEventData.value.address.line1.length>0&&(!d.stateRequired||d.stateRequired&&P.stripeAddressEventData.value.address.state.length>0)&&(!d.zipRequired||d.zipRequired&&P.stripeAddressEventData.value.address.postal_code.length>=3)&&P.stripeAddressEventData.value.phone&&P.stripeAddressEventData.value.phone.length>0:i&&a&&r)})())return{isRequestNotReady:!0};if(c&&(null===(n=P.fetchingLandedCostAbortController)||void 0===n||n.abort(),P.fetchingLandedCostAbortController=null),!c&&!l)return{isRequestNotReady:!1};d?(P.isFetchingLandedCost=!1,setTimeout((()=>{P.isFetchingLandedCost=!0}),300)):P.isFetchingLandedCost=!0,P.stripeAddressEventData&&(P.stripeAddressUsedWhenFetchingLC={countryCode:P.stripeAddressEventData.value.address.country,postalCode:P.stripeAddressEventData.value.address.postal_code,state:P.stripeAddressEventData.value.address.state}),P.stripeBillingAddressEventData&&(P.stripeBillingAddressUsedWhenFetchingLC={countryCode:P.stripeBillingAddressEventData.value.address.country,postalCode:P.stripeBillingAddressEventData.value.address.postal_code,state:P.stripeBillingAddressEventData.value.address.state}),P.stripeLinkEventData&&(P.stripeLinkUsedWhenFetchingLC=Object.assign({},P.stripeLinkEventData));try{we(),await(async()=>{var e;const t=new AbortController;P.fetchingLandedCostAbortController=t,we();const{checkoutSessionWorkflow:n,errors:s,itemCreateWorkflow:r,landedCostCalculateWorkflow:i,partyCreateWorkflow:a,shipmentRatingCalculateWorkflow:d}=await C(t);ne.customQuotingError=(null===(e=null==s?void 0:s.find((e=>{var t;return"CUSTOM"===(null===(t=e.extensions)||void 0===t?void 0:t.ruleMessageType)})))||void 0===e?void 0:e.message)||null,ne.shippingData=k((null==d?void 0:d.filter(Boolean))||[]),ae(r),P.fetchingLandedCostAbortController=null,ne.partiesData=(null==a?void 0:a.filter(Boolean))||[],ne.landedCostData=(null==n?void 0:n.map((e=>{const t=null==i?void 0:i.find((t=>(null==t?void 0:t.id)===e.landedCostId));return t?Object.assign(Object.assign({},e),{landedCost:t}):null})).filter(Boolean))||[],(null==n?void 0:n.length)&&O({checkoutSessionId:o.checkoutSessionId,eventName:"checkout_quoteReceived"});const l=ne.promoCodeApplied&&!ne.landedCostData.find((e=>{var t;return null===(t=e.landedCost.appliedAdjustments)||void 0===t?void 0:t.find((e=>"PROMO_CODE"===e.type))}));ne.promoCodeError=l,l||sessionStorage.setItem("zonos--promo-code",ne.promoCode)})();const e=null===(s=ne.shippingData)||void 0===s?void 0:s.find(Boolean),t=null===(r=ne.landedCostData)||void 0===r?void 0:r.find((t=>t.landedCost.shipmentRating.id===(null==e?void 0:e.id))),n=t?t.subtotals:null;n&&ce({method:(null==t?void 0:t.landedCost.method)||"DDP",subtotals:n})}catch(e){if(ne.landedCostData=[],ne.shippingData=[],e instanceof Error&&e.message&&!["The landed cost calculation request was aborted to initiate a new one."].includes(e.message)){if(d<1)return await F(Object.assign(Object.assign({},t),{retries:(d||0)+1})),{isRequestNotReady:!1};const o=null===(i=P.stripeAddressEventData)||void 0===i?void 0:i.value;m({endpoint:`Failed to fetch landed cost (${d} retries)`,errors:[e.message],metadata:{cartId:window.Zonos.cartId,shipToAddress:o}})}v(e)}return P.isFetchingLandedCost=!1,{isRequestNotReady:!1}},J=async()=>{var e,t;await F({applyingPromocode:!0}),"payment"===ne.step&&be(),await U();const o=null===(e=ne.shippingData)||void 0===e?void 0:e.find(Boolean),n=null===(t=ne.landedCostData)||void 0===t?void 0:t.find((e=>e.landedCost.id===(null==o?void 0:o.id)));o&&n&&await he({applySubtotalsOnly:!1,landedCostId:n.landedCostId,selectedShippingOption:o})},M=()=>{ne.promoCode="",sessionStorage.removeItem("zonos--promo-code"),ne.promoCodeError=!1,ne.promoCodeApplied=!1},W=async()=>{"payment"===ne.step&&be(),M(),await J()},$=e=>{let t=[],o=!0;const n=window.Zonos.isCollect;switch(e){case"succeeded":t=[i("Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us."),"",i("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.")],n&&(t=[i("Thank you for submitting your payment. We appreciate your prompt attention."),"",i("A confirmation email with your payment details has been sent for your records. If you have any questions or need support, our team is here to help.")]),o=!1;break;case"requires_capture":case"processing":t=[i("Payment processing. We'll update you when payment is received.")],o=!1;break;case"requires_payment_method":t=[i("Payment failed. Please try another payment method.")],n&&(t=[i("Payment failed. Please reload the page and try another payment method.")]);break;case"requires_action":o=!1,t=[i("Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.")];default:t=[i("Something went wrong.")]}return{isError:o,messages:t}},q=async()=>{var t,o;const{onInventoryCheck:n}=e.checkoutSettings,s=!!(null===(o=null===(t=window.Zonos.cartData)||void 0===t?void 0:t.metadata.find((e=>"referenceId"===e.key)))||void 0===o?void 0:o.value);if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData&&s){const{errors:e,json:t}=await l("/api/zonos-elements/legacy/inventory-check",{body:{cartData:window.Zonos.cartData},method:"POST"});return e.length||!t?(v("Error occurs when handling inventory refund","warn",JSON.stringify(e)),null):t.available&&204!==t.status?t.available||200===t.status?(P.shouldInventoryRefund=!0,null):null:i("The item you're looking for is currently unavailable in our inventory. Please check back later or contact support for assistance with availability.")}if("function"!=typeof n)return null;try{return await n({items:ne.items})}catch(e){const t=e instanceof Error?e.message:"Unknown error";throw m({endpoint:"onInventoryCheck",errors:[`cartId: ${window.Zonos.cartId} - ${t}`],metadata:{cartId:window.Zonos.cartId,href:window.location.href,items:ne.items}}),e}},Y=async()=>{var e,t;const o=!!(null===(t=null===(e=window.Zonos.cartData)||void 0===e?void 0:e.metadata.find((e=>"referenceId"===e.key)))||void 0===t?void 0:t.value);window.Zonos.isLegacyCheckout&&window.Zonos.cartData&&o&&await l("/api/zonos-elements/legacy/inventory-refund",{body:{cartData:window.Zonos.cartData},method:"POST"})},H=async({clientSecret:e,storybookForceStatus:t})=>{if(t){const{isError:e,messages:o}=$(t);return{error:e,messages:o}}const o=e||P.clientSecret;if(!P.stripe||!o)return v("Failed to retrieve payment intent. Stripe is not initialized"),{error:!0,message:[i("Something went wrong.")]};const{paymentIntent:n}=await P.stripe.retrievePaymentIntent(o),s=null==n?void 0:n.status,{isError:r,messages:a}=$(s);return{error:r,messages:a,paymentIntentId:null==n?void 0:n.id,paymentMethod:null==n?void 0:n.payment_method,status:s}},K=async e=>{var t,n;const s=!!(null===(t=P.stripePaymentEventData)||void 0===t?void 0:t.complete),r=P.stripeElements,d=P.stripe,l=P.clientSecret;if(P.customErrorMessage=null,!(null===(n=ne.selectedLandedCost)||void 0===n?void 0:n.landedCost.id)&&!(null==e?void 0:e.noLandedCostCheck))throw new Error("Attempted to confirm the payment when no landed cost is found in store");const c=await I();if(!c.valid)throw P.customErrorMessage=c.errorMessage,new Error(c.errorMessage);const u=o.checkoutSessionId;if(d&&r&&s&&l&&u){const e=new URL(window.location.href);e.searchParams.set("payment_intent_client_secret",l),e.searchParams.set("zonosCheckoutSessionId",u),O({checkoutSessionId:u,eventName:"checkout_paymentInfoCompleted"});const{error:t,paymentIntent:o}=await d.confirmPayment({confirmParams:{return_url:e.toString()},elements:r,redirect:"if_required"});if(a("Payment intent confirmed","info",{error:t,paymentIntent:o}),"requires_action"===(null==o?void 0:o.status))throw new Error(i("Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction."));if(t){if("card_error"===t.type||"validation_error"===t.type)throw new Error(t.message);if("invalid_request_error"===t.type&&"payment_intent_unexpected_state"===t.code)return;throw new Error("An unexpected error occurred.")}if("requires_payment_method"===o.status)throw new Error(i("Payment failed. Please try another payment method."))}},G=()=>{var e;const t=ne.items.reduce(((e,t)=>e+t.amount*t.quantity),0),s=o.enabledVariantTestKeys||[];return{adjustmentsAmount:ne.adjustments.reduce(((e,t)=>e+t.amount),0),cartId:window.Zonos.cartId,currency:(null===(e=ne.items.find(Boolean))||void 0===e?void 0:e.currencyCode)||"",customerAuthenticationToken:ne.customerAuthenticationToken||void 0,isCollect:window.Zonos.isCollect,itemsAmount:t,metadata:[{key:"language",value:n.selectedLocale}],presentmentCountryCode:n.selectedCountryCode,skipPaymentIntent:P.skipPaymentIntent,varianceTestInput:s}},V=async()=>{var e;if(!o.checkoutSessionId)return m({endpoint:"Error creating payment intent",errors:["No checkout session id found when retrieving payment intent"],metadata:{allLogs:p,cartId:window.Zonos.cartId}}),void le({messages:[i("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:i("Error creating Checkout")});const{errors:t,json:n}=await l("/api/zonos-elements/create-payment-intent",{body:{checkoutSessionId:o.checkoutSessionId},method:"POST"}),s=null===(e=null==n?void 0:n.checkoutSessionPaymentIntentCreate)||void 0===e?void 0:e.clientSecret;if(t.length||!s)return v("Error occurs when getting payment intent",JSON.stringify(t,null,2)),m({endpoint:"Error creating payment intent",errors:t.map((e=>e.message)),metadata:{allLogs:p,cartId:window.Zonos.cartId,checkoutSessionId:o.checkoutSessionId,clientSecret:s}}),void le({messages:[i("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:i("Error creating Checkout")});me(n.checkoutSessionPaymentIntentCreate)},Z=async()=>{var e,t;if(!n.targetCurrency)return v("Failed to create checkout session - missing localizationStore.targetCurrency"),!1;P.isFetchingSession=!0;const o=G();a("Checkout session body","info",o);const{errors:s,json:r}=await l("/api/zonos-elements/create-checkout-session",{body:o,method:"POST"});if(P.isFetchingSession=!1,s.length||!r){const t=null===(e=s.find((e=>e.message)))||void 0===e?void 0:e.message;if(Array.isArray(t)&&t.some((e=>"Cart is expired."===e.message)))throw new Error("Cart is expired.");return v("Error occurred when creating checkout session",JSON.stringify(s,null,2)),!1}const i=r.checkoutSessionCreate;return me(i),ce({method:(null===(t=i.landedCost)||void 0===t?void 0:t.method)||"DDP",subtotals:i.subtotals}),a("Exchange rate updated for cart items (checkout session create)","info",ne.exchangeRate),a("done-init-checkout-session"),!0},Q=async()=>{const t=o.checkoutSessionId;if(!t)return v("Failed to update checkout session base currency"),!1;if("LOCAL"===e.checkoutSettings.allowedSettlementCurrencies)return a('allowedSettlementCurrencies: "LOCAL". Skip updating checkout session base currency'),!0;const{json:n}=await l("/api/zonos-elements/update-checkout-session-base-currency",{body:{checkoutSessionId:t,currencyCode:P.checkoutSettlementCurrency},method:"POST"}),s=null==n?void 0:n.checkoutSessionBaseCurrencyUpdate.subtotals.presentmentCurrencyCode;return n&&s===P.checkoutSettlementCurrency?(a(`Updated checkout session to settlement currency "${s}".`),!0):(v("Failed to update checkout session base currency"),!1)},X=({currentAddress:e,translatedAddressResult:t})=>{const o={};if(!t)return o;const{city:n,line1:s,line2:r,name:i,postal_code:a,state:d}=t;return e.city&&n&&(o.city={[e.city]:n}),e.line1&&s&&(o.line1={[e.line1]:s}),e.line2&&r&&(o.line2={[e.line2]:r}),e.postal_code&&a&&(o.postal_code={[e.postal_code]:a}),e.state&&d&&(o.state={[e.state]:d}),e.name&&i&&(o.name={[e.name]:i}),o},ee=async({addressInvalidCharactersList:e,billingAddressInvalidCharactersList:t})=>{var o,n,s,r;const i=(({addressInvalidCharactersList:e,billingAddressInvalidCharactersList:t,stripeAddressEventData:o,stripeBillingAddressEventData:n,stripeShippingSameAsBilling:s})=>{const r=!!(null==o?void 0:o.complete);if(!r||!(s?r:null==n?void 0:n.complete))return null;if(!e&&!t)return null;const i=o.value,a=(null==n?void 0:n.value)||null,{firstName:d,lastName:l}=w({firstName:i.firstName,lastName:i.lastName,name:i.name}),c=`${d} ${l}`,{firstName:u,lastName:m}=w({firstName:null==a?void 0:a.firstName,lastName:null==a?void 0:a.lastName,name:(null==a?void 0:a.name)||""}),p=u&&m?`${u} ${m}`:"",v=i.address,h=null==a?void 0:a.address;return{address:A({address:Object.assign(Object.assign({},v),{name:c}),invalidAdddressList:e}),billingAddress:s?void 0:A({address:h?Object.assign(Object.assign({},h),{name:p}):null,invalidAdddressList:t}),destinationCountry:v.country}})({addressInvalidCharactersList:e,billingAddressInvalidCharactersList:t,stripeAddressEventData:P.stripeAddressEventData,stripeBillingAddressEventData:P.stripeBillingAddressEventData,stripeShippingSameAsBilling:P.stripeShippingSameAsBilling});if(!i)return void(P.translatedAddress={address:{},billingAddress:{}});const a=(()=>{var e,t,o,n;const s=JSON.stringify(null===(e=P.stripeAddressUsedWhenValidatingAddress)||void 0===e?void 0:e.value)!==JSON.stringify(null===(t=P.stripeAddressEventData)||void 0===t?void 0:t.value),r=!P.stripeShippingSameAsBilling&&JSON.stringify(null===(o=P.stripeBillingAddressEventData)||void 0===o?void 0:o.value)!==JSON.stringify(null===(n=P.stripeBillingAddressUsedWhenValidatingAddress)||void 0===n?void 0:n.value);return s||r})();if(!a)return;const{errors:d,json:c}=await l("/api/zonos-elements/validate-address",{body:i,method:"POST"});if(d.length||!c)return v("Error occurs when translating address to latin",JSON.stringify(d,null,2)),void(P.translatedAddress={address:{},billingAddress:{}});P.stripeAddressUsedWhenValidatingAddress=P.stripeAddressEventData,P.stripeBillingAddressUsedWhenValidatingAddress=P.stripeBillingAddressEventData;const u=null===(o=P.stripeAddressEventData)||void 0===o?void 0:o.value.address,m=null===(n=P.stripeBillingAddressEventData)||void 0===n?void 0:n.value.address;P.translatedAddress={address:u?X({currentAddress:Object.assign(Object.assign({},u),{name:null===(s=P.stripeAddressEventData)||void 0===s?void 0:s.value.name}),translatedAddressResult:c.address||null}):{},billingAddress:P.stripeShippingSameAsBilling?{}:X({currentAddress:Object.assign(Object.assign({},m),{name:null===(r=P.stripeBillingAddressEventData)||void 0===r?void 0:r.value.name}),translatedAddressResult:c.billingAddress||null})}};T("clientSecret",(e=>{e&&P.stripe&&sessionStorage.setItem("zonos--client-secret",e),e||sessionStorage.removeItem("zonos--client-secret")}));const{onChange:te,reset:oe,state:ne}=t((()=>({addressFormRenderType:"stripe",adjustmentTotal:0,adjustments:[],checkoutSession:null,checkoutSessionTimeoutShow:!1,checkoutTimeoutInterval:null,currency:"USD",customQuotingError:null,customerAuthenticationToken:null,displayBaseCurrency:!1,dutiesTaxesFees:null,dutiesTaxesFeesEstimate:null,error:null,exchangeRate:null,externalConfirmationPageURL:null,inventoryCheckErrorMessage:null,isSelectedShippingAboveDeminimis:!1,isSelectedShippingGuarantee:!1,isStagingMode:u(),items:[],landedCostData:null,landedCostMethod:"DDP",partiesData:[],promoCode:sessionStorage.getItem("zonos--promo-code")||"",promoCodeApplied:!!sessionStorage.getItem("zonos--promo-code"),promoCodeError:!1,restrictedItems:[],selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,shouldHideDiscountInput:!1,step:"customer-info",subtotal:0,tabItems:{"customer-info":{index:1,isDone:!1,label:"Customer",value:"customer-info"},shipping:{index:2,isDone:!1,label:"Shipping",value:"shipping"},payment:{index:3,isDone:!1,label:"Payment",value:"payment"}},total:0}))),se=e=>{switch(e){case"DAYS":return i("days");case"WEEKS":return i("weeks");default:return i("business days")}},re=e=>{var t;const o=null===(t=e.shippingProfile)||void 0===t?void 0:t.transitTime;return(null==o?void 0:o.min)&&(null==o?void 0:o.max)&&(null==o?void 0:o.type)?{maxTransit:o.max,minTransit:o.min,unit:se(o.type)}:null},ie=({item1:e,item2:t})=>!(!e||!t)&&(t.sku&&e.sku&&e.sku===t.sku||t.description&&e.description&&e.description===t.description||e.name&&t.name&&e.name===t.name),ae=e=>{a("Checking item restrictions");const t=e.map((e=>{if(!e.restriction)return null;const{restriction:t}=e,o=ne.items.find((t=>ie({item1:t,item2:e})));return Object.assign(Object.assign({matchedItem:o},e),{restriction:t})})).filter(Boolean);return ne.restrictedItems=t,ne.items=ne.items.map((e=>Object.assign(Object.assign({},e),{isRestricted:!!t.find((t=>ie({item1:t,item2:e})))}))),{cartItems:ne.items,restrictedItems:t}},de=()=>{o.checkoutSessionId=null,oe()},le=({messages:e,title:t})=>{de(),_(),ne.step="error",ne.error={messages:e,title:t}},ce=({dutiesTaxesFeesEstimate:e,method:t,subtotals:o})=>{ne.exchangeRate=o.exchangeRate,ne.adjustmentTotal=o.adjustments,ne.dutiesTaxesFees="DAP"===t?null:o.landedCostTotal,ne.subtotal=o.items,ne.total=o.total,ne.currency=o.presentmentCurrencyCode,ne.dutiesTaxesFeesEstimate=e||null},ue=()=>!!ne.items.filter((e=>e.amount>0)).find((e=>!e.isRestricted)),me=e=>{var t,n,i,d,l;P.clientSecret=e.clientSecret,P.stripeCustomerSessionClientSecret=e.customerSessionClientSecret,P.customerProfile=e.customerProfile,ne.checkoutSession=e,e.id||m({endpoint:"cartStoreSetCheckoutSession",errors:["Missing checkout session id in checkout session"],metadata:{allLogs:p,checkoutSession:e}}),e.id&&(o.checkoutSessionId=e.id);const c=s(e.varianceTestResults||[]);r(c);const u=(null===(i=null===(n=null===(t=ne.checkoutSession)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.find((e=>"externalConfirmationPageURL"===(null==e?void 0:e.key))))||void 0===i?void 0:i.value)||(null===(l=null===(d=window.Zonos.cartData)||void 0===d?void 0:d.metadata.find((e=>"externalConfirmationPageURL"===(null==e?void 0:e.key))))||void 0===l?void 0:l.value)||null;u&&(a(`Found externalConfirmationPageURL: ${u}`),ne.externalConfirmationPageURL=u)},pe=async({adjustmentsAmount:e,cartId:t,currency:s,dutiesTaxesFeesEstimate:r,itemsAmount:d,landedCostId:c,shouldInitSessionOnFailure:u})=>{var m;if(c&&ne.selectedLandedCost&&(ce({dutiesTaxesFeesEstimate:r,method:ne.landedCostMethod,subtotals:ne.selectedLandedCost.subtotals}),a("Exchange rate updated for cart items (landed cost subtotal)","info",ne.exchangeRate)),!o.checkoutSessionId)return a("Could not update cart total without checkout session id","info"),!1;const{errors:p,json:h}=await(async({adjustmentsAmount:e,cartId:t,currency:s,id:r,itemsAmount:i,landedCostId:a,presentmentCountryCode:d})=>{const c=o.enabledVariantTestKeys||[],{errors:u,json:m}=await l("/api/zonos-elements/update-checkout-session",{body:{adjustmentsAmount:e,billToPartyId:P.partyBillingId,cartId:t,currency:s,customerAuthenticationToken:ne.customerAuthenticationToken||void 0,id:r,itemsAmount:i,landedCostId:a,metadata:[{key:"language",value:n.selectedLocale}],presentmentCountryCode:d,shipToPartyId:P.partyShippingId,skipPaymentIntent:P.skipPaymentIntent,varianceTestInput:c},method:"POST"});return u.length||!m?(v("Error occurs when updating checkout session",JSON.stringify(u,null,2)),{errors:u,json:m}):{errors:[],json:m}})({adjustmentsAmount:e,billToPartyId:P.partyBillingId,cartId:t,currency:s,id:o.checkoutSessionId,itemsAmount:d,landedCostId:c,presentmentCountryCode:n.selectedCountryCode,shipToPartyId:P.partyShippingId,varianceTestInput:o.enabledVariantTestKeys||[]});if(p.length>0||!h){if(v("Error occurs when updating checkout session."),u){a("Initiating checkout session on failure","info");const e=await Z();return a(`stripeStoreInitCheckoutSession: ${e}`),!!e||(le({messages:[i("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:i("Error creating Checkout")}),!1)}return!1}return c||(ce({method:(null===(m=h.checkoutSessionUpdate.landedCost)||void 0===m?void 0:m.method)||"DDP",subtotals:h.checkoutSessionUpdate.subtotals}),a("Exchange rate updated for cart items (checkout session update)","info",ne.exchangeRate)),me(h.checkoutSessionUpdate),!0},ve=t=>{var o,n,s;return"DAP"===t.method&&(null===(n=null===(o=e.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===n?void 0:n.includes((null===(s=P.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)||"US"))||"DAP"===t.method&&t.remittance.length&&"ZONOS"===t.landedCostGuaranteeCode?"DDP":t.method},he=async({applySubtotalsOnly:t,landedCostId:n,selectedShippingOption:s})=>{var r,i,d,l,c,u,m,p,v,h,y;a("Updating selected shipping option","info",{landedCostId:n,selectedShippingOption:s}),ne.selectedShippingOption=s;const g=re(ne.selectedShippingOption);if(g){const{maxTransit:e,minTransit:t,unit:o}=g;ne.selectedShippingOptionTransitTime=`${t}-${e} ${o}`}else ne.selectedShippingOptionTransitTime="";const w=null===(r=ne.landedCostData)||void 0===r?void 0:r.find((e=>e.landedCostId===n));if(ne.selectedLandedCost=w||null,!w)return!1;const f=((null===(i=w.landedCost.amountSubtotals)||void 0===i?void 0:i.landedCostTotal)||0)*w.subtotals.exchangeRate.rate;f&&a(`DAP quote, using estimate: ${f}`,"info"),ne.landedCostMethod=ve(w.landedCost),ne.shipping=w.subtotals.shipping;const b="ZONOS"===(null===(d=null==w?void 0:w.landedCost)||void 0===d?void 0:d.landedCostGuaranteeCode),S=!!(null===(c=null===(l=null==w?void 0:w.landedCost)||void 0===l?void 0:l.deMinimis)||void 0===c?void 0:c.find((e=>["DUTY","TAX"].includes(e.type)&&"ABOVE"===e.threshold)));ne.isSelectedShippingAboveDeminimis=S,ne.isSelectedShippingGuarantee=b;let C=!1;t?(ce({dutiesTaxesFeesEstimate:f,method:ne.landedCostMethod,subtotals:w.subtotals}),a("Exchange rate updated for cart items (landed cost subtotal)","info",ne.exchangeRate),C=!0):C=await pe({adjustmentsAmount:ne.adjustmentTotal,billToPartyId:P.partyBillingId,cartId:window.Zonos.cartId,dutiesTaxesFeesEstimate:f,landedCostId:null===(u=w.landedCost)||void 0===u?void 0:u.id,shipToPartyId:P.partyShippingId,varianceTestInput:o.enabledVariantTestKeys||[]});const O=null===(m=ne.items.find(Boolean))||void 0===m?void 0:m.currencyCode,A=(null===(p=P.stripeAddressEventData)||void 0===p?void 0:p.value.address.country)||"US";return P.shouldRenderPayInUsdButton="USD"===O&&"LOCAL_AND_USD"===e.checkoutSettings.allowedSettlementCurrencies&&"USD"!==(null===(v=ne.checkoutSession)||void 0===v?void 0:v.subtotals.presentmentCurrencyCode)&&!!(null===(y=null===(h=e.genericSettings)||void 0===h?void 0:h.usdSettlementCountryEnabled)||void 0===y?void 0:y.includes(A)),C},ye=({isPreview:e,sessionTimeout:t})=>{if(e)return;const o=new URLSearchParams(window.location.search).get("zonosCheckoutTimeout"),n=o&&!isNaN(parseInt(o,10))?parseInt(o,10):t;a(`==START CHECKOUT TIMEOUT - ${n}==`),ne.checkoutTimeoutInterval=setTimeout((()=>{ne.checkoutSessionTimeoutShow=!0}),n)},ge=()=>{ne.checkoutTimeoutInterval&&(clearTimeout(ne.checkoutTimeoutInterval),ne.checkoutTimeoutInterval=null)},we=()=>{ne.items=ne.items.map((e=>Object.assign(Object.assign({},e),{isRestricted:!1}))),ne.restrictedItems=[]},fe=async({adjustments:e,cartItems:t,landedCostId:n,shouldInitSessionOnFailure:s=!0})=>{var r;ne.adjustments=e,ne.items=t.map((e=>Object.assign(Object.assign({},e),{isRestricted:!1})));const i=null===(r=t.find(Boolean))||void 0===r?void 0:r.currencyCode,a=t.reduce(((e,t)=>e+t.amount*t.quantity),0),d=e.reduce(((e,t)=>e+t.amount),0);i&&a&&(ne.currency=i,P.isFetchingSession=!0,await pe({adjustmentsAmount:d,billToPartyId:P.partyBillingId,cartId:window.Zonos.cartId,currency:i,dutiesTaxesFeesEstimate:0,itemsAmount:a,landedCostId:n,shipToPartyId:P.partyShippingId,shouldInitSessionOnFailure:s,varianceTestInput:o.enabledVariantTestKeys||[]}),P.isFetchingSession=!1)},be=()=>{"shipping"===ne.step?(ne.step="customer-info",ne.tabItems=Object.assign(Object.assign({},ne.tabItems),{"customer-info":Object.assign(Object.assign({},ne.tabItems.shipping),{isDone:!1})})):"payment"===ne.step?(ne.step="shipping",ne.tabItems=Object.assign(Object.assign({},ne.tabItems),{shipping:Object.assign(Object.assign({},ne.tabItems.shipping),{isDone:!1})})):"finish"===ne.step&&(ne.step="payment",ne.tabItems=Object.assign(Object.assign({},ne.tabItems),{payment:Object.assign(Object.assign({},ne.tabItems.payment),{isDone:!1})}))},Se=()=>{"customer-info"===ne.step?(ne.step="shipping",ne.tabItems=Object.assign(Object.assign({},ne.tabItems),{"customer-info":Object.assign(Object.assign({},ne.tabItems["customer-info"]),{isDone:!0})})):"shipping"===ne.step?(ne.step="payment",ne.tabItems=Object.assign(Object.assign({},ne.tabItems),{shipping:Object.assign(Object.assign({},ne.tabItems.shipping),{isDone:!0})})):"payment"===ne.step&&(ne.step="finish")},Ce=()=>{ne.step="customer-info",ne.tabItems=Object.assign(Object.assign({},ne.tabItems),{"customer-info":Object.assign(Object.assign({},ne.tabItems["customer-info"]),{isDone:!1}),payment:Object.assign(Object.assign({},ne.tabItems.payment),{isDone:!1}),shipping:Object.assign(Object.assign({},ne.tabItems.shipping),{isDone:!1})}),ne.selectedShippingOption=null,ne.isSelectedShippingAboveDeminimis=!1,ne.isSelectedShippingGuarantee=!1,ne.selectedShippingOptionTransitTime="",ne.dutiesTaxesFees=0,ne.dutiesTaxesFeesEstimate=0,ne.shipping=0,ne.total=ne.subtotal};export{T as A,z as B,he as C,ue as D,J as E,W as F,M as G,$ as H,ee as I,w as J,te as K,U as L,re as M,ve as N,k as O,L as a,D as b,P as c,H as d,ne as e,fe as f,de as g,Ce as h,R as i,ge as j,Z as k,V as l,ye as m,G as n,le as o,me as p,F as q,Se as r,x as s,O as t,Q as u,q as v,K as w,Y as x,_ as y,I as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-5fc34563.system.js","./p-d3485a03.system.js","./p-2813d72e.system.js","./p-9d863a3b.system.js","./p-c9e433c0.system.js","./p-062430f9.system.js","./p-5a2dd041.system.js"],(function(e){"use strict";var o,t,n,s,a,l,i,c;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){s=e.p;a=e.l},function(e){l=e.t},function(e){i=e.f},function(e){c=e.l},function(){},function(){}],execute:function(){var r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var d=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var f=d;var h=e("zonos_language_select",function(){function e(e){var t=this;o(this,e);this.handleOnClose=function(){};this.languageSelected=function(e){void s(e);t.handleOnClose()}}e.prototype.render=function(){var e=this;var o=a.selectedLocale;return t(n,{key:"232674c6f35113c6ad3f1094e6e6d4128b4d4c02",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("div",{key:"014d1364e165e4ee4e9cf304791fc10fdfb6d87c",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"65b454467b033cd061ab08693e857eed75c76511",handleOnClose:function(){return e.handleOnClose()},label:l("Select a language")}),t("div",{key:"6ea8fca0b44ada24b9b2b84e22584ba1a7459dc4",class:"zonos--language-select-content"},c.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===o&&t("zonos-icon",{content:r,size:16}))})))))};return e}());h.style=f;var g='<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 u=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var p=u;var m=e("zonos_select_dialog_header",function(){function e(e){o(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"cc65559ef7867bbd8e7990556b50434faa0a905c",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("zonos-v-stack",{key:"77c280b12744520b4a172193f88798aa53d33eb7",class:"zonos--select-dialog-header-wrapper",spacing:8},t("div",{key:"eaba9d1e50f71f23e330e989521d2156a617b22d",class:"zonos--select-dialog-header"},t("zonos-text",{key:"ddddc6b5bca87cf44cbc7428d402f44c67422cb6",type:"boldLabel"},this.label),t("zonos-button",{key:"313e3955ba8bafc9a1b36b4c1c8f99e975fb8dd3",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close select dialog",content:g,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),t("slot",{key:"9af2821c22f3e37d52b6f03bf544fcaca1c0ed7b"})))};return e}());m.style=p}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,s){function c(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,n){function l(o){try{r(s.next(o))}catch(o){n(o)}}function i(o){try{r(s["throw"](o))}catch(o){n(o)}}function r(o){o.done?t(o.value):c(o.value).then(l,i)}r((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,c,n,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(s=1,c&&(n=i[0]&2?c["return"]:i[0]?c["throw"]||((n=c["return"])&&n.call(c),0):c.next)&&!(n=n.call(c,i[1])).done)return n;if(c=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;c=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){t.label=i[1];break}if(i[0]===6&&t.label<n[1]){t.label=n[1];n=i;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(i);break}if(n[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];c=0}finally{s=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-5fc34563.system.js","./p-ce15d62d.system.js","./p-9c5b8239.system.js","./p-ea8aff21.system.js","./p-d3485a03.system.js","./p-2813d72e.system.js","./p-9d863a3b.system.js","./p-69451a50.system.js","./p-062430f9.system.js","./p-23e7c655.system.js","./p-c9e433c0.system.js","./p-e7f8595f.system.js","./p-e63b8b24.system.js","./p-5a2dd041.system.js"],(function(o){"use strict";var e,t,s,c,n,l,i,r,a,z,d,h,u,f,m,p,g,b,v,w,x,y,k,_,C,S,I,j,O,T,L,E,U,P,N,A,D,B,R;return{setters:[function(o){e=o.r;t=o.h;s=o.H;c=o.F},function(o){n=o.c;l=o.i;i=o.d;r=o.e;a=o.o;z=o.f;d=o.k;h=o.l;u=o.u;f=o.w;m=o.A;p=o.y;g=o.g},function(o){b=o.i;v=o.a;w=o.c;x=o.b;y=o.d;k=o.e},function(o){_=o.p;C=o.a},function(o){S=o.s;I=o.c;j=o.d;O=o.l},function(o){T=o.t},function(o){L=o.z},function(o){E=o.b},function(o){U=o.h;P=o.l;N=o.s;A=o.b;D=o.g},function(o){B=o.c},function(o){R=o.l},function(){},function(){},function(){}],execute:function(){var F='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var H=".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-checkout-finish.sc-zonos-collect{-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:72px}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var K=H;var V=o("zonos_collect",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.onChangeLocaleListener=function(){};this.mobile=false;this.tablet=false;this.stripe=window.Zonos.stripe;this.showLanguageDialogMobile=false;this.submitLoading=false;this.collapseReview=true;this.isMobile=false;this.isTablet=false;this.isOverlayLoading=true;this.isCartCollected=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.confirmationId=null;this.clientSecret=n.clientSecret;this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=r.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=L.appearance.theme;return[4,l({overrideTheme:this.isMobile?o:undefined,paypalEnabled:_()})];case 1:e.sent();return[2]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,U("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=t.sent().json;return[2,e]}}))}))};this.checkStripePaymentIntentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,s,c,l,r,a,z,d;return __generator(this,(function(h){switch(h.label){case 0:e=!!window.Zonos.cartData;t=new URL(window.location.href).searchParams;s=t.get("payment_intent_client_secret");c=t.get("zonosCheckoutSessionId");P("Payment intent exist, checking stripe payment intent status");if(!s){P("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:e}]}return[4,i({clientSecret:s})];case 1:l=h.sent(),r=l.error,a=l.status;z=new URLSearchParams(window.location.search).get("redirect_status");if(!(z&&c))return[3,3];if(!r){P("Payment intent is succeeded or in a good state to move forward, show success screen")}else{P("Payment intent failed, show status from error")}return[4,this.fetchCheckoutSession(c)];case 2:d=h.sent();this.confirmationId=((o=d===null||d===void 0?void 0:d.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;S.checkoutSessionId=c;n.clientSecret=s;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}];case 3:if(!e){P("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}P("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))}}o.prototype.resizeListener=function(){this.isMobile=b(this.mobile);this.isTablet=v(this.tablet)};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){n.stripe=window.Zonos.stripe;r.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2]}))}))};o.prototype.initCollectCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,n,l,u,f,m,p,g,b,v,y,k,_,C,I,j,O,U,D;return __generator(this,(function(B){switch(B.label){case 0:if(!window.Zonos.cartData){return[2]}g=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(g){r.currency=g}b=(s=(t=window.Zonos.cartData)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.checkoutSessionId;v=(n=(c=window.Zonos.cartData)===null||c===void 0?void 0:c.references)===null||n===void 0?void 0:n.landedCostId;if(!v){a({messages:[T("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:L.organizationName})],title:T("Invalid session")});return[2]}if(b){P("Setting checkout session id from cart reference","info",b);S.checkoutSessionId=b}else{P("Clear checkout session id from storage so we start from a fresh session for the collect cart");S.checkoutSessionId=null}return[4,this.checkStripePaymentIntentStatus()];case 1:y=B.sent().shouldAllowOrder;if(!y){return[2]}B.label=2;case 2:B.trys.push([2,11,,12]);k=E(window.Zonos.cartData),_=k.adjustments,C=k.cartItems;return[4,z({adjustments:_,cartItems:C,landedCostId:v,shouldInitSessionOnFailure:false})];case 3:B.sent();if(!(!S.checkoutSessionId&&!b))return[3,5];return[4,d()];case 4:I=B.sent();P("stripeStoreInitCheckoutSession: ".concat(I));if(!I){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}B.label=5;case 5:if(!((!r.checkoutSession||((l=r.checkoutSession)===null||l===void 0?void 0:l.completedAt))&&b))return[3,9];return[4,this.fetchCheckoutSession(b)];case 6:j=B.sent();this.confirmationId=((u=j===null||j===void 0?void 0:j.checkoutSession.landedCost)===null||u===void 0?void 0:u.shortId)||null;if(!!(j===null||j===void 0?void 0:j.checkoutSession.completedAt)){void this.setToFinishStep("succeeded");return[2]}if(!(j===null||j===void 0?void 0:j.checkoutSession.clientSecret))return[3,8];return[4,i({clientSecret:j.checkoutSession.clientSecret})];case 7:O=B.sent().status;if(O==="processing"||O==="succeeded"){void this.setToFinishStep(O);return[2]}B.label=8;case 8:void N({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:b,cartId:(f=window.Zonos.cartData)===null||f===void 0?void 0:f.id,cartLandedCostId:v}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!r.checkoutSession){void N({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:b||"N/A",cartId:(m=window.Zonos.cartData)===null||m===void 0?void 0:m.id,cartLandedCostId:v||"N/A"}});throw new Error("Could not update/create checkout session for this collect cart")}void h();U=(p=r.checkoutSession)===null||p===void 0?void 0:p.landedCost;if(!U){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4,w(Object.assign(Object.assign({},r.checkoutSession),{id:S.checkoutSessionId||""}))];case 10:B.sent();void x({landedCostId:U.id});void this.applyStripeTheme();return[3,12];case 11:D=B.sent();A(D);a({messages:[T("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:L.organizationName})],title:T("Invalid session")});return[3,12];case 12:this.isOverlayLoading=false;return[2]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,l,i,a,z;return __generator(this,(function(d){switch(d.label){case 0:void((o=n.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());if(!((e=n.stripeLinkEventData)===null||e===void 0?void 0:e.complete)){c=document.querySelector("zonos-link-authentication");c===null||c===void 0?void 0:c.scrollIntoView({behavior:"smooth"});return[2]}if(!((t=n.stripeBillingAddressEventData)===null||t===void 0?void 0:t.complete)){l=document.querySelector(".zonos--billing-address");l===null||l===void 0?void 0:l.scrollIntoView({behavior:"smooth"});return[2]}i=n.checkoutSettlementCurrency==="USD";if(i&&n.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;C.paypalErrorMessage=null;n.hasPaymentError=false;this.submitLoading=true;r.inventoryCheckErrorMessage=null;return[4,u()];case 1:a=d.sent();if(!a){n.hasPaymentError=true;n.customErrorMessage=T("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:n.checkoutSettlementCurrency});this.submitLoading=false;return[2]}return[4,y()];case 2:d.sent();d.label=3;case 3:d.trys.push([3,5,,6]);return[4,f({noLandedCostCheck:true})];case 4:d.sent();r.step="finish";this.confirmationId=k.landedCostShortId||((s=r.selectedLandedCost)===null||s===void 0?void 0:s.landedCostId)||null;return[2];case 5:z=d.sent();A(z);n.hasPaymentError=true;return[3,6];case 6:this.submitLoading=false;return[2]}}))}))};o.prototype.componentWillLoad=function(){var o=this;n.stripe=window.Zonos.stripe;r.step="payment";void this.initCollectCart();this.resizeListener();this.storeUnsubscribeList=[m("clientSecret",(function(){void o.applyStripeTheme()})),I("selectedLocale",(function(){void o.applyStripeTheme()}))];P("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){p();g();this.onChangeLocaleListener();this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;this.clientSecret=n.clientSecret;if(n.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret}var e=this.getBaseCurrencySettlementInfo();var l=L.appearance,i=l.logoUrl,a=l.theme;var z=function(){var o="".concat(i,"?timestamp=").concat(Date.now());return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(L.organizationName," logo"),src:o}))};var d=D();var h=function(){var e;var s=new URLSearchParams(window.location.search);var n=s.get("zonosQaUrl");var l=s.get("zonosDebug");var i=(e=R.find((function(o){return o.code===O.selectedLocale})))===null||e===void 0?void 0:e.label;return t(c,null,t("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},t("div",{class:"zonos--logo-wrapper"},z(),d&&t("zonos-badge",{badgeColor:"orange",size:"small"},T("Test mode")),l==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n)),t("div",{class:"zonos--header-right"},t("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},i,t("zonos-icon",{"aria-label":"Language select",content:F,iconColor:"gray-1200"})),t("div",{class:B(["zonos--collect-language-dialog",o.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))),t("zonos-text",{class:"zonos--header-title",type:"header"},T("Customs fees for your recent purchase from [companyName] are ready for payment",{companyName:L.organizationName})))};var u=function(){if(o.isOverlayLoading||n.isFetchingSession){return null}return t("div",{class:"zonos--content"},r.step!=="finish"&&r.step!=="error"&&t(c,null,(o.isMobile||o.isTablet)&&h(),t("div",{class:"zonos--left","data-theme":a},!o.isMobile&&!o.isTablet&&h(),t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},T("Billing info")),t("zonos-v-stack",{spacing:16},t("zonos-link-authentication",{titleText:""}),t("zonos-address",{titleText:"",type:"billing"})),t("zonos-collect-payment",{class:B(["zonos--collect-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))}})),t("div",{class:"zonos--right","data-theme":a},t("zonos-collect-review",{mobile:o.isMobile,tablet:o.isTablet}),t("div",{class:"zonos--order-details-container"},t("zonos-collect-order-details",{collapsed:o.collapseReview,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReview=!o.collapseReview}})),t("div",{class:"flex--wrapper"},t("zonos-v-stack",{spacing:16},t("zonos-collect-subtotal",null)),!o.isMobile&&!o.isTablet&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet})))),(r.step==="finish"||r.step==="error")&&t("div",{class:"zonos--done","data-theme":a},t("div",{class:"zonos--header"},z()),t("zonos-collect-finish",{confirmationId:o.confirmationId,overrideNotification:r.step==="error"&&!!r.error?Object.assign(Object.assign({},r.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||r.step==="finish"||r.step==="error")&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet}))};return t(s,{class:B(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":a},u(),e&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:T("Cancel"),dialogConfirmBtnText:T("Pay [orderTotal]",{orderTotal:j({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:T("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:T("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());V.style=K}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-5fc34563.system.js","./p-9d863a3b.system.js","./p-06f798ee.system.js","./p-23e7c655.system.js","./p-e63b8b24.system.js","./p-e7f8595f.system.js","./p-5a2dd041.system.js"],(function(o){"use strict";var s,t,n,i,e,p,r,a,l,c,u,z;return{setters:[function(o){s=o.r;t=o.c;n=o.h;i=o.H;e=o.a},function(o){p=o.f;r=o.z},function(o){a=o.i;l=o.a},function(o){c=o.c},function(o){u=o.g},function(o){z=o.i},function(){}],execute:function(){var d='.sc-zonos-stripe-input-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-stripe-input-h *.sc-zonos-stripe-input{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-stripe-input-h img.sc-zonos-stripe-input{max-width:100%}.sc-zonos-stripe-input-h dl.sc-zonos-stripe-input,.sc-zonos-stripe-input-h dd.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h1.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h2.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h3.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h4.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h5.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h6.sc-zonos-stripe-input,.sc-zonos-stripe-input-h hr.sc-zonos-stripe-input,.sc-zonos-stripe-input-h figure.sc-zonos-stripe-input,.sc-zonos-stripe-input-h p.sc-zonos-stripe-input,.sc-zonos-stripe-input-h pre.sc-zonos-stripe-input{margin:0}.sc-zonos-stripe-input-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-stripe-input-h{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}.dark.sc-zonos-stripe-input-h{color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}.sc-zonos-stripe-input-h{margin:1px}.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px;height:calc(var(--zonos-elements-size-xl) - 2px)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected+label.sc-zonos-stripe-input+div.sc-zonos-stripe-input{background-color:#e8f0fe}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.sc-zonos-stripe-input{padding:24px 4px 2px 16px}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input{padding-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{margin-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus{outline:none;border:var(--zonos--border)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}.sc-zonos-stripe-input-h .zonos--floated-input.has-error.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-webkit-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-moz-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input:-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-webkit-autofill,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;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% - 8px);z-index:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input{pointer-events:inherit}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input::after{cursor:not-allowed;z-index:1}.dark.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{background:#30313d}';var h=d;var f=0;var b=o("zonos_stripe_input",function(){function o(o){s(this,o);this.inputChange=t(this,"inputChange",7);this.inheritedAttributes={};this.inputId="zonos--input-".concat(++f);this.inputValue="";this.isDisabled=false;this.isError=false;this.error="";this.inputPlaceholder="";this.value="";this.required=false;this.internalValue=this.inputValue}o.prototype.onInputValueChange=function(o){this.internalValue=o;this.inputChange.emit(o);this.value=o};o.prototype.onValueChange=function(o){this.internalValue=o};o.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},a(this.el)),l(this.el,["tabindex","title","data-form-type","dir"]))};o.prototype.render=function(){var o=this;var s=this.overridePrimaryColor||r.appearance.colorPrimary;var t=this.overrideSecondaryColor||r.appearance.colorSecondary;var e=s&&z(s);var a=r.appearance.fontSizeInputValue||16;return n(i,{key:"ce50e8c3f41abc7f7605a4423dc21c5fce755c9a",class:c(["zonos--input zonos--elements",e&&"dark",(this.isError||!!this.error)&&"has-error"]),"data-theme":e?"DARK":"LIGHT",style:{"--zonos--border-radius":u(),"--zonos--font-family":p(),"--zonos--font-size":"".concat(a,"px"),"--zonos--primary-color":t}},n("div",{key:"8953c4cf31d9de771ef8f6351476d5db9de5655a",class:c(["zonos--label-wrapper",this.isDisabled&&"disabled"])},n("input",Object.assign({key:"c66c0e5787191ab6bb804755da7477e222b3ff40"},this.inheritedAttributes,{autoComplete:this.autoComplete,class:c(["zonos--floated-input",!!this.inputLabel&&"has-label",this.internalValue&&"has-content",(this.isError||!!this.error)&&"has-error"]),disabled:this.isDisabled,id:this.inputId,name:this.name,onInput:function(s){var t=s.target;o.inputChange.emit(t.value);o.el.inputValue=t.value;o.el.dispatchEvent(new Event("change"))},placeholder:this.inputPlaceholder||"",required:this.required,type:"text",value:this.internalValue})),n("div",{key:"17c7fa7ef87bf765203cadb3ff24ead25ac45332",class:"zonos--floated-label"},n("label",{key:"4d7c8e503bd0dc0081b13a36c2a1c5f976ee93e3",htmlFor:this.inputId},this.inputLabel))),this.error&&n("zonos-text",{key:"1352d1d09b05a25ced56d31b16cf1f203b0eaaec",textColor:"red-600",type:"caption"},this.error))};Object.defineProperty(o.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"],value:["onValueChange"]}},enumerable:false,configurable:true});return o}());b.style=h}}}));
|
|
1
|
+
System.register(["./p-5fc34563.system.js","./p-9d863a3b.system.js","./p-06f798ee.system.js","./p-23e7c655.system.js","./p-e63b8b24.system.js","./p-e7f8595f.system.js","./p-5a2dd041.system.js"],(function(o){"use strict";var s,t,n,i,e,p,r,a,l,c,u,z;return{setters:[function(o){s=o.r;t=o.c;n=o.h;i=o.H;e=o.a},function(o){p=o.z;r=o.f},function(o){a=o.i;l=o.a},function(o){c=o.c},function(o){u=o.g},function(o){z=o.i},function(){}],execute:function(){var d='.sc-zonos-stripe-input-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-stripe-input-h *.sc-zonos-stripe-input{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-stripe-input-h img.sc-zonos-stripe-input{max-width:100%}.sc-zonos-stripe-input-h dl.sc-zonos-stripe-input,.sc-zonos-stripe-input-h dd.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h1.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h2.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h3.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h4.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h5.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h6.sc-zonos-stripe-input,.sc-zonos-stripe-input-h hr.sc-zonos-stripe-input,.sc-zonos-stripe-input-h figure.sc-zonos-stripe-input,.sc-zonos-stripe-input-h p.sc-zonos-stripe-input,.sc-zonos-stripe-input-h pre.sc-zonos-stripe-input{margin:0}.sc-zonos-stripe-input-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-stripe-input-h{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}.dark.sc-zonos-stripe-input-h{color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}.sc-zonos-stripe-input-h{margin:1px}.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px;height:calc(var(--zonos-elements-size-xl) - 2px)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected+label.sc-zonos-stripe-input+div.sc-zonos-stripe-input{background-color:#e8f0fe}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.sc-zonos-stripe-input{padding:24px 4px 2px 16px}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input{padding-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{margin-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus{outline:none;border:var(--zonos--border)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}.sc-zonos-stripe-input-h .zonos--floated-input.has-error.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-webkit-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-moz-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input:-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-webkit-autofill,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;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% - 8px);z-index:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input{pointer-events:inherit}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input::after{cursor:not-allowed;z-index:1}.dark.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{background:#30313d}';var h=d;var f=0;var b=o("zonos_stripe_input",function(){function o(o){s(this,o);this.inputChange=t(this,"inputChange",7);this.inheritedAttributes={};this.inputId="zonos--input-".concat(++f);this.inputValue="";this.isDisabled=false;this.isError=false;this.error="";this.inputPlaceholder="";this.value="";this.required=false;this.internalValue=this.inputValue}o.prototype.onInputValueChange=function(o){this.internalValue=o;this.inputChange.emit(o);this.value=o};o.prototype.onValueChange=function(o){this.internalValue=o};o.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},a(this.el)),l(this.el,["tabindex","title","data-form-type","dir"]))};o.prototype.render=function(){var o=this;var s=this.overridePrimaryColor||p.appearance.colorPrimary;var t=this.overrideSecondaryColor||p.appearance.colorSecondary;var e=window.Zonos.isCollect?p.appearance.theme==="DARK":s&&z(s);var a=p.appearance.fontSizeInputValue||16;return n(i,{key:"0bed90e63595e6036b9342e15c999bb7e7971240",class:c(["zonos--input zonos--elements",e&&"dark",(this.isError||!!this.error)&&"has-error"]),"data-theme":e?"DARK":"LIGHT",style:{"--zonos--border-radius":u(),"--zonos--font-family":r(),"--zonos--font-size":"".concat(a,"px"),"--zonos--primary-color":t}},n("div",{key:"00e5c3a220aaeee221c5cc104d2463f5468067cf",class:c(["zonos--label-wrapper",this.isDisabled&&"disabled"])},n("input",Object.assign({key:"25459f6bc07647962676edd724630cd7726bb680"},this.inheritedAttributes,{autoComplete:this.autoComplete,class:c(["zonos--floated-input",!!this.inputLabel&&"has-label",this.internalValue&&"has-content",(this.isError||!!this.error)&&"has-error"]),disabled:this.isDisabled,id:this.inputId,name:this.name,onInput:function(s){var t=s.target;o.inputChange.emit(t.value);o.el.inputValue=t.value;o.el.dispatchEvent(new Event("change"))},placeholder:this.inputPlaceholder||"",required:this.required,type:"text",value:this.internalValue})),n("div",{key:"145634dac24ef37cd206847537bea2f641f3b5a0",class:"zonos--floated-label"},n("label",{key:"70eabcab7a30e851086a2b79107968f9a999c67e",htmlFor:this.inputId},this.inputLabel))),this.error&&n("zonos-text",{key:"55ab6d14b5e6c98c665f41a1c4c1dd70523ee91f",textColor:"red-600",type:"caption"},this.error))};Object.defineProperty(o.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"],value:["onValueChange"]}},enumerable:false,configurable:true});return o}());b.style=h}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,t,e,n){function s(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,i){function r(o){try{l(n.next(o))}catch(o){i(o)}}function a(o){try{l(n["throw"](o))}catch(o){i(o)}}function l(o){o.done?e(o.value):s(o.value).then(r,a)}l((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(o){return function(t){return l([o,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(e=0)),e)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;s=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(o,e)}catch(o){a=[6,o];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,t,e){if(e||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return o.concat(i||Array.prototype.slice.call(t))};System.register(["./p-5fc34563.system.js","./p-ce15d62d.system.js","./p-2813d72e.system.js","./p-82e88a33.system.js","./p-b2ae8eb7.system.js","./p-23e7c655.system.js","./p-9d863a3b.system.js","./p-ea8aff21.system.js","./p-d3485a03.system.js","./p-062430f9.system.js","./p-bf37ccc7.system.js","./p-e63b8b24.system.js","./p-c9e433c0.system.js","./p-e7f8595f.system.js","./p-c5d1217f.system.js","./p-0ed63ce0.system.js","./p-78a6e775.system.js","./p-2b8345d8.system.js","./p-5a2dd041.system.js","./p-cd1ebef9.system.js"],(function(o){"use strict";var t,e,n,s,i,r,a,l,c,u,d,h,f,p,m,z,g,b,v,y,x,w,k,C,_,S,L,I,O,j,A,B,D,M,E,Z,P,H,T,N,R,U,F,V,G,Y,q,W,K,X,J,Q,$,oo,to,eo,no,so,io,ro;return{setters:[function(o){t=o.r;e=o.d;n=o.h;s=o.H;i=o.F;r=o.c;a=o.a},function(o){l=o.e;c=o.D;u=o.E;d=o.F;h=o.c;f=o.y;p=o.d;m=o.t;z=o.G;g=o.H;b=o.r;v=o.I;y=o.J;x=o.K;w=o.L;k=o.C;C=o.M;_=o.N;S=o.O},function(o){L=o.t},function(o){I=o.r;O=o.p},function(o){j=o.c},function(o){A=o.c},function(o){B=o.z;D=o.h;M=o.g;E=o.f},function(o){Z=o.s;P=o.c;H=o.a;T=o.i},function(o){N=o.s;R=o.l;U=o.c},function(o){F=o.h;V=o.l;G=o.s;Y=o.d;q=o.j;W=o.g;K=o.i;X=o.a},function(o){J=o.c},function(o){Q=o.g},function(o){$=o.l},function(o){oo=o.i;to=o.t},function(o){eo=o.i},function(o){no=o.u},function(o){so=o.s;io=o.c},function(o){ro=o.e},function(){},function(){}],execute:function(){var ao=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}";var lo=ao;var co=o("zonos_cart_items",function(){function o(o){t(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t=e("./assets/empty-item.jpeg");var i=l.items.filter((function(o){return!o.isRestricted}));return n(s,{key:"52911cfab4b2da9d65c840cd692e638c9dc732c5",class:"zonos--cart-items zonos--elements"},n("table",{key:"428a62423a7fcf0721f420c9fdceac4bd928a6eb",class:"zonos--cart-table"},n("tbody",{key:"41a438eeb79635ba00a241fa9771b9c33c7fe7ff"},i.map((function(e){var s=e.imageUrl;var i=j(e.name);var r=e.amount*e.quantity;return n("tr",{class:"zonos--cart-item"},n("td",{class:"zonos--column zonos--cart-item-image"},s&&!o.errorImages.includes(s)?n("img",{alt:e.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[s],false)},src:e.imageUrl,style:{"min-width":"40px"},width:40}):n("img",{alt:e.name,src:t,width:40})),n("td",{class:"zonos--column zonos--cart-item-name"},n("div",null,i.map((function(o){return n("zonos-text",{type:"label"},o)}))),n("zonos-text",{textColor:"gray-600",type:"caption"},L("Quantity"),": ",e.quantity)),n("td",{class:"zonos--column zonos--cart-item-price"},n("zonos-text",{type:"semiBoldLabel",weight:600},I({amount:r,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());co.style=lo;var uo='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var ho=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{overflow:auto;position:relative}:host zonos-banner{margin-bottom:12px}:host .zonos--cart-title-collapse-trigger{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-0);width:100%;border:none;cursor:pointer;margin-bottom:16px;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}:host .zonos--cart-title-collapse-trigger zonos-icon{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}:host .zonos--cart-title-collapse-trigger.collapsed{margin-bottom:0}:host .zonos--cart-title-collapse-trigger.collapsed zonos-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host .zonos--cart-title-collapse-trigger::before,:host .zonos--cart-title-collapse-trigger::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}:host .zonos--cart-title-collapse-trigger .zonos--title-wrapper{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--cart-table{opacity:0.5;width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}:host(.collapsed){-ms-flex-negative:0;flex-shrink:0}';var fo=ho;var po=o("zonos_cart_restricted_items",function(){function o(o){t(this,o);this.hide=false;this.errorImages=[];this.internalCollapsed=true;this.firstRender=true}o.prototype.componentDidLoad=function(){this.firstRender=true};o.prototype.render=function(){var o=this;var t;var i=e("./assets/empty-item.jpeg");var r=((t=l.exchangeRate)===null||t===void 0?void 0:t.rate)||1;var a=l.restrictedItems.length;if(this.hide||a===0){return null}if(this.firstRender){this.internalCollapsed=c();this.firstRender=false}return n(s,{class:A(["zonos--cart-restricted-items","zonos--elements",this.internalCollapsed&&"collapsed"])},n("button",{class:A(["zonos--cart-title-collapse-trigger",this.internalCollapsed&&"collapsed"]),onClick:function(){o.internalCollapsed=!o.internalCollapsed}},n("div",{class:"zonos--title-wrapper"},n("zonos-text",{textColor:"red-600",type:"label"},"".concat(L(this.internalCollapsed?"Show":"Hide")," ").concat(a," ").concat(L("restricted items"))),n("zonos-icon",{content:uo,iconColor:"red-600"}))),n("zonos-collapse",{collapsed:this.internalCollapsed},n("zonos-banner",{bannerTitle:L("The following items are unable to be shipped to your country and are not included in your cart total."),intent:"error"}),n("table",{class:"zonos--cart-table"},n("tbody",null,l.restrictedItems.map((function(t,e){var s,a;var l=t.imageUrl;return n("tr",{class:"zonos--cart-item"},n("td",{class:"zonos--column zonos--cart-item-image"},l&&!o.errorImages.includes(l)?n("img",{alt:((s=t.matchedItem)===null||s===void 0?void 0:s.name)||t.name||"Restricted item ".concat(e+1),onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[l],false)},src:l,style:{"min-width":"40px"},width:40}):n("img",{alt:t.name||"Restricted item ".concat(e+1),src:i,width:40})),n("td",{class:"zonos--column zonos--cart-item-name"},n("zonos-text",{type:"label"},((a=t.matchedItem)===null||a===void 0?void 0:a.name)||t.name),n("zonos-text",{type:"caption"},t.restriction.reason)),n("td",{class:"zonos--column zonos--cart-item-price"},n("zonos-text",{type:"semiBoldLabel"},I({amount:t.amount*t.quantity*r,isForeign:false}))))}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());po.style=fo;var mo=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:20px 8px;vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price,:host .zonos--cart-promo-code-col{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}:host .zonos--cart-subtotal-price zonos-text{white-space:nowrap}:host .zonos--cart-subtotal-price zonos-text,:host .zonos--cart-pay-total zonos-text{white-space:nowrap}:host .zonos--cart-promo-code-input-wrapper{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}:host .zonos--cart-promo-code-input{-ms-flex:1;flex:1}";var zo=mo;var go=o("zonos_cart_subtotal",function(){function o(o){t(this,o);this.loading=false}o.prototype.render=function(){var o=this;var t,e,r,a,f;var p=l.step==="payment"||l.step==="shipping";var m=c()?l.total:0;var z=c()?l.subtotal:0;var g=!l.shouldHideDiscountInput&&l.step!=="customer-info";var b=(f=(a=(r=(e=(t=l.landedCostData)===null||t===void 0?void 0:t.find(Boolean))===null||e===void 0?void 0:e.landedCost.appliedAdjustments)===null||r===void 0?void 0:r.find((function(o){var t;return((t=o.adjustment)===null||t===void 0?void 0:t.source)==="PROMO_CODE"})))===null||a===void 0?void 0:a.adjustment)===null||f===void 0?void 0:f.name;var v=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:l.promoCodeApplied=true;l.promoCodeError=false;this.loading=true;return[4,u()];case 1:o.sent();this.loading=false;return[2]}}))}))};var y=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:l.promoCodeError=false;this.loading=true;return[4,d()];case 1:o.sent();this.loading=false;return[2]}}))}))};var x=function(){if(!l.selectedShippingOption){return n(i,null,n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},L("Shipping")),n("zonos-text",{class:"zonos--caption",type:"caption"},L("No shipping method selected")))}return n(i,null,n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},l.selectedShippingOption.displayName),l.selectedShippingOptionTransitTime&&n("zonos-text",{class:"zonos--caption",type:"caption"},l.selectedShippingOptionTransitTime))};var w=function(){var o,t,e;if((t=(o=B.genericSettings)===null||o===void 0?void 0:o.domesticCountries)===null||t===void 0?void 0:t.includes(((e=h.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country)||"US")){return n(i,null,n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},L("Taxes and fees"))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("div",{class:"zonos--cart-duty-tax-price"},l.dutiesTaxesFees!==null||l.dutiesTaxesFeesEstimate!==null?I({amount:l.dutiesTaxesFees||l.dutiesTaxesFeesEstimate||0,isForeign:true}):"-")))}if(l.landedCostMethod==="DAP"){return n(i,null,n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},L("Duties, taxes, and fees")),l.dutiesTaxesFeesEstimate!==null?"".concat(L("Estimated [amount]",{amount:I({amount:l.dutiesTaxesFeesEstimate,isForeign:true})})):"-"),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("div",{class:"zonos--cart-duty-tax-price"},L("Due at delivery"))))}return n(i,null,n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},L("Duties, taxes, and fees")),n("zonos-text",{class:"zonos--caption",type:"caption"},L("Nothing due at the door"))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("div",{class:"zonos--cart-duty-tax-price"},l.dutiesTaxesFees!==null?I({amount:l.dutiesTaxesFees,isForeign:true}):"-")))};return n(s,{class:"zonos--cart-subtotal zonos--elements"},n("table",{class:"zonos--cart-table"},n("tr",{class:"zonos--row zonos--cart-subtotal"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("zonos-text",{type:"semiBoldLabel"},L("Cart subtotal"))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("zonos-text",{type:"semiBoldLabel"},I({amount:z,isForeign:true})))),n("tr",{class:"zonos--row zonos--cart-shipping"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},x()),n("td",{class:"zonos--column zonos--cart-subtotal-price"},l.shipping?I({amount:l.shipping,isForeign:true}):"-")),p&&n("tr",{class:"zonos--row zonos--cart-duties"},n("td",{class:"zonos--column"}),w()),g&&n("tr",{class:"zonos--row zonos--cart-promo-code"},n("td",{class:"zonos--column"}),!!b?n(i,null,n("td",{class:"zonos--column zonos--cart-promo-code-col"},this.loading?n("zonos-spinner",{size:16}):n("zonos-badge",{dismissHandler:function(){return y()}},l.promoCode)),n("td",{class:"zonos--column zonos--cart-promo-code-col"})):n("td",{class:"zonos--column zonos--cart-promo-code-col",colSpan:2},n("div",{class:"zonos--cart-promo-code-input-wrapper"},n("zonos-input",{class:"zonos--cart-promo-code-input",inputLabel:L("Add promotional code"),inputValue:l.promoCode,isError:l.promoCodeError,onInputChange:function(o){return l.promoCode=o.detail.trim()},onKeyDown:function(o){if(o.key==="Enter"){void v()}}}),n("zonos-button",{loading:this.loading,onClick:function(){return v()},variant:"primary"},L("Apply"))))),!!l.adjustmentTotal&&n("tr",{class:"zonos--row zonos--cart-discount"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("div",{class:"zonos--title-with-icon"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},L("Discounts")))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("zonos-text",{type:"semiBoldLabel"},I({amount:l.adjustmentTotal,isForeign:true})))),n("tr",{class:"zonos--row zonos--cart-pay-total"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},L("Order total"))),n("td",{class:"zonos--column zonos--cart-total-price"},n("zonos-text",{type:"semiBoldLabel"},I({amount:m,isForeign:true}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());go.style=zo;var bo='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>';var vo='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var yo=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:20px}:host .zonos--finish-details{max-width:536px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var xo=yo;var wo=30;var ko=o("zonos_checkout_finish",function(){function o(o){var e=this;t(this,o);this.closeClick=r(this,"closeClick",7);this.borderRadius="ROUNDED";this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=L("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(e,void 0,void 0,(function(){var o,t,e,n,s,i,r,a;return __generator(this,(function(l){switch(l.label){case 0:e=N.checkoutSessionId;n=new URLSearchParams;n.set("checkoutSessionId",e||"");return[4,F("/api/zonos-elements/get-order?".concat(n.toString()))];case 1:s=l.sent(),i=s.baseUrl,r=s.errors,a=s.json;if(r.length||!(a===null||a===void 0?void 0:a.id)){return[2,{baseUrl:i,order:null}]}return[4,(t=(o=B.checkoutSettings).onOrderSuccess)===null||t===void 0?void 0:t.call(o,{zonosApiRoute:i,zonosOrder:a})];case 2:l.sent();return[2,{baseUrl:i,order:a}]}}))}))};this.redirectToUrl=function(o){f();N.checkoutSessionId=null;if(window.parent){window.parent.location.href=o}window.location.href=o};this.isRedirectBehavior=function(){var o=B.checkoutSettings.successBehavior;return o==="REDIRECT_TO_SUCCESS_PAGE"||!!l.externalConfirmationPageURL};this.shouldRenderKeepShoppingButton=function(){return!e.isRedirectBehavior()&&e.notificationType==="success"};this.shouldRenderCloseButtonForRedirectBehavior=function(){return e.isRedirectBehavior()||e.notificationType==="error"};this.redirectToMerchantSuccessPage=function(){var o,t,n,s;var i=l.externalConfirmationPageURL||B.checkoutSettings.successRedirectUrl;var r=i;var a=new URLSearchParams;var c=(o=e.order)===null||o===void 0?void 0:o.id;var u=((s=(n=(t=e.order)===null||t===void 0?void 0:t.references)===null||n===void 0?void 0:n.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||s===void 0?void 0:s.value)||null;if(c){a.set("zOrderNumber",c)}if(u){a.set("orderId",u)}var d=a.toString();var h=r.includes("?");e.isWaitingToRedirect=true;e.redirectToUrl(d?"".concat(r).concat(h?"&":"?").concat(d):r)};this.handleSuccessBehavior=function(){return __awaiter(e,void 0,void 0,(function(){var o,t;return __generator(this,(function(e){switch(e.label){case 0:this.saveOrderIdForDuplicationIssue();o=B.checkoutSettings.successBehavior;t=true;switch(t){case o==="REDIRECT_TO_SUCCESS_PAGE":return[3,1];case!!l.externalConfirmationPageURL:return[3,1];case o==="CLOSE_MODAL":return[3,3];case o==="ZONOS_SUCCESS_PAGE":return[3,3]}return[3,3];case 1:this.notificationTitle=L("Order complete!");this.notificationMessages=[L("Your order has been successfully placed."),L("You will be redirected back to the merchant's site in a few seconds.")];this.isLoading=false;this.isWaitingToRedirect=true;this.useOverrideSuccessNotification();return[4,this.getPullOrder()];case 2:e.sent();if(!this.order){V("=== Order info not found, not redirecting, hide spinner for close button","error");this.isWaitingToRedirect=false;return[2]}this.isWaitingToRedirect=false;this.redirectToMerchantSuccessPage();return[3,6];case 3:this.useOverrideSuccessNotification();this.isLoading=false;if(!(typeof B.checkoutSettings.onOrderSuccess==="function"))return[3,5];return[4,this.getPullOrder()];case 4:e.sent();e.label=5;case 5:return[3,6];case 6:return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var t=0;t<arguments.length;t++){o[t]=arguments[t]}return __awaiter(e,__spreadArray([],o,true),void 0,(function(o){var t,e,n,s,i,r,a,l,c;if(o===void 0){o=0}return __generator(this,(function(u){switch(u.label){case 0:if(o===0){V("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:n=u.sent(),s=n.baseUrl,i=n.order;r=window.Zonos.isLegacyCheckout;a=!!((e=(t=i===null||i===void 0?void 0:i.references)===null||t===void 0?void 0:t.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||e===void 0?void 0:e.value);l=N.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||wo;V("=== Polling order (".concat(o," attemps)"),"info");if(!(i&&!r||i&&o>=c||a))return[3,2];V("=== Order info found","info");if(r&&i&&!a){void G({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(l,"&orderId=").concat(i.id),errors:["Order found but legacy order number doesn't exist after ".concat(c," attempts")],metadata:{allLogs:Y,checkoutSessionId:N.checkoutSessionId||"",orderId:i.id,storeId:B.storeId}});return[2]}else if(o>10){void G({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(l,"&orderId=").concat(i.id),errors:["Order found after ".concat(o," attempts")],metadata:{allLogs:Y,checkoutSessionId:N.checkoutSessionId||"",orderId:i.id,storeId:B.storeId}})}this.order=i;return[3,6];case 2:if(!((!i||!a)&&o<c))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:u.sent();return[4,this.getPullOrder(o+1)];case 4:u.sent();return[3,6];case 5:void G({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(l),errors:["Order not found after ".concat(c," attempts")],metadata:{allLogs:Y,checkoutSessionId:N.checkoutSessionId||"",storeId:B.storeId}});u.label=6;case 6:return[2]}}))}))};this.useOverrideSuccessNotification=function(){var o=B.checkoutSettings,t=o.successPageSubtitleText,n=o.successPageTitleText;if(n){e.notificationTitle=n}if(t){e.notificationMessages=t}};this.checkStripePaymentStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o,t,e,n,s,i,r,a,l;return __generator(this,(function(c){switch(c.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||h.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,p({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:t=c.sent(),e=t.error,n=t.messages,s=t.status;i=s==="requires_action"||e;this.notificationType=i?"error":"success";this.notificationMessages=n||[];this.notificationTitle=i?L("Payment failed"):L("You're all set!");V("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:n,status:s});r=new URL(window.location.href);r.searchParams.delete("payment_intent_client_secret");r.searchParams.delete("payment_intent");r.searchParams.delete("redirect_status");r.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",r.toString());if(!(e&&(n===null||n===void 0?void 0:n.length)))return[3,2];Z("zonos-checkout-payment-fail");void G({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0],'" status: ').concat(s," - checkout session: ").concat(N.checkoutSessionId)],metadata:{allLogs:Y,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:this.saveOrderIdForDuplicationIssue();Z("zonos-checkout-success");a=N.checkoutSessionId;void m({checkoutSessionId:a,eventName:"checkout_orderCompleted"});l=J("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(l);return[4,this.handleSuccessBehavior()];case 3:c.sent();c.label=4;case 4:this.isLoading=false;z();f();N.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=L("You're all set!");this.notificationMessages=g("succeeded").messages;this.useOverrideSuccessNotification();return[4,this.handleSuccessBehavior()];case 1:o.sent();z();f();P();N.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(t){switch(t.label){case 0:if(H.paypalErrorMessage){this.notificationType="error";this.notificationTitle=L("Payment failed");this.notificationMessages=[H.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!H.orderIdCreated)return[3,2];Z("zonos-checkout-success");o=N.checkoutSessionId;void m({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=L("You're all set!");this.notificationMessages=g("succeeded").messages;this.useOverrideSuccessNotification();return[4,this.handleSuccessBehavior()];case 1:t.sent();t.label=2;case 2:z();f();P();N.checkoutSessionId=null;return[2]}}))}))};this.closeClickHandler=function(){e.closeClick.emit()};this.saveOrderIdForDuplicationIssue=function(){var o,t,n,s;var i=q(localStorage.getItem("zonos--placed-order-info"));var r={cartId:window.Zonos.cartId||null,checkoutSessionId:(i===null||i===void 0?void 0:i.checkoutSessionId)||N.checkoutSessionId||"",orderId:((o=e.order)===null||o===void 0?void 0:o.id)||null,time:(i===null||i===void 0?void 0:i.time)||Date.now(),zonosOrderNumber:((s=(n=(t=e.order)===null||t===void 0?void 0:t.references)===null||n===void 0?void 0:n.find((function(o){return o.key==="zonosOrderNumber"})))===null||s===void 0?void 0:s.value)||null};localStorage.setItem("zonos--placed-order-info",JSON.stringify(r))}}o.prototype.componentDidLoad=function(){localStorage.removeItem("zonos--placed-order-info");if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(l.isStagingMode){void this.checkStagingOrderStatus()}else if(H.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var t=W();return n(s,{key:"7b18913d8ebe7be5cbe9ee7d520b643c342c409d",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":Q({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&n("div",{key:"afb522b8b3b769817c00312fc9c14b4c032873ca",class:"zonos--finish-details"},n("div",{key:"c8cd43bc5269f7f252abaeb25dc98929f52b89bb",class:"zonos--group"},this.notificationType==="success"?n("zonos-icon",{"aria-label":"Order success",content:vo,iconColor:"blue-800",size:50}):n("zonos-icon",{"aria-label":"Order failed",content:bo,iconColor:"red-800",size:50}),n("zonos-text",{key:"1a7ead411d64fc8edf2de0383049bfd60660a315",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),n("zonos-text",{key:"0c63714bbefc4e9beb1d2cf7414e5774bab4eabe",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return n(i,null,o,n("br",null))}))),this.shouldRenderCloseButtonForRedirectBehavior()&&n("zonos-button",{key:"06304d9815e2199108dfcb3dade1494f17b76137",loading:this.isWaitingToRedirect&&this.notificationType!=="error",onClick:function(){var t;if((t=o.order)===null||t===void 0?void 0:t.id){o.redirectToMerchantSuccessPage();return}o.closeClickHandler()},size:"md",variant:"primary"},L("Close")),!window.Zonos.isLegacyCheckout&&this.shouldRenderKeepShoppingButton()&&n("zonos-button",{key:"9b809e21052fddb2149a2a1d0c22db4b10808403",onClick:function(){return o.closeClickHandler()},size:"md",variant:"primary"},this.notificationActionText)),t&&l.step==="finish"&&this.notificationType==="success"&&n("div",{key:"4a278c7c4270d265c61b6b36d20864c55e1b42f1",class:"zonos--finish-button-wrapper"},n("zonos-button",{key:"fd8a876a0c5b76edd3be2d9b28da9c3963aee714",backgroundColor:"gray-0",buttonColor:"gray-1000",onClick:function(){return o.closeClickHandler()},size:"lg",variant:"outline"},"New test cart"),n("zonos-button",{key:"7882981c1fe01ab6f78d8f84bcfc9aab94bffb74",onClick:function(){var t=window.location.hostname.includes("dashboard.zonos.com");o.redirectToUrl(t?"/orders/all":"https://dashboard.zonos.com/orders/all")},size:"lg",variant:"primary"},"View order in Dashboard"))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());ko.style=xo;var Co='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var _o='<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>\n<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>\n<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>\n</svg>\n';var So=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:absolute;bottom:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24px}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a{line-height:0}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{text-decoration:none}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:4px}}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:32px;background:var(--zonos-elements-gray-0);position:relative;padding-top:24px;bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:4px}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-icon-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";var Lo=So;var Io=o("zonos_checkout_footer",function(){function o(o){t(this,o);this.mobile=false;this.showLanguageDialog=false;this.isMobile=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=K(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=K(this.mobile)};o.prototype.render=function(){var o=this;var t;var e=(t=$.find((function(o){return o.code===R.selectedLocale})))===null||t===void 0?void 0:t.label;var i=this.dataTheme==="LIGHT"&&!this.mobile?"gray-0":"gray-1000";return n(s,{key:"aa7fe5e0bb22626f590d93a6c8a52876523a2dfb",class:A(["zonos--elements",this.isMobile&&"mobile"])},n("div",{key:"5fb0fc90649a06e324935484d0c5c1dba31d792c",class:"zonos--checkout-footer"},n("div",{key:"e34ac7fda1d9a13830276313e4a36a7840497d7e",class:"zonos--checkout-locale-wrapper"},n("zonos-button",{key:"775156c9f331715768b1bf9c36970d0c7da02fd2",buttonColor:i,class:"zonos--checkout-footer-language-button",icon:n("zonos-icon",{"aria-label":"Language select",content:Co,iconColor:i}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},e),n("div",{key:"e2cc31362529661507811b9f5aa68586b3bf9ea5",class:A(["zonos--checkout-footer-dialog",this.showLanguageDialog&&"zonos--checkout-footer-dialog-open"])},n("zonos-language-select",{key:"ad43b0a6bb947a69ea970485ee8d9afb5c8d1adb",handleOnClose:function(){return o.toggleLanguageDialog()}}))),n("div",{key:"c652833a9ce05beb22b9530003863ac0e5e9f8ea",class:"zonos--checkout-footer-icon-wrapper"},n("a",{key:"f2f8fb4ef070fe6a59a8b787e9e3e6237c2cc395",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},n("zonos-text",{key:"50b8962317bfc01bc7edbbe4c51f58476ca3c4ec",textColor:i},"Privacy policy")),n("div",{key:"7b4b70f7c0bd4ae5f385d6738f844a795261b9b9",class:"zonos--checkout-footer-logo"},n("zonos-text",{key:"8a4279a6584a376cb10e8da6b33d8006ac896d5b",textColor:i},"Powered by"),n("a",{key:"523a822b1c5b80bcb1d5dde2a7d9fce5fe476d20",href:"https://zonos.com",target:"_blank",title:"Zonos website"},n("zonos-icon",{key:"19753e93a7820765cf208916f53adebdcdf05cf9",autoHeight:true,content:_o,size:108}))))))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"]}},enumerable:false,configurable:true});return o}());Io.style=Lo;var Oo='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var jo='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var Ao=".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-5px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}";var Bo=Ao;var Do=o("zonos_checkout_payment",function(){function o(o){var e=this;t(this,o);this.continueClicked=r(this,"continueClicked",7);this.paypalSessionFailed=r(this,"paypalSessionFailed",7);this.paypalSessionDone=r(this,"paypalSessionDone",7);this.continueLoading=false;this.isMobile=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=h.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(e,[o],void 0,(function(o){var t;var e=this;var n=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){this.showErrorBanner=true;void((t=h.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var o;(o=e.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}h.checkoutSettlementCurrency=n;Z("zonos-checkout-payment-info");this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(e,void 0,void 0,(function(){var t,e;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:n.sent();return[3,3];case 2:t=n.sent();e=document.createElement("textarea");e.style.position="fixed";e.style.left="-1000px";e.style.top="-1000px";e.style.width="1px";e.style.height="1px";e.value=o;e.id="zonos-copy-card-number";document.body.appendChild(e);e.select();document.execCommand("copy");document.body.removeChild(e);return[3,3];case 3:window.Zonos.showNotification({message:L("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(t){switch(t.label){case 0:this.internalContinueLoading=true;return[4,O()];case 1:o=t.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;b();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var t;(t=o.ele.querySelector("zonos-banner"))===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.render=function(){var o=this;var t;this.hasStripePaymentError=h.hasPaymentError;if(!h.stripeElements){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var e=W();var r=l.isStagingMode||X();var a=((t=h.stripePaymentEventData)===null||t===void 0?void 0:t.value.type)==="external_paypal";var c=function(){if(r){var t=B.appearance.colorPrimary;var s=t&&oo(t)?"DARK":"LIGHT";var c=o.isMobile?B.appearance.theme:s;return n(i,null,o.stagingOrderCreateErrorMessage&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),n("zonos-empty-state-payment",{emptyStateText:L("No payment method needed for staging"),theme:c}),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},L("Place test order"))))}return n(i,null,o.showErrorBanner&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},L("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},h.customErrorMessage||L("We couldn't complete your payment. Please verify the payment details and try again.")),H.paypalErrorMessage&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},H.paypalErrorMessage),n("zonos-payment",null),n("div",{class:"zonos--group-btn"},!a&&n(i,null,n("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&h.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&h.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!l.checkoutSession){V("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:l.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},L("Pay [orderTotal]",{orderTotal:I({amount:l.total,isForeign:true})})),h.shouldRenderPayInUsdButton&&n("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&h.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&h.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},L("Click to pay in USD"))),n("zonos-paypal-payment",{onPaypalSessionDone:function(t){var e=t.detail.orderId;o.paypalSessionDone.emit(e)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:a?"block":"none"}})),e&&n("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},n("zonos-v-stack",{spacing:16},n("div",null,n("zonos-text",{type:"semiBoldLabel"},L("Test cards")),n("zonos-text",{textColor:"gray-700"},L("Click to copy the card number. Use any future expiration date and three number CVC."))),n("zonos-button",{icon:n("zonos-icon",{content:Oo}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},L("Success")," (****4242)"),n("zonos-button",{icon:n("zonos-icon",{content:jo}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},L("Failure")," (****0002)")),n("zonos-notification",null)))};return n(s,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Payment method")),c()))};Object.defineProperty(o.prototype,"ele",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());Do.style=Bo;var Mo=function(o){var t=o.backgroundColor,e=o.color;var n=T({backgroundColor1:t,backgroundColor2:e});if(n){return e}if(oo(e)){return"#ffffff"}var s=to(e).darken(25).toHexString();var i=to(e).lighten(25).toHexString();var r=T({backgroundColor1:t,backgroundColor2:s});return r?s:i};var Eo=function(o){var t=o.selectedTab,e=o.tabList;var n=e[t].index;var s=Object.values(e).slice(n-1,Object.keys(e).length).map((function(o){return o.value}));var i=Object.assign({},e);Object.values(i).forEach((function(o){if(s.includes(o.value)){o.isDone=false}}));return i};var Zo='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>\n</svg>\n';var Po=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:32px}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--zonos--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--zonos--color);height:100%;width:var(--zonos--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";var Ho=Po;var To=o("zonos_checkout_progress_tabs",function(){function o(o){t(this,o);this.tabColor=null;this.backgroundColor=null;this.getTotalSuccessStep=function(){var o=4;var t=Object.values(l.tabItems).filter((function(o){return o.isDone})).length+1;return"".concat(t/o*100,"%")};this.isTabClickable=function(o){var t=l.tabItems[o];if(!t){return false}if(t.isDone){return true}return Object.values(l.tabItems).slice(0,t.index-1).every((function(o){return o.isDone}))}}o.prototype.setTabItems=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){l.tabItems=o;return[2]}))}))};o.prototype.setTabSelected=function(o){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){if(this.isTabClickable(o)){l.step=o;t=Eo({selectedTab:o,tabList:l.tabItems});l.tabItems=t}return[2]}))}))};o.prototype.render=function(){var o=this;var t=l.step;var e=this.tabColor||B.appearance.colorSecondary;var i=this.backgroundColor||B.appearance.colorPrimary||"";var r=i&&e?Mo({backgroundColor:eo(i)?window.getComputedStyle(this.ele).getPropertyValue("--zonos-elements-".concat(i.replace("--zonos-elements-",""))):i,color:e}):e;return n(s,{key:"1db73e8a63f5eef955430c64e6f86d941619b9f6",class:"zonos--elements",style:{"--zonos--color":r,"--zonos--progress-percent":this.getTotalSuccessStep()}},n("div",{key:"a580a08d71465c78699d40f7d65a423366262d6e",class:"zonos--tab-wrapper"},Object.values(l.tabItems).map((function(e,s){var i=e.value===t;return n("button",{"aria-label":"Tab ".concat(e.label),class:A(["zonos--tab-item",e.value===t&&"selected",e.isDone&&"done"]),disabled:!o.isTabClickable(e.value),key:e.value,onClick:function(){return o.setTabSelected(e.value)}},n("div",{class:"zonos--tab-index"},n("zonos-text",{class:"zonos--tab-index-label",textColor:i?r:"gray-1000",type:"label"},s+1),n("zonos-icon",{class:"zonos--tab-index-done-icon",content:Zo,iconColor:i?r:"gray-1000"})),n("zonos-text",{textColor:i?r:"gray-1000",type:"label"},L(e.label)))}))),n("div",{key:"f3285aaaeefbb16c79b656576dc49c73483fedd8",class:"zonos--tab-progress"},n("div",{key:"74ee5173069a4269c35724a9121d9c343bd13950",class:"zonos--progress-bar-fill"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"ele",{get:function(){return a(this)},enumerable:false,configurable:true});return o}());To.style=Ho;var No=o("zonos_currency_toggle",function(){function o(o){t(this,o);this.errorImages=[]}o.prototype.handleToggleChanged=function(o){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(n){e=(t=l.exchangeRate)===null||t===void 0?void 0:t.targetCurrencyCode;l.displayBaseCurrency=e!==o;return[2]}))}))};o.prototype.render=function(){var o=this;var t=l.exchangeRate;var e=t&&t.sourceCurrencyCode!==t.targetCurrencyCode?[{label:t.sourceCurrencyCode,value:t.sourceCurrencyCode},{label:t.targetCurrencyCode,value:t.targetCurrencyCode}]:[];if(!e.length){return null}return n(s,{class:"zonos--currency-toggle zonos--elements"},n("zonos-toggle",{onToggleChanged:function(t){return o.handleToggleChanged(t.detail)},options:e,value:l.displayBaseCurrency?e[0].value:e[1].value}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());var Ro=function(o){var t=__spreadArray(["MX"],ro,true);return t.includes(o)};var Uo=function(o){var t=o.companyName,e=o.shippingCountry,n=o.taxId;var s=so({companyName:t,countryCode:e});if(!s){return{error:null,valid:true}}var i=Ro(e);if(!i){return{error:null,valid:true}}if(ro.includes(e)){if(!t.trim()){return{error:null,valid:true}}if(!n){return{error:"Tax id is required",valid:false}}return{error:null,valid:true}}if(!n){return{error:"Tax id is required",valid:false}}if(e==="MX"){var r=/^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(n);if(!r){return{error:"Invalid RFC format. Must be 12–13 uppercase letters and numbers only.",valid:false}}return{error:null,valid:true}}return{error:null,valid:true}};var Fo=".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";var Vo=Fo;var Go=o("zonos_customer_info",function(){function o(o){var e=this;t(this,o);this.continueClicked=r(this,"continueClicked",7);this.testContinueClicked=r(this,"testContinueClicked",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.isMobile=false;this.defaultAddress=[];this.shouldUseCustomAddressFormOverride=false;this.showErrorBanner=false;this.shippingCountry="";this.isCheckingForRestrictedItems=false;this.isValidatingAddress=false;this.taxIdErrorMessage="";this.invalidShippingCharacterList=null;this.invalidBillingCharacterList=null;this.openAddressValidationDialog=false;this.isEmailError=false;this.recordedFormTypeUsed=false;this.selectedCountryCode=R.selectedCountryCode;this.genericSettings=B.genericSettings;this.addressFormRenderType=l.addressFormRenderType;this.handleInvalidCharacters=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(t){switch(t.label){case 0:if(B.checkoutSettings.allowedCharacterSets==="ALL"){return[2,{hasInvalidCharacters:false}]}this.invalidShippingCharacterList=h.stripeAddressEventData?this.checkInvalidCharacters(h.stripeAddressEventData):null;this.invalidBillingCharacterList=!h.stripeShippingSameAsBilling?this.checkInvalidCharacters(h.stripeBillingAddressEventData):null;o=!!this.invalidShippingCharacterList||!!this.invalidBillingCharacterList;if(!o)return[3,2];this.openAddressValidationDialog=true;this.isValidatingAddress=true;return[4,v({addressInvalidCharactersList:this.invalidShippingCharacterList,billingAddressInvalidCharactersList:this.invalidBillingCharacterList})];case 1:t.sent();this.isValidatingAddress=false;t.label=2;case 2:return[2,{hasInvalidCharacters:o}]}}))}))};this.transformTranslatedAddressToStripeEvent=function(o){var t=o.submitData,e=o.type;var n=e==="shippingAddress"?h.stripeAddressEventData:h.stripeBillingAddressEventData;var s=t[e];if(!n||!s){return}var i=y({name:s.name}),r=i.firstName,a=i.lastName;var l=Object.assign(Object.assign({},n),{complete:true,value:Object.assign(Object.assign({},n===null||n===void 0?void 0:n.value),{address:Object.assign(Object.assign({},n===null||n===void 0?void 0:n.value.address),{city:s.city||(n===null||n===void 0?void 0:n.value.address.city)||"",line1:s.line1,line2:s.line2,postal_code:s.postal_code,state:s.state}),firstName:r,lastName:a,name:s.name})});if(e==="shippingAddress"){h.stripeAddressEventData=l}else{h.stripeBillingAddressEventData=l}};this.continueClickHandler=function(){return __awaiter(e,void 0,void 0,(function(){var o,t;var e=this;return __generator(this,(function(n){switch(n.label){case 0:(o=this.testContinueClicked)===null||o===void 0?void 0:o.emit({billingAddress:h.stripeBillingAddressEventData,sameAsBilling:h.stripeShippingSameAsBilling,shippingAddress:h.stripeAddressEventData});if(!this.handleValidate()){setTimeout((function(){var o;(o=e.el.querySelector("zonos-banner.zonos--error-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center"})}),50);this.showErrorBanner=true;return[2]}this.showErrorBanner=false;return[4,this.handleInvalidCharacters()];case 1:t=n.sent().hasInvalidCharacters;if(t){return[2]}this.continueClicked.emit({billingAddress:h.stripeBillingAddressEventData,sameAsBilling:h.stripeShippingSameAsBilling,shippingAddress:h.stripeAddressEventData});return[2]}}))}))};this.validateCustomAddressForm=function(o){var t=h.stripeShippingSameAsBilling||o==="shipping";var e=t?h.customAddressErrors:h.customBillingAddressErrors;var n=e.city,s=e.firstName,i=e.lastName,r=e.line1,a=e.phone,l=e.postalCode,c=e.state;var u=false;if(n||s||i||r||a||l||c){u=true}if(t){h.customAddressErrors=Object.assign(Object.assign({},e),{showError:u})}else{h.customBillingAddressErrors=Object.assign(Object.assign({},e),{showError:u})}return{isValid:!u}};this.handleValidate=function(){var o,t;var n=h.stripeAddressEventData;var s=h.stripeBillingAddressEventData;var i=h.stripeLinkEventData;var r=h.stripeShippingSameAsBilling?!!(n===null||n===void 0?void 0:n.complete):!!(s===null||s===void 0?void 0:s.complete);var a=!!(n===null||n===void 0?void 0:n.complete);var l=!!(i===null||i===void 0?void 0:i.complete);void((o=h.stripeAddressElement)===null||o===void 0?void 0:o.getValue());void((t=h.stripeBillingAddressElement)===null||t===void 0?void 0:t.getValue());var c=e.addressFormRenderType==="zonos"?e.validateCustomAddressForm("billing").isValid:r;var u=e.addressFormRenderType==="zonos"?e.validateCustomAddressForm("shipping").isValid:a;if(!l&&(i===null||i===void 0?void 0:i.empty)){e.isEmailError=true}V("==> isValidBilling","info",c,{address:h.stripeBillingAddressEventData,errors:h.customBillingAddressErrors});V("==> isValidShipping","info",u,{address:h.stripeAddressEventData,errors:h.customAddressErrors});V("==> isValidLink","info",l);var d=Uo({companyName:h.companyName,shippingCountry:e.shippingCountry,taxId:h.taxId}),f=d.error,p=d.valid;e.taxIdErrorMessage=!p?L(f):"";if(!c||!u||!l||!p){return false}return true};this.handleEmailValidation=function(){var o;if(!e.isEmailError){return}if(!((o=h.stripeLinkEventData)===null||o===void 0?void 0:o.empty)){e.isEmailError=false}};this.prepareAddressObject=function(o){var t;var e=o.value;return{city:e.address.city||"",country:e.address.country,email:((t=h.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"",line1:e.address.line1||"",line2:e.address.line2||"",name:e.name||"",phone:e.phone||"",postal_code:e.address.postal_code||"",state:e.address.state||""}};this.renderAddressComponent=function(o){if(!e.selectedCountryCode){void G({endpoint:"NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT",errors:["No country selected when rendering address component"],metadata:{type:o},shouldPostReleaseErrorReporting:true})}var t=o==="shipping"?e.defaultAddress:[];if(o==="shipping"&&N.checkoutSessionId&&!e.recordedFormTypeUsed){void no({attributes:[{key:"ZONOS_FORM_TYPE_USING",value:e.addressFormRenderType==="zonos"?"custom":"stripe"}],checkoutSessionId:N.checkoutSessionId});e.recordedFormTypeUsed=true}if(e.addressFormRenderType==="zonos"){return n("zonos-custom-address",{defaultAddress:t,taxIdErrorMessage:e.taxIdErrorMessage,titleText:L(o==="shipping"?"Shipping address":"Billing address"),type:o})}return n("zonos-address",{defaultAddress:t,taxIdErrorMessage:e.taxIdErrorMessage,titleText:L(o==="shipping"?"Shipping address":"Billing address"),type:o})}}o.prototype.watchShowErrorBanner=function(){if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}};o.prototype.checkInvalidCharacters=function(o){if(!o){return null}if(!o.complete||B.checkoutSettings.allowedCharacterSets==="ALL"){return null}var t=o.value,e=t.address,n=t.firstName,s=t.lastName,i=t.name;var r=e.city,a=e.country,l=e.line1,c=e.line2,u=e.postal_code,d=e.state;var h=io({city:r,country:a,line1:l,line2:c||"",name:i||"".concat(n," ").concat(s),postal_code:u,state:d});if(!Object.keys(h).length){return null}return h};o.prototype.watchShouldEnabledCustomAddress=function(){var o,t,e;var n=this.shouldUseCustomAddressFormOverride||!!((o=this.genericSettings)===null||o===void 0?void 0:o.shouldEnabledCustomAddress);var s=!!this.selectedCountryCode&&n&&!!((e=(t=this.genericSettings)===null||t===void 0?void 0:t.countryCustomAddressEnabled)===null||e===void 0?void 0:e.includes(this.selectedCountryCode));l.addressFormRenderType=s?"zonos":"stripe"};o.prototype.disconnectedCallback=function(){try{this.storeUnsubscribeList.forEach((function(o){return o()}))}catch(o){}};o.prototype.componentWillLoad=function(){var o=this;this.storeUnsubscribeList=[D("genericSettings",(function(){o.genericSettings=B.genericSettings})),U("selectedCountryCode",(function(){o.selectedCountryCode=R.selectedCountryCode})),x("addressFormRenderType",(function(){o.addressFormRenderType=l.addressFormRenderType}))];this.watchShouldEnabledCustomAddress()};o.prototype.render=function(){var o=this;var t,e,i,r,a,l;if(!h.stripeElements){return null}if(!this.shippingCountry&&h.stripeAddressEventData){this.shippingCountry=(t=h.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country}if(h.stripeAddressEventData&&this.shippingCountry!==h.stripeAddressEventData.value.address.country){this.shippingCountry=h.stripeAddressEventData.value.address.country}var c=!h.stripeShippingSameAsBilling;var u=M(B.appearance.theme);var d=((e=this.defaultAddress.find(Boolean))===null||e===void 0?void 0:e.email)||((a=(r=(i=h.customerProfile)===null||i===void 0?void 0:i.locations)===null||r===void 0?void 0:r.find(Boolean))===null||a===void 0?void 0:a.email)||((l=h.customerProfile)===null||l===void 0?void 0:l.email);return n(s,{class:"zonos--customer-info zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Customer information")),this.showErrorBanner&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},L("Missing required fields. Make sure all fields are completed.")),n("zonos-link-authentication",{defaultEmail:d,isEmailError:this.isEmailError,onLinkAuthenticationChange:this.handleEmailValidation,titleText:L("Contact")}),this.renderAddressComponent("shipping"),n("zonos-checkbox",{class:"zonos--shipping-same-as-billing-cbx",isChecked:h.stripeShippingSameAsBilling,label:L("Shipping address same as billing"),onCheckboxSelected:function(o){h.stripeShippingSameAsBilling=o.detail}}),n("zonos-collapse",{collapsed:!c},this.renderAddressComponent("billing")),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:this.submitBtnColor,bold:true,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},L("Continue to shipping")))),h.stripeAddressEventData&&n("zonos-address-update-dialog",{billingAddress:!h.stripeShippingSameAsBilling&&h.stripeBillingAddressEventData?this.prepareAddressObject(h.stripeBillingAddressEventData):null,"data-theme":u,dialogLoading:this.isValidatingAddress,dialogOpen:this.openAddressValidationDialog,isMobile:this.isMobile,onCloseUpdateDialog:function(){return o.openAddressValidationDialog=false},onContinueClicked:function(t){var e=t.detail;o.transformTranslatedAddressToStripeEvent({submitData:e,type:"shippingAddress"});o.transformTranslatedAddressToStripeEvent({submitData:e,type:"billingAddress"})},shippingAddress:this.prepareAddressObject(h.stripeAddressEventData),translatedBillingAddress:h.translatedAddress.billingAddress,translatedShippingAddress:h.translatedAddress.address}))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showErrorBanner:["watchShowErrorBanner"],shouldUseCustomAddressFormOverride:["watchShouldEnabledCustomAddress"],genericSettings:["watchShouldEnabledCustomAddress"],selectedCountryCode:["watchShouldEnabledCustomAddress"]}},enumerable:false,configurable:true});return o}());Go.style=Vo;var Yo=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{height:100%;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;gap:20px}:host .zonos--restState-image{width:124px;height:124px;margin-bottom:15px}:host .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:8px}";var qo=Yo;var Wo=o("zonos_rest_state",function(){function o(o){var n=this;t(this,o);this.isErrorImageLoad=false;this.getImageRestState=function(){var o=e("./assets/".concat(n.restStateType,".png"));return o}}o.prototype.render=function(){var o=this;var t=this.getImageRestState();return n(s,{key:"4dd1bf92f89b6433673643621d4d2e91c32dc9c0",class:A(["zonos--elements zonos--restState"]),style:{"--zonos--font-family":E()}},n("div",{key:"1635b6b084c26f973405a863c898087f7805af4a",class:"zonos--restState-image"},n("img",{key:"305262852c1bc4df2fae58e9d18fe9ef48108155",alt:this.restStateType,onError:function(){o.isErrorImageLoad=true},src:t})),n("div",{key:"b25da09d4d56ab01b5bcb1d219337a94208e8272",class:"content"},n("zonos-text",{key:"1d0bfb2cd2473df240fb6f54eb1329a7aa34009f",class:"title",type:"boldSubheader"},this.restStateTitle),n("zonos-text",{key:"7dd2da6e10a7e07649534673f7a5b630e1e98a91",class:"subtitle"},this.restStateSubtitle)),n("div",{key:"1ccb01b392f0bca4687a3a1b0fe7a55e6fac69a2",class:"action"},n("slot",{key:"f8200baab65872d4c4c28e53c791f6fc406199e5"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());Wo.style=qo;var Ko='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var Xo='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var Jo=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-pack:justify;justify-content:space-between;padding:4px 0;margin-bottom:8px;background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:8px}:host(.mobile) .zonos--total-pay{margin:0}";var Qo=Jo;var $o=o("zonos_review",function(){function o(o){t(this,o);this.mobile=false;this.collapsed=false;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=K(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=K(this.mobile)};o.prototype.render=function(){var o=this;var t=c()?l.total:0;var e=this.isMobile?"boldSubheader":"semiBoldLabel";var i=this.isMobile?"boldSubheader":"secondaryPageHeader";var r=this.isMobile?"gray-1000":"gray-800";var a=function(){if(!o.isMobile){return null}if(!o.collapsed){return n("zonos-icon",{"aria-label":"Collapse expanded section",content:Ko,iconColor:"gray-1200"})}return n("zonos-icon",{"aria-label":"Expand collapsed section",content:Xo,iconColor:"gray-1200"})};return n(s,{class:A(["zonos--review zonos--elements",this.isMobile&&"mobile"])},n("div",{class:"zonos--title"},n("zonos-text",{textColor:r,type:e},L("Pay [organizationName]",{organizationName:B.organizationName})),a()),n("div",{class:"zonos--total-pay"},n("zonos-text",{type:i},I({amount:t,isForeign:true}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());$o.style=Qo;var ot='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var tt='.sc-zonos-shipping-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:-16px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:16px}.sc-zonos-shipping-h .zonos--shipping-method-error.sc-zonos-shipping{margin-top:24px}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;z-index:1;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h .zonos--shipping-options-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:transparent;width:100%;border:none;cursor:pointer;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping{margin-bottom:0}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::before,.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping .zonos--title-wrapper.sc-zonos-shipping{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}.sc-zonos-shipping-h .zonos--dap-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}';var et=tt;var nt=o("zonos_shipping",function(){function o(o){var e=this;t(this,o);this.continueClicked=r(this,"continueClicked",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.selectedShippingMethod=null;this.collapsedDAPOptions=true;this.isSelecting=false;this.showErrorBanner=false;this.serviceLevelsDDP=[];this.serviceLevelsDAP=[];this.serviceLevelsOther=[];this.serviceLevelsAll=[];this.displayBaseCurrency=false;this.shippingData=[];this.handleRadioSelected=function(o){return __awaiter(e,void 0,void 0,(function(){var t,e;var n=this;return __generator(this,(function(s){switch(s.label){case 0:this.selectedShippingMethod=o.detail;if(!this.selectedShippingMethod){return[2]}e=((t=l.shippingData)===null||t===void 0?void 0:t.find((function(o){var t;return o.id===((t=n.selectedShippingMethod)===null||t===void 0?void 0:t.shipmentRatingId)})))||null;if(!e){return[2]}this.isSelecting=true;return[4,w()];case 1:s.sent();return[4,k({applySubtotalsOnly:false,landedCostId:o.detail.landedCostId,selectedShippingOption:e})];case 2:s.sent();this.isSelecting=false;return[2]}}))}))};this.handleValidate=function(){return!!e.selectedShippingMethod};this.isOutdatedShippingData=function(){var o;var t=!!((o=l.shippingData)===null||o===void 0?void 0:o.some((function(o){var t;var n=(t=e.serviceLevelsAll)===null||t===void 0?void 0:t.find((function(t){return t.shipmentRatingId===o.id}));if(!n){return true}})));return t};this.continueClickHandler=function(){var o;if(!e.handleValidate()){e.showErrorBanner=true;return}Z("zonos-checkout-shipping-info");var t=N.checkoutSessionId;void m({checkoutSessionId:t,eventName:"checkout_shippingInfoCompleted",metadata:{serviceLevelId:(o=e.selectedShippingMethod)===null||o===void 0?void 0:o.value}});e.showErrorBanner=false;e.continueClicked.emit()};this.getLandedCostMethodLabelSuffix=function(o){var t,e,n;switch(true){case o==="DAP"&&!((e=(t=B.genericSettings)===null||t===void 0?void 0:t.domesticCountries)===null||e===void 0?void 0:e.includes(((n=h.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country)||"US")):return L(" (Duties due at door)");default:return""}};this.initServiceLevels=function(){var o;e.collapsedDAPOptions=true;var t=((o=l.shippingData)===null||o===void 0?void 0:o.flatMap((function(o){var t;var n=C(o);var s=n?"".concat(n.minTransit,"-").concat(n.maxTransit," ").concat(n.unit):"";var i=(t=l.landedCostData)===null||t===void 0?void 0:t.filter((function(t){var e;return((e=t.landedCost)===null||e===void 0?void 0:e.shipmentRating.id)===o.id}));return(i===null||i===void 0?void 0:i.map((function(t){var n=t.subtotals.shipping;var i=_(t.landedCost);var r={amount:n,label:"".concat(o.displayName).concat(e.getLandedCostMethodLabelSuffix(i)),landedCostId:t.landedCostId,method:i,price:I({amount:n,isForeign:true}),shipmentRatingId:o.id,sublabel:s,value:t.landedCostId};return r})))||[]})))||[];var n=t.filter((function(o){return o.method==="DDP"}));var s=t.filter((function(o){return o.method==="DAP"}));var i=t.filter((function(o){return o.method!=="DAP"&&o.method!=="DDP"}));e.serviceLevelsDDP=S(n);e.serviceLevelsDAP=S(s);e.serviceLevelsOther=S(i);e.serviceLevelsAll=__spreadArray(__spreadArray(__spreadArray([],e.serviceLevelsDDP,true),e.serviceLevelsDAP,true),e.serviceLevelsOther,true);var r=__spreadArray(__spreadArray([],e.serviceLevelsDDP,true),e.serviceLevelsOther,true);if(!r.length){e.collapsedDAPOptions=false}};this.isCurrencyToggled=function(){if(e.displayBaseCurrency!==l.displayBaseCurrency){e.displayBaseCurrency=l.displayBaseCurrency;return true}return false};this.preselectFirstShippingMethod=function(){return __awaiter(e,void 0,void 0,(function(){var o,t;return __generator(this,(function(e){this.initServiceLevels();o=this.serviceLevelsAll.find((function(o){var t;return o.shipmentRatingId===((t=l.selectedShippingOption)===null||t===void 0?void 0:t.id)}))||null;if(o){void this.handleRadioSelected({detail:o});return[2]}t=this.serviceLevelsAll.find(Boolean);if(t){void this.handleRadioSelected({detail:t})}return[2]}))}))}}o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.componentWillLoad=function(){var o=this;this.storeUnsubscribeList=[x("shippingData",(function(){if(o.isOutdatedShippingData()){void o.preselectFirstShippingMethod()}})),x("landedCostData",(function(){if(o.isOutdatedShippingData()){void o.preselectFirstShippingMethod()}}))];void this.preselectFirstShippingMethod()};o.prototype.render=function(){var o=this;if(this.isCurrencyToggled()){this.initServiceLevels()}var t=__spreadArray(__spreadArray([],this.serviceLevelsDDP,true),this.serviceLevelsOther,true);if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var e=function(){var e;if(((e=h.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country)==="US"){return n("zonos-shipping-rich-radio",{items:o.serviceLevelsAll,onRadioSelected:function(t){return o.handleRadioSelected(t)},selectedItem:o.selectedShippingMethod})}return n(i,null,n("zonos-shipping-rich-radio",{items:t,onRadioSelected:function(t){return o.handleRadioSelected(t)},selectedItem:o.selectedShippingMethod}),!!t.length&&!!o.serviceLevelsDAP.length&&n("button",{class:A(["zonos--shipping-options-collapse-trigger",o.collapsedDAPOptions&&"collapsed"]),onClick:function(){o.collapsedDAPOptions=!o.collapsedDAPOptions}},n("div",{class:"zonos--title-wrapper"},n("zonos-text",{type:"label"},"".concat(L(o.collapsedDAPOptions?"Show non-prepaid options":"Hide non-prepaid options")," ")),n("zonos-icon",{content:ot}))),n("zonos-collapse",{collapsed:o.collapsedDAPOptions},n("div",{class:"zonos--dap-wrapper"},n("zonos-banner",{bannerTitle:L("Duties and taxes will be charged upon delivery."),intent:"warning"},L("You may incur additional fees from the shipping carrier by not prepaying.")),n("zonos-shipping-rich-radio",{items:o.serviceLevelsDAP,onRadioSelected:function(t){return o.handleRadioSelected(t)},selectedItem:o.selectedShippingMethod}))))};return n(s,{class:"zonos--shipping zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Delivery options")),this.showErrorBanner&&!!this.serviceLevelsAll.length&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},L("No shipping method selected")),n("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},L("Shipping method")),!this.serviceLevelsAll.length?n("zonos-banner",{bannerTitle:l.customQuotingError?l.customQuotingError:L('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'),class:"zonos--shipping-method-error",intent:"error"}):n("div",{class:"zonos--shipping-options-wrapper"},e()),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:this.submitBtnColor,bold:true,loading:this.continueLoading||this.isSelecting,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},L("Go to payment")))))};return o}());nt.style=et}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as o,H as i}from"./p-b30c2ad9.js";import{c as n}from"./p-2a6c964d.js";import{i as s,e as r,s as c,a as l}from"./p-40a4266f.js";import{z as a,e as d,f as h}from"./p-7ce093aa.js";import{g as u,i as p,a as f}from"./p-e7b0c156.js";import{h as m,b as v,l as w}from"./p-a8a312b2.js";import"./p-27d9abab.js";import"./p-56e0ed65.js";import"./p-2b9c124d.js";import"./p-04a01cb1.js";const g=t=>{const e=document.querySelector(t);if(!document.querySelector("zonos-hello")&&e){const t=document.createElement("zonos-hello");return e.appendChild(t),!0}return!1},y=t=>{switch(t){case"BOTTOM_RIGHT":default:return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right"}},b=({position:t="bottom-right"})=>{const e=".zonos--hello-mobile-wrapper";if(document.querySelector(e))return e;const o=document.createElement("div");return o.className="zonos--hello-mobile-wrapper",o.style.position="fixed","top-right"===t&&(o.style.top="72px",o.style.right="24px"),"top-left"===t&&(o.style.top="72px",o.style.left="24px"),"bottom-right"===t&&(o.style.bottom="72px",o.style.right="24px"),"bottom-left"===t&&(o.style.bottom="72px",o.style.left="24px"),o.style.zIndex="2147483647",document.body.appendChild(o),e},S=async t=>{if(window.Zonos.isLegacyCheckout)return void w("Hello is disabled when isLegacyCheckout","info");const{anchorElementSelector:e}=t;let o=e;if(!t.anchorElementSelector&&t.desktopLocation){const t=b({position:"bottom-right"});o=t}if(o&&s(o)){if(w("Hello init complete"),!g(o)){const e=new MutationObserver((()=>{g(o)&&e.disconnect()}));e.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{g(o)}),1e3),setTimeout((()=>{if(t.notFoundElementFallback){w(`Hello anchor selector ${t.anchorElementSelector} not found after 3 seconds, falling back to 'notFoundElementFallback': ${t.notFoundElementFallback}`,"info");const e=b({position:y(t.notFoundElementFallback)});g(e)}}),3e3)}}else v(`Selector anchorElementSelector "${t.anchorElementSelector}" is not a valid selector.`)};class z{constructor(t,e){this.targetId=t,this.allowedEvents=e,this.listeners=new Map,this.handleMessage=t=>{var e,o,i;const n=t.data,s=(null===(e=this.iframe)||void 0===e?void 0:e.contentWindow)||(null===(i=null===(o=this.iframe)||void 0===o?void 0:o.contentDocument)||void 0===i?void 0:i.defaultView);if(t.source!==s)return;if(!this.isValidMessage(n))return;const r=this.listeners.get(n.type);null==r||r.forEach((t=>{try{t(n.payload)}catch(t){v("Error in event listener:",t)}}))},this.initializeEventListeners(),this.iframe=document.getElementById(this.targetId)}initializeEventListeners(){window.addEventListener("message",this.handleMessage)}isValidMessage(t){if(!t||"object"!=typeof t)return!1;const e=t;return e.id===this.targetId&&"string"==typeof e.type&&this.allowedEvents.includes(e.type)&&void 0!==e.payload}on(t,e){this.listeners.has(t)||this.listeners.set(t,new Set),w(`[CheckoutAddressService] listening to ${t}`,"info");const o=e,i=this.listeners.get(t);return i&&i.add(o),()=>{const e=this.listeners.get(t);e&&e.delete(o)}}destroy(){window.removeEventListener("message",this.handleMessage),this.listeners.clear()}}class j extends z{constructor(){w("=== [Google Places Service] Initializing","info"),super(p.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])}sendMessage(t,e){var o;if(!(null===(o=this.iframe)||void 0===o?void 0:o.contentWindow))return;const i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:e,type:t};w(`GooglePlacesService] parent --\x3e ${t}`,"info",e),this.iframe.contentWindow.postMessage(i,"*")}initialize(){this.sendMessage("initializeGooglePlacesService",{})}fetchSuggestions({country:t,query:e,type:o}){t&&this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[t],input:e},type:o})}selectPlace({placeId:t,type:e}){this.sendMessage("placeSelected",{placeId:t,type:e})}}class O{constructor(){this.googlePlaceInitialized=!1,w("=== [CheckoutAddressService] Initializing","info"),this.googlePlaces=new j,this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{w("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info"),this.googlePlaceInitialized=!0})),this.initialize()}initialize(){this.googlePlaces.initialize()}onInitializeGooglePlacesService(t){return this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{w("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService"),t()}))}isGooglePlaceInitialized(){return this.googlePlaceInitialized}onAddressSuggestions(t){return this.suggestionsCallback=t,this.googlePlaces.on("onFetchAutocompleteSuggestions",((...e)=>{w(`[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ${e[0].type}`,"info",...e),t(...e)}))}onAddressSelected(t){return this.placeSelectedCallback=t,this.googlePlaces.on("onPlaceSelected",((...e)=>{w(`[CheckoutAddressService] parent <-- onPlaceSelected ${e[0].type}`,"info",...e),t(...e)}))}getAddressSuggestions({country:t,query:e,type:o}){this.googlePlaceInitialized&&this.googlePlaces.fetchSuggestions({country:t,query:e,type:o})}selectAddress({placeId:t,type:e}){this.googlePlaces.selectPlace({placeId:t,type:e})}destroy(){this.googlePlaces.destroy(),this.suggestionsCallback&&(this.suggestionsCallback=void 0),this.placeSelectedCallback&&(this.placeSelectedCallback=void 0)}}const I=class{constructor(o){t(this,o),this.paypalInitEvent=e(this,"paypalInitEvent",7),this.stripeInitEvent=e(this,"stripeInitEvent",7)}async initCheckoutElement(t){var e;t?(n.stripe=t,((e=a.checkoutSettings).placeOrderButtonSelector||e.alwaysTriggerInternationalCheckoutSelector||window.Zonos.cartData)&&(!e.placeOrderButtonSelector||s(e.placeOrderButtonSelector)?!e.alwaysTriggerInternationalCheckoutSelector||s(e.alwaysTriggerInternationalCheckoutSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const t=document.createElement("zonos-checkout");document.body.appendChild(t)}})():v(`Selector alwaysTriggerInternationalCheckoutSelector "${e.alwaysTriggerInternationalCheckoutSelector}" is not a valid selector`):v(`Selector checkoutButtonAnchor "${e.placeOrderButtonSelector}" is not a valid selector`)),w("init checkout element")):w("Stripe is not loaded yet - cannot init checkout element","warn")}async initCollectElement(t){t?(n.stripe=t,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-collect")){const t=document.createElement("zonos-collect");document.body.appendChild(t)}})(),w("init Collect element")):w("Stripe is not loaded yet - cannot init Collect element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const t=document.createElement("zonos-notification");document.body.appendChild(t)}async setupGoogleFont(t){var e,o;const i=t||h();if("Inter"===i){if(!t)return;w("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),a.appearance=Object.assign(Object.assign({},a.appearance),{fontFamily:t})}const n=new URLSearchParams;n.set("family",i);const{errors:s,json:r}=await m(`/api/zonos-elements/get-font-detail?${n.toString()}`);if(s.length>0)return w(`Failed to load font ${i}`,"warn"),void(a.appearance=Object.assign(Object.assign({},a.appearance),{fontFamily:"Inter"}));const c=null==r?void 0:r.fontUrl;c&&(null===(o=(e=window.Zonos).injectSupportGoogleFont)||void 0===o||o.call(e,c)),t&&(w(`[FONT] ${t} font override applied`),a.appearance=Object.assign(Object.assign({},a.appearance),{fontFamily:t}))}handleLocationChange(){S(a.helloSettings)}initHistoryListener(){const t=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)};const e=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),e.apply(this,arguments)}}injectCustomHTML(t){if(!t)return;if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect)return void w("=== Skip injecting custom HTML for hosted checkout","info");w("=== Injecting custom HTML for hosted checkout");const e=document.createElement("template");e.innerHTML=t,e.content.querySelectorAll("script").forEach((t=>{const e=document.createElement("script");t.src?(e.src=t.src,e.async=t.async):e.textContent=t.innerHTML,document.body.appendChild(e)}))}async initGooglePlacesService(t){const e=null==t?void 0:t.genericSettings;if(!e)return;const o=e.signedTokenGooglePlaces;o&&f({id:p.GOOGLE_PLACES,onload:()=>{a.checkoutAddressService=new O},src:`https://route.elements.zonos.com/iframe/google-maps?signedToken=${o}`})}buildBaseConfig(t){var e,o;const i=Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:void 0,captureDelay:void 0,subscriptionStatus:void 0});if(window.Zonos.isCollect)return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{visibilityStatus:"DISABLED"})});if(!this.config.checkoutSettings)return Object.assign(Object.assign({},this.config),{checkoutSettings:void 0});const n=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&"CLOSE_MODAL"===(null===(e=this.config.checkoutSettings)||void 0===e?void 0:e.successBehavior);return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{successBehavior:n?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:n?(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||(null==t?void 0:t.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})}async componentWillLoad(){this.initHistoryListener(),a.zonosApiKey=this.zonosApiKey,(async()=>{var t,e,o,i;const{errors:n,json:s,zonosMode:c}=await(async()=>{if(window.Zonos.cartSettings)return{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode};const t=u(),e=new URLSearchParams;t.overrideShouldEnabledCustomAddress&&e.set("overrideShouldEnabledCustomAddress",t.overrideShouldEnabledCustomAddress);const{errors:o,json:i,zonosMode:n}=await m(`/api/zonos-elements/zonos-settings?${e.toString()}`);return o.length?(v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null,zonosMode:n}):{errors:[],json:i,zonosMode:n}})();if("403"===(null===(e=null===(t=n[0])||void 0===t?void 0:t.type)||void 0===e?void 0:e.toString()))return void w("Failed to load zonos settings. This domain may not have access","warn");const l=(null===(o=null==s?void 0:s.checkoutSettings)||void 0===o?void 0:o.customHTML)||"";this.injectCustomHTML(l),this.initZonosNotification();const h=this.buildBaseConfig(s),p=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:(()=>{var t,e,o;return window.Zonos.isLegacyCheckout?(null===(t=null==s?void 0:s.appearanceSettings)||void 0===t?void 0:t.logoUrl)||(null===(e=this.config.appearance)||void 0===e?void 0:e.logoUrl):null===(o=this.config.appearance)||void 0===o?void 0:o.logoUrl})()})}),h);d({overrideSettings:p,zonosSettings:s}),a.zonosMode=c,this.setupGoogleFont(),"DISABLED"===a.helloSettings.visibilityStatus&&w("=== Hello is disabled by store owner ===","warn"),a.helloSettings&&"ENABLED"===a.helloSettings.visibilityStatus&&(w("Initializing hello"),S(a.helloSettings)),await r();const f=(null===(i=null==s?void 0:s.checkoutSettings)||void 0===i?void 0:i.externalServiceTokens.find((t=>"STRIPE_PUBLISHABLE_TOKEN"===t.type)))||null;if(f&&this.stripeInitEvent){if(window.Zonos.isCollect)return this.stripeInitEvent.emit({publishableKey:f.token}),void this.initGooglePlacesService(s);if("INACTIVE"===a.checkoutSettings.subscriptionStatus)return w('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void w("zonos controller loaded");if("DISABLED"===a.checkoutSettings.visibilityStatus)return w("=== Checkout is disabled by store owner ===","warn"),void w("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:f.token}),this.initGooglePlacesService(s)}else w("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(t){const e=document.querySelector("zonos-notification");e?e.showNotification(t):w("Failed to show notification - zonos-notification not found","warn")}async reset(){c.checkoutSessionId=null,n.clientSecret=""}async overrideConfig(t){d({overrideSettings:t,zonosSettings:null})}async overrideCountry(t){w(`Override country code to ${t}`),l(t)}async getAppearanceSetting(){return a.appearance}async updateOrganizationName(t){a.organizationName=t}render(){return o(i,{key:"ca4c02bf0aa73d19ea58cdf6a76c8424276b69cd",class:"zonos--elements"})}};I.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";export{I as zonos_controller}
|