@zonos/elements 1.3.288 → 1.3.290
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-CV4buPlT.js → cart-7DceSLKl.js} +3 -3
- package/dist/cjs/{collect-jzWKzrV7.js → collect-C08DUE1L.js} +3 -3
- package/dist/cjs/{debounce-5sZmmlCI.js → debounce-Cd2emZPn.js} +2 -2
- package/dist/cjs/{debounce-Nu2lJW4A.js → debounce-vY0QYT6o.js} +1 -1
- package/dist/cjs/{getBorderRadius-DGZiQu09.js → getBorderRadius-CyYZw4qq.js} +1 -1
- package/dist/cjs/{getMissingRequiredShippingFields-r5vYIqoX.js → getMissingRequiredShippingFields-Duz8xpmf.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-BZMQohG9.js → hasInclusivePrice-C-iyXqJ0.js} +1 -1
- package/dist/cjs/index.cjs.js +8 -9
- package/dist/cjs/{invoice-CHw-mJdS.js → invoice-DSuHUQpi.js} +3 -3
- package/dist/cjs/{localization-CxXsmxs5.js → localization-BJqYz_PB.js} +192 -69
- package/dist/cjs/{paypal-BLuHeOJH.js → paypal-CZoctP9S.js} +4 -4
- package/dist/cjs/{placeTestOrder-VK_CMeq0.js → placeTestOrder-D7baFuaV.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-CC4CAy-a.js → renderCheckoutCurrency-Ca2HH1Gc.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-Bj_jKWPK.js → shouldShowLanguageSelect-FyTdz7U_.js} +1 -1
- package/dist/cjs/{submitGtag-CcEL-w5D.js → submitGtag-D79e8u6s.js} +1 -1
- package/dist/cjs/{throttle-BcxGntLr.js → throttle-zSVRQLC0.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-Dltl5RBx.js → updateCheckoutSessionAttributes-jMtfOL2m.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +11 -11
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +7 -7
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +15 -15
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +12 -12
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +11 -11
- package/dist/cjs/zonos-collect.cjs.entry.js +7 -7
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +129 -51
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +11 -11
- package/dist/cjs/zonos-invoice.cjs.entry.js +7 -7
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-BCNYr6Tk.js → zonosStore-Bx9jK82G.js} +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +17 -15
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +29 -52
- package/dist/collection/components/main/zonos-controller.js +2 -2
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -2
- package/dist/collection/components/store/hello/localization.js +69 -34
- package/dist/collection/components/store/zonosStore.js +2 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +0 -1
- package/dist/collection/components/utils/api/getLocalization.js +2 -2
- package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -4
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +1 -0
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +2 -0
- package/dist/collection/components/utils/formatDate.js +1 -3
- package/dist/collection/components/utils/getOverridenZCountry.js +3 -5
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +49 -0
- package/dist/collection/components/utils/hello/getZCountryUrlParam.js +5 -9
- package/dist/collection/components/utils/hello/isCountryCode.js +1 -0
- package/dist/collection/components/utils/hello/isCountryInShippingZone.js +8 -0
- package/dist/collection/components/utils/hello/reconcileRememberedCountryOverride.js +37 -0
- package/dist/collection/components/utils/hello/resolveHelloFloatPlacement.js +98 -0
- package/dist/collection/components/utils/hello/shouldShowHelloWidget.js +27 -20
- package/dist/collection/environment.js +0 -1
- package/dist/collection/scripts/_stripe.js +0 -2
- package/dist/collection/scripts/_zonosBase.js +1 -1
- package/dist/collection/types/generated/graphql.frontend.types.js +218 -63
- package/dist/collection/types/generated/graphql.internal.types.js +815 -152
- package/dist/collection/utils/formattedCloudflareApiUrl.js +1 -0
- package/dist/collection/utils/generateCloudflareDeployUrl.js +5 -2
- package/dist/esm/{cart-ekBk_gxV.js → cart-Cleo1j5P.js} +3 -3
- package/dist/esm/{collect-33rMINDo.js → collect-CspdWIRo.js} +3 -3
- package/dist/esm/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +1 -1
- package/dist/esm/{debounce-DWPsxJsW.js → debounce-CrmpwbEE.js} +2 -2
- package/dist/esm/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
- package/dist/esm/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-B1IL1-gn.js} +1 -1
- package/dist/esm/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-DKRplpLX.js} +1 -1
- package/dist/esm/index.js +8 -9
- package/dist/esm/{invoice-BNDWuVsD.js → invoice-D49igPQ9.js} +3 -3
- package/dist/esm/{localization-AOqYXGdP.js → localization-BiL8bPsY.js} +192 -70
- package/dist/esm/{paypal-CW1D2XqZ.js → paypal-D4vWRxHJ.js} +4 -4
- package/dist/esm/{placeTestOrder-nhmsLLOA.js → placeTestOrder-BNmc5RCo.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-BNbwijGo.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-B82gTfHz.js} +1 -1
- package/dist/esm/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
- package/dist/esm/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +11 -11
- package/dist/esm/zonos-address-display_2.entry.js +3 -3
- package/dist/esm/zonos-address_4.entry.js +8 -8
- package/dist/esm/zonos-airwallex-payment.entry.js +5 -5
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +7 -7
- package/dist/esm/zonos-cart-items_12.entry.js +15 -15
- package/dist/esm/zonos-checkbox_2.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +12 -12
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-collect-cart-items_3.entry.js +4 -4
- package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
- package/dist/esm/zonos-collect.entry.js +7 -7
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +3 -3
- package/dist/esm/zonos-hello.entry.js +129 -51
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +6 -6
- package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
- package/dist/esm/zonos-invoice.entry.js +7 -7
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +2 -0
- package/dist/esm-es5/{cart-ekBk_gxV.js → cart-Cleo1j5P.js} +8 -8
- package/dist/esm-es5/{collect-33rMINDo.js → collect-CspdWIRo.js} +1 -1
- package/dist/esm-es5/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +7 -7
- package/dist/esm-es5/debounce-CrmpwbEE.js +1 -0
- package/dist/esm-es5/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
- package/dist/esm-es5/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-B1IL1-gn.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-DKRplpLX.js} +1 -1
- package/dist/esm-es5/index.js +6 -8
- package/dist/esm-es5/{invoice-BNDWuVsD.js → invoice-D49igPQ9.js} +1 -1
- package/dist/esm-es5/{localization-AOqYXGdP.js → localization-BiL8bPsY.js} +74 -68
- package/dist/esm-es5/{paypal-CW1D2XqZ.js → paypal-D4vWRxHJ.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-nhmsLLOA.js → placeTestOrder-BNmc5RCo.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-BNbwijGo.js} +1 -1
- package/dist/esm-es5/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-B82gTfHz.js} +1 -1
- package/dist/esm-es5/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
- package/dist/esm-es5/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
- package/dist/esm-es5/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +3 -3
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +2 -2
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +2 -2
- package/dist/esm-es5/zonos-cart-items_12.entry.js +2 -2
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +6 -6
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +2 -2
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +3 -3
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +2 -2
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +21 -24
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +2 -2
- package/dist/esm-es5/zonos-invoice.entry.js +3 -3
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +2 -2
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +1 -1
- package/dist/scripts/index.d.ts +36 -6
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +5 -3
- package/dist/types/components/store/hello/localization.d.ts +2 -1
- package/dist/types/components/utils/api/getLocalization.d.ts +3 -1
- package/dist/types/components/utils/getOverridenZCountry.d.ts +2 -3
- package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +5 -0
- package/dist/types/components/utils/hello/isCountryCode.d.ts +2 -0
- package/dist/types/components/utils/hello/isCountryInShippingZone.d.ts +2 -0
- package/dist/types/components/utils/hello/reconcileRememberedCountryOverride.d.ts +18 -0
- package/dist/types/components/utils/hello/resolveHelloFloatPlacement.d.ts +39 -0
- package/dist/types/components/utils/hello/shouldShowHelloWidget.d.ts +8 -4
- package/dist/types/components.d.ts +4 -6
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +10 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +41 -52
- package/dist/types/types/generated/graphql.frontend.types.ts +226 -114
- package/dist/types/types/generated/graphql.internal.types.d.ts +465 -100
- package/dist/types/types/generated/graphql.internal.types.ts +1007 -253
- package/dist/types/types/hello/HelloConfig.d.ts +12 -0
- package/dist/types/utils/formattedCloudflareApiUrl.d.ts +1 -0
- package/dist/types/utils/generateCloudflareDeployUrl.d.ts +5 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-39c8a898.entry.js → p-028e0500.entry.js} +1 -1
- package/dist/zonos-elements/p-079af8c0.system.entry.js +118 -0
- package/dist/zonos-elements/{p-058f07aa.system.entry.js → p-0a4a7742.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-04cc0dac.system.entry.js → p-0dca8a26.system.entry.js} +47 -47
- package/dist/zonos-elements/{p-d33dfc78.system.entry.js → p-0ee74bf3.system.entry.js} +30 -30
- package/dist/zonos-elements/{p-e284d329.entry.js → p-11bab88b.entry.js} +1 -1
- package/dist/zonos-elements/{p-7a5d2211.system.entry.js → p-13d3a372.system.entry.js} +18 -18
- package/dist/zonos-elements/{p-1568ab06.system.entry.js → p-1409de3b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8328f44d.entry.js → p-193d9722.entry.js} +1 -1
- package/dist/zonos-elements/{p-dcdbc610.system.entry.js → p-195f6e38.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-daf9fa07.system.entry.js → p-1b77464d.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-cc5306fe.system.entry.js → p-1bac5ac1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-128485dc.entry.js → p-1c150f26.entry.js} +1 -1
- package/dist/zonos-elements/{p-cf5688f7.entry.js → p-234c202c.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a631080.system.entry.js → p-23f6346b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cc949df1.system.entry.js → p-244e0302.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7681798d.entry.js → p-24f3c547.entry.js} +1 -1
- package/dist/zonos-elements/{p-5c08d36b.entry.js → p-2603dce0.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b0afaa7.entry.js → p-26295311.entry.js} +1 -1
- package/dist/zonos-elements/{p-d4c4a00e.entry.js → p-34c5e145.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6e0aeba.system.entry.js → p-35509b10.system.entry.js} +185 -185
- package/dist/zonos-elements/{p-4a54f664.entry.js → p-35539d3d.entry.js} +1 -1
- package/dist/zonos-elements/{p-5024df2d.system.entry.js → p-3c800376.system.entry.js} +61 -61
- package/dist/zonos-elements/{p-f8fd756a.system.entry.js → p-474e8a92.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d55b9664.system.entry.js → p-481ecc23.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-4973f8d8.system.entry.js → p-4fd78ecf.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-8cd3f1e2.entry.js → p-52d9fd3a.entry.js} +1 -1
- package/dist/zonos-elements/{p-a6faab6a.entry.js → p-55916c90.entry.js} +1 -1
- package/dist/zonos-elements/p-5b06f069.entry.js +1 -0
- package/dist/zonos-elements/{p-5d3079e8.entry.js → p-5df25a1a.entry.js} +1 -1
- package/dist/zonos-elements/{p-450ed170.system.entry.js → p-5f347f91.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-beeb9d36.system.entry.js → p-756d303f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5836d426.system.entry.js → p-79ddb12a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f27317d3.system.entry.js → p-7d284341.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-f6ba59f6.system.entry.js → p-7e1050dd.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-02ef0f99.system.entry.js → p-7ee2af6e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-34d1545a.entry.js → p-83aa1c8c.entry.js} +1 -1
- package/dist/zonos-elements/{p-9818f823.entry.js → p-84c9ce16.entry.js} +1 -1
- package/dist/zonos-elements/{p-CaUXHglQ.system.js → p-8PPEbm_0.system.js} +9 -9
- package/dist/zonos-elements/{p-b6deae2b.system.entry.js → p-92fe9a1f.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-f57495dc.entry.js → p-990b49f2.entry.js} +1 -1
- package/dist/zonos-elements/{p-cadf6b63.system.entry.js → p-9ef0f69e.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-CZl1nwqv.system.js → p-B4Ufchqh.system.js} +3 -3
- package/dist/zonos-elements/{p-BtMauqj_.system.js → p-B5NDhB1w.system.js} +6 -8
- package/dist/zonos-elements/{p-CJCoACvU.js → p-BDrM4x5N.js} +2 -2
- package/dist/zonos-elements/p-BGktDPwA.system.js +1 -0
- package/dist/zonos-elements/{p-C19J2XSh.js → p-BJzAgoqz.js} +1 -1
- package/dist/zonos-elements/p-BKoLoalh.js +1 -0
- package/dist/zonos-elements/{p-Dj-O6VfM.system.js → p-BT9_ehlh.system.js} +2 -2
- package/dist/zonos-elements/{p-B2EZRfoq.system.js → p-B_5RofQ9.system.js} +15 -15
- package/dist/zonos-elements/p-BaF00SfB.js +1 -0
- package/dist/zonos-elements/{p-D0erXw7p.js → p-BpDCLBwW.js} +1 -1
- package/dist/zonos-elements/{p-DkpYo2Fs.js → p-BtWDzGMx.js} +1 -1
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-CPnR_T0a.system.js → p-BuU_p5DP.system.js} +58 -58
- package/dist/zonos-elements/{p-D5AtAlJx.system.js → p-CASTsiDR.system.js} +3 -3
- package/dist/zonos-elements/{p-CaAod213.system.js → p-CBx5nYet.system.js} +1 -1
- package/dist/zonos-elements/{p-DIJaXkiE.system.js → p-CEmXVahp.system.js} +111 -105
- package/dist/zonos-elements/{p-nU86HJ5w.js → p-CUaf1cEg.js} +1 -1
- package/dist/zonos-elements/p-CX_vfdWt.js +1 -0
- package/dist/zonos-elements/p-C_z9WL8a.js +1 -0
- package/dist/zonos-elements/p-CcJF6xhQ.js +1 -0
- package/dist/zonos-elements/{p-DjuFsKLG.js → p-CewmhMGk.js} +1 -1
- package/dist/zonos-elements/{p-CYdt69j5.system.js → p-Cpe_ISNt.system.js} +18 -18
- package/dist/zonos-elements/{p-DTgv0QpG.js → p-Cuk0LLGQ.js} +1 -1
- package/dist/zonos-elements/p-Cxuiqv1I.js +1 -0
- package/dist/zonos-elements/p-DQZncB2d.system.js +9 -0
- package/dist/zonos-elements/{p-D-DawUYF.system.js → p-DVITR-Eu.system.js} +1 -1
- package/dist/zonos-elements/{p-DGsEWFDU.system.js → p-DYIisqF7.system.js} +1 -1
- package/dist/zonos-elements/{p-uV7m6KrY.system.js → p-DoEHepOc.system.js} +1 -1
- package/dist/zonos-elements/{p-DHwpNxG9.js → p-DwkyNtpD.js} +1 -1
- package/dist/zonos-elements/{p-CKTIJ2Gr.js → p-NJVOYjda.js} +1 -1
- package/dist/zonos-elements/{p-CtEsvWI6.js → p-W82paT5F.js} +1 -1
- package/dist/zonos-elements/{p-04bfcd72.system.entry.js → p-a571beaa.system.entry.js} +13 -13
- package/dist/zonos-elements/{p-5562a955.system.entry.js → p-a5c25829.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-b68ca96f.entry.js → p-a938c174.entry.js} +1 -1
- package/dist/zonos-elements/{p-844a743a.entry.js → p-ab54d0a1.entry.js} +1 -1
- package/dist/zonos-elements/{p-9ebe9a36.entry.js → p-acd50b0b.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f603278.system.entry.js → p-b5882fbb.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-891b47d7.entry.js → p-ba510730.entry.js} +1 -1
- package/dist/zonos-elements/{p-e9320825.entry.js → p-c3b02dbf.entry.js} +1 -1
- package/dist/zonos-elements/{p-be64d823.system.entry.js → p-c403f004.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-64e7bc5b.entry.js → p-c4ad6d4b.entry.js} +1 -1
- package/dist/zonos-elements/p-ca3175d9.entry.js +1 -0
- package/dist/zonos-elements/{p-a38e62cc.entry.js → p-d3d0656a.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b6482ef.entry.js → p-d4d2b39e.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea8790aa.entry.js → p-d6b72f6d.entry.js} +1 -1
- package/dist/zonos-elements/p-d74bc3e8.entry.js +1 -0
- package/dist/zonos-elements/p-db75322d.entry.js +1 -0
- package/dist/zonos-elements/p-dd8ca91e.entry.js +1 -0
- package/dist/zonos-elements/{p-7ae48e31.entry.js → p-ddca5ee1.entry.js} +1 -1
- package/dist/zonos-elements/{p-bdba7d9e.system.entry.js → p-dfc87b10.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e101d722.system.entry.js → p-f37b8aaf.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-b14819ab.system.entry.js → p-fb869759.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-i1iCWKdv.js → p-sz4L-ZnB.js} +1 -1
- package/dist/zonos-elements/{p-D31lQiWo.system.js → p-tGJYTlGL.system.js} +4 -4
- package/dist/zonos-elements/p-tkSf-lrO.system.js +13 -0
- package/dist/zonos-elements/{p-DPW1yXt9.system.js → p-uuZUZPIm.system.js} +61 -61
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +12 -11
- package/dist/esm-es5/debounce-DWPsxJsW.js +0 -1
- package/dist/zonos-elements/p-0466650f.entry.js +0 -1
- package/dist/zonos-elements/p-2ba738ec.entry.js +0 -1
- package/dist/zonos-elements/p-3ERbuo5a.js +0 -1
- package/dist/zonos-elements/p-6f742021.entry.js +0 -1
- package/dist/zonos-elements/p-89ddab88.entry.js +0 -1
- package/dist/zonos-elements/p-BANhKkF2.system.js +0 -1
- package/dist/zonos-elements/p-BJufDgh3.js +0 -1
- package/dist/zonos-elements/p-BSgVcCxT.system.js +0 -9
- package/dist/zonos-elements/p-CQqNJo0D.system.js +0 -13
- package/dist/zonos-elements/p-LypTHRUC.js +0 -1
- package/dist/zonos-elements/p-adfee3a3.entry.js +0 -1
- package/dist/zonos-elements/p-f2cedbcd.system.entry.js +0 -121
- package/dist/zonos-elements/p-lGLcGvEA.js +0 -1
- package/dist/zonos-elements/p-pfIceXbY.js +0 -1
- package/dist/zonos-elements/p-t_ClFAJR.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,B as o,c as i,w as t,N as n,H as r,b as a}from"./p-_lt63o7c.js";export{s as setNonce}from"./p-_lt63o7c.js";import{g as l}from"./p-DQuL1Twl.js";var d=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const i=o.call(this,!1),t=this.childNodes;if(e)for(let e=0;e<t.length;e++)2!==t[e].nodeType&&i.appendChild(t[e].cloneNode(!0));return i}};(()=>{o.isDev&&!o.isTesting&&i("Running in development mode."),o.cloneNodeFix&&d(r.prototype);const s=o.scriptDataOpts?t.document&&Array.from(t.document.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)):null,a=import.meta.url,l=o.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a(JSON.parse('[["p-5c08d36b",[[257,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-2ba738ec",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"isOverlayLoading":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"shouldShowFedexShippingConsentDialog":[32],"detectedDomesticCheckoutDialogOpen":[32],"redirectToDomesticCheckoutDialogOpen":[32],"loggedInIntlAddressConfirmDialogOpen":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"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}]}]]],["p-d4c4a00e",[[2,"zonos-collect",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReview":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-adfee3a3",[[2,"zonos-invoice",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-6f742021",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"desktopLocationOverride":[1,"desktop-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"showDialog":[{"showDialogHandler":0}],"appearanceSettingsOverride":[{"handleAppearanceSettingsOverrideChange":0}]}]]],["p-7ae48e31",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"initCollectElement":[64],"initInvoiceElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-fe778437",[[257,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-eadaefdc",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-0466650f",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-9b6482ef",[[273,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":[{"iconChangeHandler":0}]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-cf5688f7",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":[{"isOpenHandler":0}]}]]],["p-9818f823",[[2,"zonos-airwallex-payment",{"hasError":[32],"clientSecret":[32]},null,{"clientSecret":[{"clientSecretWatcher":0}]}]]],["p-b68ca96f",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"isMobile":[4,"is-mobile"],"selectedItem":[16]}]]],["p-6b0afaa7",[[1,"zonos-store-credit",{"enabled":[4],"customAmountInput":[32]}],[1,"zonos-policy-consent"]]],["p-31ac495f",[[257,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-4a54f664",[[1,"zonos-invoice-cart-items",{"isMobile":[4,"is-mobile"],"errorImages":[32],"locale":[32]}],[1,"zonos-invoice-subtotal",{"isMobile":[4,"is-mobile"]}]]],["p-128485dc",[[257,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-8328f44d",[[257,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-64e7bc5b",[[2,"zonos-invoice-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-invoice-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-invoice-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-invoice-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-invoice-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]]]],["p-e9320825",[[1,"zonos-collect-cart-items",{"errorImages":[32]}],[1,"zonos-skeleton",{"skeletonWidth":[1,"skeleton-width"],"skeletonHeight":[1,"skeleton-height"],"dismissHandler":[16]}],[257,"zonos-h-stack",{"spacing":[2]}]]],["p-f57495dc",[[2,"zonos-collect-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-collect-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-collect-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-collect-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-collect-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-collect-subtotal",{"subtotals":[32]}]]],["p-a38e62cc",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":[{"onInputValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-5d3079e8",[[257,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"loadingTitle":[1,"loading-title"],"loadingText":[1,"loading-text"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}]]],["p-7681798d",[[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-9ebe9a36",[[257,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-34d1545a",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":[{"onInputValueChange":0}]}]]],["p-844a743a",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-a6faab6a",[[257,"zonos-v-stack",{"spacing":[2]}]]],["p-ea8790aa",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"buffer":[2],"scrollTop":[32],"totalHeight":[32],"containerDimensions":[32]},null,{"itemHeights":[{"updateTotalHeight":0}],"fallbackItemHeight":[{"updateTotalHeight":0}]}]]],["p-89ddab88",[[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-loading-overlay",{"open":[4],"spinnerColor":[1,"spinner-color"],"size":[2]}],[262,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32],"prevCountry":[32],"prevPostalCode":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"stripe":[{"watchInitStripe":0}],"defaultAddress":[{"defaultAddressChanged":0}]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32],"retriesInitializeLink":[32]},null,{"isStagingMode":[{"watchIsStagingMode":0}],"stripe":[{"watchInitStripe":0}],"clientSecret":[{"watchInitStripe":0}],"defaultEmail":[{"watchDefaultEmail":0}]}]]],["p-891b47d7",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":[{"watchTranslatedShippingAddress":0}],"translatedBillingAddress":[{"watchTranslatedBillingAddress":0}]}],[262,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"defaultAddress":[{"defaultAddressChanged":0}],"line1":[{"line1Changed":0}],"city":[{"formFieldsChanged":0}],"country":[{"formFieldsChanged":0},{"countryChanged":0}],"firstName":[{"formFieldsChanged":0}],"lastName":[{"formFieldsChanged":0}],"line2":[{"formFieldsChanged":0}],"phone":[{"formFieldsChanged":0}],"postalCode":[{"formFieldsChanged":0}],"state":[{"formFieldsChanged":0}],"addressService":[{"shouldEnabledCustomAddressChanged":0}]}],[1,"zonos-address-completion-dialog",{"continueLoading":[4,"continue-loading"],"dialogOpen":[4,"dialog-open"],"isMobile":[4,"is-mobile"],"missingFields":[16],"shippingAddress":[16],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"values":[32],"showError":[32]},null,{"dialogOpen":[{"watchDialogOpen":0}]}],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":[{"suggestionsChanged":0}]}],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryCode":[{"onCountryCodeChange":0}],"countryOptions":[{"onCountryOptionsChange":0}],"selectedCountry":[{"onSelectedCountryChange":0}],"inputValue":[{"onPhoneNumberChange":0}]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":[{"watchCurrentAddress":0}]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":[{"onOptionsChange":0}],"selectedValue":[{"onSelectedValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-e284d329",[[1,"zonos-language-select",{"handleOnClose":[16]}],[257,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-39c8a898",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":[{"watchIsPaymentInfoFilled":0}],"stripeElements":[{"watchInitStripe":0}],"stripe":[{"watchInitStripe":0}]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}],[257,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-8cd3f1e2",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"shortAddressCodeErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"openCompletionDialog":[32],"missingShippingFields":[32],"isEmailError":[32],"recordedFormTypeUsed":[32],"selectedCountryCode":[32],"genericSettings":[32],"addressFormRenderType":[32],"exceededCharacterLimitErrorFieldList":[32]},null,{"showErrorBanner":[{"watchShowErrorBanner":0}],"shouldUseCustomAddressFormOverride":[{"watchShouldEnabledCustomAddress":0}],"genericSettings":[{"watchShouldEnabledCustomAddress":0}],"selectedCountryCode":[{"watchShouldEnabledCustomAddress":0}]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"isMobile":[4,"is-mobile"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32],"shippingData":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32],"isImmediateRedirecting":[32]}],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[257,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
|
|
1
|
+
import{p as e,B as o,c as i,w as t,N as n,H as r,b as a}from"./p-_lt63o7c.js";export{s as setNonce}from"./p-_lt63o7c.js";import{g as l}from"./p-DQuL1Twl.js";var d=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const i=o.call(this,!1),t=this.childNodes;if(e)for(let e=0;e<t.length;e++)2!==t[e].nodeType&&i.appendChild(t[e].cloneNode(!0));return i}};(()=>{o.isDev&&!o.isTesting&&i("Running in development mode."),o.cloneNodeFix&&d(r.prototype);const s=o.scriptDataOpts?t.document&&Array.from(t.document.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)):null,a=import.meta.url,l=o.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a(JSON.parse('[["p-2603dce0",[[257,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-ca3175d9",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"isOverlayLoading":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"shouldShowFedexShippingConsentDialog":[32],"detectedDomesticCheckoutDialogOpen":[32],"redirectToDomesticCheckoutDialogOpen":[32],"loggedInIntlAddressConfirmDialogOpen":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"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}]}]]],["p-34c5e145",[[2,"zonos-collect",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReview":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-5b06f069",[[2,"zonos-invoice",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-db75322d",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"desktopLocationOverride":[1,"desktop-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"showDialog":[{"showDialogHandler":0}],"appearanceSettingsOverride":[{"handleAppearanceSettingsOverrideChange":0}]}]]],["p-ddca5ee1",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"initCollectElement":[64],"initInvoiceElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-fe778437",[[257,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-eadaefdc",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-d74bc3e8",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-d4d2b39e",[[273,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":[{"iconChangeHandler":0}]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-234c202c",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":[{"isOpenHandler":0}]}]]],["p-84c9ce16",[[2,"zonos-airwallex-payment",{"hasError":[32],"clientSecret":[32]},null,{"clientSecret":[{"clientSecretWatcher":0}]}]]],["p-a938c174",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"isMobile":[4,"is-mobile"],"selectedItem":[16]}]]],["p-26295311",[[1,"zonos-store-credit",{"enabled":[4],"customAmountInput":[32]}],[1,"zonos-policy-consent"]]],["p-31ac495f",[[257,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-35539d3d",[[1,"zonos-invoice-cart-items",{"isMobile":[4,"is-mobile"],"errorImages":[32],"locale":[32]}],[1,"zonos-invoice-subtotal",{"isMobile":[4,"is-mobile"]}]]],["p-1c150f26",[[257,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-193d9722",[[257,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-c4ad6d4b",[[2,"zonos-invoice-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-invoice-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-invoice-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-invoice-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-invoice-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]]]],["p-c3b02dbf",[[1,"zonos-collect-cart-items",{"errorImages":[32]}],[1,"zonos-skeleton",{"skeletonWidth":[1,"skeleton-width"],"skeletonHeight":[1,"skeleton-height"],"dismissHandler":[16]}],[257,"zonos-h-stack",{"spacing":[2]}]]],["p-990b49f2",[[2,"zonos-collect-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-collect-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-collect-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-collect-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-collect-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-collect-subtotal",{"subtotals":[32]}]]],["p-d3d0656a",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":[{"onInputValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-5df25a1a",[[257,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"loadingTitle":[1,"loading-title"],"loadingText":[1,"loading-text"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}]]],["p-24f3c547",[[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-acd50b0b",[[257,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-83aa1c8c",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":[{"onInputValueChange":0}]}]]],["p-ab54d0a1",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-55916c90",[[257,"zonos-v-stack",{"spacing":[2]}]]],["p-d6b72f6d",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"buffer":[2],"scrollTop":[32],"totalHeight":[32],"containerDimensions":[32]},null,{"itemHeights":[{"updateTotalHeight":0}],"fallbackItemHeight":[{"updateTotalHeight":0}]}]]],["p-dd8ca91e",[[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-loading-overlay",{"open":[4],"spinnerColor":[1,"spinner-color"],"size":[2]}],[262,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32],"prevCountry":[32],"prevPostalCode":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"stripe":[{"watchInitStripe":0}],"defaultAddress":[{"defaultAddressChanged":0}]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32],"retriesInitializeLink":[32]},null,{"isStagingMode":[{"watchIsStagingMode":0}],"stripe":[{"watchInitStripe":0}],"clientSecret":[{"watchInitStripe":0}],"defaultEmail":[{"watchDefaultEmail":0}]}]]],["p-ba510730",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":[{"watchTranslatedShippingAddress":0}],"translatedBillingAddress":[{"watchTranslatedBillingAddress":0}]}],[262,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"defaultAddress":[{"defaultAddressChanged":0}],"line1":[{"line1Changed":0}],"city":[{"formFieldsChanged":0}],"country":[{"formFieldsChanged":0},{"countryChanged":0}],"firstName":[{"formFieldsChanged":0}],"lastName":[{"formFieldsChanged":0}],"line2":[{"formFieldsChanged":0}],"phone":[{"formFieldsChanged":0}],"postalCode":[{"formFieldsChanged":0}],"state":[{"formFieldsChanged":0}],"addressService":[{"shouldEnabledCustomAddressChanged":0}]}],[1,"zonos-address-completion-dialog",{"continueLoading":[4,"continue-loading"],"dialogOpen":[4,"dialog-open"],"isMobile":[4,"is-mobile"],"missingFields":[16],"shippingAddress":[16],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"values":[32],"showError":[32]},null,{"dialogOpen":[{"watchDialogOpen":0}]}],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":[{"suggestionsChanged":0}]}],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryCode":[{"onCountryCodeChange":0}],"countryOptions":[{"onCountryOptionsChange":0}],"selectedCountry":[{"onSelectedCountryChange":0}],"inputValue":[{"onPhoneNumberChange":0}]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":[{"watchCurrentAddress":0}]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":[{"onOptionsChange":0}],"selectedValue":[{"onSelectedValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-11bab88b",[[1,"zonos-language-select",{"handleOnClose":[16]}],[257,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-028e0500",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":[{"watchIsPaymentInfoFilled":0}],"stripeElements":[{"watchInitStripe":0}],"stripe":[{"watchInitStripe":0}]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}],[257,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-52d9fd3a",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"shortAddressCodeErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"openCompletionDialog":[32],"missingShippingFields":[32],"isEmailError":[32],"recordedFormTypeUsed":[32],"selectedCountryCode":[32],"genericSettings":[32],"addressFormRenderType":[32],"exceededCharacterLimitErrorFieldList":[32]},null,{"showErrorBanner":[{"watchShowErrorBanner":0}],"shouldUseCustomAddressFormOverride":[{"watchShouldEnabledCustomAddress":0}],"genericSettings":[{"watchShouldEnabledCustomAddress":0}],"selectedCountryCode":[{"watchShouldEnabledCustomAddress":0}]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"isMobile":[4,"is-mobile"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32],"shippingData":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32],"isImmediateRedirecting":[32]}],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[257,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zonos/elements",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.290",
|
|
4
4
|
"description": "Zonos component UI for Stripe elements",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"dev:open": "open https://dev.elements.zonos.com",
|
|
41
41
|
"generate": "stencil generate",
|
|
42
42
|
"open": "cursor ./.vscode/zonos-elements.code-workspace",
|
|
43
|
-
"lint": "eslint .
|
|
43
|
+
"lint": "eslint .",
|
|
44
44
|
"lint:fix": "pnpm lint --fix",
|
|
45
|
-
"lint:prod": "pnpm lint -c
|
|
45
|
+
"lint:prod": "pnpm lint -c ./eslint.config.prod.mjs",
|
|
46
46
|
"push:tags": "git push --follow-tags",
|
|
47
47
|
"demo:exec": "pnpm --dir demo-app",
|
|
48
48
|
"demo:playwright": "pnpm demo:exec playwright",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"demo:dev": "pnpm demo:exec dev",
|
|
52
52
|
"demo:build": "pnpm demo:exec build",
|
|
53
53
|
"demo:codegen": "pnpm demo:exec codegen",
|
|
54
|
-
"demo:test": "pnpm demo:exec test:prod
|
|
54
|
+
"demo:test": "pnpm demo:exec test:prod",
|
|
55
55
|
"demo:ngrok": "pnpm demo:exec ngrok",
|
|
56
56
|
"cacheKey": "ts-node scripts/cacheKey.ts",
|
|
57
57
|
"translations:insert": "ts-node -r tsconfig-paths/register scripts/translations/_insertTranslations.ts",
|
|
@@ -119,21 +119,20 @@
|
|
|
119
119
|
"@types/styled-components": "^5.1.36",
|
|
120
120
|
"@types/tinycolor2": "^1.4.6",
|
|
121
121
|
"@types/turndown": "^5.0.6",
|
|
122
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
123
|
-
"@typescript-eslint/parser": "^8.
|
|
122
|
+
"@typescript-eslint/eslint-plugin": "^8.69.0",
|
|
123
|
+
"@typescript-eslint/parser": "^8.69.0",
|
|
124
124
|
"@vitejs/plugin-react": "^4.7.0",
|
|
125
125
|
"caniuse-lite": "^1.0.30001776",
|
|
126
126
|
"clean-css-cli": "^5.6.3",
|
|
127
127
|
"concurrently": "^10.0.5",
|
|
128
128
|
"crypto-js": "^4.2.0",
|
|
129
129
|
"dotenv": "^16.6.1",
|
|
130
|
-
"eslint": "^
|
|
131
|
-
"eslint-config-prettier": "
|
|
132
|
-
"eslint-plugin-
|
|
133
|
-
"eslint-plugin-import": "2.31.0",
|
|
130
|
+
"eslint": "^9.39.5",
|
|
131
|
+
"eslint-config-prettier": "10.1.8",
|
|
132
|
+
"eslint-plugin-import": "2.32.0",
|
|
134
133
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
135
134
|
"eslint-plugin-no-relative-import-paths": "^1.6.1",
|
|
136
|
-
"eslint-plugin-no-smart-quotes": "^
|
|
135
|
+
"eslint-plugin-no-smart-quotes": "^2.0.1",
|
|
137
136
|
"eslint-plugin-prettier": "5.2.6",
|
|
138
137
|
"eslint-plugin-react": "^7.37.5",
|
|
139
138
|
"eslint-plugin-simple-import-sort": "^9.0.0",
|
|
@@ -141,6 +140,7 @@
|
|
|
141
140
|
"eslint-plugin-sort-keys": "^2.3.5",
|
|
142
141
|
"eslint-plugin-storybook": "^0.12.0",
|
|
143
142
|
"glob": "^11.1.0",
|
|
143
|
+
"globals": "16.4.0",
|
|
144
144
|
"graphql": "^16.13.1",
|
|
145
145
|
"graphql-tag": "^2.12.6",
|
|
146
146
|
"jsx-dom": "^8.1.6",
|
|
@@ -164,6 +164,7 @@
|
|
|
164
164
|
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
165
165
|
"tslib": "^2.8.1",
|
|
166
166
|
"typescript": "^5.9.3",
|
|
167
|
+
"typescript-eslint": "^8.69.0",
|
|
167
168
|
"typescript-transform-paths": "^3.5.6",
|
|
168
169
|
"vite": "^6.4.3",
|
|
169
170
|
"vite-tsconfig-paths": "^5.1.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as getDefaultExportFromCjs}from"./zonosStore-DrIOAz4M.js";import{r as requireDebounce}from"./debounce-D4ko2kvZ.js";var debounceExports=requireDebounce();var debounce=getDefaultExportFromCjs(debounceExports);export{debounce as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t,e as s,a as e}from"./p-_lt63o7c.js";import{a as r}from"./p-CtEsvWI6.js";import{c as a}from"./p-BJHSB96f.js";import"./p-BJmZPrZl.js";const i=class{constructor(t){o(this,t),this.theme="LIGHT",this.width="auto"}render(){const o="DARK"===this.theme?"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 t(e,{key:"89d856c28d227afbe76656ce217544faad91715e",class:a(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":r(),"--zonos--width":this.width}},t("img",{key:"025c97e65f2666028391f6ca2d548bf905528133",alt:"Zonos Logo",src:s("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};i.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";export{i as zonos_logo}
|
|
@@ -1 +0,0 @@
|
|
|
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}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as o}from"./p-CtEsvWI6.js";const p=p=>{const s=(null==p?void 0:p.customRoundRadius)||"10px",t=null==p?void 0:p.overrideBorderStyle;return t?"SHARP"===t?"0px":s:"SHARP"===o.appearance.style?"0px":s};export{p as g}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as e,a as t,g as s}from"./p-_lt63o7c.js";import{d as l}from"./p-t_ClFAJR.js";import{l as i,m as n,t as r,g as h,o as a,p as d,q as c,r as m,h as z,u as g}from"./p-DTgv0QpG.js";import{z as p,g as w,m as f}from"./p-CtEsvWI6.js";import{c as u}from"./p-BJHSB96f.js";import{h as b,l as v}from"./p-DE4a-QD5.js";import{g as x}from"./p-DAscqB23.js";import{l as y}from"./p-BJmZPrZl.js";import"./p-D0erXw7p.js";const k=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},C=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:l,restrictionBehavior:i}=p.helloSettings;l&&s||y("Hello could not check item restrictions - must provide title and description selectors.");const r=l&&n(l)&&document.querySelectorAll(l)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return y("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===i,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],l=h[t];if(s&&l){const i={cartButtonNode:d[t]||null,description:(null===(o=l.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(i)}}return c},D=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=p.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===p.currentHelloPage||"productList"===p.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===p.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(p.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==p.currentHelloPage&&"productList"!==p.currentHelloPage||"DISABLED"===p.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=i;if(!e)return v("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const l={items:o,shipFrom:e,shipTo:t},{errors:i,json:n}=await b("/api/zonos-elements/check-item-restrictions",{body:l,method:"POST"});return i.length||!n?(v(`Error fetching item restrictions: ${null===(s=i.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(p.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=p.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=C();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=l((()=>{const{productTitleElementSelector:o}=p.helloSettings;if(o){const o=C();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==i.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,p.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=p.helloSettings;return k(o)?"cart":k(t)?"productDetail":k(s)?"productList":k(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(i.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return x(this.helloRef)}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return i.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&p.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==p.helloSettings.currencyBehavior&&(i.exchangeRate?d():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||i.selectedCountryCode&&"function"==typeof p.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=p.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||p.helloSettings.mobileLocation,e=this.desktopLocationOverride||p.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!!this.desktopLocationOverride||!p.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(o&&e?e.includes("LEFT"):this.shouldAnimateLeftDesktop()),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=p.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:l,targetCurrency:n}=i,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(p.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(p.organizationName);const z=g()&&!!l;z&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:n});const w=null==(b=p.helloSettings.widgetSize)||!Number.isFinite(b)||b<=0?18:Math.min(64,Math.max(18,b));var b;return e(t,{class:"zonos--hello zonos--elements","data-theme":c,style:{"--zonos-elements-hello-widget-size":`${w}px`}},z&&e("div",{class:u(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:u(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),e("div",{class:u(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:r,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:[{showDialogHandler:0}],appearanceSettingsOverride:[{handleAppearanceSettingsOverrideChange:0}]}}};D.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:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max( 6px, calc(var(--zonos-elements-hello-widget-size) * 0.22) );--zonos-elements-hello-bubble-size:calc( var(--zonos-elements-hello-widget-size) + var(--zonos-elements-hello-bubble-padding) * 2 + 2px )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{D as zonos_hello}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,d as t,h as o,a as e,g as n}from"./p-_lt63o7c.js";import{t as i}from"./p-BJufDgh3.js";import{U as a,w as r,b as l,t as d,J as h,d as c}from"./p-DHwpNxG9.js";import{s as p,l as u,B as m,t as f,y as z}from"./p-DTgv0QpG.js";import{z as v,g as b,a as g}from"./p-CtEsvWI6.js";import{l as y,i as k,s as w}from"./p-DE4a-QD5.js";import{a as x,s as C}from"./p-DnjGkbEy.js";import{c as I}from"./p-BJHSB96f.js";import{l as E}from"./p-BJmZPrZl.js";import{c as A,s as j}from"./p-Cye-evFK.js";import{g as D}from"./p-3ERbuo5a.js";import"./p-D0erXw7p.js";import"./p-YdrG78th.js";import"./p-nJ6oI8-n.js";const S=s=>{var t,o,e;return[s.name,null===(t=s.address)||void 0===t?void 0:t.line1,null===(o=s.address)||void 0===o?void 0:o.postal_code,null===(e=s.address)||void 0===e?void 0:e.country].map((s=>(s||"").trim().toLowerCase())).join("|")},N=({currentEvent:s,defaultAddress:t})=>{if(!s)return t;const o=(s=>{const{firstName:t,lastName:o}=a({firstName:s.firstName,lastName:s.lastName,name:s.name});return{address:{city:s.address.city,country:s.address.country,line1:s.address.line1,line2:s.address.line2||void 0,postal_code:s.address.postal_code,state:s.address.state},name:(s.name||`${t} ${o}`).trim(),phone:s.phone||void 0}})(s.value),e=S(o);return t.some((s=>S(s)===e))?t:[o,...t]},B=class{constructor(o){s(this,o),this.invalidCharacters=t(this,"invalidCharacters",7),this.taxIdChanged=t(this,"taxIdChanged",7),this.storeUnsubscribeList=[],this.isAutoCompleteAdjusted=!1,this.defaultAddress=[],this.taxIdErrorMessage="",this.shortAddressCodeErrorMessage="",this.stripe=window.Zonos.stripe,this.isDirtyAddress=!1,this.isAddressFilled=!1,this.checkoutSessionId=p.checkoutSessionId,this.prevCountry=null,this.prevPostalCode=null,this.trackingSent=!1,this.prefetchLandedCost=i(r,1e3)}getStripeAddressInstance(){return"billing"===this.type?{stripeAddressElement:l.stripeBillingAddressElement,stripeAddressEventData:l.stripeBillingAddressEventData,stripeElements:l.stripeElementsForBillingAddress}:{stripeAddressElement:l.stripeAddressElement,stripeAddressEventData:l.stripeAddressEventData,stripeElements:l.stripeElements}}updateAddressEventData({event:s,type:t}){"billing"===t?l.stripeBillingAddressEventData=s:l.stripeAddressEventData=s,"shipping"===t&&s.value.address.line1.length&&this.prefetchLandedCost()}isAddressFilledChanged(){p.checkoutSessionId&&this.isAddressFilled&&!this.trackingSent&&"shipping"===this.type&&(this.trackingSent=!0,d({checkoutSessionId:p.checkoutSessionId,eventName:"checkout_customerInfoFilled"}))}updateAddressElement({stripeAddressElement:s,type:t}){"shipping"!==t?l.stripeBillingAddressElement=s:l.stripeAddressElement=s}async watchInitStripe(){this.stripe=window.Zonos.stripe;const{stripeAddressEventData:s,stripeElements:t}=this.getStripeAddressInstance();if(!this.stripe||!t)return void y("Stripe is not initialized. Couldn't load stripe element.");const o=this.defaultAddress.map((s=>Object.assign(Object.assign({},s),{name:s.name,phone:s.phone||void 0}))),e=u.shippingZoneCountries,n=e?Object.values(e).map((s=>s.code)):[],i=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries"),r="shipping"===this.type?n:[],l=(null==s?void 0:s.value.address.country)||m(r);E(`Stripe country code: ${l}`,"info");const d=t.create("address",{allowedCountries:i?[]:r,contacts:N({currentEvent:s,defaultAddress:o}),defaultValues:{address:Object.assign(Object.assign({},null==s?void 0:s.value.address),{country:l}),firstName:null==s?void 0:s.value.firstName,lastName:null==s?void 0:s.value.lastName,phone:null==s?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component")),(null==s?void 0:s.value.address)&&(this.prevCountry=s.value.address.country,this.prevPostalCode=s.value.address.postal_code),d.on("change",(s=>{const t=s.value;if(!this.isDirtyAddress&&t.address.line1.length>=3){if(this.isDirtyAddress=!0,!this.isAutoCompleteAdjusted){const s=this.el.querySelector('iframe[src*="autocomplete-suggestions"]');s&&(s.style.zIndex="3"),this.isAutoCompleteAdjusted=!0}setTimeout((()=>{if(k())this.el.scrollIntoView({behavior:"smooth",block:"end"});else{const s="shipping"===this.type?100:600,t=this.el.closest(".zonos--group"),o=this.el.getBoundingClientRect().top+s;null==t||t.scrollTo({behavior:"smooth",top:o})}}),600)}const{firstName:o,lastName:e}=a({firstName:t.firstName,lastName:t.lastName,name:t.name});this.updateAddressEventData({event:Object.assign(Object.assign({},s),{elementMode:this.type,elementType:"address",value:Object.assign(Object.assign({},t),{firstName:o,lastName:e})}),type:this.type})})),this.updateAddressElement({stripeAddressElement:d,type:this.type})}defaultAddressChanged(s,t){if(JSON.stringify(t)===JSON.stringify(s))return;E("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});const o=this.getStripeAddressInstance().stripeAddressElement;null==o||o.clear(),null==o||o.destroy(),"shipping"===this.type?l.stripeAddressEventData=null:l.stripeBillingAddressEventData=null,this.watchInitStripe()}isInTaxIdCountry(s){return A.includes(s)}renderTaxIdInput(){var s;if("billing"===this.type)return null;const t=null===(s=l.stripeAddressEventData)||void 0===s?void 0:s.value.address.country;if(!t)return null;if(!this.isInTaxIdCountry(t))return null;if(!x({companyName:l.companyName,countryCode:t}))return null;const e=j[t];return o("div",{class:"zonos--tax-id-input"},o("zonos-stripe-input",{inputLabel:f(e.friendlyName),inputPlaceholder:e.placeholder,inputValue:l.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:s=>{l.taxId=s.detail,this.taxIdChanged.emit(s.detail)}}),this.taxIdErrorMessage&&o("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))}renderShortAddressCodeInput(){var s;if("billing"===this.type)return null;const t=null===(s=l.stripeAddressEventData)||void 0===s?void 0:s.value.address.country;return t&&C({countryCode:t})?o("div",{class:"zonos--short-address-code-input"},o("zonos-stripe-input",{inputLabel:f("Short address code"),inputPlaceholder:"RRRD2929",inputValue:l.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:s=>{l.shortAddressCode=s.detail}}),this.shortAddressCodeErrorMessage&&o("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage)):null}renderCompanyNameInput(){return("billing"!==this.type||window.Zonos.isCollect||window.Zonos.isInvoice)&&("ENABLED"===v.checkoutSettings.companyFieldsStatus||window.Zonos.isCollect||window.Zonos.isInvoice)?o("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:f("Company name (optional)"),inputValue:l.companyName,onInputChange:s=>{l.companyName=s.detail}}):null}disconnectedCallback(){const s=this.getStripeAddressInstance().stripeAddressElement;null==s||s.destroy();try{this.storeUnsubscribeList.forEach((s=>s()))}catch(s){}}componentDidLoad(){const s=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!s&&s.value.address.line1.length>0,this.watchInitStripe(),this.checkoutSessionId=p.checkoutSessionId,this.storeUnsubscribeList=[z("checkoutSessionId",(()=>{this.checkoutSessionId=p.checkoutSessionId})),h("stripeElements",(()=>{"shipping"===this.type&&this.watchInitStripe()})),h("stripeElementsForBillingAddress",(()=>{"billing"===this.type&&this.watchInitStripe()}))]}render(){var s;return this.checkoutSessionId=p.checkoutSessionId,(null===(s=l.stripeAddressEventData)||void 0===s?void 0:s.complete)&&(this.isAddressFilled=!0),o(e,{key:"9b7a5340b839d63c64da03639bdfda5a11a5c25e",class:I(["zonos--address","zonos--elements",`zonos--${this.type}-address`])},this.titleText&&o("zonos-text",{key:"23739f6a48e5698372df2d53098dea6ad1c0559a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("slot",{key:"dea4b437eedaad2af2f6bbe3a1e2ae4f0706aa13",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),o("div",{key:"b4be684977a632371b9b6ff4587ccdd7bacc8c67",class:"zonos--address-component"}))}get el(){return n(this)}static get watchers(){return{checkoutSessionId:[{isAddressFilledChanged:0}],isAddressFilled:[{isAddressFilledChanged:0}],stripe:[{watchInitStripe:0}],defaultAddress:[{defaultAddressChanged:0}]}}};B.style=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";const L=class{constructor(o){s(this,o),this.confirmClicked=t(this,"confirmClicked",7),this.cancelClicked=t(this,"cancelClicked",7),this.dialogTitle=f("Are you sure?"),this.dialogIntent="info",this.dialogSubtitle=null,this.dialogWidth=350,this.dialogType="confirm",this.isMobile=!1,this.noClickOutside=!1,this.clickOutsideDialogHandler=s=>{s.target!==s.currentTarget||this.noClickOutside||this.closeDialogHandler()}}handleKeyDown(s){"Escape"===s.key&&this.closeDialogHandler()}focusDialog(){this.dialogOpen&&setTimeout((()=>{var s,t;null===(t=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector(".zonos--backdrop"))||void 0===t||t.focus()}),100)}confirmDialogHandler(){this.dialogOpen&&this.confirmClicked.emit()}closeDialogHandler(){this.dialogOpen&&this.cancelClicked.emit()}renderIcon(){switch(this.dialogIntent){case"info":return o("zonos-icon",{content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>',iconColor:"blue-800"});case"danger":return o("zonos-icon",{content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>',iconColor:"red-800"});case"warn":return o("zonos-icon",{content:'<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>',iconColor:"orange-800"})}}getButtonConfirmVariant(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}}render(){this.focusDialog();const s=D(),t=b(v.appearance.theme);return o(e,{key:"9ad8aff8631692fa53ef172869d98e9fbfbdc059",class:I([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":t,style:{"--zonos--border-radius":s,"--zonos--dialog-width":`${this.dialogWidth}px`,"--zonos--font-family":g()}},o("div",{key:"6d7c55b90bfb05890d876a0243558eb9a2e7a772",class:"zonos--backdrop",tabIndex:-1}),o("div",{key:"abf306ddd70cefd64aa6804aeccf700506c175d7",class:I(["zonos--confirm-layout",this.dialogIntent]),onClick:s=>this.clickOutsideDialogHandler(s)},o("div",{key:"dc7e9e6d501872597928603ded57d82c15c26710",class:"zonos--confirm-dialog",onBlur:()=>{this.focusDialog()}},o("div",{key:"5c1fa9ec8b59cba68ccbc5dc36e66e2fdefdeae5",class:"wrapper"},o("div",{key:"0ce48c41c78e393a181fd5e9beeac90622b5c620",class:"icon-wrapper"},this.renderIcon()),o("div",{key:"b42157f8e76de8a60190e384d7d53a36d8051c67",class:"content"},o("div",{key:"bd8eb897f15a6d095df8fbd1803f62a11b9d5d7b",class:"title"},o("zonos-text",{key:"d1c06b89d4917b2366f881dda7da9e1369722126",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&o("div",{key:"4f1269aaab5ad3965d6ddfc0949341d4f202f296",class:"subtitle"},o("zonos-text",{key:"f784b5dd86ff684e790f27a586e3eeb4ac683884",textColor:"gray-800"},this.dialogSubtitle))),o("div",{key:"e0403a968aee6ff878c9e916e9ff216e2052ab0c",class:"footer"},"confirm"===this.dialogType&&o("zonos-button",{key:"66e34a9d61f677786bfe286f377854c9ebc780ed",backgroundColor:"gray-0",class:"cancel-button",onClick:()=>this.closeDialogHandler(),size:"lg",withBoxShadow:!0},this.dialogCancelBtnText||f("Cancel")),o("zonos-button",{key:"3652507591e3055856a044e191525ea36b6042ca",class:"confirm-button",onClick:()=>this.confirmDialogHandler(),size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))}static get assetsDirs(){return["assets"]}get el(){return n(this)}};L.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 .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";const Z=s=>/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/.test(s),O=class{constructor(o){s(this,o),this.linkAuthenticationChange=t(this,"linkAuthenticationChange",7),this.storeUnsubscribeList=[],this.defaultEmail=null,this.isEmailError=!1,this.stripe=l.stripe,this.isStagingMode=c.isStagingMode,this.clientSecret=l.clientSecret,this.retriesInitializeLink=0,this.setCustomEmailInputToLinkEvent=s=>{const t=Z(s);l.stripeLinkEventData={complete:!!t,elementType:"linkAuthentication",empty:!s,value:{email:s}}},this.handleNormalEmailInput=s=>{var t;this.setCustomEmailInputToLinkEvent(s.detail),null===(t=this.linkAuthenticationChange)||void 0===t||t.emit()}}watchIsStagingMode(){setTimeout((()=>{this.watchInitStripe()}),0)}async watchInitStripe(){if(!this.stripe||!l.stripeElements)return;if(c.isStagingMode||!this.clientSecret)return;const s=this.defaultEmail?{email:this.defaultEmail}:void 0;try{const t=l.stripeLinkElement||l.stripeElements.create("linkAuthentication",{defaultValues:s}),o=this.el.querySelector(".zonos--link-authentication-component");if(!o)return void y("Cannot find container element for linkAuthenticationElement");t.mount(o),t.on("change",(s=>{var t;l.stripeLinkEventData=s,null===(t=this.linkAuthenticationChange)||void 0===t||t.emit()})),l.stripeLinkElement=t,this.retriesInitializeLink=0,this.retriesInitializeLink>11&&(E("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe}),w({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}}))}catch(s){s instanceof Error&&(this.retriesInitializeLink++,this.retriesInitializeLink<51&&(await new Promise((s=>setTimeout(s,500))),this.watchInitStripe()),51===this.retriesInitializeLink&&w({endpoint:"stripe-link-authentication-init-error",errors:[s.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}}))}}watchDefaultEmail(s,t){var o,e;E("Default email is changed","info",{newDefaultEmail:s,oldDefaultEmail:t}),t!==s&&(s||(l.stripeLinkEventData=null),c.isStagingMode?this.setCustomEmailInputToLinkEvent(s||""):(null===(o=l.stripeLinkElement)||void 0===o||o.clear(),null===(e=l.stripeLinkElement)||void 0===e||e.destroy(),l.stripeLinkElement=null,l.stripeLinkEventData=null,E("Reset stripe link element when default email is changed","info",{defaultEmail:s}),this.watchInitStripe()))}disconnectedCallback(){try{this.storeUnsubscribeList.forEach((s=>s()))}catch(s){}}componentDidLoad(){this.storeUnsubscribeList=[h("stripeElements",(async()=>{this.watchInitStripe()})),h("clientSecret",(async()=>{this.clientSecret=l.clientSecret})),h("stripe",(async()=>{this.stripe=l.stripe}))],this.watchInitStripe(),this.defaultEmail&&this.setCustomEmailInputToLinkEvent(this.defaultEmail)}render(){return this.isStagingMode=c.isStagingMode,this.clientSecret=l.clientSecret,o(e,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":D()}},this.titleText&&o("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),(()=>{var s;return c.isStagingMode?o("zonos-stripe-input",{inputLabel:f("Email"),inputValue:this.defaultEmail||(null===(s=l.stripeLinkEventData)||void 0===s?void 0:s.value.email)||"",isError:this.isEmailError,onBlur:()=>{var s;const t=(null===(s=l.stripeLinkEventData)||void 0===s?void 0:s.value.email)||"";if(!t)return;const o=Z(t);this.isEmailError=!o},onInputChange:this.handleNormalEmailInput}):o("div",{class:`zonos--link-authentication-component ${this.isEmailError&&"zonos--input-invalid"}`})})(),this.isEmailError&&o("zonos-text",{textColor:"red-600"},f("Please enter a valid email address.")))}get el(){return n(this)}static get watchers(){return{isStagingMode:[{watchIsStagingMode:0}],stripe:[{watchInitStripe:0}],clientSecret:[{watchInitStripe:0}],defaultEmail:[{watchDefaultEmail:0}]}}};O.style=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";const _=class{constructor(t){s(this,t),this.open=!1,this.size=40}render(){return o(e,{key:"8cafd99b309b04da5cf1b26b0f0804f4699c06b2",class:I(["zonos--elements",this.open&&"zonos--open"])},o("div",{key:"9ce7ac9b7e6956a5f76fc2105fa7f5d05299fd36",class:"zonos--loading-overlay"},o("zonos-spinner",{key:"4be3a8d471e3aead2e4194c4ecbf66878a7a3f17",size:this.size,spinnerColor:this.spinnerColor})))}};_.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{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";export{B as zonos_address,L as zonos_confirm_dialog,O as zonos_link_authentication,_ as zonos_loading_overlay}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-CPnR_T0a.system.js","./p-CaUXHglQ.system.js"],(function(t){"use strict";var s,e;return{setters:[function(t){s=t.e},function(t){e=t.r}],execute:function(){var n=e();var r=t("d",s(n))}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,e as n}from"./p-CtEsvWI6.js";import{r as t}from"./p-D0erXw7p.js";var i,a,e=n(function(){if(a)return i;a=1;var n=t(),e=r();return i=function(r,t,i){var a=!0,o=!0;if("function"!=typeof r)throw new TypeError("Expected a function");return e(i)&&(a="leading"in i?!!i.leading:a,o="trailing"in i?!!i.trailing:o),n(r,t,{leading:a,maxWait:t,trailing:o})}}());export{e as t}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
System.register(["./p-CPnR_T0a.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.z}],execute:function(){
|
|
2
|
-
/**
|
|
3
|
-
* Get the border radius for the elements based on the style
|
|
4
|
-
* @param overrideBorderStyle
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
var r=n("g",(function(n){var r=(n===null||n===void 0?void 0:n.customRoundRadius)||"10px";var e=n===null||n===void 0?void 0:n.overrideBorderStyle;if(e){
|
|
8
|
-
// If the override is set, use that, otherwise use the default radius style
|
|
9
|
-
return e==="SHARP"?"0px":r}return t.appearance.style==="SHARP"?"0px":r}))}}}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
System.register(["./p-DPW1yXt9.system.js","./p-DIJaXkiE.system.js"],(function(r){"use strict";var n,v,t;return{setters:[function(r){n=r.d},function(r){v=r.A;t=r.h}],execute:function(){var u=function(){var r,v;var t=n.displayBaseCurrency;var u=t&&((r=n.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(v=n.exchangeRate)===null||v===void 0?void 0:v.sourceCurrencyCode:n.currency;return u};
|
|
2
|
-
/**
|
|
3
|
-
* Unified currency rendering for checkout amounts.
|
|
4
|
-
* @note This is only to display, not for calculations.
|
|
5
|
-
*/var a=r("r",(function(r){var a=r.amount,i=r.isForeign;var e,o;var c=((e=n.exchangeRate)===null||e===void 0?void 0:e.rate)||1;
|
|
6
|
-
// If the amount already in foreign currency, no need to apply the inclusive effective rate since it's already has the inclusive effective rate applied
|
|
7
|
-
var s=i?a:v(a);var d=n.currency;var f=(o=n.items[0])===null||o===void 0?void 0:o.currencyCode;
|
|
8
|
-
// If the item currency is the same as the presentment currency, we can just return the amount in the presentment currency in the same format
|
|
9
|
-
if(f===d){return t({amount:s,currency:d})}var l=n.displayBaseCurrency;var y=u();if(i){
|
|
10
|
-
// Amount is in foreign currency, divide by the rate to convert it to the base currency if displaying in base currency
|
|
11
|
-
var m=l?s/c:s;return t({amount:m,currency:y})}
|
|
12
|
-
// Amount is already in base currency, need to multiply rate to convert to foreign currency if display in foreign currency
|
|
13
|
-
var j=l?s:s*c;return t({amount:j,currency:y})}))}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as e}from"./p-DHwpNxG9.js";const l=3,a=({countryField:l,event:a})=>{var o,t,n;if(!a)return[];const{value:s}=a,i=[],{lastName:r}=e({firstName:s.firstName,lastName:s.lastName,name:s.name});return r.trim()||i.push({key:"lastName"}),(null==l?void 0:l.stateRequired)&&!(null===(o=s.address.state)||void 0===o?void 0:o.trim())&&i.push({key:"state"}),(null==l?void 0:l.zipRequired)&&(null!==(n=null===(t=s.address.postal_code)||void 0===t?void 0:t.trim().length)&&void 0!==n?n:0)<3&&i.push({key:"postal_code"}),i};export{l as M,a as g}
|