@zonos/elements 1.3.285 → 1.3.287
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/README.md +9 -1
- package/dist/cjs/RemoveIcon-CuM1YmjP.js +5 -0
- package/dist/cjs/{cart-94908542.js → cart-CV4buPlT.js} +43 -30
- package/dist/cjs/{collect-0c05e2b4.js → collect-jzWKzrV7.js} +17 -113
- package/dist/cjs/debounce-5sZmmlCI.js +9 -0
- package/dist/cjs/debounce-Nu2lJW4A.js +405 -0
- package/dist/cjs/{formatStringWithLinks-c25b4018.js → formatStringWithLinks-vOVkAjlu.js} +1 -1
- package/dist/cjs/{getBorderRadius-97fd5e02.js → getBorderRadius-DGZiQu09.js} +1 -1
- package/dist/cjs/{getContrastColor-956dfaf7.js → getContrastColor-B2Kn8XHA.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-124b3f20.js → getMissingRequiredShippingFields-r5vYIqoX.js} +1 -1
- package/dist/cjs/{handleFetch-954f30e1.js → handleFetch-DQLhurnE.js} +4 -3
- package/dist/cjs/{hasInclusivePrice-d0cd2007.js → hasInclusivePrice-BZMQohG9.js} +1 -1
- package/dist/cjs/{helpers-5bdbb68c.js → helpers-ClOZ11A9.js} +0 -3
- package/dist/cjs/{index-b1f95d96.js → index-DAAr465v.js} +1252 -580
- package/dist/cjs/index.cjs.js +17 -21
- package/dist/cjs/{invoice-205fb5bc.js → invoice-CHw-mJdS.js} +6 -6
- package/dist/cjs/{isContrastColor-30f84a91.js → isContrastColor-B9ldIdpa.js} +1 -1
- package/dist/cjs/isDarkColor-f-fD9c2l.js +1187 -0
- package/dist/cjs/loader.cjs.js +3 -5
- package/dist/cjs/{localization-fb2ece37.js → localization-CxXsmxs5.js} +4 -4
- package/dist/cjs/{paypal-45ca5301.js → paypal-BLuHeOJH.js} +10 -9
- package/dist/cjs/{placeTestOrder-302b6862.js → placeTestOrder-VK_CMeq0.js} +3 -3
- package/dist/cjs/{renderCheckoutCurrency-1b0cd5f2.js → renderCheckoutCurrency-CC4CAy-a.js} +2 -2
- package/dist/cjs/{renderFallback-bc20ee20.js → renderFallback-Bme86uk8.js} +1 -1
- package/dist/cjs/{shouldRenderTaxIdInput-7d19556c.js → shouldRenderTaxIdInput-TxekHCp7.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-82985128.js → shouldShowLanguageSelect-Bj_jKWPK.js} +1 -1
- package/dist/cjs/{submitGtag-8a25f001.js → submitGtag-CcEL-w5D.js} +3 -3
- package/dist/cjs/throttle-BcxGntLr.js +87 -0
- package/dist/cjs/{updateCheckoutSessionAttributes-de7b1466.js → updateCheckoutSessionAttributes-Dltl5RBx.js} +3 -3
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +644 -692
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +13 -17
- package/dist/cjs/zonos-address_4.cjs.entry.js +50 -40
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +15 -16
- package/dist/cjs/zonos-badge.cjs.entry.js +7 -10
- package/dist/cjs/zonos-banner.cjs.entry.js +6 -9
- package/dist/cjs/zonos-button_3.cjs.entry.js +18 -21
- package/dist/cjs/zonos-card_5.cjs.entry.js +34 -35
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +101 -87
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +10 -14
- package/dist/cjs/zonos-checkout.cjs.entry.js +151 -37
- package/dist/cjs/zonos-collapse.cjs.entry.js +5 -8
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +18 -23
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +59 -55
- package/dist/cjs/zonos-collect.cjs.entry.js +20 -23
- package/dist/cjs/zonos-component.cjs.entry.js +3 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +13 -16
- package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -11
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +68 -57
- package/dist/cjs/zonos-elements.cjs.js +7 -7
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +22 -23
- package/dist/cjs/zonos-hello.cjs.entry.js +19 -17
- package/dist/cjs/zonos-input.cjs.entry.js +10 -11
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +17 -21
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +57 -52
- package/dist/cjs/zonos-invoice.cjs.entry.js +19 -22
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +11 -15
- package/dist/cjs/zonos-link.cjs.entry.js +3 -6
- package/dist/cjs/zonos-logo.cjs.entry.js +6 -9
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +15 -19
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +11 -14
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +15 -14
- package/dist/cjs/zonos-text.cjs.entry.js +8 -11
- package/dist/cjs/zonos-tooltip.cjs.entry.js +4 -7
- package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -9
- package/dist/cjs/zonosStore-BCNYr6Tk.js +3808 -0
- package/dist/collection/__tests__/jsxWithChildren.types.js +13 -0
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.js +13 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +4 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +17 -13
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +21 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +7 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +5 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +8 -8
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +5 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +121 -18
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +13 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +7 -7
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +8 -6
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +6 -5
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +4 -4
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +7 -7
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +8 -6
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +6 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +4 -4
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +7 -7
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +8 -7
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -4
- package/dist/collection/components/common/zonos-button/zonos-button.js +29 -25
- package/dist/collection/components/common/zonos-card/zonos-card.js +9 -8
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -12
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +9 -6
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +15 -15
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +6 -5
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +22 -21
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +3 -2
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -7
- package/dist/collection/components/common/zonos-input/zonos-input.js +7 -7
- package/dist/collection/components/common/zonos-link/zonos-link.js +7 -7
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +4 -4
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -3
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +8 -7
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +15 -12
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +2 -2
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +3 -3
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +17 -17
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +23 -20
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +19 -19
- package/dist/collection/components/common/zonos-text/zonos-text.js +15 -11
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -3
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +3 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +7 -6
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +3 -3
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +16 -12
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +3 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -11
- package/dist/collection/components/main/zonos-controller.js +18 -10
- package/dist/collection/components/store/checkout/cart.js +14 -1
- package/dist/collection/components/store/checkout/stripe.js +1 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -8
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +6 -4
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +13 -10
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +4 -4
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
- package/dist/collection/components/utils/checkout/isEuDapRemittance.js +1 -1
- package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +1 -1
- package/dist/collection/components/utils/validateCheckoutSession.js +11 -3
- package/dist/collection/scripts/cart/_setupCartData.js +2 -2
- package/dist/collection/scripts/cart/_setupCartDataWithSettings.js +2 -2
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +76 -6
- package/dist/esm/RemoveIcon-C2QMVeWW.js +3 -0
- package/dist/esm/{cart-2e407f7b.js → cart-ekBk_gxV.js} +42 -31
- package/dist/esm/{collect-19428e18.js → collect-33rMINDo.js} +17 -113
- package/dist/esm/debounce-D4ko2kvZ.js +403 -0
- package/dist/esm/debounce-DWPsxJsW.js +7 -0
- package/dist/esm/{formatStringWithLinks-0d48f183.js → formatStringWithLinks-BcMPqGl0.js} +1 -1
- package/dist/esm/{getBorderRadius-1f7be586.js → getBorderRadius-HwG64EKM.js} +1 -1
- package/dist/esm/{getContrastColor-4c0ae8c1.js → getContrastColor-CfCPlW9U.js} +2 -2
- package/dist/esm/{getMissingRequiredShippingFields-719b206f.js → getMissingRequiredShippingFields-u1nhQzJ1.js} +1 -1
- package/dist/esm/{handleFetch-a844cac1.js → handleFetch-D5GYDF-O.js} +4 -3
- package/dist/esm/{hasInclusivePrice-d801be22.js → hasInclusivePrice-CAVXi310.js} +1 -1
- package/dist/esm/{helpers-2f6955b1.js → helpers-DJIdCwJ5.js} +0 -3
- package/dist/esm/{index-cfd394c8.js → index-_lt63o7c.js} +1253 -561
- package/dist/esm/index.js +20 -22
- package/dist/esm/{invoice-67a47785.js → invoice-BNDWuVsD.js} +6 -6
- package/dist/esm/{isContrastColor-9fa0d013.js → isContrastColor-CWLU13s9.js} +1 -1
- package/dist/esm/isDarkColor-YdrG78th.js +1184 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{localization-36a4dc22.js → localization-AOqYXGdP.js} +5 -5
- package/dist/esm/{paypal-6dca6567.js → paypal-CW1D2XqZ.js} +10 -9
- package/dist/esm/{placeTestOrder-9563c89a.js → placeTestOrder-nhmsLLOA.js} +3 -3
- package/dist/esm/{renderCheckoutCurrency-282384f0.js → renderCheckoutCurrency-BQANmZyM.js} +2 -2
- package/dist/esm/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
- package/dist/esm/{shouldRenderTaxIdInput-ef7b5860.js → shouldRenderTaxIdInput-CKyZ6Zni.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-328f50e2.js → shouldShowLanguageSelect-BQFCXouB.js} +1 -1
- package/dist/esm/{submitGtag-71c450b6.js → submitGtag-CCGQS060.js} +4 -4
- package/dist/esm/throttle-D5GyA3yr.js +85 -0
- package/dist/esm/{updateCheckoutSessionAttributes-23b222de.js → updateCheckoutSessionAttributes-eRSqdC74.js} +3 -3
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +644 -690
- package/dist/esm/zonos-address-display_2.entry.js +13 -15
- package/dist/esm/zonos-address_4.entry.js +50 -38
- package/dist/esm/zonos-airwallex-payment.entry.js +15 -14
- package/dist/esm/zonos-badge.entry.js +7 -8
- package/dist/esm/zonos-banner.entry.js +6 -7
- package/dist/esm/zonos-button_3.entry.js +18 -19
- package/dist/esm/zonos-card_5.entry.js +34 -33
- package/dist/esm/zonos-cart-items_12.entry.js +101 -85
- package/dist/esm/zonos-checkbox_2.entry.js +10 -12
- package/dist/esm/zonos-checkout.entry.js +151 -35
- package/dist/esm/zonos-collapse.entry.js +5 -6
- package/dist/esm/zonos-collect-cart-items_3.entry.js +18 -21
- package/dist/esm/zonos-collect-finish_6.entry.js +59 -53
- package/dist/esm/zonos-collect.entry.js +20 -21
- package/dist/esm/zonos-component.entry.js +3 -4
- package/dist/esm/zonos-controller.entry.js +13 -14
- package/dist/esm/zonos-country-flag.entry.js +8 -9
- package/dist/esm/zonos-country-select_4.entry.js +68 -55
- package/dist/esm/zonos-elements.js +6 -5
- package/dist/esm/zonos-hello-dialog.entry.js +22 -21
- package/dist/esm/zonos-hello.entry.js +19 -15
- package/dist/esm/zonos-input.entry.js +10 -9
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +17 -19
- package/dist/esm/zonos-invoice-finish_5.entry.js +57 -50
- package/dist/esm/zonos-invoice.entry.js +19 -20
- package/dist/esm/zonos-language-select_2.entry.js +11 -13
- package/dist/esm/zonos-link.entry.js +3 -4
- package/dist/esm/zonos-logo.entry.js +6 -7
- package/dist/esm/zonos-policy-consent_2.entry.js +15 -17
- package/dist/esm/zonos-shipping-rich-radio.entry.js +11 -12
- package/dist/esm/zonos-stripe-input.entry.js +15 -12
- package/dist/esm/zonos-text.entry.js +8 -9
- package/dist/esm/zonos-tooltip.entry.js +4 -5
- package/dist/esm/zonos-v-stack.entry.js +6 -7
- package/dist/esm/zonosStore-DrIOAz4M.js +3795 -0
- package/dist/esm-es5/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +5 -1
- package/dist/esm-es5/VarianceTest-BJmZPrZl.js +9 -0
- package/dist/esm-es5/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +4 -0
- package/dist/esm-es5/cart-ekBk_gxV.js +517 -0
- package/dist/esm-es5/classes-BJHSB96f.js +10 -0
- package/dist/esm-es5/cleanHtmlMarkdown-ByGDytaN.js +191 -0
- package/dist/esm-es5/collect-33rMINDo.js +241 -0
- package/dist/esm-es5/containsNonLatinChars-C04AWRC2.js +11 -0
- package/dist/esm-es5/createCustomEvent-XQfWgQLB.js +6 -0
- package/dist/esm-es5/debounce-D4ko2kvZ.js +153 -0
- package/dist/esm-es5/debounce-DWPsxJsW.js +1 -0
- package/dist/esm-es5/formatStringWithLinks-BcMPqGl0.js +8 -0
- package/dist/esm-es5/getBorderRadius-HwG64EKM.js +8 -0
- package/dist/esm-es5/getContrastColor-CfCPlW9U.js +14 -0
- package/dist/esm-es5/getGenericSettingsOverride-HeAZDwVW.js +4 -0
- package/dist/esm-es5/getMissingRequiredShippingFields-u1nhQzJ1.js +20 -0
- package/dist/esm-es5/handleFetch-D5GYDF-O.js +60 -0
- package/dist/esm-es5/hasInclusivePrice-CAVXi310.js +6 -0
- package/dist/esm-es5/helpers-DJIdCwJ5.js +23 -0
- package/dist/esm-es5/index-_lt63o7c.js +162 -0
- package/dist/esm-es5/index.js +227 -1
- package/dist/esm-es5/invoice-BNDWuVsD.js +13 -0
- package/dist/esm-es5/isColorVariable-DXXUq2Lv.js +11 -0
- package/dist/esm-es5/isContrastColor-CWLU13s9.js +5 -0
- package/dist/esm-es5/isDarkColor-YdrG78th.js +204 -0
- package/dist/esm-es5/isSameHostCheckoutLink-BxAHnL5J.js +16 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-AOqYXGdP.js +332 -0
- package/dist/esm-es5/paypal-CW1D2XqZ.js +192 -0
- package/dist/esm-es5/placeTestOrder-nhmsLLOA.js +1 -0
- package/dist/esm-es5/renderCheckoutCurrency-BQANmZyM.js +13 -0
- package/dist/esm-es5/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +17 -0
- package/dist/esm-es5/shouldShowLanguageSelect-BQFCXouB.js +7 -0
- package/dist/esm-es5/styles-BTIeCf3T.js +6 -0
- package/dist/esm-es5/submitGtag-CCGQS060.js +45 -0
- package/dist/esm-es5/throttle-D5GyA3yr.js +46 -0
- package/dist/esm-es5/updateCheckoutSessionAttributes-eRSqdC74.js +8 -0
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2966 -1
- package/dist/esm-es5/zonos-address-display_2.entry.js +46 -1
- package/dist/esm-es5/zonos-address_4.entry.js +179 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +49 -1
- package/dist/esm-es5/zonos-badge.entry.js +25 -1
- package/dist/esm-es5/zonos-banner.entry.js +7 -1
- package/dist/esm-es5/zonos-button_3.entry.js +116 -1
- package/dist/esm-es5/zonos-card_5.entry.js +33 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +666 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +21 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1043 -1
- package/dist/esm-es5/zonos-collapse.entry.js +15 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +13 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +157 -1
- package/dist/esm-es5/zonos-collect.entry.js +171 -1
- package/dist/esm-es5/zonos-component.entry.js +10 -1
- package/dist/esm-es5/zonos-controller.entry.js +198 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +6 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +152 -1
- package/dist/esm-es5/zonos-elements.js +4 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +63 -1
- package/dist/esm-es5/zonos-hello.entry.js +121 -1
- package/dist/esm-es5/zonos-input.entry.js +16 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +7 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +133 -1
- package/dist/esm-es5/zonos-invoice.entry.js +115 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +14 -1
- package/dist/esm-es5/zonos-link.entry.js +4 -1
- package/dist/esm-es5/zonos-logo.entry.js +7 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +31 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +5 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +27 -1
- package/dist/esm-es5/zonos-text.entry.js +24 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +7 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +5 -1
- package/dist/esm-es5/zonosStore-DrIOAz4M.js +1153 -0
- package/dist/scripts/index.d.ts +1167 -514
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/__tests__/jsxWithChildren.types.d.ts +14 -0
- package/dist/types/__tests__/vitest-globals.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +14 -0
- package/dist/types/components/store/checkout/cart.d.ts +19 -10
- package/dist/types/components/utils/api/checkItemRestrictions.d.ts +2 -2
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +5 -5
- package/dist/types/components/utils/checkout/isShippableCountry.d.ts +5 -1
- package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +2 -2
- package/dist/types/components.d.ts +797 -147
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +124 -124
- package/dist/types/stencil-public-runtime.d.ts +205 -12
- package/dist/types/types/generated/graphql.frontend.types.d.ts +62 -60
- package/dist/types/types/generated/graphql.frontend.types.ts +57 -55
- package/dist/types/types/generated/graphql.internal.types.d.ts +1346 -1251
- package/dist/types/types/generated/graphql.internal.types.ts +1187 -1075
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-02ef0f99.system.entry.js +6 -0
- package/dist/zonos-elements/{p-1be53c82.entry.js → p-0466650f.entry.js} +1 -1
- package/dist/zonos-elements/p-04bfcd72.system.entry.js +152 -0
- package/dist/zonos-elements/p-04cc0dac.system.entry.js +198 -0
- package/dist/zonos-elements/p-058f07aa.system.entry.js +7 -0
- package/dist/zonos-elements/p-0f603278.system.entry.js +5 -0
- package/dist/zonos-elements/{p-bb09ee50.entry.js → p-128485dc.entry.js} +1 -1
- package/dist/zonos-elements/p-1568ab06.system.entry.js +117 -0
- package/dist/zonos-elements/p-2ba738ec.entry.js +1 -0
- package/dist/zonos-elements/{p-6afd5fab.entry.js → p-31ac495f.entry.js} +1 -1
- package/dist/zonos-elements/p-34d1545a.entry.js +1 -0
- package/dist/zonos-elements/p-39c8a898.entry.js +1 -0
- package/dist/zonos-elements/p-3ERbuo5a.js +1 -0
- package/dist/zonos-elements/p-450ed170.system.entry.js +46 -0
- package/dist/zonos-elements/p-4973f8d8.system.entry.js +180 -0
- package/dist/zonos-elements/p-49e7bb1e.system.entry.js +7 -0
- package/dist/zonos-elements/p-4a54f664.entry.js +1 -0
- package/dist/zonos-elements/p-4ab1c533.system.entry.js +4 -0
- package/dist/zonos-elements/p-5024df2d.system.entry.js +666 -0
- package/dist/zonos-elements/p-5562a955.system.entry.js +7 -0
- package/dist/zonos-elements/p-5836d426.system.entry.js +49 -0
- package/dist/zonos-elements/p-5a631080.system.entry.js +13 -0
- package/dist/zonos-elements/{p-2ce039e5.entry.js → p-5c08d36b.entry.js} +1 -1
- package/dist/zonos-elements/{p-aed4ffb2.entry.js → p-5d3079e8.entry.js} +1 -1
- package/dist/zonos-elements/p-629f09dc.system.entry.js +171 -0
- package/dist/zonos-elements/p-64e7bc5b.entry.js +1 -0
- package/dist/zonos-elements/p-6b0afaa7.entry.js +1 -0
- package/dist/zonos-elements/p-6f742021.entry.js +1 -0
- package/dist/zonos-elements/p-7681798d.entry.js +1 -0
- package/dist/zonos-elements/p-7a5d2211.system.entry.js +115 -0
- package/dist/zonos-elements/{p-b1e95f95.entry.js → p-7ae48e31.entry.js} +1 -1
- package/dist/zonos-elements/{p-f37150e8.entry.js → p-8328f44d.entry.js} +1 -1
- package/dist/zonos-elements/{p-171a7e1e.entry.js → p-844a743a.entry.js} +1 -1
- package/dist/zonos-elements/p-891b47d7.entry.js +1 -0
- package/dist/zonos-elements/p-89ddab88.entry.js +1 -0
- package/dist/zonos-elements/p-8cd3f1e2.entry.js +1 -0
- package/dist/zonos-elements/p-9818f823.entry.js +1 -0
- package/dist/zonos-elements/p-9b399685.system.entry.js +10 -0
- package/dist/zonos-elements/p-9b6482ef.entry.js +1 -0
- package/dist/zonos-elements/{p-2c44e013.entry.js → p-9ebe9a36.entry.js} +1 -1
- package/dist/zonos-elements/p-B2EZRfoq.system.js +193 -0
- package/dist/zonos-elements/p-B3GRrRtL.system.js +5 -0
- package/dist/zonos-elements/p-BANhKkF2.system.js +1 -0
- package/dist/zonos-elements/p-BDopxBpR.system.js +6 -0
- package/dist/zonos-elements/p-BJufDgh3.js +1 -0
- package/dist/zonos-elements/p-BLQFeIez.system.js +191 -0
- package/dist/zonos-elements/p-BNtWsPPP.system.js +7 -0
- package/dist/zonos-elements/p-BSgVcCxT.system.js +9 -0
- package/dist/zonos-elements/p-BXjdMMUy.js +1 -0
- package/dist/zonos-elements/p-BbgqQIHv.system.js +9 -0
- package/dist/zonos-elements/p-BgSx82zO.system.js +11 -0
- package/dist/zonos-elements/p-Bi-s0fp_.system.js +17 -0
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +5 -0
- package/dist/zonos-elements/p-C19J2XSh.js +1 -0
- package/dist/zonos-elements/p-C2QMVeWW.js +1 -0
- package/dist/zonos-elements/p-C2j7R11h.system.js +11 -0
- package/dist/zonos-elements/p-CEl4pzNq.js +1 -0
- package/dist/zonos-elements/p-CICjAi70.js +1 -0
- package/dist/zonos-elements/p-CIevpRv_.system.js +162 -0
- package/dist/zonos-elements/{p-e5c76a9b.js → p-CJCoACvU.js} +2 -2
- package/dist/zonos-elements/p-CKBbIU4b.system.js +14 -0
- package/dist/zonos-elements/p-CKTIJ2Gr.js +1 -0
- package/dist/zonos-elements/p-CKhl__Kc.system.js +4 -0
- package/dist/zonos-elements/p-CPnR_T0a.system.js +1153 -0
- package/dist/zonos-elements/p-CQqNJo0D.system.js +13 -0
- package/dist/zonos-elements/p-CYdt69j5.system.js +241 -0
- package/dist/zonos-elements/p-CZl1nwqv.system.js +46 -0
- package/dist/zonos-elements/p-CaAod213.system.js +8 -0
- package/dist/zonos-elements/p-CaUXHglQ.system.js +153 -0
- package/dist/zonos-elements/{p-45bd8072.system.js → p-CeLaK0Ff.system.js} +1 -1
- package/dist/zonos-elements/p-CtEsvWI6.js +1 -0
- package/dist/zonos-elements/p-D-DawUYF.system.js +1 -0
- package/dist/zonos-elements/p-D0erXw7p.js +1 -0
- package/dist/zonos-elements/p-D31lQiWo.system.js +21 -0
- package/dist/zonos-elements/p-D5AtAlJx.system.js +13 -0
- package/dist/zonos-elements/p-DBOI98r5.system.js +7 -0
- package/dist/zonos-elements/{p-41dd1cb8.js → p-DE4a-QD5.js} +1 -1
- package/dist/zonos-elements/p-DGsEWFDU.system.js +8 -0
- package/dist/zonos-elements/p-DHwpNxG9.js +1 -0
- package/dist/zonos-elements/p-DIJaXkiE.system.js +332 -0
- package/dist/zonos-elements/{p-eef5b0cc.js → p-DJIdCwJ5.js} +1 -1
- package/dist/zonos-elements/p-DPW1yXt9.system.js +517 -0
- package/dist/zonos-elements/{p-6bdc5c96.js → p-DTgv0QpG.js} +1 -1
- package/dist/zonos-elements/p-DW-fW8yR.system.js +205 -0
- package/dist/zonos-elements/p-Dj-O6VfM.system.js +7 -0
- package/dist/zonos-elements/p-DjuFsKLG.js +1 -0
- package/dist/zonos-elements/p-DkpYo2Fs.js +1 -0
- package/dist/zonos-elements/p-DnjGkbEy.js +1 -0
- package/dist/zonos-elements/p-Dw-5yD9y.system.js +227 -0
- package/dist/zonos-elements/{p-46cd14e5.js → p-LypTHRUC.js} +1 -1
- package/dist/zonos-elements/p-MfsSJh_D.system.js +8 -0
- package/dist/zonos-elements/p-YdrG78th.js +1 -0
- package/dist/zonos-elements/p-_lt63o7c.js +3 -0
- package/dist/zonos-elements/p-a38e62cc.entry.js +1 -0
- package/dist/zonos-elements/p-a6faab6a.entry.js +1 -0
- package/dist/zonos-elements/p-adfee3a3.entry.js +1 -0
- package/dist/zonos-elements/p-b14819ab.system.entry.js +14 -0
- package/dist/zonos-elements/{p-0c972ddf.entry.js → p-b68ca96f.entry.js} +1 -1
- package/dist/zonos-elements/p-b6deae2b.system.entry.js +5 -0
- package/dist/zonos-elements/p-bdba7d9e.system.entry.js +25 -0
- package/dist/zonos-elements/p-be64d823.system.entry.js +16 -0
- package/dist/zonos-elements/p-beeb9d36.system.entry.js +21 -0
- package/dist/zonos-elements/p-cadf6b63.system.entry.js +33 -0
- package/dist/zonos-elements/p-cc5306fe.system.entry.js +24 -0
- package/dist/zonos-elements/p-cc949df1.system.entry.js +7 -0
- package/dist/zonos-elements/{p-bced320e.entry.js → p-cdffc9b6.entry.js} +1 -1
- package/dist/zonos-elements/p-cf5688f7.entry.js +1 -0
- package/dist/zonos-elements/p-d05Ku7gM.system.js +24 -0
- package/dist/zonos-elements/p-d33dfc78.system.entry.js +2966 -0
- package/dist/zonos-elements/p-d55b9664.system.entry.js +157 -0
- package/dist/zonos-elements/p-daf9fa07.system.entry.js +133 -0
- package/dist/zonos-elements/p-dcdbc610.system.entry.js +27 -0
- package/dist/zonos-elements/p-e101d722.system.entry.js +63 -0
- package/dist/zonos-elements/{p-9639a8ed.entry.js → p-e284d329.entry.js} +1 -1
- package/dist/zonos-elements/{p-8311edc7.entry.js → p-e9320825.entry.js} +1 -1
- package/dist/zonos-elements/p-ea8790aa.entry.js +1 -0
- package/dist/zonos-elements/{p-6ee4e027.entry.js → p-eadaefdc.entry.js} +1 -1
- package/dist/zonos-elements/p-f27317d3.system.entry.js +31 -0
- package/dist/zonos-elements/p-f2cedbcd.system.entry.js +121 -0
- package/dist/zonos-elements/p-f57495dc.entry.js +1 -0
- package/dist/zonos-elements/p-f6e0aeba.system.entry.js +1043 -0
- package/dist/zonos-elements/p-f8fd756a.system.entry.js +15 -0
- package/dist/zonos-elements/{p-7ada039e.entry.js → p-fe778437.entry.js} +1 -1
- package/dist/zonos-elements/{p-adfbf57b.js → p-i1iCWKdv.js} +1 -1
- package/dist/zonos-elements/p-lGLcGvEA.js +1 -0
- package/dist/zonos-elements/p-nOb4xPLF.system.js +17 -0
- package/dist/zonos-elements/p-nU86HJ5w.js +1 -0
- package/dist/zonos-elements/p-pfIceXbY.js +1 -0
- package/dist/zonos-elements/p-smUku7Ku.system.js +5 -0
- package/dist/zonos-elements/p-t_ClFAJR.js +1 -0
- package/dist/zonos-elements/p-uV7m6KrY.system.js +46 -0
- package/dist/zonos-elements/p-vN6p_rO1.system.js +11 -0
- package/dist/zonos-elements/p-zRjRcLMp.js +1 -0
- package/dist/zonos-elements/p-zVLAvre1.system.js +60 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/loader/index.d.ts +1 -1
- package/package.json +28 -32
- package/dist/cjs/RemoveIcon-081ac073.js +0 -5
- package/dist/cjs/debounce-7ca3c878.js +0 -357
- package/dist/cjs/isDarkColor-a6e6fd5e.js +0 -1202
- package/dist/cjs/throttle-366c204b.js +0 -76
- package/dist/cjs/zonosStore-0af0b937.js +0 -3030
- package/dist/esm/RemoveIcon-9dc5dd1a.js +0 -3
- package/dist/esm/debounce-84ade9c2.js +0 -355
- package/dist/esm/isDarkColor-939d8e9c.js +0 -1199
- package/dist/esm/throttle-c4c24e86.js +0 -74
- package/dist/esm/zonosStore-eca1e364.js +0 -3017
- package/dist/esm-es5/VarianceTest-572cecf5.js +0 -1
- package/dist/esm-es5/cart-2e407f7b.js +0 -1
- package/dist/esm-es5/classes-0d95c529.js +0 -1
- package/dist/esm-es5/cleanHtmlMarkdown-87d195f6.js +0 -1
- package/dist/esm-es5/collect-19428e18.js +0 -1
- package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +0 -1
- package/dist/esm-es5/createCustomEvent-58159025.js +0 -1
- package/dist/esm-es5/debounce-84ade9c2.js +0 -1
- package/dist/esm-es5/formatStringWithLinks-0d48f183.js +0 -1
- package/dist/esm-es5/getBorderRadius-1f7be586.js +0 -1
- package/dist/esm-es5/getContrastColor-4c0ae8c1.js +0 -1
- package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +0 -1
- package/dist/esm-es5/getMissingRequiredShippingFields-719b206f.js +0 -1
- package/dist/esm-es5/handleFetch-a844cac1.js +0 -1
- package/dist/esm-es5/hasInclusivePrice-d801be22.js +0 -1
- package/dist/esm-es5/helpers-2f6955b1.js +0 -1
- package/dist/esm-es5/index-cfd394c8.js +0 -13
- package/dist/esm-es5/invoice-67a47785.js +0 -1
- package/dist/esm-es5/isColorVariable-0a94004f.js +0 -1
- package/dist/esm-es5/isContrastColor-9fa0d013.js +0 -1
- package/dist/esm-es5/isDarkColor-939d8e9c.js +0 -1
- package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +0 -1
- package/dist/esm-es5/localization-36a4dc22.js +0 -1
- package/dist/esm-es5/paypal-6dca6567.js +0 -17
- package/dist/esm-es5/placeTestOrder-9563c89a.js +0 -1
- package/dist/esm-es5/renderCheckoutCurrency-282384f0.js +0 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-ef7b5860.js +0 -1
- package/dist/esm-es5/shouldShowLanguageSelect-328f50e2.js +0 -1
- package/dist/esm-es5/styles-6fc2fad9.js +0 -1
- package/dist/esm-es5/submitGtag-71c450b6.js +0 -1
- package/dist/esm-es5/throttle-c4c24e86.js +0 -1
- package/dist/esm-es5/updateCheckoutSessionAttributes-23b222de.js +0 -1
- package/dist/esm-es5/zonosStore-eca1e364.js +0 -1
- package/dist/zonos-elements/p-01174496.system.js +0 -1
- package/dist/zonos-elements/p-06f798ee.system.js +0 -1
- package/dist/zonos-elements/p-083a11cd.system.entry.js +0 -1
- package/dist/zonos-elements/p-08e7107d.js +0 -1
- package/dist/zonos-elements/p-0b29169b.js +0 -1
- package/dist/zonos-elements/p-0c9fec73.js +0 -1
- package/dist/zonos-elements/p-0d2f81ce.system.js +0 -1
- package/dist/zonos-elements/p-0e199a6c.system.entry.js +0 -1
- package/dist/zonos-elements/p-0ff845ec.js +0 -1
- package/dist/zonos-elements/p-1277abac.system.entry.js +0 -1
- package/dist/zonos-elements/p-14afffa8.system.js +0 -1
- package/dist/zonos-elements/p-1834f486.js +0 -1
- package/dist/zonos-elements/p-1aa93d1e.system.js +0 -1
- package/dist/zonos-elements/p-1ac0c631.system.js +0 -1
- package/dist/zonos-elements/p-1b8771bb.js +0 -1
- package/dist/zonos-elements/p-1cdd27ec.js +0 -1
- package/dist/zonos-elements/p-1f8648c8.system.entry.js +0 -1
- package/dist/zonos-elements/p-22e10b7d.entry.js +0 -1
- package/dist/zonos-elements/p-23e7c655.system.js +0 -1
- package/dist/zonos-elements/p-260ad739.system.entry.js +0 -1
- package/dist/zonos-elements/p-2670438c.system.js +0 -1
- package/dist/zonos-elements/p-27660512.js +0 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +0 -1
- package/dist/zonos-elements/p-2b8c96e3.system.js +0 -1
- package/dist/zonos-elements/p-2b97f7ed.js +0 -1
- package/dist/zonos-elements/p-2bbe9d91.js +0 -1
- package/dist/zonos-elements/p-2c2afed4.entry.js +0 -1
- package/dist/zonos-elements/p-2c7a425d.entry.js +0 -1
- package/dist/zonos-elements/p-2cab1746.system.entry.js +0 -1
- package/dist/zonos-elements/p-2cdd1b49.system.entry.js +0 -1
- package/dist/zonos-elements/p-3490b6d0.entry.js +0 -1
- package/dist/zonos-elements/p-398d9022.system.js +0 -1
- package/dist/zonos-elements/p-3a13e58c.system.js +0 -1
- package/dist/zonos-elements/p-40a4c8a2.system.js +0 -1
- package/dist/zonos-elements/p-4160bbc2.system.js +0 -1
- package/dist/zonos-elements/p-4671fde7.entry.js +0 -1
- package/dist/zonos-elements/p-4a20893e.system.js +0 -1
- package/dist/zonos-elements/p-4b159ff3.system.js +0 -1
- package/dist/zonos-elements/p-502d6eeb.js +0 -1
- package/dist/zonos-elements/p-51e4e61a.system.entry.js +0 -1
- package/dist/zonos-elements/p-551fa762.system.js +0 -1
- package/dist/zonos-elements/p-5a491f28.js +0 -1
- package/dist/zonos-elements/p-5b990c91.entry.js +0 -1
- package/dist/zonos-elements/p-5ebb7ae6.entry.js +0 -1
- package/dist/zonos-elements/p-60832726.system.js +0 -1
- package/dist/zonos-elements/p-60a6b71d.system.js +0 -1
- package/dist/zonos-elements/p-62f6a757.entry.js +0 -1
- package/dist/zonos-elements/p-65c1f51e.entry.js +0 -1
- package/dist/zonos-elements/p-6695de06.system.js +0 -1
- package/dist/zonos-elements/p-67426156.system.js +0 -1
- package/dist/zonos-elements/p-6890e060.system.js +0 -1
- package/dist/zonos-elements/p-6dde1e85.system.entry.js +0 -1
- package/dist/zonos-elements/p-7176f582.entry.js +0 -1
- package/dist/zonos-elements/p-7261e245.system.js +0 -13
- package/dist/zonos-elements/p-76834a0a.system.entry.js +0 -1
- package/dist/zonos-elements/p-7ac8846c.system.js +0 -1
- package/dist/zonos-elements/p-7fbbdb0f.system.js +0 -1
- package/dist/zonos-elements/p-8a0b8175.system.entry.js +0 -1
- package/dist/zonos-elements/p-8a6c4017.js +0 -1
- package/dist/zonos-elements/p-8b298971.system.entry.js +0 -1
- package/dist/zonos-elements/p-8be02f3a.system.js +0 -1
- package/dist/zonos-elements/p-8bfe5b2b.entry.js +0 -1
- package/dist/zonos-elements/p-8e6338b9.entry.js +0 -1
- package/dist/zonos-elements/p-916228fb.system.js +0 -1
- package/dist/zonos-elements/p-94722bf6.system.entry.js +0 -1
- package/dist/zonos-elements/p-947e4402.system.entry.js +0 -1
- package/dist/zonos-elements/p-9ad640b2.system.entry.js +0 -1
- package/dist/zonos-elements/p-9ecb9afc.system.entry.js +0 -1
- package/dist/zonos-elements/p-a04e2750.system.entry.js +0 -1
- package/dist/zonos-elements/p-a07e5011.entry.js +0 -1
- package/dist/zonos-elements/p-a1bd3a53.system.js +0 -1
- package/dist/zonos-elements/p-a553e132.js +0 -1
- package/dist/zonos-elements/p-a9ad74e5.system.entry.js +0 -1
- package/dist/zonos-elements/p-acb7dee1.system.entry.js +0 -1
- package/dist/zonos-elements/p-ae0de3e4.entry.js +0 -1
- package/dist/zonos-elements/p-aecb5d61.entry.js +0 -1
- package/dist/zonos-elements/p-af19722c.system.js +0 -1
- package/dist/zonos-elements/p-b4ae66cb.system.entry.js +0 -1
- package/dist/zonos-elements/p-bcaffb85.system.entry.js +0 -1
- package/dist/zonos-elements/p-be6cd28c.system.entry.js +0 -1
- package/dist/zonos-elements/p-bf37ccc7.system.js +0 -1
- package/dist/zonos-elements/p-c1631c9c.js +0 -1
- package/dist/zonos-elements/p-c5d1217f.system.js +0 -1
- package/dist/zonos-elements/p-c77b049c.entry.js +0 -1
- package/dist/zonos-elements/p-ca87ada5.system.entry.js +0 -1
- package/dist/zonos-elements/p-cb49dcfe.entry.js +0 -1
- package/dist/zonos-elements/p-cb4cb5a3.system.js +0 -1
- package/dist/zonos-elements/p-ce75b047.js +0 -2
- package/dist/zonos-elements/p-d20fe2c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-d42bd250.system.entry.js +0 -1
- package/dist/zonos-elements/p-d6a73125.system.entry.js +0 -1
- package/dist/zonos-elements/p-d938f42f.system.js +0 -1
- package/dist/zonos-elements/p-dc80cb87.js +0 -1
- package/dist/zonos-elements/p-dd3c00d6.system.entry.js +0 -1
- package/dist/zonos-elements/p-de58684b.system.js +0 -1
- package/dist/zonos-elements/p-e160b75f.js +0 -1
- package/dist/zonos-elements/p-e1ef3984.system.entry.js +0 -1
- package/dist/zonos-elements/p-e27b8e18.entry.js +0 -1
- package/dist/zonos-elements/p-e2b4c082.system.entry.js +0 -1
- package/dist/zonos-elements/p-e32ee011.system.entry.js +0 -1
- package/dist/zonos-elements/p-e4b07f7d.system.entry.js +0 -1
- package/dist/zonos-elements/p-e8587f9f.system.entry.js +0 -1
- package/dist/zonos-elements/p-eb5f3451.system.js +0 -18
- package/dist/zonos-elements/p-ebbda085.system.js +0 -1
- package/dist/zonos-elements/p-f4720b0a.js +0 -1
- package/dist/zonos-elements/p-f4acce01.js +0 -1
- package/dist/zonos-elements/p-f59a0129.system.entry.js +0 -1
- package/dist/zonos-elements/p-f8356934.system.entry.js +0 -1
- package/dist/zonos-elements/p-fe5f05fc.system.js +0 -1
- package/dist/zonos-elements/p-ff4e6811.entry.js +0 -1
- package/loader/package.json +0 -11
- /package/dist/cjs/{CheckoutConfig-27c82f94.js → CheckoutConfig-B7JRM7yr.js} +0 -0
- /package/dist/cjs/{ShortAddressCode-bec338b0.js → ShortAddressCode-C5l520-F.js} +0 -0
- /package/dist/cjs/{TaxId-cd9d490e.js → TaxId-Q6aDqqWv.js} +0 -0
- /package/dist/cjs/{VarianceTest-bec00ea8.js → VarianceTest-C98whVgO.js} +0 -0
- /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
- /package/dist/cjs/{buildCartItemsByTempCart-edddbf4b.js → buildCartItemsByTempCart-ILzonEjb.js} +0 -0
- /package/dist/cjs/{classes-b7918f56.js → classes-D_DL168u.js} +0 -0
- /package/dist/cjs/{cleanHtmlMarkdown-57147de7.js → cleanHtmlMarkdown-DpT-nZLH.js} +0 -0
- /package/dist/cjs/{containsNonLatinChars-2be5129b.js → containsNonLatinChars-D_OggJN6.js} +0 -0
- /package/dist/cjs/{createCustomEvent-7b6fad95.js → createCustomEvent-Cs5zGImL.js} +0 -0
- /package/dist/cjs/{getGenericSettingsOverride-c0ca32b9.js → getGenericSettingsOverride-CL6l6wvX.js} +0 -0
- /package/dist/cjs/{getHasMoreSpaceOnRight-4c94667f.js → getHasMoreSpaceOnRight-Cl50u1mb.js} +0 -0
- /package/dist/cjs/{isCollectMobileTablet-884d4280.js → isCollectMobileTablet-Cx2nZ15_.js} +0 -0
- /package/dist/cjs/{isColorVariable-525dbfa7.js → isColorVariable-CKoJdu9G.js} +0 -0
- /package/dist/cjs/{isInvoiceMobileTablet-dde41e4e.js → isInvoiceMobileTablet-CCqFYV6m.js} +0 -0
- /package/dist/cjs/{isSameHostCheckoutLink-6148cabb.js → isSameHostCheckoutLink-DbmQ7Ha4.js} +0 -0
- /package/dist/cjs/{styles-d1e64fb9.js → styles-nowYls3K.js} +0 -0
- /package/dist/esm/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +0 -0
- /package/dist/esm/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
- /package/dist/esm/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
- /package/dist/esm/{VarianceTest-572cecf5.js → VarianceTest-BJmZPrZl.js} +0 -0
- /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
- /package/dist/esm/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +0 -0
- /package/dist/esm/{classes-0d95c529.js → classes-BJHSB96f.js} +0 -0
- /package/dist/esm/{cleanHtmlMarkdown-87d195f6.js → cleanHtmlMarkdown-ByGDytaN.js} +0 -0
- /package/dist/esm/{containsNonLatinChars-2d8810c3.js → containsNonLatinChars-C04AWRC2.js} +0 -0
- /package/dist/esm/{createCustomEvent-58159025.js → createCustomEvent-XQfWgQLB.js} +0 -0
- /package/dist/esm/{getGenericSettingsOverride-0bc3e118.js → getGenericSettingsOverride-HeAZDwVW.js} +0 -0
- /package/dist/esm/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
- /package/dist/esm/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
- /package/dist/esm/{isColorVariable-0a94004f.js → isColorVariable-DXXUq2Lv.js} +0 -0
- /package/dist/esm/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
- /package/dist/esm/{isSameHostCheckoutLink-c1b88ab7.js → isSameHostCheckoutLink-BxAHnL5J.js} +0 -0
- /package/dist/esm/{styles-6fc2fad9.js → styles-BTIeCf3T.js} +0 -0
- /package/dist/esm-es5/{RemoveIcon-9dc5dd1a.js → RemoveIcon-C2QMVeWW.js} +0 -0
- /package/dist/esm-es5/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
- /package/dist/esm-es5/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
- /package/dist/esm-es5/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
- /package/dist/esm-es5/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
- /package/dist/esm-es5/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
- /package/dist/esm-es5/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
- /package/dist/zonos-elements/{p-2770ba48.system.js → p-0D0aCMu6.system.js} +0 -0
- /package/dist/zonos-elements/{p-b4b7f705.js → p-BJHSB96f.js} +0 -0
- /package/dist/zonos-elements/{p-0a377722.js → p-BJmZPrZl.js} +0 -0
- /package/dist/zonos-elements/{p-96d77739.js → p-BTIeCf3T.js} +0 -0
- /package/dist/zonos-elements/{p-56ba5cbf.system.js → p-BbPAtVJG.system.js} +0 -0
- /package/dist/zonos-elements/{p-11206fe2.js → p-BxAHnL5J.js} +0 -0
- /package/dist/zonos-elements/{p-cc6ad18a.js → p-ByGDytaN.js} +0 -0
- /package/dist/zonos-elements/{p-83666056.js → p-BycjkdlE.js} +0 -0
- /package/dist/zonos-elements/{p-0c64dbbb.js → p-C04AWRC2.js} +0 -0
- /package/dist/zonos-elements/{p-655ec440.system.js → p-C29tlYn0.system.js} +0 -0
- /package/dist/zonos-elements/{p-2adbbce7.system.js → p-CLDnjFm5.system.js} +0 -0
- /package/dist/zonos-elements/{p-989cb22b.system.js → p-Cby4EkFu.system.js} +0 -0
- /package/dist/zonos-elements/{p-1f3549c6.js → p-Clej0Ffe.js} +0 -0
- /package/dist/zonos-elements/{p-bcf5cffb.js → p-Cye-evFK.js} +0 -0
- /package/dist/zonos-elements/{p-b2d81c98.js → p-D5SpFsQJ.js} +0 -0
- /package/dist/zonos-elements/{p-5883217a.js → p-DAscqB23.js} +0 -0
- /package/dist/zonos-elements/{p-579932a7.js → p-DGlnuxEX.js} +0 -0
- /package/dist/zonos-elements/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
- /package/dist/zonos-elements/{p-ae393255.js → p-DXXUq2Lv.js} +0 -0
- /package/dist/zonos-elements/{p-e7b0c156.js → p-HeAZDwVW.js} +0 -0
- /package/dist/zonos-elements/{p-595f5dd2.js → p-XQfWgQLB.js} +0 -0
- /package/dist/zonos-elements/{p-bc7bf53e.system.js → p-Z99tSPFR.system.js} +0 -0
- /package/dist/zonos-elements/{p-6f23a26a.system.js → p-_GDmY2H7.system.js} +0 -0
- /package/dist/zonos-elements/{p-1d42cd20.js → p-nJ6oI8-n.js} +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(n,e){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e))t[e]=n[e]};return t(n,e)};return function(n,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function i(){this.constructor=n}n.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}();var __awaiter=this&&this.__awaiter||function(t,n,e,i){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function u(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i["throw"](t))}catch(t){r(t)}}function c(t){t.done?e(t.value):o(t.value).then(u,s)}c((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,u=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return u.next=s(0),u["throw"]=s(1),u["return"]=s(2),typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return c([t,n])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(e=0)),e)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;o=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];o=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,e){if(e||arguments.length===2)for(var i=0,o=n.length,r;i<o;i++){if(r||!(i in n)){if(!r)r=Array.prototype.slice.call(n,0,i);r[i]=n[i]}}return t.concat(r||Array.prototype.slice.call(n))};System.register(["./p-CIevpRv_.system.js","./p-DPW1yXt9.system.js","./p-DIJaXkiE.system.js","./p-CPnR_T0a.system.js","./p-CKhl__Kc.system.js","./p-zVLAvre1.system.js","./p-BbgqQIHv.system.js","./p-uV7m6KrY.system.js","./p-DW-fW8yR.system.js","./p-BSgVcCxT.system.js","./p-Cby4EkFu.system.js"],(function(t){"use strict";var n,e,i,o,r,u,s,c,a,f,l,d,h,v,w,m,p,g,y,_;return{setters:[function(t){n=t.r;e=t.d;i=t.h;o=t.a},function(t){r=t.b},function(t){u=t.k;s=t.m;c=t.n;a=t.s;f=t.c},function(t){l=t.z;d=t.a;h=t.b},function(t){v=t.g;w=t.i;m=t.a},function(t){p=t.h;g=t.l},function(t){y=t.l},function(t){_=t.e},null,null,null],execute:function(){var b=this;var S=function(){return __awaiter(b,void 0,void 0,(function(){var t,n,e,i,o,r,s;return __generator(this,(function(c){switch(c.label){case 0:if(window.Zonos.cartSettings){y("Reusing cached zonos settings");return[2/*return*/,{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode}]}t=v();n=new URLSearchParams;if(t.overrideShouldEnabledCustomAddress){n.set("overrideShouldEnabledCustomAddress",t.overrideShouldEnabledCustomAddress)}e=u();if(e){n.set("zCountry",e)}return[4/*yield*/,p("/api/zonos-elements/zonos-settings?".concat(n.toString()))];case 1:i=c.sent(),o=i.errors,r=i.json,s=i.zonosMode;if(o.length){g("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2/*return*/,{errors:o,json:null,zonosMode:s}]}return[2/*return*/,{errors:[],json:r,zonosMode:s}]}}))}))};var z=function(){
|
|
2
|
+
// append checkout component if doesn't exist
|
|
3
|
+
var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var j=function(t){
|
|
4
|
+
// allow to load checkout if cartData is ready (Checkout can be loaded right awaiy if tempCartUUID is in the URL)
|
|
5
|
+
if(!t.placeOrderButtonSelector&&!t.alwaysTriggerInternationalCheckoutSelector&&!window.Zonos.cartData){
|
|
6
|
+
// do nothing if checkout button anchor is not set
|
|
7
|
+
return}
|
|
8
|
+
// check if checkout button anchor selector user pass in is valid
|
|
9
|
+
if(t.placeOrderButtonSelector&&!s(t.placeOrderButtonSelector)){g('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}if(t.alwaysTriggerInternationalCheckoutSelector&&!s(t.alwaysTriggerInternationalCheckoutSelector)){g('Selector alwaysTriggerInternationalCheckoutSelector "'.concat(t.alwaysTriggerInternationalCheckoutSelector,'" is not a valid selector'));return}z()};var I=function(){
|
|
10
|
+
// append checkout component if doesn't exist
|
|
11
|
+
var t=document.querySelector("zonos-collect");if(!t){var n=document.createElement("zonos-collect");document.body.appendChild(n)}};var O=function(){
|
|
12
|
+
// allow to load checkout if cartData is ready (Checkout can be loaded right away if tempCartUUID is in the URL)
|
|
13
|
+
if(!window.Zonos.cartData){return}I()};var k=function(){
|
|
14
|
+
// append checkout component if doesn't exist
|
|
15
|
+
var t=document.querySelector("zonos-invoice");if(!t){var n=document.createElement("zonos-invoice");document.body.appendChild(n)}};var C=function(){
|
|
16
|
+
// allow to load checkout if cartData is ready (Checkout can be loaded right away if tempCartUUID is in the URL)
|
|
17
|
+
if(!window.Zonos.cartData){return}k()};var A="zonos-domestic-element-hide-style";
|
|
18
|
+
/**
|
|
19
|
+
* Probe whether the host parser understands `:is(...)`. Real browsers do
|
|
20
|
+
* (Chrome 88+, Firefox 78+, Safari 14+); older environments and some test
|
|
21
|
+
* runtimes don't. When supported, we wrap the merchant selector in a single
|
|
22
|
+
* `:is(...)` so a single `body.z-intl ` ancestor scopes the whole group.
|
|
23
|
+
* When not supported, we distribute the prefix across each top-level
|
|
24
|
+
* comma-separated piece instead — so the rule still applies in that
|
|
25
|
+
* environment.
|
|
26
|
+
*/var T=typeof document!=="undefined"&&function(){try{document.querySelector(":is(.zonos-is-probe)");return true}catch(t){return false}}();
|
|
27
|
+
/**
|
|
28
|
+
* Split a CSS selector string on top-level commas. Commas inside parentheses
|
|
29
|
+
* (`:not(.a, .b)`, `:nth-child(2n+1)`) or attribute brackets
|
|
30
|
+
* (`[data-foo=","]`) are preserved as part of the piece.
|
|
31
|
+
*/var E=function(t){var n=[];var e=0;var i=0;var o="";for(var r=0;r<t.length;r++){var u=t[r];if(u==="("){e++}else if(u===")"){e--}else if(u==="["){i++}else if(u==="]"){i--}if(u===","&&e===0&&i===0){var s=o.trim();if(s){n.push(s)}o=""}else{o+=u}}var c=o.trim();if(c){n.push(c)}return n};
|
|
32
|
+
/**
|
|
33
|
+
* Build the fully-scoped selector that will land in the injected `<style>`
|
|
34
|
+
* tag. Exported so tests can exercise both branches of the `:is()`-support
|
|
35
|
+
* fallback without having to mock the module-level probe.
|
|
36
|
+
*/var P=function(t){var n=t.merchantSelector,e=t.supportsIs;if(e){return"body.z-intl :is(".concat(n,")")}
|
|
37
|
+
// Fallback: distribute the `body.z-intl ` ancestor prefix across each
|
|
38
|
+
// top-level comma-separated piece. Parentheses/brackets are respected,
|
|
39
|
+
// so pseudo-classes that take selector lists (`:not(.a, .b)`) and
|
|
40
|
+
// attribute selectors that contain commas stay intact.
|
|
41
|
+
return E(n).map((function(t){return"body.z-intl ".concat(t)})).join(", ")};
|
|
42
|
+
/**
|
|
43
|
+
* Inject a `<style>` tag that hides storefront elements matching the
|
|
44
|
+
* merchant-configured `checkoutSettings.domesticElementSelector`, scoped to
|
|
45
|
+
* `body.z-intl` so the rule only takes effect when the shopper is in a
|
|
46
|
+
* shipping zone (Hello sets the body class). The exact selector we emit is
|
|
47
|
+
* also the selector we validate — see [[buildDomesticHideSelector]] for the
|
|
48
|
+
* `:is()`-support branching.
|
|
49
|
+
*/var x=function(t){if(typeof document==="undefined"||!t){return}var n=P({merchantSelector:t,supportsIs:T});
|
|
50
|
+
// The browser's own parser is the source of truth — `document.querySelector`
|
|
51
|
+
// throws `DOMException(SyntaxError)` for syntactically invalid selectors.
|
|
52
|
+
// Validating the exact string we're about to emit catches both malformed
|
|
53
|
+
// input and payloads that close `:is(` early to escape the wrapper.
|
|
54
|
+
try{document.querySelector(n)}catch(e){y('Skip domesticElementSelector injection: "'.concat(t,'" produced an invalid CSS selector ("').concat(n,'")'),"warn");return}
|
|
55
|
+
// Already injected — settings can re-emit on hot reload during dev.
|
|
56
|
+
if(document.getElementById(A)){return}var e=document.createElement("style");e.id=A;e.textContent="".concat(n," { display: none !important; }");(document.head||document.body).appendChild(e);y("Zonos domestic element hide style injected")};var L=function(t){var n=document.querySelector(t);
|
|
57
|
+
// append checkout component if doesn't exist
|
|
58
|
+
var e=document.querySelector("zonos-hello");if(!e&&n){var i=document.createElement("zonos-hello");n.appendChild(i);return true}return false};var F=function(t){switch(t){case"BOTTOM_RIGHT":return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right";default:return"bottom-right"}};
|
|
59
|
+
/**
|
|
60
|
+
* Injects the hello mobile wrapper to the DOM and returns the anchor element selector
|
|
61
|
+
* @returns anchor element selector
|
|
62
|
+
*/var D=function(t){var n=t.position,e=n===void 0?"bottom-right":n;var i=".zonos--hello-mobile-wrapper";var o=document.querySelector(i);if(o){return i}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(e==="top-right"){r.style.top="72px";r.style.right="24px"}if(e==="top-left"){r.style.top="72px";r.style.left="24px"}if(e==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(e==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483647";document.body.appendChild(r);return i};var G=function(t){return __awaiter(b,void 0,void 0,(function(){var n,e,i,o,r;return __generator(this,(function(u){if(window.Zonos.isLegacyCheckout){y("Hello is disabled when isLegacyCheckout","info");return[2/*return*/]}n=t.anchorElementSelector;e=n;
|
|
63
|
+
/**
|
|
64
|
+
* Use default mobile anchor only if desktopLocation is provided and no anchorElementSelector is provided
|
|
65
|
+
* So for bigcommerce, we don't need to manually add a anchor every time we onboard a new store
|
|
66
|
+
**/if(!t.anchorElementSelector&&t.desktopLocation){i=D({position:"bottom-right"});e=i}
|
|
67
|
+
// check if checkout button anchor selector user pass in is valid to setup hello
|
|
68
|
+
if(!e||!s(e)){g('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2/*return*/]}y("Hello init complete");o=L(e);
|
|
69
|
+
// keep watching for the anchor element to be added to the DOM, then inject hello component
|
|
70
|
+
if(!o){r=new MutationObserver((function(){var t=L(e);if(t){
|
|
71
|
+
// disconnect observer if hello is successfully injected
|
|
72
|
+
r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){
|
|
73
|
+
// inject hello to mobile anchor if hello is still not found
|
|
74
|
+
L(e)}),1e3);setTimeout((function(){if(t.notFoundElementFallback){y("Hello anchor selector ".concat(t.anchorElementSelector," not found after 3 seconds, falling back to 'notFoundElementFallback': ").concat(t.notFoundElementFallback),"info");var n=D({position:F(t.notFoundElementFallback)});L(n)}}),3e3)}return[2/*return*/]}))}))};
|
|
75
|
+
/**
|
|
76
|
+
* Base class for iframe communication
|
|
77
|
+
*/var B=/** @class */function(){function t(t,n){var e=this;this.targetId=t;this.allowedEvents=n;this.listeners=new Map;this.handleMessage=function(t){var n,i,o;var r=t.data;var u=((n=e.iframe)===null||n===void 0?void 0:n.contentWindow)||((o=(i=e.iframe)===null||i===void 0?void 0:i.contentDocument)===null||o===void 0?void 0:o.defaultView);
|
|
78
|
+
// check if the message is from the same src
|
|
79
|
+
if(t.source!==u){return}if(!e.isValidMessage(r)){return}var s=e.listeners.get(r.type);s===null||s===void 0?void 0:s.forEach((function(t){try{t(r.payload)}catch(t){g("Error in event listener:",t)}}))};this.initializeEventListeners();
|
|
80
|
+
// get the iframe element
|
|
81
|
+
this.iframe=document.getElementById(this.targetId)}t.prototype.initializeEventListeners=function(){window.addEventListener("message",this.handleMessage)};t.prototype.isValidMessage=function(t){if(!t||typeof t!=="object")return false;var n=t;return n.id===this.targetId&&typeof n.type==="string"&&this.allowedEvents.includes(n.type)&&n.payload!==undefined};t.prototype.on=function(t,n){var e=this;if(!this.listeners.has(t)){this.listeners.set(t,new Set)}y("[CheckoutAddressService] listening to ".concat(t),"info");var i=n;var o=this.listeners.get(t);if(o){o.add(i)}return function(){var n=e.listeners.get(t);if(n){n.delete(i)}}};t.prototype.destroy=function(){window.removeEventListener("message",this.handleMessage);this.listeners.clear()};return t}();
|
|
82
|
+
/**
|
|
83
|
+
* Service for communicating with the Google Places iframe
|
|
84
|
+
*/var R=/** @class */function(t){__extends(n,t);function n(){y("=== [Google Places Service] Initializing","info");return t.call(this,w.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])||this}n.prototype.sendMessage=function(t,n){var e;if(!((e=this.iframe)===null||e===void 0?void 0:e.contentWindow)){return}var i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:n,type:t};y("GooglePlacesService] parent --\x3e ".concat(t),"info",n);this.iframe.contentWindow.postMessage(i,"*")};n.prototype.initialize=function(){this.sendMessage("initializeGooglePlacesService",{})};n.prototype.fetchSuggestions=function(t){var n=t.country,e=t.query,i=t.type;if(!n){return}this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[n],input:e},type:i})};n.prototype.selectPlace=function(t){var n=t.placeId,e=t.type;this.sendMessage("placeSelected",{placeId:n,type:e})};return n}(B);
|
|
85
|
+
/**
|
|
86
|
+
* Checkout service for managing address selection and validation
|
|
87
|
+
*/var H=/** @class */function(){function t(){var t=this;this.googlePlaceInitialized=false;y("=== [CheckoutAddressService] Initializing","info");this.googlePlaces=new R;this.googlePlaces.on("onInitializeGooglePlacesService",(function(){y("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info");t.googlePlaceInitialized=true}));this.initialize()}t.prototype.initialize=function(){this.googlePlaces.initialize()};t.prototype.onInitializeGooglePlacesService=function(t){return this.googlePlaces.on("onInitializeGooglePlacesService",(function(){y("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService");t()}))};t.prototype.isGooglePlaceInitialized=function(){return this.googlePlaceInitialized};
|
|
88
|
+
/**
|
|
89
|
+
* Set up event listeners for address suggestions
|
|
90
|
+
*/t.prototype.onAddressSuggestions=function(t){this.suggestionsCallback=t;return this.googlePlaces.on("onFetchAutocompleteSuggestions",(function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}y.apply(void 0,__spreadArray(["[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ".concat(n[0].type),"info"],n,false));t.apply(void 0,n)}))};
|
|
91
|
+
/**
|
|
92
|
+
* Set up event listeners for selected address
|
|
93
|
+
*/t.prototype.onAddressSelected=function(t){this.placeSelectedCallback=t;return this.googlePlaces.on("onPlaceSelected",(function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}y.apply(void 0,__spreadArray(["[CheckoutAddressService] parent <-- onPlaceSelected ".concat(n[0].type),"info"],n,false));t.apply(void 0,n)}))};
|
|
94
|
+
/**
|
|
95
|
+
* Request address suggestions based on user input
|
|
96
|
+
*/t.prototype.getAddressSuggestions=function(t){var n=t.country,e=t.query,i=t.type;if(!this.googlePlaceInitialized){return}this.googlePlaces.fetchSuggestions({country:n,query:e,type:i})};
|
|
97
|
+
/**
|
|
98
|
+
* Select an address from suggestions
|
|
99
|
+
*/t.prototype.selectAddress=function(t){var n=t.placeId,e=t.type;this.googlePlaces.selectPlace({placeId:n,type:e})};t.prototype.destroy=function(){this.googlePlaces.destroy();if(this.suggestionsCallback){this.suggestionsCallback=undefined}if(this.placeSelectedCallback){this.placeSelectedCallback=undefined}};return t}();var M=function(){return":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}"};var N=t("zonos_controller",/** @class */function(){function t(t){n(this,t);this.paypalInitEvent=e(this,"paypalInitEvent",7);this.stripeInitEvent=e(this,"stripeInitEvent",7)}
|
|
100
|
+
/**
|
|
101
|
+
* Method to initialize checkout element
|
|
102
|
+
*/t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init checkout element","warn");return[2/*return*/]}r.stripe=t;void j(l.checkoutSettings);y("init checkout element");return[2/*return*/]}))}))};
|
|
103
|
+
/**
|
|
104
|
+
* Method to initialize Collect element
|
|
105
|
+
*/t.prototype.initCollectElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init Collect element","warn");return[2/*return*/]}r.stripe=t;void O();y("init Collect element");return[2/*return*/]}))}))};
|
|
106
|
+
/**
|
|
107
|
+
* Method to initialize Collect element
|
|
108
|
+
*/t.prototype.initInvoiceElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init Invoice element","warn");return[2/*return*/]}r.stripe=t;void C();y("init Invoice element");return[2/*return*/]}))}))};
|
|
109
|
+
/**
|
|
110
|
+
* Init zonos notification
|
|
111
|
+
*/t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};
|
|
112
|
+
/**
|
|
113
|
+
* Setup google font
|
|
114
|
+
*/t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,o,r,u,s,c;return __generator(this,(function(a){switch(a.label){case 0:i=t||d();if(i==="Inter"){if(!t){
|
|
115
|
+
// Do nothing if font is Inter, since we already inject it on start
|
|
116
|
+
return[2/*return*/]}y("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:t})}o=new URLSearchParams;o.set("family",i);return[4/*yield*/,p("/api/zonos-elements/get-font-detail?".concat(o.toString()))];case 1:r=a.sent(),u=r.errors,s=r.json;
|
|
117
|
+
// Keep using Inter font, font in the setting maybe outdated and not found in google font, API will return Inter font instead
|
|
118
|
+
if(u.length>0){y("Failed to load font ".concat(i),"warn");l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:"Inter"});return[2/*return*/]}c=s===null||s===void 0?void 0:s.fontUrl;if(c){(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,c)}if(!t){return[2/*return*/]}
|
|
119
|
+
// apply override font
|
|
120
|
+
y("[FONT] ".concat(t," font override applied"));l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:t});return[2/*return*/]}}))}))};t.prototype.handleLocationChange=function(){
|
|
121
|
+
// re-inject hello component if the location changes
|
|
122
|
+
void G(l.helloSettings)};
|
|
123
|
+
/**
|
|
124
|
+
* Init history listener to know when the location changes to re-inject hello component
|
|
125
|
+
*/t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.injectCustomHTML=function(t){if(!t){return}
|
|
126
|
+
// Skip injecting custom HTML for legacy checkout and collect
|
|
127
|
+
if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect||window.Zonos.isInvoice){y("=== Skip injecting custom HTML for hosted checkout","info");return}y("=== Injecting custom HTML for hosted checkout");var n=document.createElement("template");n.innerHTML=t;var e=n.content.querySelectorAll("script");e.forEach((function(t){var n=document.createElement("script");if(t.src){n.src=t.src;n.async=t.async}else{n.textContent=t.innerHTML}document.body.appendChild(n)}));
|
|
128
|
+
// Custom HTML may set window.Zonos.googleAnalyticId / window.Zonos.facebookPixelId; trigger relay ping so parent configures GA / FB Pixel
|
|
129
|
+
_()};t.prototype.initGooglePlacesService=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e;return __generator(this,(function(i){n=t===null||t===void 0?void 0:t.genericSettings;if(!n){return[2/*return*/]}e=n.signedTokenGooglePlaces;if(!e){return[2/*return*/]}
|
|
130
|
+
// Create private iframe to load google places api
|
|
131
|
+
m({id:w.GOOGLE_PLACES,onload:function(){
|
|
132
|
+
// init checkout address service
|
|
133
|
+
l.checkoutAddressService=new H},src:"".concat("https://route.elements.zonos.com","/iframe/google-maps?signedToken=").concat(e)});return[2/*return*/]}))}))};t.prototype.buildBaseConfig=function(t){var n,e;var i=Object.assign(Object.assign({},this.config.checkoutSettings),{
|
|
134
|
+
// Don't allow to override settlement currencies setting. This setting is only configured by Zonos
|
|
135
|
+
allowedSettlementCurrencies:undefined,
|
|
136
|
+
// Don't allow to override capture delay setting. This setting is only configured by Zonos
|
|
137
|
+
captureDelay:undefined,
|
|
138
|
+
// Don't allow to override subscription status
|
|
139
|
+
subscriptionStatus:undefined});if(window.Zonos.isCollect||window.Zonos.isInvoice){return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{
|
|
140
|
+
// No need to show hello for collect
|
|
141
|
+
visibilityStatus:"DISABLED"})})}if(!this.config.checkoutSettings){return Object.assign(Object.assign({},this.config),{
|
|
142
|
+
// If there is no override checkout settings from Zonos.init, just use the default checkout settings from our settings
|
|
143
|
+
checkoutSettings:undefined})}
|
|
144
|
+
// Should override success behavior for legacy checkout if
|
|
145
|
+
var o=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&((n=this.config.checkoutSettings)===null||n===void 0?void 0:n.successBehavior)==="CLOSE_MODAL";return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{
|
|
146
|
+
// Set success redirect url to store url if it's legacy checkout.
|
|
147
|
+
// when success behavior is CLOSE_MODAL, use the default success behavior and update the keep shopping button link to their store, because just redirect user without confirmation page would confuse them
|
|
148
|
+
successBehavior:o?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:o?((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||(t===null||t===void 0?void 0:t.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();l.zonosApiKey=this.zonosApiKey;
|
|
149
|
+
// running with scope async function to avoid blocking the main thread
|
|
150
|
+
(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,i,o,r,u,s,a,f,d,v,w,m,p,g,_,b;var z=this;return __generator(this,(function(j){switch(j.label){case 0:return[4/*yield*/,S()];case 1:u=j.sent(),s=u.errors,a=u.json,f=u.zonosMode;if(((n=(t=s[0])===null||t===void 0?void 0:t.type)===null||n===void 0?void 0:n.toString())==="403"){y("Failed to load zonos settings. This domain may not have access","warn");return[2/*return*/]}d=((e=a===null||a===void 0?void 0:a.checkoutSettings)===null||e===void 0?void 0:e.customHTML)||"";this.injectCustomHTML(d);
|
|
151
|
+
// init zonos notification
|
|
152
|
+
this.initZonosNotification();v=function(){var t,n,e;if(window.Zonos.isLegacyCheckout){
|
|
153
|
+
// Try to use new settings first for legacy stores
|
|
154
|
+
return((t=a===null||a===void 0?void 0:a.appearanceSettings)===null||t===void 0?void 0:t.logoUrl)||((n=z.config.appearance)===null||n===void 0?void 0:n.logoUrl)}
|
|
155
|
+
// Otherwise respect override
|
|
156
|
+
return(e=z.config.appearance)===null||e===void 0?void 0:e.logoUrl};w=this.buildBaseConfig(a);m=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:v()})}),w);
|
|
157
|
+
// load default setting if failed to load user settings
|
|
158
|
+
h({overrideSettings:m,zonosSettings:a});l.zonosMode=f;
|
|
159
|
+
// Inject the merchant's domestic-element hide style now that
|
|
160
|
+
// checkoutSettings have been merged into the store.
|
|
161
|
+
x(l.checkoutSettings.domesticElementSelector);
|
|
162
|
+
// setup google font after store loaded
|
|
163
|
+
void this.setupGoogleFont();if(l.helloSettings.visibilityStatus==="DISABLED"){
|
|
164
|
+
// Store owner disabled this intentionally
|
|
165
|
+
y("=== Hello is disabled by store owner ===","warn")}if(l.helloSettings&&l.helloSettings.visibilityStatus==="ENABLED"){y("Initializing hello");void G(l.helloSettings)}
|
|
166
|
+
// init localization store
|
|
167
|
+
return[4/*yield*/,c()];case 2:
|
|
168
|
+
// init localization store
|
|
169
|
+
j.sent();p=((i=a===null||a===void 0?void 0:a.checkoutSettings)===null||i===void 0?void 0:i.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!p||!this.stripeInitEvent){y("Checkout failed to load -- missing publishable key","warn");return[2/*return*/]}if(window.Zonos.isCollect||window.Zonos.isInvoice){
|
|
170
|
+
// send publishable key out to load stripe
|
|
171
|
+
this.stripeInitEvent.emit({publishableKey:p.token});
|
|
172
|
+
// init google places service
|
|
173
|
+
void this.initGooglePlacesService(a);return[2/*return*/]}if(l.checkoutSettings.subscriptionStatus==="INACTIVE"){y('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");y("zonos controller loaded");return[2/*return*/]}if(l.checkoutSettings.visibilityStatus==="DISABLED"){y("=== Checkout is disabled by store owner ===","warn");y("zonos controller loaded");return[2/*return*/]}g=
|
|
174
|
+
// eslint-disable-next-line deprecation/deprecation -- gating Stripe load also honors the legacy callback
|
|
175
|
+
typeof((o=l.checkoutSettings)===null||o===void 0?void 0:o.buildCartDetail)==="function"||typeof((r=l.checkoutSettings)===null||r===void 0?void 0:r.createCartId)==="function";_=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");b=!!(window.Zonos.cartId&&window.Zonos.cartData)||!!_;if(!g&&!b){y("Skip loading Stripe because no cart callback (buildCartDetail/createCartId), prefetched cart, or payment client secret is present","warn");return[2/*return*/]}
|
|
176
|
+
// send publishable key out to load stripe
|
|
177
|
+
this.stripeInitEvent.emit({publishableKey:p.token});
|
|
178
|
+
// init google places service
|
|
179
|
+
void this.initGooglePlacesService(a);return[2/*return*/]}}))}))})();return[2/*return*/]}))}))};
|
|
180
|
+
/**
|
|
181
|
+
* Show notification
|
|
182
|
+
*/t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=document.querySelector("zonos-notification");if(!n){y("Failed to show notification - zonos-notification not found","warn");return[2/*return*/]}void n.showNotification(t);return[2/*return*/]}))}))};
|
|
183
|
+
/**
|
|
184
|
+
* Reset the Checkout session id and client secret (required for dashboard store switching)
|
|
185
|
+
*/t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){a.checkoutSessionId=null;r.clientSecret="";return[2/*return*/]}))}))};
|
|
186
|
+
/**
|
|
187
|
+
* Override the setting
|
|
188
|
+
* @param config config that need to override the default setting
|
|
189
|
+
*/t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){h({overrideSettings:t,zonosSettings:null});return[2/*return*/]}))}))};
|
|
190
|
+
/**
|
|
191
|
+
* Override country code. Used in dashboard create test cart.
|
|
192
|
+
*/t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){y("Override country code to ".concat(t));void f({isInitializing:false,newSelectedCountryCode:t});return[2/*return*/]}))}))};
|
|
193
|
+
/**
|
|
194
|
+
* Get appearance from setting
|
|
195
|
+
*/t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2/*return*/,l.appearance]}))}))};
|
|
196
|
+
/**
|
|
197
|
+
* Update the organizationName
|
|
198
|
+
*/t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){l.organizationName=t;return[2/*return*/]}))}))};t.prototype.render=function(){return i(o,{key:"12257443495182932a4ca497928398e22f5fb892",class:"zonos--elements"})};return t}());N.style=M()}}}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-CPnR_T0a.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js"],(function(t){"use strict";var o,s,e,n,i,r;return{setters:[function(t){o=t.r;s=t.h;e=t.e;n=t.a},function(t){i=t.a},function(t){r=t.c},null],execute:function(){var a=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}"};var h=t("zonos_logo",/** @class */function(){function t(t){o(this,t);
|
|
2
|
+
/**
|
|
3
|
+
* Theme to change the color of the logo
|
|
4
|
+
*/this.theme="LIGHT";
|
|
5
|
+
/**
|
|
6
|
+
* The width of the logo
|
|
7
|
+
*/this.width="auto"}t.prototype.render=function(){var t=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return s(n,{key:"89d856c28d227afbe76656ce217544faad91715e",class:r(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":t,"--zonos--font-family":i(),"--zonos--width":this.width}},s("img",{key:"025c97e65f2666028391f6ca2d548bf905528133",alt:"Zonos Logo",src:e("./assets/ZonosLogo.png")}))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());h.style=a()}}}));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-CPnR_T0a.system.js","./p-C2j7R11h.system.js","./p-BSgVcCxT.system.js","./p-CKBbIU4b.system.js","./p-vN6p_rO1.system.js","./p-BbgqQIHv.system.js","./p-DW-fW8yR.system.js","./p-B3GRrRtL.system.js"],(function(o){"use strict";var s,e,t,i,n,r,a,l,d,h,p;return{setters:[function(o){s=o.r;e=o.d;t=o.h;i=o.a;n=o.g},function(o){r=o.z;a=o.a},function(o){l=o.c},function(o){d=o.g},function(o){h=o.g},function(o){p=o.i},null,null,null],execute:function(){var c=function(){return":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 input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}"};var u=o("zonos_shipping_rich_radio",/** @class */function(){function o(o){var t=this;s(this,o);this.radioSelected=e(this,"radioSelected",7);
|
|
2
|
+
/**
|
|
3
|
+
* Selected item
|
|
4
|
+
* @default {null|firstItem}
|
|
5
|
+
*/this.selectedItem=null;this.handleRichRadioSelect=function(o){var s;(s=t.radioSelected)===null||s===void 0?void 0:s.emit(o)};this.getRadioItemStyleVariables=function(){var o=t.borderColor||r.appearance.colorSecondary;var s=!t.isMobile?r.appearance.colorPrimary:"--zonos-elements-gray-0";var e=s&&o?h({backgroundColor:p(s)?window.getComputedStyle(t.ele).getPropertyValue("--zonos-elements-".concat(s.replace("--zonos-elements-",""))):s,color:o}):o;return{"--zonos--border-radius":d({overrideBorderStyle:t.borderStyle}),"--zonos--selected-border-color":e||"unset"}}}o.prototype.render=function(){var o=this;var s;return t(i,{key:"8d77a01ba101899adb41904a820ba5f4985bc52d",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":a()})},(s=this.items)===null||s===void 0?void 0:s.map((function(s){var e;var i=((e=o.selectedItem)===null||e===void 0?void 0:e.value)===s.value;return t("div",{"aria-hidden":"true",class:l(["zonos--shipping-rich-radio-item",i&&"selected"]),onClick:function(){return o.handleRichRadioSelect(s)}},t("input",{checked:i,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:s.value}),t("div",{class:"zonos--shipping-info"},t("div",{class:"zonos--shipping-detail"},t("zonos-text",{class:"zonos--shipping-label",type:"label"},s.label),(s.sublabel||s.caption)&&t("div",{class:"zonos--sub-detail"},s.sublabel&&t("zonos-text",{textColor:"gray-800"},s.sublabel),s.caption&&t("zonos-text",{textColor:"gray-600"},s.caption))),t("zonos-text",{type:"semiBoldLabel"},s.price)))})))};Object.defineProperty(o.prototype,"ele",{get:function(){return n(this)},enumerable:false,configurable:true});return o}());u.style=c()}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e,a as s}from"./p-
|
|
1
|
+
import{r as o,h as e,a as s}from"./p-_lt63o7c.js";import{a as n}from"./p-CtEsvWI6.js";import{c as r}from"./p-BJHSB96f.js";import"./p-BJmZPrZl.js";const t=class{constructor(e){o(this,e),this.bold=!1,this.badgeColor="gray",this.iconRight=!1,this.size="default",this.rounded=!1,this.loading=!1}render(){return e(s,{key:"95c8a620e803b4ea84d7789ff746d1edc1252389",class:r(["zonos--elements zonos--badge"]),style:{"--zonos--font-family":n()}},e("div",{key:"000fb2efaa9cffa4635e89e700013bcc1f9fd63c",class:r(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,e("zonos-text",{key:"8c84abeb697dd20f6c1acbd2f512a5bac2c45883",textColor:`${this.badgeColor}-800`},e("slot",{key:"b5bc9ed235747f2986fd7a1c94cbede4b8ffc715"})),this.dismissHandler&&e("zonos-icon",{key:"629b306370ba2fab2e43b625fce19e44be2a91a7","aria-label":"Remove action",class:"zonos--badge-dismiss",content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>\n</svg>\n',onClick:()=>{var o;return null===(o=this.dismissHandler)||void 0===o?void 0:o.call(this)}})))}};t.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{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}:host .zonos--badge-dismiss{cursor:pointer}";export{t as zonos_badge}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-CPnR_T0a.system.js","./p-d05Ku7gM.system.js","./p-C2j7R11h.system.js","./p-BSgVcCxT.system.js","./p-vN6p_rO1.system.js","./p-DW-fW8yR.system.js","./p-BNtWsPPP.system.js","./p-BbgqQIHv.system.js"],(function(o){"use strict";var e,t,n,s,r,a,i,d,l,h,c,u,b;return{setters:[function(o){e=o.r;t=o.h;n=o.a;s=o.g},function(o){r=o.z;a=o.a},function(o){i=o.i;d=o.a},function(o){l=o.c},function(o){h=o.g},function(o){c=o.i},function(o){u=o.i},function(o){b=o.s},null],execute:function(){
|
|
2
|
+
/**
|
|
3
|
+
* Get theme for button text based on background color
|
|
4
|
+
*/
|
|
5
|
+
var g=function(o){
|
|
6
|
+
// use override background if it exists, otherwise use color from setting
|
|
7
|
+
var e=o||r.appearance.colorSecondary;var t=e&&c(e)?"var(--zonos-elements-".concat(e,")"):e;
|
|
8
|
+
// determine theme based on background color (to change button text color if needed)
|
|
9
|
+
var n=t&&u(t)?"DARK":"LIGHT";return n};
|
|
10
|
+
// This is to determine if variable of the element is using dark theme, so we can invert the color if needed
|
|
11
|
+
var v=function(o){return u(window.getComputedStyle(o).getPropertyValue("--zonos-elements-gray-0"))};var m=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--zonos-elements-radius-10);gap:8px}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--zonos-elements-surface-color);border:none;outline:1px solid var(--zonos-elements-surface-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-weight:var(--zonos--font-weight, 500);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--zonos--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:8px 24px;color:var(--zonos--color, var(--zonos-elements-gray-1000));margin:1px}:host button:not([disabled]):hover{background-image:var(--zonos-elements-button-standard-hover)}:host button:not([disabled]):active{background:var(--zonos-elements-gray-700)}:host button:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button.with-box-shadow{-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard)}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button{}:host button.sm{height:var(--zonos-elements-size-sm);line-height:var(--zonos-elements-size-sm);padding:4px 8px}:host button.sm:not(.has-content).has-icon{padding:0 4px}:host button.md{height:var(--zonos-elements-size-md);line-height:var(--zonos-elements-size-md);padding:8px 16px}:host button.md:not(.has-content).has-icon{padding:0 8px}:host button.lg{height:var(--zonos-elements-size-lg);line-height:var(--zonos-elements-size-lg);padding:12px 24px}:host button.lg:not(.has-content).has-icon{padding:0 16px}:host button:not(.only-icon).has-icon{gap:8px}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--zonos-elements-font-size-s)}}:host button.override-background{background-color:var(--zonos--background-color, var(--zonos-elements-gray-0));color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:1px solid var(--zonos--background-color, var(--zonos-elements-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--zonos-elements-blue-600);outline:1px solid var(--zonos-elements-blue-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--zonos-elements-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--zonos-elements-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-600)}:host button:not(.override-background).success{background:var(--zonos-elements-green-600);outline:1px solid var(--zonos-elements-green-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--zonos-elements-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--zonos-elements-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--zonos-elements-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-green-400)}:host button:not(.override-background).danger{background:var(--zonos-elements-red-600);outline:1px solid var(--zonos-elements-red-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--zonos-elements-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--zonos-elements-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--zonos-elements-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-red-400)}:host button:not(.override-background).warning{background:var(--zonos-elements-orange-600);outline:1px solid var(--zonos-elements-orange-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--zonos-elements-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--zonos-elements-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--zonos-elements-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:rgba(0, 0, 0, 0.1)}:host button:not(.override-background).subtle:not([disabled]):active{background:rgba(0, 0, 0, 0.2)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--zonos-elements-button-focus-ring);box-shadow:var(--zonos-elements-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--zonos-elements-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--zonos-elements-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--zonos-elements-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--zonos-elements-radius-4);width:24px}"};var f=o("zonos_button",/** @class */function(){function o(o){var t=this;e(this,o);
|
|
12
|
+
/**
|
|
13
|
+
* Inherited attributes from the host element
|
|
14
|
+
*/this.inheritedAttributes={};
|
|
15
|
+
/**
|
|
16
|
+
* Whether or not the button is disabled
|
|
17
|
+
* @note Prop should not conflict name with native html attribute if the prop is also affected by another prop.
|
|
18
|
+
* The issue is the component has internal disabled @prop(). @prop decorator is to watch the update of the attribute of the component in the dom.
|
|
19
|
+
* And `disabled` prop is not an only factor to determine the component is disabled. isLoading @prop() also affect that.
|
|
20
|
+
* <Host> is also referred to a component itself, if disabled prop is true, the `zonos-button` will have disabled attribute.
|
|
21
|
+
* So let's say when the loading state is true, and the component consume the zonos-button doesn't pass the disabled prop down.
|
|
22
|
+
* It accidentally turns the disabled prop on even thought the disabled state is not changed from the outside.
|
|
23
|
+
*/this.isDisabled=false;
|
|
24
|
+
/**
|
|
25
|
+
* The icon element to display
|
|
26
|
+
* @default null
|
|
27
|
+
*/this.icon=null;
|
|
28
|
+
/**
|
|
29
|
+
* Whether or not the icon is on the right
|
|
30
|
+
* @default false
|
|
31
|
+
*/this.iconRight=false;
|
|
32
|
+
/**
|
|
33
|
+
* The size of the button
|
|
34
|
+
* @default 'sm'
|
|
35
|
+
*/this.size="sm";
|
|
36
|
+
/**
|
|
37
|
+
* The variance of the button
|
|
38
|
+
* @note If the button `variant` is set to 'standard', backgroundColor will be disregarded
|
|
39
|
+
* @default standard
|
|
40
|
+
*/this.variant="standard";
|
|
41
|
+
/**
|
|
42
|
+
* Whether or not the button has a background
|
|
43
|
+
* @default false
|
|
44
|
+
*/this.noBackground=false;
|
|
45
|
+
/**
|
|
46
|
+
* Whether or not the button has a box shadow
|
|
47
|
+
*/this.withBoxShadow=false;
|
|
48
|
+
/**
|
|
49
|
+
* Whether or not the button has a left padding
|
|
50
|
+
*/this.noPaddingLeft=false;
|
|
51
|
+
/**
|
|
52
|
+
* Whether or not the button has a right padding
|
|
53
|
+
*/this.noPaddingRight=false;
|
|
54
|
+
/**
|
|
55
|
+
* Whether or not the button is loading
|
|
56
|
+
*/this.loading=false;
|
|
57
|
+
/**
|
|
58
|
+
* The content alignment within the button
|
|
59
|
+
* @default 'center'
|
|
60
|
+
*/this.justifyContent="center";
|
|
61
|
+
/**
|
|
62
|
+
* Whether or not the button text color is bold
|
|
63
|
+
*/this.bold=false;
|
|
64
|
+
/**
|
|
65
|
+
* Whether or not the button has an icon
|
|
66
|
+
*/this.hasIcon=!!this.icon;
|
|
67
|
+
/**
|
|
68
|
+
* Whether or not the button has content
|
|
69
|
+
*/this.hasContent=false;
|
|
70
|
+
/**
|
|
71
|
+
* Detect if the button has an content
|
|
72
|
+
*/this.handleSlotChange=function(){t.hasContent=true};this.getColorVarProperty=function(o){return o.replace("var(","").replace(")","")};this.getButtonStyle=function(){
|
|
73
|
+
/**
|
|
74
|
+
* If the parent component pass in the variant prop with `undefined` value, it would not re-assign the `undefined` value with the default value.
|
|
75
|
+
* So need to re-assign the variant prop with the default value if the value is `undefined` here.
|
|
76
|
+
*/
|
|
77
|
+
var o=t.variant||"standard";
|
|
78
|
+
// use the variable if it's a color variable, otherwise use the color
|
|
79
|
+
var e=t.buttonColor&&c(t.buttonColor)?"var(--zonos-elements-".concat(t.buttonColor,")"):t.buttonColor;var n=window.getComputedStyle(t.ele).getPropertyValue(t.getColorVarProperty(e||""))||e||"";
|
|
80
|
+
/**
|
|
81
|
+
* Determine if the button should use dark hover subtle
|
|
82
|
+
* If variable = LIGHT && text color = LIGHT, use white hover subtle
|
|
83
|
+
* If variable = LIGHT && text color = DARK, use dark hover subtle
|
|
84
|
+
* If variable = DARK && text color = LIGHT, use dark hover subtle (invert hover color)
|
|
85
|
+
* If variable = DARK && text color = DARK, use white hover subtle (invert hover color)
|
|
86
|
+
*/var s=!v(t.ele);var a=!u(n);var i=s&&!a||!s&&a;switch(o){case"subtle":{
|
|
87
|
+
// Background color is not used for subtle variant
|
|
88
|
+
return{color:e,useDarkHoverSubtle:i}}default:{
|
|
89
|
+
// use the variable if it's a color variable, otherwise use the color
|
|
90
|
+
var d=t.backgroundColor&&c(t.backgroundColor)?"var(--zonos-elements-".concat(t.backgroundColor,")"):t.backgroundColor;
|
|
91
|
+
// use override background if it exists, otherwise use color from setting
|
|
92
|
+
var l=d||r.appearance.colorSecondary;var h=l&&c(t.getColorVarProperty(l))?window.getComputedStyle(t.ele).getPropertyValue(t.getColorVarProperty(l)):l;
|
|
93
|
+
// set contrast color if background color is dark for all variants except subtle
|
|
94
|
+
var b=t.variant!=="subtle"&&h&&u(h)?"white":e;return{backgroundColor:l,color:b,spinnerColor:h&&u(h)?"white":"black",useDarkHoverSubtle:i}}}}}
|
|
95
|
+
/**
|
|
96
|
+
* Detect if the icon changes and update the state accordingly
|
|
97
|
+
*/o.prototype.iconChangeHandler=function(){this.hasIcon=!!this.icon};o.prototype.clickHandler=function(o){if(this.loading||this.isDisabled){o.preventDefault();o.stopPropagation()}};o.prototype.componentWillLoad=function(){this.iconChangeHandler();this.inheritedAttributes=Object.assign(Object.assign({},i(this.ele)),d(this.ele,["tabindex","title","data-form-type","dir"]))};o.prototype.render=function(){var o=this.getButtonStyle(),e=o.backgroundColor,s=o.color,r=o.spinnerColor,i=o.useDarkHoverSubtle;var d=this.loading||this.isDisabled;var c=this.variant||"standard";
|
|
98
|
+
// // only set theme for button to change text color if variant is standard and override background is set
|
|
99
|
+
var u=c==="standard"?g(e):undefined;var v=h({overrideBorderStyle:this.borderStyle});return t(n,{key:"df2bfe5807583d29166ccb7f5da28dcf5b41dcd3",class:l(["zonos--elements"]),"data-theme":this.theme||u,disabled:d,style:b({"--zonos--background-color":e,"--zonos--border-radius":v,"--zonos--color":s,"--zonos--font-family":a(),"--zonos--font-weight":this.bold?"bold":"normal"})},t("button",Object.assign({key:"18c6ba3797948296d847a8deed8784ee34b93113"},this.inheritedAttributes,{class:l([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",this.withBoxShadow&&"with-box-shadow",i&&"dark-hover-subtle",c,this.size,
|
|
100
|
+
// only override background if variant is set to standard
|
|
101
|
+
e&&c==="standard"&&"override-background"]),disabled:d,style:{justifyContent:this.justifyContent}}),this.loading&&t("div",{key:"b468795b69f4e20f7d0ca2c915b95080a53092e4",class:"zonos--spinner-wrapper"},t("zonos-spinner",{key:"368ea5d9cdb641140d78e55ac1874cbfd6b48db0",size:16,spinnerColor:r})),!this.loading&&!this.iconRight&&this.icon,t("slot",{key:"41ecf6db38ca534ed99fd8c2f6020bbfe99cddc9",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))};Object.defineProperty(o,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"ele",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{icon:[{iconChangeHandler:0}]}},enumerable:false,configurable:true});return o}());f.style=m();var k=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--width);height:var(--zonos--height);fill:var(--zonos--color);color:var(--zonos--color)}"};var z=o("zonos_icon",/** @class */function(){function o(o){e(this,o);
|
|
102
|
+
/**
|
|
103
|
+
* Determines if the icon should be auto height instead of square
|
|
104
|
+
* @default false
|
|
105
|
+
*/this.autoHeight=false;
|
|
106
|
+
/**
|
|
107
|
+
* Color of the SVG
|
|
108
|
+
* @default 'gray-1000'
|
|
109
|
+
*/this.iconColor="gray-1000";
|
|
110
|
+
/**
|
|
111
|
+
* The size of the icon
|
|
112
|
+
* @default 24
|
|
113
|
+
*/this.size=24}o.prototype.render=function(){if(!this.content||!this.el.shadowRoot){return null}var o=c(this.iconColor)?"var(--zonos-elements-".concat(this.iconColor,")"):this.iconColor;this.el.shadowRoot.innerHTML=this.content;return t(n,{class:"zonos--elements",style:{"--zonos--color":o,"--zonos--font-family":a(),"--zonos--height":"".concat(this.autoHeight?"auto":"".concat(this.size,"px")),"--zonos--width":"".concat(this.size,"px")}})};Object.defineProperty(o.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return o}());z.style=k();var p=function(){return":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:relative;overflow:hidden;width:var(--zonos--size);height:var(--zonos--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--size);height:var(--zonos--size);stroke:var(--zonos-elements-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--zonos-elements-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--zonos-elements-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--zonos-elements-spinner-track-black)}:host(.white) circle{stroke:var(--zonos-elements-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--zonos-elements-spinner-track-white)}:host(.info) circle{stroke:var(--zonos-elements-blue-600)}:host(.info) circle.track{stroke:var(--zonos-elements-blue-100)}:host(.success) circle{stroke:var(--zonos-elements-green-600)}:host(.success) circle.track{stroke:var(--zonos-elements-green-100)}:host(.danger) circle{stroke:var(--zonos-elements-red-600)}:host(.danger) circle.track{stroke:var(--zonos-elements-red-100)}:host(.warning) circle{stroke:var(--zonos-elements-orange-600)}:host(.warning) circle.track{stroke:var(--zonos-elements-orange-100)}"};var w=o("zonos_spinner",/** @class */function(){function o(o){e(this,o);
|
|
114
|
+
/**
|
|
115
|
+
* The size of the spinner
|
|
116
|
+
* @default 32
|
|
117
|
+
*/this.size=32}o.prototype.render=function(){if(!this.el.shadowRoot){return null}return t(n,{class:l(["zonos--elements",this.spinnerColor]),style:{"--zonos--size":"".concat(this.size,"px")}},t("svg",{viewBox:"0 0 50 50"},t("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),t("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"})))};Object.defineProperty(o.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return o}());w.style=p()}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as e,F as t,a as s}from"./p-_lt63o7c.js";import{s as n,a as i,b as c,i as r,c as a,g as d,d as l,e as u,f as h,p as m,h as p,j as g,k as f,l as w,m as v,n as z,o as k,t as y,q as C,r as b,u as S,v as x,w as I,x as T,y as A,z as O,A as _,B,C as E,D,E as L,F as P,G as U,H as j,I as N,J as R,K as $}from"./p-DHwpNxG9.js";import{p as F,s as M,a as H,b as K}from"./p-CJCoACvU.js";import{f as Z,a as V,b as G,i as Q,l as W,c as J,g as Y,s as q,V as X,d as oo,t as eo,e as to,h as so}from"./p-DTgv0QpG.js";import{z as no,g as io,m as co}from"./p-CtEsvWI6.js";import{b as ro}from"./p-BycjkdlE.js";import{h as ao,g as lo,j as uo,l as ho,b as mo,s as po,a as go,i as fo}from"./p-DE4a-QD5.js";import{u as wo}from"./p-nU86HJ5w.js";import{l as vo,g as zo,b as ko}from"./p-BJmZPrZl.js";import{_ as yo,c as Co,d as bo,a as So,g as xo}from"./p-D5SpFsQJ.js";import{c as Io}from"./p-BJHSB96f.js";import{c as To}from"./p-XQfWgQLB.js";import{g as Ao}from"./p-3ERbuo5a.js";import{i as Oo}from"./p-YdrG78th.js";import{s as _o}from"./p-BTIeCf3T.js";import{R as Bo}from"./p-C2QMVeWW.js";import"./p-Cye-evFK.js";import"./p-CICjAi70.js";import"./p-i1iCWKdv.js";import"./p-t_ClFAJR.js";import"./p-D0erXw7p.js";const Eo="isInternationalCheckout",Do=({action:o}={})=>{const e=new URL("/login.php",window.location.origin);o&&e.searchParams.set("action",o);const t=new URLSearchParams(window.location.search),s=t.get("zonosQaUrl");s&&e.searchParams.set("zonosQaUrl",s);const n=t.get("zonosQaUrlApi");return n&&e.searchParams.set("zonosQaUrlApi",n),lo()&&e.searchParams.set("zonosTestMode","1"),e.searchParams.set("from",(()=>{const o=new URLSearchParams;o.set(Eo,"true");const e=new URLSearchParams(window.location.search),t=e.get("zonosQaUrl");t&&o.set("zonosQaUrl",t);const s=e.get("zonosQaUrlApi");return s&&o.set("zonosQaUrlApi",s),lo()&&o.set("zonosTestMode","1"),`cart.php?${o.toString()}`})()),e.toString()},Lo=o=>{const e=new URL(o,window.location.origin),t=new URLSearchParams(window.location.search),s=t.get("zonosQaUrl");return s&&e.searchParams.set("zonosQaUrl",s),"1"===t.get("zonosDebug")&&e.searchParams.set("zonosDebug","1"),lo()&&e.searchParams.set("zonosTestMode","1"),e.toString()},Po={customerGroupId:null,shouldBypass:!1};let Uo=null;const jo=o=>{const e=(async o=>{var e,t,s,n;if(!window.Zonos.isBigCommerce)return{conclusive:!0,result:Po};const i=null===(e=no.genericSettings)||void 0===e?void 0:e.bigcommerceBypassCustomerGroupIds;if(!(null==i?void 0:i.length))return no.loadedConfig?{conclusive:!0,result:Po}:{conclusive:!1,result:Po};const c=o?o.checkoutId:await V();if(!c)return vo("BigCommerce bypass check: no active cart yet, will retry on next call","info"),{conclusive:!1,result:Po};const r=o?o.checkout:await G(c);if(!r)return vo("BigCommerce bypass check: failed to fetch checkout data, will retry","info"),{conclusive:!1,result:Po};const a=null!==(n=null===(s=null===(t=r.customer)||void 0===t?void 0:t.customerGroup)||void 0===s?void 0:s.id)&&void 0!==n?n:null;if(null===a)return vo("BigCommerce bypass check: no customer group found (guest user)","info"),{conclusive:!0,result:Po};const d=i.includes(a),l={customerGroupId:a,shouldBypass:d};return vo(d?`BigCommerce bypass check: customer group ${String(a)} is in bypass list; caller should keep the user on BC native checkout`:`BigCommerce bypass check: customer group ${String(a)} is not in bypass list`,"info"),{conclusive:!0,result:l}})(o),t=e.then((({conclusive:o,result:e})=>(o||Uo!==t||(Uo=null),e)));return Uo=t,t},No=async(o={})=>o.forceRefresh||!Uo?jo(o.preFetched):Uo,Ro={guestCheckoutType:null},$o="zonos--bc-checkout-settings",Fo={redirectUrl:null,shouldForceLogin:!1};let Mo=null;const Ho=()=>{if(!Mo){const o=(async()=>{var o;if(!window.Zonos.isBigCommerce)return Ro;const e=null===(o=no.checkoutSettings.bigCommerceConfig)||void 0===o?void 0:o.storeHash;if(!e)return vo("BigCommerce checkout settings: no storeHash provided — skipping fetch","info"),Ro;const t=(o=>{try{const e=window.localStorage.getItem($o);if(!e)return null;const t=uo(e);return t?t.storeHash!==o||t.expiresAt<Date.now()?null:{guestCheckoutType:t.guestCheckoutType}:null}catch(o){return null}})(e);if(t)return t;const{errors:s,json:n}=await ao("/api/bigcommerce/checkout-settings",{body:{storeHash:e},method:"POST"});if(s.length||!n)return vo("BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior","info"),Ro;const i={guestCheckoutType:n.guestCheckoutType};return((o,e)=>{try{const t={expiresAt:Date.now()+36e5,guestCheckoutType:e.guestCheckoutType,storeHash:o};window.localStorage.setItem($o,JSON.stringify(t))}catch(o){}})(e,i),i})().then((({guestCheckoutType:e})=>e?"no_guest_checkout"===e:(Mo===o&&(Mo=null),!1))).catch((()=>(Mo===o&&(Mo=null),!1)));Mo=o}return Mo},Ko=async({preFetched:o}={})=>{if(!window.Zonos.isBigCommerce)return Fo;if(!await Ho())return Fo;const e=o?o.checkoutId:await V();if(!e)return Fo;const t=o?o.checkout:await G(e);return t?Q(t)?Fo:(vo("BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php","info"),{redirectUrl:Do(),shouldForceLogin:!0}):(vo("BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue","info"),Fo)},Zo="data-zonos-login-from-rewritten",Vo='a[href*="login.php?action=create_account"]:not(['+Zo+"])",Go=()=>{const o=document.querySelectorAll(Vo);if(!o.length)return;const e=Do({action:"create_account"});o.forEach((o=>{o.setAttribute("href",e),o.setAttribute(Zo,"true")}))},Qo=(o,e)=>{if(!o.address1||!o.countryCode)return null;const t=[o.firstName,o.lastName].filter(Boolean).join(" ").trim();return{address:{city:o.city||"",country:o.countryCode,line1:o.address1,line2:o.address2||"",postal_code:o.postalCode||"",state:o.stateOrProvinceCode||o.stateOrProvince||""},email:e,name:t,phone:o.phone||""}},Wo=o=>[o.address.line1,o.address.line2||"",o.address.postal_code,o.address.country].join("|").toLowerCase(),Jo=(o=!0,e)=>{var t;if(!W.localizationLoaded)return!1;if(e){const s=!!(null===(t=W.shippingZoneCountries)||void 0===t?void 0:t[e])&&!no.disabledCountries.includes(e);return o&&!s&&vo(`Checkout: ${e} is not a shippable country: ${s}`),s}return!!W.isShippableCountry||(o&&vo("Checkout: not shippable country"),!1)},Yo='select[name="shippingAddress.countryCode"]',qo=({domesticRedirectedBtnSelector:o,onInternationalCheckoutSelected:e,onLoggedInInternationalAddressDetected:t,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const c=async o=>{var t;const s=document.querySelector((null===(t=no.genericSettings)||void 0===t?void 0:t.bigcommerceDomesticCheckoutCountrySelector)||Yo),n=(null==s?void 0:s.value)||o;if(!n)return"noAction";if(!Jo(!1,n))return"noAction";const c=await V(),r={checkout:c?await G(c):null,checkoutId:c},{shouldBypass:a}=await No({forceRefresh:!0,preFetched:r});if(a)return vo("Bypass customer group detected on BC checkout, stopping interval","info"),"bypass";const d=await Ko({preFetched:r});if(d.shouldForceLogin&&d.redirectUrl)return window.location.href=d.redirectUrl,"redirected";e&&await e(),J({isInitializing:!1,newSelectedCountryCode:n});const l={address1:"",address2:"",city:"",countryCode:n,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};return i({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),window.location.href=Lo("/"),"redirected"};let r=!1,a=!1;let d=!1,l=!1,u=!1,h=!1,m=!1;const p=new MutationObserver((async()=>{var g;const f=document.querySelector(o),w=n();if(!f&&w){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(w),void p.disconnect()}if(!window.location.pathname.includes("/checkout")||!window.Zonos.isBigCommerce)return void p.disconnect();if(!h&&!u){u=!0,m=!0;try{const o=await(async({onInternationalCheckoutSelected:o,onLoggedInInternationalAddressDetected:e})=>{var t,s,n,c,r,a,d,l,u,h;const m=await V();if(!m)return"noAction";const p=await G(m),g={checkout:p,checkoutId:m},{shouldBypass:f}=await No({preFetched:g});if(f)return"noAction";const w=null===(s=null===(t=null==p?void 0:p.consignments)||void 0===t?void 0:t[0])||void 0===s?void 0:s.shippingAddress;if(!(null==w?void 0:w.countryCode))return"noAction";const v=w.countryCode;if(!Jo(!1,v))return"noAction";if(vo(e?`Logged-in user has international shipping address: ${v}, prompting user to choose checkout`:`Logged-in user has international shipping address: ${v}, redirecting automatically (legacy behavior)`,"info"),e&&"stay"===await e())return vo("User opted to stay on BigCommerce native checkout despite international default address","info"),"optedOut";const z=await Ko({preFetched:g});return z.shouldForceLogin&&z.redirectUrl?(window.location.href=z.redirectUrl,"redirected"):(o&&await o(),J({isInitializing:!1,newSelectedCountryCode:v}),i({address1:null!==(n=w.address1)&&void 0!==n?n:"",address2:null!==(c=w.address2)&&void 0!==c?c:"",city:null!==(r=w.city)&&void 0!==r?r:"",countryCode:v,firstName:null!==(a=w.firstName)&&void 0!==a?a:"",lastName:null!==(d=w.lastName)&&void 0!==d?d:"",phone:null!==(l=w.phone)&&void 0!==l?l:"",postalCode:null!==(u=w.postalCode)&&void 0!==u?u:"",state:null!==(h=w.stateOrProvince)&&void 0!==h?h:""}),window.location.href=Lo("/"),"redirected")})({onInternationalCheckoutSelected:e,onLoggedInInternationalAddressDetected:t});if("redirected"===o)return void p.disconnect();"optedOut"===o&&(h=!0,(o=>{a||(a=!0,document.addEventListener("click",(e=>{if(r)return;const{target:t}=e;if(!(t instanceof Element))return;const s=t.closest("#checkout-shipping-continue, #checkout-billing-continue, #checkout-payment-continue");s&&(e.preventDefault(),e.stopImmediatePropagation(),(async(o,e)=>{let t=!0;try{let o=null;try{o=await(async()=>{var o,e,t,s;const n=await V();if(n){const s=await G(n),i=null===(t=null===(e=null===(o=null==s?void 0:s.consignments)||void 0===o?void 0:o[0])||void 0===e?void 0:e.shippingAddress)||void 0===t?void 0:t.countryCode;if(i)return i}const i=document.querySelector((null===(s=no.genericSettings)||void 0===s?void 0:s.bigcommerceDomesticCheckoutCountrySelector)||Yo);return(null==i?void 0:i.value)||null})()}catch(o){ho("Error resolving selected shipping country on BC continue",o)}o&&Jo(!1,o)&&e.disconnect(),"redirected"===(o?await c(o):"noAction")&&(t=!1)}catch(o){ho("Error handling BC continue international redirect",o)}t&&(r=!0,o.click(),r=!1)})(s,o))}),!0))})(p))}catch(o){ho("Error checking logged-in user shipping address",o)}finally{u=!1,m=!1}}const v=document.querySelector((null===(g=no.genericSettings)||void 0===g?void 0:g.bigcommerceDomesticCheckoutCountrySelector)||Yo);if(!v)return;if(vo("Domestic checkout found - Listening for shipping country change","info",{value:v.value}),l)return;l=!0,p.disconnect();const z=setInterval((async()=>{if(!d&&!m){d=!0;try{const o=await c();if("redirected"===o||"bypass"===o)return void clearInterval(z);d=!1}catch(o){d=!1}}}),1e3),k=setInterval((()=>{var o;if(!window.bcStripeElements)return void clearInterval(k);const e=null===(o=window.bcStripeElements)||void 0===o?void 0:o.getElement("address");e&&(clearInterval(k),e.on("change",(o=>{const e=o.value.address.country;e&&!m&&c(e)})))}),500)}));p.observe(document.body,{childList:!0,subtree:!0})};let Xo=0;const oe=o=>{var e;const t=null===(e=q.enabledVariantTestKeys)||void 0===e?void 0:e.find((e=>e.testKey===o));return(null==t?void 0:t.selectedVariantKey)||null},ee=async({cartId:o,retries:e})=>{const t=lo(),{errors:s,json:n}=await ao("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:!0},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"}),i=!n||s.length;return i&&e?(vo("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:e}),await new Promise((o=>setTimeout(o,500))),ee({cartId:o,retries:e-1})):i?null:n};var te='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';const se=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.isRedirectAfterOrder=!1,this.preview=!1,this.hiddenMode=!1,this.mobile=!1,this.defaultAddress=[],this.forceDialogOpen=!1,this.defaultAddressParams=[],this.defaultCustomerProfileAddress=[],this.customerProfile=null,this.open=this.forceDialogOpen,this.isOverlayLoading=!1,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.shouldShowFedexShippingConsentDialog=!1,this.detectedDomesticCheckoutDialogOpen=!1,this.redirectToDomesticCheckoutDialogOpen=!1,this.loggedInIntlAddressConfirmDialogOpen=!1,this.loggedInIntlAddressResolver=null,this.clientSecret=c.clientSecret,this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret,this.applyStripeTheme=async()=>{var o,e,t,s;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||no.appearance.theme;await r({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideSecondaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:F()})},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${Co}`),t=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,n=s.get("payment_intent_client_secret"),i=s.get("zonosCheckoutSessionId");if(!e)return vo("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(vo("Payment intent exist, checking stripe payment intent status"),!n)return vo("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:t};const{error:r,status:d}=await a({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(vo(r?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,q.checkoutSessionId=i,c.clientSecret=n,this.setToFinishStep(d),{shouldAllowOrder:!1}):t?(vo("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(vo("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.recoverCompletedOrderModificationSession=async o=>{q.checkoutSessionId=o;const{errors:e,json:t}=await d();if(e.length||!t)return!1;const{checkoutSession:s}=t;if(s.completedAt&&s.order)return this.setToFinishStep("succeeded"),!0;if(s.clientSecret){const{status:o}=await a({clientSecret:s.clientSecret});if("processing"===o||"succeeded"===o)return c.clientSecret=s.clientSecret,this.setToFinishStep(o),!0}return!1},this.initializeTestKeys=()=>{var o;q.enabledVariantTestKeys=(null==(o=q.enabledVariantTestKeys||[])?void 0:o.filter((o=>!(o.expiresAt&&o.expiresAt<Date.now()||!o.expiresAt))))||[];const e=no.enabledVariantTestKeys.map((o=>{var e;const t=null===(e=q.enabledVariantTestKeys)||void 0===e?void 0:e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+X,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}}));return oo(e),{allSelected:!1}},this.shouldAllowHostedVsNativeTest=()=>"function"==typeof no.checkoutSettings.createCartId&&!!no.enabledVariantTestKeys.includes("hosted_vs_native"),this.registerTestHostedVsNative=async()=>{if(!this.shouldAllowHostedVsNativeTest())return;vo("[TEST] - Registering hosted vs native test");const o=oe("hosted_vs_native");if(o)return void vo(`[TEST] - Hosted vs native test already has variant selected: ${o}`);const e=await(async({testKeys:o})=>{if(0===o.length)return null;const{errors:e,json:t}=await ao("/api/zonos-elements/select-variance-test",{body:{testKeys:o},method:"POST"});return e.length||!t?null:Z(t)})({testKeys:["hosted_vs_native"]});if(!e)return void vo("[TEST] - Failed to get selection for hosted vs native test");const t=(({baseTestObj:o,mergeTestObj:e})=>o.map((({testKey:o})=>{const t=e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+X,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}})))({baseTestObj:q.enabledVariantTestKeys||[],mergeTestObj:e});oo(t)},this.handleHostedVsNative=async()=>{var o;if(!this.shouldAllowHostedVsNativeTest())return{redirected:!1};const e=oe("hosted_vs_native");if(vo(`[TEST] - hosted_vs_native: ${e}`),"function"!=typeof no.checkoutSettings.createCartId)return vo("[TEST] - createCartId is not provided, skipping hosted vs native test"),{redirected:!1};if("hosted"!==e)return vo("[TEST] - Hosted vs native test is enabled for native, skipping"),{redirected:!1};if(!(null===(o=no.genericSettings)||void 0===o?void 0:o.hostedCheckoutUrl))return vo("[TEST] - Hosted checkout URL is not provided"),{redirected:!1};vo('"createCartId" is provided, start building cart');const t=await no.checkoutSettings.createCartId();let s,n=null;"object"==typeof t?(s=t.cartId,n=t.shippingData||null):s=t;const i=(()=>{const o=new URLSearchParams(window.location.search);vo("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:""},t=Y(o)||W.selectedCountryCode||"US",s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerPhone"),d=e("customerZip"),l=e("customerState");return{customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:e("customerFirstName"),customerLastName:e("customerLastName"),customerName:r,customerPhone:a,customerState:l,customerZip:d}})(),c=(({cartId:o,checkoutSessionId:e,customerAddress1:t,customerAddress2:s,customerCity:n,customerCountry:i,customerEmail:c,customerFirstName:r,customerLastName:a,customerPhone:d,customerState:l,customerZip:u,hostedCheckoutUrl:h,isTestMode:m,isVariantTest:p})=>{const g=new URLSearchParams;return g.set("tempCartUUID",o),r&&g.set("customerFirstName",r),a&&g.set("customerLastName",a),c&&g.set("customerEmail",c),d&&g.set("customerPhone",d),u&&g.set("customerZip",u),n&&g.set("customerCity",n),l&&g.set("customerState",l),i&&g.set("zCountry",i),t&&g.set("customerAddress1",t),s&&g.set("customerAddress2",s),m&&g.set("zonosTestMode","1"),e&&g.set("zonosCheckoutSessionId",e),p&&g.set("zonosVariantTest","1"),`${h}?${g.toString()}`})(Object.assign(Object.assign({cartId:s,checkoutSessionId:q.checkoutSessionId||void 0,hostedCheckoutUrl:no.genericSettings.hostedCheckoutUrl,isTestMode:lo(),isVariantTest:!0},i),n));return vo(`[TEST] - Redirecting to: ${c}`),window.open(c,"_blank"),{redirected:!0}},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.getBaseCurrencySettlementInfo=()=>{const o=l.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:e}}=o;return e?{settlementAmount:(e.discounts||0)+e.items+e.landedCostTotal+e.shipping}:null},this.prefillBigCommerceCustomerAddresses=async()=>{if(!window.Zonos.isBigCommerce)return;if(this.defaultCustomerProfileAddress.length)return;if(Array.isArray(this.defaultAddress)&&this.defaultAddress.length>0||!Array.isArray(this.defaultAddress)&&"object"==typeof this.defaultAddress&&null!==this.defaultAddress)return;const o=await V();if(!o)return;const e=await G(o);if(!Q(e))return;const t=((o,e)=>{var t,s,n,i;if(!(null===(t=null==o?void 0:o.customer)||void 0===t?void 0:t.id))return[];const{isShippable:c,selectedCountryCode:r}=e,a=o.customer.email||"",d=null!==(n=null===(s=o.consignments)||void 0===s?void 0:s.flatMap((o=>o.shippingAddress?[o.shippingAddress]:[])))&&void 0!==n?n:[],l=null!==(i=o.customer.addresses)&&void 0!==i?i:[],u=new Set,h=[];for(const o of[...l,...d]){const e=Qo(o,a);if(!e)continue;if(!c(e.address.country))continue;const t=Wo(e);u.has(t)||(u.add(t),h.push(e))}return r?h.map(((o,e)=>({index:e,option:o}))).sort(((o,e)=>{const t=o.option.address.country===r;return t===(e.option.address.country===r)?o.index-e.index:t?-1:1})).map((o=>o.option)):h})(e,{isShippable:o=>Jo(!1,o),selectedCountryCode:W.selectedCountryCode||void 0});t.length&&(this.defaultCustomerProfileAddress.length||(this.defaultCustomerProfileAddress=t,vo(`Prefilled ${String(t.length)} BigCommerce customer address(es) for logged-in shopper`,"info")))},this.getDefaultAddress=()=>this.defaultCustomerProfileAddress.length?this.defaultCustomerProfileAddress:Array.isArray(this.defaultAddress)&&this.defaultAddress.length?this.defaultAddress:Array.isArray(this.defaultAddress)||"object"!=typeof this.defaultAddress?this.defaultAddressParams:[this.defaultAddress],this.handleHostedOpenWindowCallback=o=>{var e;const t=null===(e=no.genericSettings)||void 0===e?void 0:e.hostedCheckoutUrl;if(!origin)return;const s=["dev.checkout.elements.zonos.com"].some((e=>o.origin.includes(e)));o.origin!==t&&!s||"zonos-checkout-session-update"!==o.data.type||(q.checkoutSessionId=o.data.checkoutSessionId)},this.captureParamsRedirectedForVariantTest=()=>{const o=new URL(window.location.href);if("1"!==o.searchParams.get("zonosVariantTest"))return;const e=o.searchParams.get("zonosCheckoutSessionId");e&&(q.checkoutSessionId=e);const t=q.enabledVariantTestKeys||[];window.Zonos.isLegacyCheckout&&(oe("hosted_vs_native")?oo(t.map((o=>"hosted_vs_native"===o.testKey?Object.assign(Object.assign({},o),{selectedVariantKey:"hosted"}):o))):(t.push({expiresAt:Date.now()+X,selectedVariantKey:"hosted",testKey:"hosted_vs_native"}),oo(t))),o.searchParams.delete("zonosCheckoutSessionId"),o.searchParams.delete("zonosVariantTest"),window.history.replaceState({},"",o.toString())}}async initCartInfoHandler(o){u({adjustments:l.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,t;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,M({event:"zonos-checkout-close",metadata:{checkoutSessionId:q.checkoutSessionId}}),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||h(),this.preview||m(),l.step="customer-info",p(),g(),null===(t=(e=no.checkoutSettings).onClose)||void 0===t||t.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){var o;if("function"==typeof no.checkoutSettings.createCartId){vo('"createCartId" is provided, start building cart'),l.customMessage=[];const o=await no.checkoutSettings.createCartId();let e;"object"==typeof o?(vo("object detected, use cartId and prefill address from createCartId","info",o),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData),l.customerAuthenticationToken=o.customerAuthenticationToken||null,l.customMessage=Array.isArray(o.customMessage)?o.customMessage.filter((o=>"string"==typeof o)):[]):e=o,window.Zonos.cartId=e;const t=await(async o=>{const{isDgsCartId:e,isLegacyCartId:t}=yo(o);if(!t&&!e)return ho("[ZONOS - loadZonos] invalid cart id"),null;const s=await ee({cartId:o,retries:5});return vo("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(ho("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(e),s=null==t?void 0:t.cartData;if(!s)return ho("Failed to build cart, please try again."),!1;window.Zonos.cartData=s;const{adjustments:n,cartItems:i}=ro(s);await u({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){vo("tempCartUUID is provided, start building cart");const e=null===(o=window.Zonos.cartData.references)||void 0===o?void 0:o.checkoutSessionId;if(e){if(vo("Setting checkout session id from cart reference","info",e),await this.recoverCompletedOrderModificationSession(e))return c.isFetchingSession=!1,!0;q.checkoutSessionId=e}else vo("Clear checkout session id from storage so we start from a fresh session for this cart"),q.checkoutSessionId=null;const{adjustments:t,cartItems:s}=ro(window.Zonos.cartData);await u({adjustments:t,cartItems:s})}else if(no.checkoutSettings.buildCartDetail&&W.selectedCountryCode){vo("build cart detail");const o=await no.checkoutSettings.buildCartDetail({countryCode:W.selectedCountryCode,currencyCode:W.targetCurrency}),e=o.filter((o=>o.amount>=0)),t=o.filter((o=>o.amount<0));vo("cartItems","info",{cartItems:o});const s=t.map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await u({adjustments:s,cartItems:e})}if(!q.checkoutSessionId){const o=await f();if(vo(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}l.isStagingMode||w(),await this.applyStripeTheme();const{successBehavior:e,successRedirectUrl:t}=no.checkoutSettings;return this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===e||"CLOSE_MODAL"===e&&!!t||!!l.externalConfirmationPageURL,v()&&(l.step="payment"),!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=uo(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;vo(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>t)return vo(`=== Existing placed order info is older than ${t}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,vo("=== Showing order duplication confirmation","warn")}recordCheckoutInfo(){q.checkoutSessionId&&wo({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:q.checkoutSessionId})}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,q.checkoutSessionId&&wo({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:q.checkoutSessionId})}markTheSessionAsAbandonedCart(){q.checkoutSessionId&&wo({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:q.checkoutSessionId})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||no.onlineStoreSettings.url;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=no.checkoutSettings.placeOrderButtonSelector,e=no.checkoutSettings.alwaysTriggerInternationalCheckoutSelector,t=!!document.querySelector(`#${Co}`);if(vo(`attach checkout ${o}`,"info",{href:window.location.href}),vo(`attach checkout to always trigger international checkout selector: ${e}`),!(o||e||window.Zonos.cartData||t))return;const s=[o,e,`#${bo}`,`#${Co}`,`#${So}`].filter(Boolean);document.querySelectorAll(s.join(",")).forEach((t=>{t.getAttribute("data-zonos-checkout-attached")||(vo(`attached event to button ${o}`,"info",{button:t}),t.addEventListener("click",(async o=>{var s,n;const i=performance.now(),r=e&&t.matches(e),a=t.matches(`#${So}`),d=t.matches(`#${bo}`)||t.matches(`#${Co}`);if(!window.Zonos.isLegacyCheckout&&(!Jo()||((o=!0)=>!W.localizationLoaded||!!W.isDisabledCountry&&(o&&vo("Checkout: disabled country"),!0))())&&!r&&!a&&!d)return;o.preventDefault(),o.stopPropagation(),vo("zonos checkout button clicked");const{shouldAllowOrder:u}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(u){if(window.Zonos.logIntervalId||(window.Zonos.logIntervalId=setInterval((()=>{(async()=>{if(0===window.Zonos.loadTimeApiInfoList.length)return;vo("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});const o={data:[...window.Zonos.loadTimeApiInfoList],storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;const{errors:e}=await ao("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"});e.length&&(window.Zonos.loadTimeApiInfoList.push(...o.data),Xo++,Xo>5&&window.Zonos.logIntervalId&&clearInterval(window.Zonos.logIntervalId))})()}),2e3)),no.enabledVariantTestKeys.includes("hosted_vs_native")){this.isOverlayLoading=!0,await this.registerTestHostedVsNative();const{redirected:o}=await this.handleHostedVsNative();if(this.isOverlayLoading=!1,o)return}if(window.Zonos.isBigCommerce){const{shouldBypass:o}=await No();if(o)return vo("Bypass customer group detected, redirecting to BigCommerce native checkout","info"),void(window.location.href=Lo("/checkout"));const e=await Ko();if(e.shouldForceLogin&&e.redirectUrl)return void(window.location.href=e.redirectUrl)}c.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");if(!window.Zonos.isLegacyCheckout){let o=null;try{o=await z()}catch(e){o=eo("Unable to check inventory. Please try again.")}if(o)return l.inventoryCheckErrorMessage=o,c.isFetchingSession=!1,void(this.open=!1)}null===(s=window.opener)||void 0===s||s.postMessage({checkoutSessionId:q.checkoutSessionId,type:"zonos-checkout-session-update"},"*"),k({isPreview:this.preview,sessionTimeout:54e5}),M({event:"zonos-checkout-start",metadata:{checkoutSessionId:q.checkoutSessionId}}),y({checkoutSessionId:q.checkoutSessionId,eventName:"checkout_open"});const{enabled:o}=await(async()=>{const{errors:o,json:e}=await ao("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();if(l.shouldHideDiscountInput=!o,this.handleOrderDuplication(),window.Zonos.isLegacyCheckout)(async()=>{const{elapsedTime:o}=zo(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:ko},mo()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};ao("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})();else{(async({loadTime:o})=>{const e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:ko},mo()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};ao("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})({loadTime:performance.now()-i})}this.recordCheckoutInfo(),xo()&&this.markTheSessionAsAbandonedCart()}catch(o){if(o instanceof Error&&"Cart is expired."===o.message&&(this.isCartExpired=!0),c.isFetchingSession=!1,ho(o),this.isCartExpired)return void(c.isFetchingSession=!0);po({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:ko,cartId:window.Zonos.cartId,checkoutSessionBody:C(),href:window.location.href,storeBaseUrl:(null===(n=window.Zonos.cartData)||void 0===n?void 0:n.storeBaseUrl)||no.onlineStoreSettings.url}}),b({messages:[eo("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:eo("Error creating Checkout")})}}}),{capture:!0,passive:!1}),no.checkoutSettings.disablePlaceOrderButtonActivation||t.removeAttribute("disabled"),t.setAttribute("data-zonos-checkout-attached","true"),t.matches(`#${bo}`)&&(t.dispatchEvent(To("click")),S(),t.remove()),t.matches(`#${Co}`)&&(t.dispatchEvent(To("click")),t.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;vo("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:n,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:u}=o,h=new URLSearchParams(window.location.search),m=n||Y(h)||W.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:m,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:u})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);vo("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:null},t=Y(o)||W.selectedCountryCode,s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerFirstName"),d=e("customerLastName"),l=e("customerPhone"),u=e("customerZip"),h=e("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:a,customerLastName:d,customerName:r,customerPhone:l,customerState:h,customerZip:u})}applyPrefillAddress(o){const e=o.customerAddress1||"",t=o.customerCountry||"",s=o.customerAddress2||"",n=o.customerCity||"",i=o.customerEmail||"",c=o.customerFirstName&&o.customerLastName?`${o.customerFirstName} ${o.customerLastName}`:o.customerName||"",r=o.customerPhone||"",a=o.customerZip||"",d=o.customerState||"";e&&c&&r&&t?t&&W.shippingZoneCountries&&!(t in W.shippingZoneCountries)?vo(`Country "${t}" is not in the shipping zone, so it can not be prefilled`,"warn"):(this.defaultAddressParams=[{address:{city:n||"",country:t,line1:e,line2:s,postal_code:a,state:d},email:i,name:c,phone:r}],vo("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):vo("Missing required query params so it can not be prefilled","info",[!e&&"line1",!c&&"name",!r&&"phone",!t&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){l.isStagingMode=!!this.overrideStagingMode}async init(){c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,l.isStagingMode=go(),void 0!==this.overrideStagingMode&&(l.isStagingMode=this.overrideStagingMode),(()=>{var o;if(!window.Zonos.isBigCommerce)return;const e=null===(o=no.genericSettings)||void 0===o?void 0:o.bigcommerceBypassCustomerGroupIds;(null==e?void 0:e.length)&&jo()})(),window.Zonos.isBigCommerce&&Ho(),(()=>{if(!window.Zonos.isBigCommerce)return;if(!window.location.pathname.includes("/login.php"))return;Go();const o=new MutationObserver((()=>{Go()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>o.disconnect()),1e4)})(),this.handleBigcommerceInternationalResumeFlag(),this.prefillBigCommerceCustomerAddresses(),qo({domesticRedirectedBtnSelector:bo,onInternationalCheckoutSelected:async()=>{this.detectedDomesticCheckoutDialogOpen=!0,await new Promise((o=>setTimeout(o,2e3)))},onLoggedInInternationalAddressDetected:()=>new Promise((o=>{this.loggedInIntlAddressResolver=o,this.loggedInIntlAddressConfirmDialogOpen=!0})),onShippingAddressSessionFound:o=>{this.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}]}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(vo("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):vo("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}handleBigcommerceInternationalResumeFlag(){if(!window.Zonos.isBigCommerce)return;const o=new URL(window.location.href);if("true"!==o.searchParams.get(Eo))return;o.searchParams.delete(Eo),window.history.replaceState({},"",o.toString());const e=Date.now(),t=setInterval((()=>{if(!W.localizationLoaded||!W.selectedCountryCode)return void(Date.now()-e>15e3&&(clearInterval(t),vo("BigCommerce international checkout resume flag: localization did not initialize within 15s","info")));const o=document.querySelector(`#${So}`);if(o)return clearInterval(t),void o.dispatchEvent(To("click"));Date.now()-e>15e3&&(clearInterval(t),vo("BigCommerce international checkout resume flag: trigger button did not mount within 15s","info"))}),200)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){x(o)}async triggerCheckoutInternational(){const o=document.querySelector(`#${So}`);o&&o.dispatchEvent(To("click"))}async handleCustomerInfoContinue(){var o,e,t,s;M({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:q.checkoutSessionId}}),y({checkoutSessionId:q.checkoutSessionId,eventName:"checkout_customerInfoCompleted"}),this.submitLoading=!0;const{isRequestNotReady:n}=await I();n&&"stripe"===l.addressFormRenderType&&po({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:null===(e=null===(o=c.stripeAddressEventData)||void 0===o?void 0:o.value)||void 0===e?void 0:e.address,billingAddress:null===(s=null===(t=c.stripeBillingAddressEventData)||void 0===t?void 0:t.value)||void 0===s?void 0:s.address,cartId:window.Zonos.cartId}});const i=o=>{"customer-info"===l.step?c.isFetchingLandedCost||(l.landedCostData&&(K({currency:l.currency}),T()),this.submitLoading=!1,o&&clearInterval(o)):clearInterval(o)};i();const r=setInterval((()=>{i(r)}),20);setTimeout((()=>{clearInterval(r)}),1e4)}async handleShippingContinue(){T()}handleInventoryCheckDialogConfirm(){l.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){if("USD"===c.checkoutSettlementCurrency&&c.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen)return void(this.payInUsdConfirmDialogOpen=!0);this.payInUsdConfirmDialogOpen=!1;const o=A();try{if(H.paypalErrorMessage=null,c.hasPaymentError=!1,this.submitLoading=!0,l.inventoryCheckErrorMessage=null,!await O())return c.hasPaymentError=!0,c.customErrorMessage=eo("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:c.checkoutSettlementCurrency}),void(this.submitLoading=!1);try{l.inventoryCheckErrorMessage=await z()}catch(o){l.inventoryCheckErrorMessage=eo("Unable to check inventory. Please try again.")}if(l.inventoryCheckErrorMessage)return void(this.submitLoading=!1);if($()>0){const o=await _();if(!o.success)return c.hasPaymentError=!0,c.customErrorMessage=o.error||eo("Unable to apply store credit. Please try again."),void(this.submitLoading=!1)}if(B()){try{const o=await E();if(!o.valid)return c.hasPaymentError=!0,c.customErrorMessage=o.errorMessage,void(this.submitLoading=!1);const e=await D();if(!e.success)return c.hasPaymentError=!0,c.customErrorMessage=e.error||eo("Unable to place order with store credit. Please try again."),void(this.submitLoading=!1);T(),g()}catch(o){ho(o),M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:q.checkoutSessionId}}),c.hasPaymentError=!0}return void(this.submitLoading=!1)}try{await L({noLandedCostCheck:v()}),T(),g()}catch(o){ho(o),M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:q.checkoutSessionId}}),c.hasPaymentError=!0,c.shouldInventoryRefund&&(P(),c.shouldInventoryRefund=!1)}this.submitLoading=!1}finally{o&&(U.locked=!1)}}async handleFinishClick(){if(j(),this.preview)return l.step="customer-info",void await this.init();if(h(),m(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl||no.onlineStoreSettings.url;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=fo(this.mobile),this.applyStripeTheme(),vo(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=fo(this.mobile),this.applyStripeTheme(),vo(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=io(this.appearanceSettingsOverride.theme))}handleAddressChange(){j()}handleCustomerProfileChange(){var o,e;if(!this.customerProfile)return vo("No customer profile","info"),void(this.defaultCustomerProfileAddress=[]);vo("Customer profile found","info",{customerProfile:this.customerProfile}),this.defaultCustomerProfileAddress=(null===(e=null===(o=c.customerProfile)||void 0===o?void 0:o.locations)||void 0===e?void 0:e.map((o=>{var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||(null===(e=c.customerProfile)||void 0===e?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]}handleClientSecretChange(){vo("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret}),this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,t=document.documentElement;if(this.open)window.Zonos.openHelloDialog(!1),e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",t.style.overflow&&t.setAttribute(o,t.style.overflow),t.style.overflow="hidden";else{this.stripeCustomerSessionClientSecret=null;const s=e.getAttribute(o),n=t.getAttribute(o);s?(e.removeAttribute(o),e.style.overflow=s):e.style.removeProperty("overflow"),n?(t.removeAttribute(o),t.style.overflow=n):t.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=fo(this.mobile),this.isIframed=window.self!==window.top,vo(`iframed: ${this.isIframed}`),window.Zonos.isLegacyCheckout&&this.captureParamsRedirectedForVariantTest(),this.handleAppearanceSettingsOverrideChange(),this.storeUnsubscribeList=[to("selectedLocale",(()=>{this.applyStripeTheme()})),N("selectedShippingOption",(()=>{var o,e,t,s;const n=l.selectedShippingOption;(null===(o=no.genericSettings)||void 0===o?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&(null===(t=null===(e=null==n?void 0:n.shippingProfile)||void 0===e?void 0:e.serviceLevel.code)||void 0===t?void 0:t.toLowerCase().startsWith("fedex."))&&"CA"===(null===(s=c.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)&&(this.shouldShowFedexShippingConsentDialog=!0)})),R("stripeAddressEventData",(o=>{var e;if(!window.Zonos.isBigCommerce||!o||this.redirectToDomesticCheckoutDialogOpen||!(null===(e=no.genericSettings)||void 0===e?void 0:e.isBigcommerceDomesticCheckoutRedirectEnabled)||"USD"!==no.sourceCurrency)return;if(!this.open)return;if(window.location.pathname.includes("/checkout"))return;const t=o.value.address.country;t&&no.disabledCountries.includes(t)&&(this.redirectToDomesticCheckoutDialogOpen=!0,vo(`Domestic country ${t} selected in international checkout, redirecting to BigCommerce domestic checkout`,"info"),setTimeout((()=>{window.location.href=Lo("/checkout")}),2e3))}))],this.initializeTestKeys(),window.addEventListener("message",this.handleHostedOpenWindowCallback),vo(`mobile: ${this.isMobile}`)}disconnectedCallback(){j(),h(),m(),this.storeUnsubscribeList.forEach((o=>o())),window.removeEventListener("message",this.handleHostedOpenWindowCallback)}render(){var o,n,i,r;this.customerProfile=c.customerProfile,this.clientSecret=c.clientSecret,c.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret);const a="finish"!==l.step&&"error"!==l.step&&!c.stripeElements||c.isFetchingSession,d=v(),{colorPrimary:u,colorSecondary:h,logoUrl:m,style:p}=co(no.appearance,this.appearanceSettingsOverride||null),g="ENABLED"===no.appearance.zonosAttribution,f=no.appearance.theme,w=u&&Oo(u)?"DARK":"LIGHT",z=this.isMobile?f:w,k=this.isMobile?void 0:h,{customMessages:y}=W,C=null===(o=y.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,b=this.getCurrentLocalePageEnum(),S=y.filter((o=>o.pageName===b)),x=this.getBaseCurrencySettlementInfo(),I=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${no.organizationName} logo`,src:o}))},T=lo(),A=()=>{const o=new URLSearchParams(window.location.search),t=o.get("zonosQaUrl"),s=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||go();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},I(),T&&e("zonos-badge",{badgeColor:"orange",size:"small"},eo("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},eo("Staging mode")),"1"===s&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),!d&&e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),S.map((o=>e("zonos-custom-message",{icon:te,message:o.message}))))},O=()=>l.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:eo("Your checkout session has expired. Please reload the page to continue."),restStateTitle:eo("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},eo("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":Ao({overrideBorderStyle:p})}},"finish"!==l.step&&"error"!==l.step&&e(t,null,e("div",{class:"zonos--left","data-theme":z,style:_o({"--zonos--primary-color":this.isMobile?void 0:u})},!this.isMobile&&A(),"customer-info"===l.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.getDefaultAddress(),isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:k}),"shipping"===l.step&&e("zonos-shipping",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:k}),"payment"===l.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:k})),e("div",{class:"zonos--right","data-theme":f},this.isMobile&&A(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Bo}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:k}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:te,message:C})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:te,message:C}))))),("finish"===l.step||"error"===l.step)&&e("div",{class:"zonos--done","data-theme":f},e("div",{class:"zonos--header"},I(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Bo}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:f})),e("zonos-checkout-finish",{borderRadius:p,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":f,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:Io(["zonos--checkout zonos--elements","payment"===l.step&&"zonos--processing-payment",g&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?O():e("zonos-dialog",{borderStyle:p,class:"zonos--checkout-dialog","data-theme":f,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},O()),e("zonos-dialog",{isLoading:!0,loadingText:eo("You will be redirected to international checkout shortly."),loadingTitle:eo("We detected that you are shipping to an international address."),noClickOutside:!0,noCloseButton:!0,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-dialog",{isLoading:!0,loadingText:eo("You will be redirected to domestic checkout shortly."),loadingTitle:eo("We detected that you are shipping to a domestic address."),noClickOutside:!0,noCloseButton:!0,open:this.redirectToDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-confirm-dialog",{class:"zonos--logged-in-intl-address-dialog",dialogCancelBtnText:eo("Stay on this page"),dialogConfirmBtnText:eo("Continue to international checkout"),dialogIntent:"info",dialogOpen:this.loggedInIntlAddressConfirmDialogOpen,dialogSubtitle:eo("Your selected address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?"),dialogTitle:eo("International shipping address detected"),dialogWidth:480,onCancelClicked:()=>{var o;this.loggedInIntlAddressConfirmDialogOpen=!1,null===(o=this.loggedInIntlAddressResolver)||void 0===o||o.call(this,"stay"),this.loggedInIntlAddressResolver=null},onConfirmClicked:()=>{var o;this.loggedInIntlAddressConfirmDialogOpen=!1,null===(o=this.loggedInIntlAddressResolver)||void 0===o||o.call(this,"redirect"),this.loggedInIntlAddressResolver=null}}),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:eo("Don't close"),dialogConfirmBtnText:eo("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:eo("Would you like to close checkout and return to the site?"),dialogTitle:eo("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:eo("Return to merchant site"),dialogConfirmBtnText:eo("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(n=this.placedOrderInfo)||void 0===n?void 0:n.zonosOrderNumber)?eo("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):eo("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(i=this.placedOrderInfo)||void 0===i?void 0:i.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:eo("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:eo("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:e(t,null,eo("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),e("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},eo("View GAA Form."))),dialogTitle:eo("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:()=>this.shouldShowFedexShippingConsentDialog=!1}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:eo("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:eo("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),x&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:eo("Cancel"),dialogConfirmBtnText:eo("Pay [orderTotal]",{orderTotal:so({amount:x.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:eo("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:eo("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:eo("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:eo("You are being sent back to the shop to re-add items to your cart."),dialogTitle:eo("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}),e("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:[{appearanceSettingsOverrideChanged:0},{handleAppearanceSettingsOverrideChange:0}],overrideStagingMode:[{overrideStagingModeChanged:0}],mobile:[{handleMobileChange:0}],defaultAddress:[{handleAddressChange:0}],customerProfile:[{handleCustomerProfileChange:0}],clientSecret:[{handleClientSecretChange:0}],stripeCustomerSessionClientSecret:[{handleClientSecretChange:0}],open:[{handleOpenChange:0}]}}};se.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-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-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{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-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{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-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";export{se as zonos_checkout}
|