@zonos/elements 1.5.1 → 1.5.3
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/_isBigCommerceNativeCheckout-3-xbKbAO.js +133 -0
- package/dist/cjs/{cart-CiXlehwQ.js → cart-C39TMSgB.js} +27 -13
- package/dist/cjs/{collect-Drr8fY-q.js → collect-lF9DenLk.js} +4 -4
- package/dist/cjs/{getMissingRequiredShippingFields-DI6qF1z3.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
- package/dist/cjs/{handleFetch-DQLhurnE.js → handleFetch-DVfjFTYO.js} +181 -71
- package/dist/cjs/{hasInclusivePrice-84KS94yH.js → hasInclusivePrice-CEPf3_FG.js} +1 -1
- package/dist/cjs/index.cjs.js +158 -47
- package/dist/cjs/{invoice-5hVfSXpb.js → invoice-BD3pCr8P.js} +3 -3
- package/dist/cjs/{localization-B2mjW0Xa.js → localization-BhNVhLZs.js} +24 -48
- package/dist/cjs/{paypal-pd8Nz_R_.js → paypal-Bd1qmwiv.js} +4 -4
- package/dist/cjs/{placeTestOrder-DrI8rD9o.js → placeTestOrder-BMQRvX2q.js} +3 -3
- package/dist/cjs/{renderCheckoutCurrency-u5q8YdUb.js → renderCheckoutCurrency-DE2p8CT8.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-gBg4KeTQ.js → shouldShowLanguageSelect-NOVWOU53.js} +1 -1
- package/dist/cjs/{submitGtag-Rc-S3PnH.js → submitGtag-D4sB7w4z.js} +1 -1
- package/dist/cjs/{taxIdFields-BrIaPTcd.js → taxIdFields-BKbk2bhi.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-d0IKpwW8.js → updateCheckoutSessionAttributes-KxwcsKhM.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +6 -6
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card_5.cjs.entry.js +5 -5
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +18 -18
- package/dist/cjs/zonos-checkout.cjs.entry.js +48 -22
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +9 -9
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +65 -40
- 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 +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +9 -9
- package/dist/cjs/zonos-invoice.cjs.entry.js +6 -6
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +8 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +14 -4
- package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
- package/dist/collection/components/main/zonos-controller.js +26 -10
- package/dist/collection/components/store/checkout/cart.js +3 -2
- package/dist/collection/components/store/checkout/stripe.js +23 -10
- package/dist/collection/components/store/storageStore.js +7 -6
- package/dist/collection/components/utils/__tests__/helpers/blockStorage.js +24 -0
- package/dist/collection/components/utils/api/getExchangeRate.js +2 -1
- package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
- package/dist/collection/components/utils/handleFetch.js +19 -9
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +17 -40
- package/dist/collection/components/utils/logging/installConstructorCapture.js +58 -0
- package/dist/collection/components/utils/logging/reportBlockedStorage.js +34 -0
- package/dist/collection/components/utils/logging/sendErrorLog.js +8 -1
- package/dist/collection/components/utils/logging/startZonosInit.js +35 -0
- package/dist/collection/components/utils/logging/thrownMessage.js +16 -0
- package/dist/collection/components/utils/safeStorage.js +39 -0
- package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
- package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +3 -2
- package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
- package/dist/collection/scripts/_loadStripe.js +15 -4
- package/dist/collection/scripts/_zonosBase.js +46 -33
- package/dist/collection/types/generated/graphql.frontend.types.js +0 -16
- package/dist/collection/types/generated/graphql.internal.types.js +215 -1
- package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
- package/dist/esm/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +26 -14
- package/dist/esm/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +4 -4
- package/dist/esm/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
- package/dist/esm/{handleFetch-D5GYDF-O.js → handleFetch-BFVO7oAR.js} +178 -72
- package/dist/esm/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm/index.js +158 -47
- package/dist/esm/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +3 -3
- package/dist/esm/{localization-DHM91diu.js → localization-B5CRzthT.js} +25 -49
- package/dist/esm/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +4 -4
- package/dist/esm/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +3 -3
- package/dist/esm/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
- package/dist/esm/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +6 -6
- package/dist/esm/zonos-address-display_2.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +4 -4
- package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
- package/dist/esm/zonos-card_5.entry.js +5 -5
- package/dist/esm/zonos-cart-items_12.entry.js +18 -18
- package/dist/esm/zonos-checkout.entry.js +48 -22
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +9 -9
- package/dist/esm/zonos-collect.entry.js +6 -6
- package/dist/esm/zonos-controller.entry.js +65 -40
- 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 +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
- package/dist/esm/zonos-invoice-finish_5.entry.js +9 -9
- package/dist/esm/zonos-invoice.entry.js +6 -6
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
- package/dist/esm-es5/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
- package/dist/esm-es5/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +59 -59
- package/dist/esm-es5/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +2 -2
- package/dist/esm-es5/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
- package/dist/esm-es5/handleFetch-BFVO7oAR.js +73 -0
- package/dist/esm-es5/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm-es5/index.js +94 -65
- package/dist/esm-es5/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +1 -1
- package/dist/esm-es5/{localization-DHM91diu.js → localization-B5CRzthT.js} +7 -10
- package/dist/esm-es5/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +5 -5
- package/dist/esm-es5/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm-es5/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
- package/dist/esm-es5/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2 -2
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +6 -6
- package/dist/esm-es5/zonos-cart-items_12.entry.js +127 -127
- package/dist/esm-es5/zonos-checkout.entry.js +22 -11
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +21 -12
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- 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-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +22 -0
- 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/main/mountCheckoutWithoutStripe.d.ts +8 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -1
- package/dist/types/components/utils/__tests__/helpers/blockStorage.d.ts +3 -0
- package/dist/types/components/utils/logging/installConstructorCapture.d.ts +20 -0
- package/dist/types/components/utils/logging/reportBlockedStorage.d.ts +16 -0
- package/dist/types/components/utils/logging/startZonosInit.d.ts +5 -0
- package/dist/types/components/utils/logging/thrownMessage.d.ts +1 -0
- package/dist/types/components/utils/safeStorage.d.ts +4 -0
- package/dist/types/scripts/_bigcommerceCheckoutPath.d.ts +12 -0
- package/dist/types/scripts/_detectBigCommerceHost.d.ts +5 -0
- package/dist/types/scripts/_isBigCommerceNativeCheckout.d.ts +21 -0
- package/dist/types/scripts/_zonosBase.d.ts +16 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +0 -22
- package/dist/types/types/generated/graphql.frontend.types.ts +0 -51
- package/dist/types/types/generated/graphql.internal.types.d.ts +270 -1
- package/dist/types/types/generated/graphql.internal.types.ts +341 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-8fa6cfff.entry.js → p-02faff47.entry.js} +1 -1
- package/dist/zonos-elements/{p-216a908d.system.entry.js → p-0c68cbbb.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-vTIygnHq.system.js → p-1OG3IJgY.system.js} +1 -1
- package/dist/zonos-elements/{p-960070d0.system.entry.js → p-1cd2d097.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-1e6db427.entry.js → p-255e411a.entry.js} +1 -1
- package/dist/zonos-elements/p-2c_UqKJL.system.js +7 -0
- package/dist/zonos-elements/{p-DprOoI2W.system.js → p-3AUMK-5E.system.js} +154 -154
- package/dist/zonos-elements/{p-d3345b2c.entry.js → p-3ee87d8b.entry.js} +1 -1
- package/dist/zonos-elements/{p-cccaad60.system.entry.js → p-42fa5694.system.entry.js} +10 -10
- package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
- package/dist/zonos-elements/{p-fda89981.system.entry.js → p-4ce4c49f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-f3d9a380.system.entry.js → p-5622fc50.system.entry.js} +263 -252
- package/dist/zonos-elements/{p-5585db86.system.entry.js → p-59457fd9.system.entry.js} +73 -64
- package/dist/zonos-elements/{p-65817880.entry.js → p-66398133.entry.js} +1 -1
- package/dist/zonos-elements/{p-d8f375da.system.entry.js → p-674323ac.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-678b9214.entry.js → p-71d9a5b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-189cc594.system.entry.js → p-81780f8f.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-6e691736.entry.js → p-821b83a2.entry.js} +1 -1
- package/dist/zonos-elements/{p-1fda4aec.system.entry.js → p-877a82d2.system.entry.js} +94 -94
- package/dist/zonos-elements/p-8daec112.entry.js +1 -0
- package/dist/zonos-elements/{p-46a839d2.system.entry.js → p-93bc75fd.system.entry.js} +13 -13
- package/dist/zonos-elements/{p-2ca826b9.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84e76348.entry.js → p-9a4947a5.entry.js} +1 -1
- package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
- package/dist/zonos-elements/p-BIJM2Kj-.js +1 -0
- package/dist/zonos-elements/p-BJFa5RwX.js +1 -0
- package/dist/zonos-elements/{p-6vSUiBfr.system.js → p-BOh4ifdL.system.js} +51 -54
- package/dist/zonos-elements/p-BZAX-HmS.js +1 -0
- package/dist/zonos-elements/p-Bb90IMVt.js +1 -0
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-CbhN65lj.system.js → p-BvoPE_nb.system.js} +1 -1
- package/dist/zonos-elements/{p-iAIzUA4k.js → p-C3E55OqH.js} +1 -1
- package/dist/zonos-elements/{p-CBUz18kA.system.js → p-C3gF3UV5.system.js} +23 -23
- package/dist/zonos-elements/{p-XoQH3S7Z.system.js → p-CD2ahEZn.system.js} +1 -1
- package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
- package/dist/zonos-elements/{p-CGNVm52g.system.js → p-CEV0O_IQ.system.js} +5 -5
- package/dist/zonos-elements/{p-D1e9zNDA.js → p-CJmWr75U.js} +1 -1
- package/dist/zonos-elements/{p-DgUrB-1a.system.js → p-CZ-uYiCo.system.js} +1 -1
- package/dist/zonos-elements/p-Cn2xE-9t.system.js +256 -0
- package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
- package/dist/zonos-elements/{p-BrQ8n8NS.system.js → p-Cw_Qnyow.system.js} +3 -3
- package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
- package/dist/zonos-elements/p-D0DkOoAw.system.js +73 -0
- package/dist/zonos-elements/p-D9OPKqLg.js +1 -0
- package/dist/zonos-elements/{p-ojtNq-r5.system.js → p-DXlojp_Y.system.js} +1 -1
- package/dist/zonos-elements/{p-DpwmHU8R.js → p-Df62LRNs.js} +2 -2
- package/dist/zonos-elements/{p-CHKKvuiz.js → p-Lsqrpzc5.js} +1 -1
- package/dist/zonos-elements/{p-C9XLkmmb.system.js → p-YQFbWtjn.system.js} +1 -1
- package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
- package/dist/zonos-elements/{p-941a95a1.system.entry.js → p-a6bb296c.system.entry.js} +7 -7
- package/dist/zonos-elements/{p-2b63865a.system.entry.js → p-abb85879.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-12b24ebb.entry.js → p-b8653024.entry.js} +1 -1
- package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
- package/dist/zonos-elements/{p-f5f95990.system.entry.js → p-be067e12.system.entry.js} +15 -15
- package/dist/zonos-elements/p-bmrOH9oh.js +1 -0
- package/dist/zonos-elements/p-c185bc23.entry.js +1 -0
- package/dist/zonos-elements/{p-2d513aa3.entry.js → p-c6e78de2.entry.js} +1 -1
- package/dist/zonos-elements/{p-55813e9f.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-3e705c9b.entry.js → p-cbb96382.entry.js} +1 -1
- package/dist/zonos-elements/{p-53eac12f.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-6410fa11.system.entry.js → p-df240119.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-1cc42a98.system.entry.js → p-e16e4db6.system.entry.js} +17 -17
- package/dist/zonos-elements/{p-064d8829.system.entry.js → p-eb016dd8.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-1199baef.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ef5344ea.entry.js → p-ed8a7a7f.entry.js} +1 -1
- package/dist/zonos-elements/{p-4917b74d.entry.js → p-ef932fda.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7fdb2c9.entry.js → p-f792ba5f.entry.js} +1 -1
- package/dist/zonos-elements/{p-DiMEP3mh.js → p-fZcKMzE-.js} +1 -1
- package/dist/zonos-elements/{p-CMo3ZweU.js → p-fdritVtG.js} +1 -1
- package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
- package/dist/zonos-elements/p-gEViRqvf.js +1 -0
- package/dist/zonos-elements/{p-Dtu_Japy.system.js → p-v8IEjQ2z.system.js} +39 -39
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +10 -10
- package/dist/esm-es5/handleFetch-D5GYDF-O.js +0 -60
- package/dist/zonos-elements/p-107f287b.entry.js +0 -1
- package/dist/zonos-elements/p-25eb99d4.entry.js +0 -1
- package/dist/zonos-elements/p-46b9f0cf.entry.js +0 -1
- package/dist/zonos-elements/p-636b71d4.entry.js +0 -1
- package/dist/zonos-elements/p-7dc7f328.entry.js +0 -1
- package/dist/zonos-elements/p-8f9d8795.entry.js +0 -1
- package/dist/zonos-elements/p-BMPYH-LT.js +0 -1
- package/dist/zonos-elements/p-C70h5mKA.js +0 -1
- package/dist/zonos-elements/p-CTiqplrr.js +0 -1
- package/dist/zonos-elements/p-Ch1w0Lr7.js +0 -1
- package/dist/zonos-elements/p-D1SmY_fZ.js +0 -1
- package/dist/zonos-elements/p-D6xXnsM_.js +0 -1
- package/dist/zonos-elements/p-DE4a-QD5.js +0 -1
- package/dist/zonos-elements/p-DQrMfUzi.system.js +0 -227
- package/dist/zonos-elements/p-DZdkJHK9.system.js +0 -7
- package/dist/zonos-elements/p-U33isUJG.js +0 -1
- package/dist/zonos-elements/p-ebe157b5.entry.js +0 -1
- package/dist/zonos-elements/p-zVLAvre1.system.js +0 -60
package/dist/esm/index.js
CHANGED
|
@@ -1,14 +1,106 @@
|
|
|
1
1
|
export { c as curpRegex, i as isMexicoTaxIdType, a as isPeruTaxIdType, p as peruTaxIdTypeFromValue, s as stripTaxIdSeparators } from './taxIdRules-xYlx7ZXW.js';
|
|
2
2
|
import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
|
|
3
3
|
import { g as getGenericSettingsOverride, I as IframeService } from './getGenericSettingsOverride-HeAZDwVW.js';
|
|
4
|
+
import { t as thrownMessage, s as sendErrorLog, g as getIsTestMode, a as getIsStagingMode, h as handleFetch, l as logError, b as safeRemoveItem, c as safeGetItem } from './handleFetch-BFVO7oAR.js';
|
|
4
5
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
5
6
|
export { a as availableTestKeys } from './VarianceTest-BJmZPrZl.js';
|
|
6
|
-
import {
|
|
7
|
+
import { h as holdStripeForNativeCheckout, m as markBigCommerceHostChecked, i as isBigCommerceNativeCheckout } from './_isBigCommerceNativeCheckout-Bb90IMVt.js';
|
|
7
8
|
import { g as getAbandonedCartRenewTokenValue, _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, a as checkoutHiddenInternationalBtnSelector } from './CheckoutConfig-D5SpFsQJ.js';
|
|
8
9
|
export { d as domesticRedirectedBtnSelector } from './CheckoutConfig-D5SpFsQJ.js';
|
|
9
10
|
export { c as countryRequireShortAddressCode } from './ShortAddressCode-nJ6oI8-n.js';
|
|
10
11
|
export { a as checkoutTaxIdTypeValues, c as countryRequireTaxId, e as euCountryCodes, i as isCountryRequireTaxId, p as peruTaxIdDigitLength, b as peruTaxIdFormatError, s as shipToTaxIdLabels, t as taxIdTypeOptions } from './TaxId-DMIgN_sT.js';
|
|
11
12
|
|
|
13
|
+
const constructorNotFound = /^Constructor for .+ was not found/;
|
|
14
|
+
const constructorTag = /^Constructor for "?([^#"]+)#/;
|
|
15
|
+
const recordConstructorFailure = (value) => {
|
|
16
|
+
var _a;
|
|
17
|
+
const message = thrownMessage(value, '');
|
|
18
|
+
if (!message || !constructorNotFound.test(message)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (typeof window.Zonos === 'undefined') {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const capture = window.__zonosConstructorCapture;
|
|
25
|
+
if (!capture) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const tagMatch = constructorTag.exec(message);
|
|
29
|
+
const tag = (_a = tagMatch === null || tagMatch === void 0 ? void 0 : tagMatch[1]) !== null && _a !== void 0 ? _a : '';
|
|
30
|
+
if (capture.reported.has(tag)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
capture.reported.add(tag);
|
|
34
|
+
void sendErrorLog({
|
|
35
|
+
endpoint: 'stencil://constructor',
|
|
36
|
+
errors: [message],
|
|
37
|
+
metadata: {
|
|
38
|
+
shape: 'constructor-not-found',
|
|
39
|
+
tag,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Copy a missing-constructor failure onto the existing error log.
|
|
45
|
+
* Stencil catches `Constructor for "tag#mode" was not found` and passes that
|
|
46
|
+
* Error to `console.error`. One report is sent per tag, then the original
|
|
47
|
+
* console.error still runs. This does not request the chunk again.
|
|
48
|
+
*/
|
|
49
|
+
const installConstructorCapture = () => {
|
|
50
|
+
if (window.__zonosConstructorCapture) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const listener = (event) => {
|
|
54
|
+
recordConstructorFailure(event.reason);
|
|
55
|
+
};
|
|
56
|
+
window.__zonosConstructorCapture = {
|
|
57
|
+
listener,
|
|
58
|
+
reported: new Set(),
|
|
59
|
+
};
|
|
60
|
+
window.addEventListener('unhandledrejection', listener);
|
|
61
|
+
// eslint-disable-next-line no-console -- Stencil reports the missing constructor here
|
|
62
|
+
const originalError = console.error.bind(console);
|
|
63
|
+
// eslint-disable-next-line no-console -- record the Stencil diagnostic, then forward it
|
|
64
|
+
console.error = (...data) => {
|
|
65
|
+
recordConstructorFailure(data[0]);
|
|
66
|
+
originalError(...data);
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const reportInitRejection = (error) => {
|
|
71
|
+
// sendErrorLog prints only when zonosDebug is on. Keep the failure in the
|
|
72
|
+
// merchant console without leaving an unhandled rejection.
|
|
73
|
+
// eslint-disable-next-line no-console -- the page console is the support signal
|
|
74
|
+
console.error(error);
|
|
75
|
+
if (typeof window.Zonos === 'undefined') {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
void sendErrorLog({
|
|
79
|
+
endpoint: 'zonos://init',
|
|
80
|
+
errors: [thrownMessage(error, 'Unknown init rejection')],
|
|
81
|
+
metadata: {
|
|
82
|
+
shape: 'init-rejection',
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Run an init that the caller is not waiting on. The rejection is recorded
|
|
88
|
+
* and not rethrown, so startup does not become an unhandled rejection.
|
|
89
|
+
*/
|
|
90
|
+
const startZonosInit = (start) => {
|
|
91
|
+
let pending;
|
|
92
|
+
try {
|
|
93
|
+
pending = start();
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
reportInitRejection(error);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
void pending.catch((error) => {
|
|
100
|
+
reportInitRejection(error);
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
|
|
12
104
|
/**
|
|
13
105
|
* Get the load version and url based on the loadScriptSrc and version
|
|
14
106
|
* @returns
|
|
@@ -132,7 +224,7 @@ const getZonosQaUrl = () => {
|
|
|
132
224
|
return null;
|
|
133
225
|
}
|
|
134
226
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
135
|
-
const cdnUrl = "https://v1.5.
|
|
227
|
+
const cdnUrl = "https://v1.5.3.js.zonos.com";
|
|
136
228
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
137
229
|
if (!qaUrl &&
|
|
138
230
|
(cdnUrl.includes('test.') ||
|
|
@@ -167,8 +259,8 @@ const getZonosQaUrl = () => {
|
|
|
167
259
|
void fetch(fullUrl)
|
|
168
260
|
.then(() => {
|
|
169
261
|
// cleanup checkout session to avoid using the prod session in preview domain
|
|
170
|
-
|
|
171
|
-
|
|
262
|
+
safeRemoveItem('session', 'zonos--checkout-session-id');
|
|
263
|
+
safeRemoveItem('session', 'zonos--client-secret');
|
|
172
264
|
})
|
|
173
265
|
.catch(() => {
|
|
174
266
|
alert(`[ZONOS-WARNING] '${fullUrl}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);
|
|
@@ -308,13 +400,23 @@ const hasCheckoutCartCallback = () => {
|
|
|
308
400
|
(typeof ((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.createCartId) === 'function' ||
|
|
309
401
|
typeof ((_b = window.Zonos) === null || _b === void 0 ? void 0 : _b.buildCartDetail) === 'function');
|
|
310
402
|
};
|
|
403
|
+
/**
|
|
404
|
+
* The only function that may inject Stripe.js. Native BigCommerce checkout
|
|
405
|
+
* returns null before `window.Stripe` is read or `js.stripe.com/v3` is added.
|
|
406
|
+
* Callers decide whether to ask for Stripe. They do not load it themselves.
|
|
407
|
+
*/
|
|
408
|
+
const loadStripeScript = () => {
|
|
409
|
+
if (holdStripeForNativeCheckout()) {
|
|
410
|
+
return Promise.resolve(null);
|
|
411
|
+
}
|
|
412
|
+
return zonosStripeLoadScript(null);
|
|
413
|
+
};
|
|
311
414
|
const stripePromise = Promise.resolve().then(() => {
|
|
312
|
-
//
|
|
313
|
-
// (e.g. a Hello-only integration). Stripe is loaded on demand instead.
|
|
415
|
+
// Hello-only pages have no cart callback, so they skip the eager preload.
|
|
314
416
|
if (!hasCheckoutCartCallback()) {
|
|
315
417
|
return null;
|
|
316
418
|
}
|
|
317
|
-
return
|
|
419
|
+
return loadStripeScript();
|
|
318
420
|
});
|
|
319
421
|
let loadCalled = false;
|
|
320
422
|
stripePromise.catch((err) => {
|
|
@@ -330,7 +432,7 @@ const zonosLoadStripe = async (...args) => {
|
|
|
330
432
|
// Fall back to loading Stripe on demand if the eager preload was skipped
|
|
331
433
|
// (callbacks set after the microtask, or Collect/Invoice flows that don't
|
|
332
434
|
// use cart callbacks). `zonosStripeLoadScript` is idempotent.
|
|
333
|
-
const maybeStripe = (_a = (await stripePromise)) !== null && _a !== void 0 ? _a : (await
|
|
435
|
+
const maybeStripe = (_a = (await stripePromise)) !== null && _a !== void 0 ? _a : (await loadStripeScript());
|
|
334
436
|
return initStripe(maybeStripe, args, startTime);
|
|
335
437
|
};
|
|
336
438
|
|
|
@@ -421,10 +523,10 @@ const zonosLoadUrl = (() => {
|
|
|
421
523
|
return null;
|
|
422
524
|
})();
|
|
423
525
|
const startLoadTime = Date.now();
|
|
424
|
-
const ZONOS_URL = "https://v1.5.
|
|
425
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.5.
|
|
426
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.5.
|
|
427
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.5.
|
|
526
|
+
const ZONOS_URL = "https://v1.5.3.js.zonos.com";
|
|
527
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.5.3";
|
|
528
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.5.3";
|
|
529
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.5.3";
|
|
428
530
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
429
531
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
430
532
|
class Zonos {
|
|
@@ -442,7 +544,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
442
544
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
443
545
|
: null;
|
|
444
546
|
Zonos.isBigCommerce = false;
|
|
445
|
-
Zonos.releaseDate = "
|
|
547
|
+
Zonos.releaseDate = "1794098254078";
|
|
446
548
|
Zonos.isLegacyCheckout = false;
|
|
447
549
|
Zonos.googleAnalyticId = null;
|
|
448
550
|
Zonos.googleAnalyticReady = false;
|
|
@@ -467,7 +569,7 @@ Zonos.isNpm = true;
|
|
|
467
569
|
Zonos.zonosQaUrl = null;
|
|
468
570
|
Zonos.zonosQaUrlApi = null;
|
|
469
571
|
Zonos.trackEventLogs = [];
|
|
470
|
-
Zonos.version = `v${"1.5.
|
|
572
|
+
Zonos.version = `v${"1.5.3"}`;
|
|
471
573
|
Zonos.modeAlerted = false;
|
|
472
574
|
Zonos.cartData = null;
|
|
473
575
|
Zonos.paypal = null;
|
|
@@ -478,6 +580,7 @@ Zonos.zonosController = null;
|
|
|
478
580
|
Zonos.loadTimeApiInfoList = [];
|
|
479
581
|
Zonos.logIntervalId = null;
|
|
480
582
|
Zonos.init = async (params) => {
|
|
583
|
+
installConstructorCapture();
|
|
481
584
|
const { appearance, checkoutSettings, currencyConverter, helloSettings, onCountryChange, overrideCurrencyFormat, storeId, zonosApiKey, } = params;
|
|
482
585
|
_a.cartId = getCartIdFromQueryParam();
|
|
483
586
|
// Expose the checkout cart callbacks on the global so Stripe loading can be
|
|
@@ -489,6 +592,9 @@ Zonos.init = async (params) => {
|
|
|
489
592
|
// do nothing if zonos is already initialized
|
|
490
593
|
return;
|
|
491
594
|
}
|
|
595
|
+
// Host detection has already copied `isBigCommerce`. Settle the
|
|
596
|
+
// native-checkout answer once, before buttons or Stripe are touched.
|
|
597
|
+
markBigCommerceHostChecked();
|
|
492
598
|
log(`====== ZONOS DEBUG MODE: on (${_a.version}) ======`);
|
|
493
599
|
_a.zonosApiKey = zonosApiKey;
|
|
494
600
|
_a.storeId = storeId;
|
|
@@ -513,7 +619,7 @@ Zonos.init = async (params) => {
|
|
|
513
619
|
window.Zonos.isLegacyCheckout = _a.isLegacyCheckout;
|
|
514
620
|
window.Zonos.zonosMode = _a.zonosMode;
|
|
515
621
|
// call init again after the script is loaded
|
|
516
|
-
|
|
622
|
+
startZonosInit(() => window.Zonos.init(params));
|
|
517
623
|
});
|
|
518
624
|
script.addEventListener('error', () => {
|
|
519
625
|
alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${zonosQaUrl}`);
|
|
@@ -549,7 +655,7 @@ Zonos.init = async (params) => {
|
|
|
549
655
|
}
|
|
550
656
|
}
|
|
551
657
|
// Check if the stripe client secret is available in the url or session storage, inject hidden button to trigger checkout right away to check status of client secret
|
|
552
|
-
const clientSecretUrlParam = new URL(window.location.href).searchParams.get('payment_intent_client_secret') ||
|
|
658
|
+
const clientSecretUrlParam = new URL(window.location.href).searchParams.get('payment_intent_client_secret') || safeGetItem('session', 'zonos--client-secret');
|
|
553
659
|
const shouldAttemptImmediatelyOpenCheckout = (_a.cartId && _a.cartData) || !!clientSecretUrlParam;
|
|
554
660
|
// inject hidden button to body to trigger checkout right away if we have cartData or stripe client secret
|
|
555
661
|
if (shouldAttemptImmediatelyOpenCheckout) {
|
|
@@ -745,47 +851,52 @@ Zonos.injectController = ({ config, }) => {
|
|
|
745
851
|
if (document.querySelector('zonos-controller')) {
|
|
746
852
|
return;
|
|
747
853
|
}
|
|
748
|
-
//
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
placeOrderButtonSelector
|
|
755
|
-
});
|
|
756
|
-
// create a mutation observer to see if any new elements that match our selector is added to the DOM
|
|
757
|
-
const observer = new MutationObserver(() => {
|
|
854
|
+
// Native BigCommerce checkout never calls attachCheckout, which is what
|
|
855
|
+
// marks these buttons handled. Disabling them here would flicker the
|
|
856
|
+
// store's own buttons after every DOM mutation.
|
|
857
|
+
if (!isBigCommerceNativeCheckout()) {
|
|
858
|
+
// if placeOrderAnchor is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
|
|
859
|
+
if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.placeOrderButtonSelector) {
|
|
860
|
+
const placeOrderButtonSelector = config.checkoutSettings.placeOrderButtonSelector;
|
|
758
861
|
_a.disablePlaceOrderButtons({
|
|
759
862
|
config,
|
|
760
863
|
disable: true,
|
|
761
864
|
placeOrderButtonSelector,
|
|
762
865
|
});
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
866
|
+
// create a mutation observer to see if any new elements that match our selector is added to the DOM
|
|
867
|
+
const observer = new MutationObserver(() => {
|
|
868
|
+
_a.disablePlaceOrderButtons({
|
|
869
|
+
config,
|
|
870
|
+
disable: true,
|
|
871
|
+
placeOrderButtonSelector,
|
|
872
|
+
});
|
|
873
|
+
});
|
|
874
|
+
observer.observe(document.body, {
|
|
875
|
+
childList: true,
|
|
876
|
+
subtree: true,
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
// if alwaysTriggerInternationalCheckoutSelector is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
|
|
880
|
+
if ((_c = config.checkoutSettings) === null || _c === void 0 ? void 0 : _c.alwaysTriggerInternationalCheckoutSelector) {
|
|
881
|
+
const alwaysTriggerInternationalCheckoutSelector = config.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;
|
|
779
882
|
_a.disablePlaceOrderButtons({
|
|
780
883
|
config,
|
|
781
884
|
disable: true,
|
|
782
885
|
placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
|
|
783
886
|
});
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
887
|
+
// create a mutation observer to see if any new elements that match our selector is added to the DOM
|
|
888
|
+
const observer = new MutationObserver(() => {
|
|
889
|
+
_a.disablePlaceOrderButtons({
|
|
890
|
+
config,
|
|
891
|
+
disable: true,
|
|
892
|
+
placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
|
|
893
|
+
});
|
|
894
|
+
});
|
|
895
|
+
observer.observe(document.body, {
|
|
896
|
+
childList: true,
|
|
897
|
+
subtree: true,
|
|
898
|
+
});
|
|
899
|
+
}
|
|
789
900
|
}
|
|
790
901
|
const zonosController = document.createElement('zonos-controller');
|
|
791
902
|
zonosController.config = config;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
2
|
-
import {
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
4
|
-
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-
|
|
2
|
+
import { h as cartStore, $ as cartStoreUpdateSelectedShippingOption, e as stripeStore, a3 as stripeStoreBuildAddressForPartyCreate } from './cart-b84n0nhi.js';
|
|
3
|
+
import { s as storageStore } from './localization-B5CRzthT.js';
|
|
4
|
+
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-BFVO7oAR.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
6
6
|
|
|
7
7
|
const { state: invoiceStore } = createStore(() => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
2
|
-
import { j as jsonParse, h as handleFetch, l as logError } from './handleFetch-
|
|
2
|
+
import { j as jsonParse, c as safeGetItem, b as safeRemoveItem, e as safeSetItem, h as handleFetch, l as logError } from './handleFetch-BFVO7oAR.js';
|
|
3
3
|
import { a as availableTestKeys, l as log } from './VarianceTest-BJmZPrZl.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -42,24 +42,24 @@ const filterValidTests = (testKeys) => {
|
|
|
42
42
|
*/
|
|
43
43
|
const VARIANT_TEST_KEY_EXPIRATION = 60 * 60 * 24 * 1000;
|
|
44
44
|
const { onChange: storageStoreOnChange, state: storageStore } = createStore({
|
|
45
|
-
checkoutSessionId:
|
|
46
|
-
enabledVariantTestKeys: jsonParse(
|
|
45
|
+
checkoutSessionId: safeGetItem('session', 'zonos--checkout-session-id'),
|
|
46
|
+
enabledVariantTestKeys: jsonParse(safeGetItem('local', 'zonos--enabled-variant-test-keys')),
|
|
47
47
|
});
|
|
48
48
|
storageStoreOnChange('enabledVariantTestKeys', () => {
|
|
49
49
|
var _a;
|
|
50
50
|
// This should be set in localStorage so we don't have multiple tests for the same user in short period of time
|
|
51
51
|
if (!((_a = storageStore.enabledVariantTestKeys) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
52
|
-
|
|
52
|
+
safeRemoveItem('local', 'zonos--enabled-variant-test-keys');
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
safeSetItem('local', 'zonos--enabled-variant-test-keys', JSON.stringify(storageStore.enabledVariantTestKeys));
|
|
56
56
|
});
|
|
57
57
|
storageStoreOnChange('checkoutSessionId', () => {
|
|
58
58
|
if (!storageStore.checkoutSessionId) {
|
|
59
|
-
|
|
59
|
+
safeRemoveItem('session', 'zonos--checkout-session-id');
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
safeSetItem('session', 'zonos--checkout-session-id', storageStore.checkoutSessionId);
|
|
63
63
|
});
|
|
64
64
|
const storageStoreSetEnabledVariantTestKeys = (testKeys) => {
|
|
65
65
|
storageStore.enabledVariantTestKeys = filterValidTests(testKeys);
|
|
@@ -18276,7 +18276,7 @@ const getExchangeRate = async ({ country, isGuaranteed, sourceCurrency, targetCu
|
|
|
18276
18276
|
const { rate, targetFormat } = json.exchangeRateCreate;
|
|
18277
18277
|
const maxAge = json.maxAge;
|
|
18278
18278
|
if (rate) {
|
|
18279
|
-
|
|
18279
|
+
safeSetItem('session', `${country}_rate`, JSON.stringify(rate));
|
|
18280
18280
|
const exchangeRate = { rate, targetFormat };
|
|
18281
18281
|
return { exchangeRate, maxAge };
|
|
18282
18282
|
}
|
|
@@ -18315,58 +18315,34 @@ const getLocaleMessages = async ({ countryCode, localeTo, storeId, }) => {
|
|
|
18315
18315
|
const isCountryCode = (value) => /^[A-Z]{2}$/.test(value);
|
|
18316
18316
|
|
|
18317
18317
|
const COUNTRY_OVERRIDE_KEY = 'zonos--country';
|
|
18318
|
-
const
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
}
|
|
18322
|
-
catch (_a) {
|
|
18323
|
-
// localStorage/sessionStorage can throw in blocked-storage contexts
|
|
18324
|
-
// (Safari private mode, cross-origin iframes).
|
|
18325
|
-
}
|
|
18326
|
-
};
|
|
18327
|
-
const readStoredCountry = (storage) => {
|
|
18328
|
-
try {
|
|
18329
|
-
const value = storage.getItem(COUNTRY_OVERRIDE_KEY);
|
|
18330
|
-
if (!value || !isCountryCode(value)) {
|
|
18331
|
-
return null;
|
|
18332
|
-
}
|
|
18333
|
-
return value;
|
|
18334
|
-
}
|
|
18335
|
-
catch (_a) {
|
|
18318
|
+
const readStoredCountry = (area) => {
|
|
18319
|
+
const value = safeGetItem(area, COUNTRY_OVERRIDE_KEY);
|
|
18320
|
+
if (!value || !isCountryCode(value)) {
|
|
18336
18321
|
return null;
|
|
18337
18322
|
}
|
|
18323
|
+
return value;
|
|
18338
18324
|
};
|
|
18339
|
-
const
|
|
18340
|
-
storage.setItem(COUNTRY_OVERRIDE_KEY, countryCode);
|
|
18341
|
-
};
|
|
18342
|
-
const withEachStorage = (run) => {
|
|
18343
|
-
withBlockedStorage(() => run(window.localStorage));
|
|
18344
|
-
withBlockedStorage(() => run(window.sessionStorage));
|
|
18345
|
-
};
|
|
18346
|
-
const getCountryOverrideStorage = () => {
|
|
18347
|
-
var _a;
|
|
18348
|
-
return (_a = readStoredCountry(window.localStorage)) !== null && _a !== void 0 ? _a : readStoredCountry(window.sessionStorage);
|
|
18349
|
-
};
|
|
18325
|
+
const getCountryOverrideStorage = () => { var _a; return (_a = readStoredCountry('local')) !== null && _a !== void 0 ? _a : readStoredCountry('session'); };
|
|
18350
18326
|
const migrateCountryOverrideStorage = (selectedCountryCode) => {
|
|
18351
18327
|
if (!selectedCountryCode) {
|
|
18352
18328
|
return;
|
|
18353
18329
|
}
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
}
|
|
18362
|
-
});
|
|
18330
|
+
const localCountry = readStoredCountry('local');
|
|
18331
|
+
// Only mirror the country Hello actually kept. A failed localStorage
|
|
18332
|
+
// clear can leave a discarded country in local; never copy that to
|
|
18333
|
+
// session for older Elements. Never copy session → local.
|
|
18334
|
+
if (localCountry === selectedCountryCode) {
|
|
18335
|
+
safeSetItem('session', COUNTRY_OVERRIDE_KEY, localCountry);
|
|
18336
|
+
}
|
|
18363
18337
|
};
|
|
18364
18338
|
const setCountryOverrideStorage = (countryCode) => {
|
|
18365
18339
|
// Dual-write so older Elements that only read sessionStorage see the pick.
|
|
18366
|
-
|
|
18340
|
+
safeSetItem('local', COUNTRY_OVERRIDE_KEY, countryCode);
|
|
18341
|
+
safeSetItem('session', COUNTRY_OVERRIDE_KEY, countryCode);
|
|
18367
18342
|
};
|
|
18368
18343
|
const clearCountryOverrideStorage = () => {
|
|
18369
|
-
|
|
18344
|
+
safeRemoveItem('local', COUNTRY_OVERRIDE_KEY);
|
|
18345
|
+
safeRemoveItem('session', COUNTRY_OVERRIDE_KEY);
|
|
18370
18346
|
};
|
|
18371
18347
|
|
|
18372
18348
|
const getZCountryUrlParam = (urlParams) => {
|
|
@@ -19566,4 +19542,4 @@ const initLocalizationStore = async () => {
|
|
|
19566
19542
|
}
|
|
19567
19543
|
};
|
|
19568
19544
|
|
|
19569
|
-
export { getSupportedLanguages as A, applyInclusiveEffectiveRate as B, getFallbackDefaultCountryCode as C, localizationStoreUpdateSelectedLocale as D, VARIANT_TEST_KEY_EXPIRATION as V, fetchCheckoutId as a, fetchBigCommerceCheckout as b, isCountryInShippingZone as c, localizationStoreUpdateSelectedCountryCode as d, storageStoreSetEnabledVariantTestKeys as e, filterValidTests as f, getZCountryUrlParam as g, localizationStoreOnChange as h, isBigCommerceCustomerLoggedIn as i, currencyFormat as j, languages as k, localizationStore as l,
|
|
19545
|
+
export { getSupportedLanguages as A, applyInclusiveEffectiveRate as B, getFallbackDefaultCountryCode as C, localizationStoreUpdateSelectedLocale as D, VARIANT_TEST_KEY_EXPIRATION as V, fetchCheckoutId as a, fetchBigCommerceCheckout as b, isCountryInShippingZone as c, localizationStoreUpdateSelectedCountryCode as d, storageStoreSetEnabledVariantTestKeys as e, filterValidTests as f, getZCountryUrlParam as g, localizationStoreOnChange as h, isBigCommerceCustomerLoggedIn as i, currencyFormat as j, languages as k, localizationStore as l, isValidSelector as m, getOverridenZCountry as n, initLocalizationStore as o, setZCountryUrlParam as p, currencyDisplay as q, currencyConvertAndFormat as r, storageStore as s, translate as t, currencyConvert as u, shouldShowHelloWidget as v, getExchangeRate as w, numberFormat as x, translationStoreOnChange as y, storageStoreOnChange as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-BXP9FvIt.js';
|
|
2
|
-
import {
|
|
3
|
-
import { s as storageStore, t as translate } from './localization-
|
|
4
|
-
import { h as handleFetch, g as getIsTestMode, l as logError, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { z as cartStoreNextStep, m as cartStoreClearCheckoutInterval, u as trackConversionEvent, A as isPolicyConsentRequired, I as policyConsentStore, E as validateCheckoutSession, e as stripeStore, h as cartStore, r as stripeStoreHandleInventoryCheck, C as storeCreditStoreApplyCredit, V as stripeStoreRecordPolicyConsent, D as storeCreditStoreCoversFullAmount, F as storeCreditStoreCreateOrder, M as storeCreditStoreGetEffectiveAmount } from './cart-b84n0nhi.js';
|
|
3
|
+
import { s as storageStore, t as translate } from './localization-B5CRzthT.js';
|
|
4
|
+
import { h as handleFetch, g as getIsTestMode, l as logError, j as jsonParse } from './handleFetch-BFVO7oAR.js';
|
|
5
5
|
import { i as isContrastColor } from './isContrastColor-CWLU13s9.js';
|
|
6
6
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
7
|
-
import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-
|
|
7
|
+
import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-C5xzFHjG.js';
|
|
8
8
|
|
|
9
9
|
/*!
|
|
10
10
|
* paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as storageStore } from './localization-
|
|
3
|
-
import { l as logError, h as handleFetch } from './handleFetch-
|
|
1
|
+
import { h as cartStore } from './cart-b84n0nhi.js';
|
|
2
|
+
import { s as storageStore } from './localization-B5CRzthT.js';
|
|
3
|
+
import { l as logError, h as handleFetch } from './handleFetch-BFVO7oAR.js';
|
|
4
4
|
|
|
5
5
|
const placeTestOrder = async () => {
|
|
6
6
|
var _a, _b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-
|
|
1
|
+
import { h as cartStore } from './cart-b84n0nhi.js';
|
|
2
|
+
import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-B5CRzthT.js';
|
|
3
3
|
|
|
4
4
|
const getDisplayCurrency = () => {
|
|
5
5
|
var _a, _b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
2
|
-
import { g as getIsTestMode } from './handleFetch-
|
|
2
|
+
import { g as getIsTestMode } from './handleFetch-BFVO7oAR.js';
|
|
3
3
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
4
4
|
|
|
5
5
|
/** Message type for zonos-analytic events sent from iframe to parent. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as requireIsObject, f as getDefaultExportFromCjs } from './zonosStore-BXP9FvIt.js';
|
|
2
2
|
import { r as requireDebounce } from './debounce-DHj2iHA1.js';
|
|
3
3
|
import { h } from './index-_lt63o7c.js';
|
|
4
|
-
import {
|
|
5
|
-
import { t as translate } from './localization-
|
|
4
|
+
import { X as resolveTaxIdSelection, e as stripeStore } from './cart-b84n0nhi.js';
|
|
5
|
+
import { t as translate } from './localization-B5CRzthT.js';
|
|
6
6
|
import { t as taxIdLabelForCheckout, d as isCheckoutTaxIdTypeValue } from './taxIdRules-xYlx7ZXW.js';
|
|
7
7
|
|
|
8
8
|
var throttle_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as debounce } from './debounce-DWqMT4lo.js';
|
|
2
|
-
import { h as handleFetch, l as logError } from './handleFetch-
|
|
2
|
+
import { h as handleFetch, l as logError } from './handleFetch-BFVO7oAR.js';
|
|
3
3
|
|
|
4
4
|
const attributesToUpdate = {};
|
|
5
5
|
// Store debounced functions per session to ensure proper debouncing
|