@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, d as createEvent } from './index-_lt63o7c.js';
|
|
2
|
-
import { t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { t as translate, l as localizationStore } from './localization-B5CRzthT.js';
|
|
3
3
|
import { i as isTextContainsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
|
|
4
4
|
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
5
5
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
7
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-BFVO7oAR.js';
|
|
8
8
|
import './VarianceTest-BJmZPrZl.js';
|
|
9
9
|
|
|
10
10
|
const zonosAddressDisplayCss = () => `: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--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { t as throttle, r as renderTaxIdFields } from './taxIdFields-
|
|
3
|
-
import {
|
|
4
|
-
import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-
|
|
2
|
+
import { t as throttle, r as renderTaxIdFields } from './taxIdFields-BCyXnc9O.js';
|
|
3
|
+
import { W as extractName, y as stripeStorePrefetchLandedCost, e as stripeStore, u as trackConversionEvent, L as stripeStoreOnChange, h as cartStore } from './cart-b84n0nhi.js';
|
|
4
|
+
import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-B5CRzthT.js';
|
|
5
5
|
import { e as getShouldRequirePeruTaxId, z as zonosStore, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
6
|
-
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-
|
|
6
|
+
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-BFVO7oAR.js';
|
|
7
7
|
import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
|
|
8
8
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
9
9
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-
|
|
3
|
-
import {
|
|
4
|
-
import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-B_AEVONL.js';
|
|
3
|
+
import { h as cartStore } from './cart-b84n0nhi.js';
|
|
4
|
+
import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-B5CRzthT.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
6
6
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
7
|
-
import { l as logError } from './handleFetch-
|
|
7
|
+
import { l as logError } from './handleFetch-BFVO7oAR.js';
|
|
8
8
|
import './taxIdRules-xYlx7ZXW.js';
|
|
9
9
|
import './TaxId-DMIgN_sT.js';
|
|
10
10
|
import './isDarkColor-YdrG78th.js';
|
|
@@ -2,16 +2,16 @@ import { r as registerInstance, h, a as Host, g as getElement, d as createEvent
|
|
|
2
2
|
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
3
3
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
5
|
-
import {
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
7
|
-
import { l as logError } from './handleFetch-
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
5
|
+
import { e as stripeStore, u as trackConversionEvent } from './cart-b84n0nhi.js';
|
|
6
|
+
import { s as storageStore } from './localization-B5CRzthT.js';
|
|
7
|
+
import { l as logError } from './handleFetch-BFVO7oAR.js';
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-CF_oM0B6.js';
|
|
9
9
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
10
10
|
import './taxIdRules-xYlx7ZXW.js';
|
|
11
11
|
import './TaxId-DMIgN_sT.js';
|
|
12
12
|
import './isDarkColor-YdrG78th.js';
|
|
13
13
|
import './isContrastColor-CWLU13s9.js';
|
|
14
|
-
import './submitGtag-
|
|
14
|
+
import './submitGtag-C5xzFHjG.js';
|
|
15
15
|
|
|
16
16
|
const zonosCardCss = () => `:host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}`;
|
|
17
17
|
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import {
|
|
3
|
-
import { t as translate, l as localizationStore, s as storageStore, k as languages, w as getExchangeRate, x as numberFormat, h as localizationStoreOnChange } from './localization-
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { h as cartStore, N as cartStoreHasOneEligibleItem, O as isEuDapRemittance, q as cartStoreIsOrderModificationPaymentOnlySession, P as stripeStoreApplyPromoCode, Q as stripeStoreRemovePromoCode, e as stripeStore, J as stripeStoreReset, f as stripeStoreRetrievePayment, u as trackConversionEvent, R as stripeStoreResetPromoCode, S as stripeStoreMessageBasedOnStatus, T as storeCreditStore, U as storeCreditStoreReset, D as storeCreditStoreCoversFullAmount, A as isPolicyConsentRequired, I as policyConsentStore, V as stripeStoreRecordPolicyConsent, z as cartStoreNextStep, W as extractName, X as resolveTaxIdSelection, Y as stripeStoreTranslateAddressToLatin, K as cartStoreOnChange, Z as getCountryField, _ as stripeStoreAsyncAddressUpdate, $ as cartStoreUpdateSelectedShippingOption, a0 as cartStoreGetShippingTransitInfo, a1 as cartStoreGetMethod, a2 as sortServiceLevelOptionsByAmount } from './cart-b84n0nhi.js';
|
|
3
|
+
import { t as translate, l as localizationStore, s as storageStore, k as languages, w as getExchangeRate, x as numberFormat, h as localizationStoreOnChange } from './localization-B5CRzthT.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-CpeuDWx-.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.js';
|
|
6
6
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
7
7
|
import { z as zonosStore, c as createStore, d as zonosStoreOnChange, g as getZonosStoreTheme, e as getShouldRequirePeruTaxId, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
8
|
-
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-
|
|
8
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-DfEiyzw7.js';
|
|
9
9
|
import { i as isSameHostCheckoutLink } from './isSameHostCheckoutLink-BxAHnL5J.js';
|
|
10
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-
|
|
11
|
-
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode, l as logError } from './handleFetch-
|
|
10
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-CF_oM0B6.js';
|
|
11
|
+
import { h as handleFetch, s as sendErrorLog, j as jsonParse, c as safeGetItem, e as safeSetItem, b as safeRemoveItem, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode, l as logError } from './handleFetch-BFVO7oAR.js';
|
|
12
12
|
import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
|
|
13
13
|
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
14
14
|
import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
15
|
-
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-
|
|
16
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
15
|
+
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CJinx9-m.js';
|
|
16
|
+
import { p as placeTestOrder } from './placeTestOrder-BTpfyqPL.js';
|
|
17
17
|
import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
|
|
18
18
|
import { g as getContrastColor } from './getContrastColor-CfCPlW9U.js';
|
|
19
19
|
import { i as isColorVariable } from './isColorVariable-DXXUq2Lv.js';
|
|
20
|
-
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-
|
|
21
|
-
import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-
|
|
20
|
+
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-C9bMKTjz.js';
|
|
21
|
+
import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-EY10c34-.js';
|
|
22
22
|
import { c as containsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
|
|
23
23
|
import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
|
|
24
24
|
import { b as isPeruTaxIdActive, a as isPeruTaxIdType, s as stripTaxIdSeparators, p as peruTaxIdTypeFromValue, r as rfcRegex, c as curpRegex } from './taxIdRules-xYlx7ZXW.js';
|
|
25
25
|
import { b as peruTaxIdFormatError, e as euCountryCodes } from './TaxId-DMIgN_sT.js';
|
|
26
26
|
import './isContrastColor-CWLU13s9.js';
|
|
27
|
-
import './submitGtag-
|
|
27
|
+
import './submitGtag-C5xzFHjG.js';
|
|
28
28
|
import './debounce-DWqMT4lo.js';
|
|
29
29
|
import './debounce-DHj2iHA1.js';
|
|
30
30
|
import './ShortAddressCode-nJ6oI8-n.js';
|
|
@@ -1056,7 +1056,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1056
1056
|
};
|
|
1057
1057
|
this.saveOrderIdForDuplicationIssue = () => {
|
|
1058
1058
|
var _a, _b, _c, _d;
|
|
1059
|
-
const existingPlacedOrderInfo = jsonParse(
|
|
1059
|
+
const existingPlacedOrderInfo = jsonParse(safeGetItem('local', 'zonos--placed-order-info'));
|
|
1060
1060
|
const placedOrderTime = {
|
|
1061
1061
|
cartId: window.Zonos.cartId || null,
|
|
1062
1062
|
checkoutSessionId: (existingPlacedOrderInfo === null || existingPlacedOrderInfo === void 0 ? void 0 : existingPlacedOrderInfo.checkoutSessionId) ||
|
|
@@ -1066,12 +1066,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1066
1066
|
time: (existingPlacedOrderInfo === null || existingPlacedOrderInfo === void 0 ? void 0 : existingPlacedOrderInfo.time) || Date.now(),
|
|
1067
1067
|
zonosOrderNumber: ((_d = (_c = (_b = this.order) === null || _b === void 0 ? void 0 : _b.references) === null || _c === void 0 ? void 0 : _c.find(ref => ref.key === 'zonosOrderNumber')) === null || _d === void 0 ? void 0 : _d.value) || null,
|
|
1068
1068
|
};
|
|
1069
|
-
|
|
1069
|
+
safeSetItem('local', 'zonos--placed-order-info', JSON.stringify(placedOrderTime));
|
|
1070
1070
|
};
|
|
1071
1071
|
}
|
|
1072
1072
|
componentDidLoad() {
|
|
1073
1073
|
// Reset local storage for placed order info
|
|
1074
|
-
|
|
1074
|
+
safeRemoveItem('local', 'zonos--placed-order-info');
|
|
1075
1075
|
if (this.overrideNotification) {
|
|
1076
1076
|
// just show the notification and don't check any of the payment status
|
|
1077
1077
|
this.notificationType = this.overrideNotification.type;
|
|
@@ -1095,11 +1095,11 @@ const ZonosCheckoutFinish = class {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
render() {
|
|
1097
1097
|
const isTestMode = getIsTestMode();
|
|
1098
|
-
return (h(Host, { key: '
|
|
1098
|
+
return (h(Host, { key: 'd0e01955edb2c23678d39ef14a18a3b8cd0e2b28', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1099
1099
|
'--zonos--border-radius': getBorderRadius({
|
|
1100
1100
|
overrideBorderStyle: this.borderRadius,
|
|
1101
1101
|
}),
|
|
1102
|
-
} }, this.isImmediateRedirecting && (h("div", { key: '
|
|
1102
|
+
} }, this.isImmediateRedirecting && (h("div", { key: 'fdd0468df80703543b942e729a3d90dd2d9f3eee', class: "loading-wrapper" }, h("zonos-spinner", { key: '82f8cb7f62ab073a4b39bf6fca67c7e37db94f5e', size: 48 }))), !this.isLoading && !this.isImmediateRedirecting && (h("div", { key: '1ad8c9a98307a017aca8493404fb9575b9f8eaa0', class: "zonos--finish-details" }, h("div", { key: '474a8780c96fbaf2ebb2e7db7f6a6734cb630baa', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '4f8ce6ac8ca854cd400db16345433cef732ba9de', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '5ccf3054ba802e69692ba0154390c4fb24e051e6', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: '813fec3a2d1e77487935203baf92010e5d28392d',
|
|
1103
1103
|
// Only show loading spinner if it's not an error notification
|
|
1104
1104
|
loading: this.isWaitingToRedirect &&
|
|
1105
1105
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -1111,9 +1111,9 @@ const ZonosCheckoutFinish = class {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
this.closeClickHandler();
|
|
1113
1113
|
}, size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
1114
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
1114
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: 'ad9969e7e07881f872fa599e1dbfe481df03d51e', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
1115
1115
|
cartStore.step === 'finish' &&
|
|
1116
|
-
this.notificationType === 'success' && (h("div", { key: '
|
|
1116
|
+
this.notificationType === 'success' && (h("div", { key: '6b520c1b13cb036c15f798557b44f9f386a55d68', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '4ef2807d00be47ba87c4bf4223505923ab6e194a', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '7db0f58fb43aefabd168f4a82be7daeef843d7cc', onClick: () => {
|
|
1117
1117
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
1118
1118
|
this.redirectToUrl(isZonosDashboard
|
|
1119
1119
|
? '/orders/all'
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as isCountryInShippingZone, d as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, e as storageStoreSetEnabledVariantTestKeys, t as translate, h as localizationStoreOnChange, j as currencyFormat } from './localization-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreHasDomesticSessionRedirectMarker, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreMarkDomesticSessionRedirected, d as stripeStoreSaveDomesticShippingSession, e as stripeStore, i as initStripeElements, f as stripeStoreRetrievePayment, g as getCheckoutSession, h as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, p as policyConsentStoreReset, l as cartStoreResetTabItems, m as cartStoreClearCheckoutInterval, n as stripeStoreInitCheckoutSession, o as stripeStoreGetPaymentIntent, q as cartStoreIsOrderModificationPaymentOnlySession, r as stripeStoreHandleInventoryCheck, t as cartStoreStartCheckoutInterval, u as trackConversionEvent, v as getCheckoutSessionBody, w as cartStoreUpdateToErrorState, x as cartStoreSetCheckoutSession, y as stripeStorePrefetchLandedCost, z as cartStoreNextStep, A as isPolicyConsentRequired, B as stripeStoreUpdateCheckoutSessionBaseCurrency, C as storeCreditStoreApplyCredit, D as storeCreditStoreCoversFullAmount, E as validateCheckoutSession, F as storeCreditStoreCreateOrder, G as stripeStoreConfirmPayment, H as stripeStoreHandleInventoryRefund, I as policyConsentStore, J as stripeStoreReset, K as cartStoreOnChange, L as stripeStoreOnChange, M as storeCreditStoreGetEffectiveAmount } from './cart-b84n0nhi.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-CF_oM0B6.js';
|
|
4
|
+
import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as isCountryInShippingZone, d as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, e as storageStoreSetEnabledVariantTestKeys, t as translate, h as localizationStoreOnChange, j as currencyFormat } from './localization-B5CRzthT.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-BXP9FvIt.js';
|
|
6
6
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
|
|
7
|
-
import { h as handleFetch, g as getIsTestMode, j as jsonParse, l as logError,
|
|
8
|
-
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-
|
|
7
|
+
import { h as handleFetch, g as getIsTestMode, j as jsonParse, l as logError, d as getAdditionalLogMetadata, c as safeGetItem, b as safeRemoveItem, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-BFVO7oAR.js';
|
|
8
|
+
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-C9bMKTjz.js';
|
|
9
9
|
import { l as log, g as getElapsedTime, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
10
10
|
import { _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector, a as checkoutHiddenInternationalBtnSelector, g as getAbandonedCartRenewTokenValue } from './CheckoutConfig-D5SpFsQJ.js';
|
|
11
|
+
import { p as pathContainsCheckout, i as isBigCommerceNativeCheckout } from './_isBigCommerceNativeCheckout-Bb90IMVt.js';
|
|
11
12
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
12
13
|
import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
|
|
13
14
|
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
@@ -17,7 +18,7 @@ import { R as RemoveIcon } from './RemoveIcon-C2QMVeWW.js';
|
|
|
17
18
|
import './taxIdRules-xYlx7ZXW.js';
|
|
18
19
|
import './TaxId-DMIgN_sT.js';
|
|
19
20
|
import './isContrastColor-CWLU13s9.js';
|
|
20
|
-
import './submitGtag-
|
|
21
|
+
import './submitGtag-C5xzFHjG.js';
|
|
21
22
|
import './debounce-DWqMT4lo.js';
|
|
22
23
|
import './debounce-DHj2iHA1.js';
|
|
23
24
|
|
|
@@ -721,7 +722,7 @@ const ZBYPASS_ON_VALUES = ['1', 'true', 'yes'];
|
|
|
721
722
|
*/
|
|
722
723
|
let consumedZBypassQuery = null;
|
|
723
724
|
const isCheckoutPage = () => {
|
|
724
|
-
return window.location.pathname
|
|
725
|
+
return pathContainsCheckout(window.location.pathname);
|
|
725
726
|
};
|
|
726
727
|
const isAcceptedZBypassQuery = (rawValue) => {
|
|
727
728
|
if (rawValue === null) {
|
|
@@ -886,7 +887,7 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
|
|
|
886
887
|
// Only the native checkout page skips address detection. Storefront pages
|
|
887
888
|
// still run the domestic-session handoff below, and they do not consume
|
|
888
889
|
// a `zBypass` query, so the parameter can survive until `/checkout`.
|
|
889
|
-
if (window.location.pathname
|
|
890
|
+
if (pathContainsCheckout(window.location.pathname) &&
|
|
890
891
|
isBigCommerceCheckoutBypassEnabled()) {
|
|
891
892
|
return;
|
|
892
893
|
}
|
|
@@ -1139,17 +1140,35 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
|
|
|
1139
1140
|
const shippingAddressSession = stripeStoreGetDomesticShippingSession();
|
|
1140
1141
|
// append a hidden button to the body if the shipping address session is found
|
|
1141
1142
|
if (!domesticRedirectedButton && shippingAddressSession) {
|
|
1142
|
-
//
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1143
|
+
// Stripe.js is not loaded on native checkout, so nothing here can click
|
|
1144
|
+
// a hidden button or clear this session. Send the shopper to `/` once.
|
|
1145
|
+
// Saving or clearing the session drops that hop marker, so a later
|
|
1146
|
+
// leftover session still gets its own redirect. If they come back and
|
|
1147
|
+
// the session is still set, drop it and keep watching the address.
|
|
1148
|
+
if (isBigCommerceNativeCheckout()) {
|
|
1149
|
+
if (stripeStoreHasDomesticSessionRedirectMarker()) {
|
|
1150
|
+
stripeStoreCleanupDomesticShippingSession();
|
|
1151
|
+
}
|
|
1152
|
+
else {
|
|
1153
|
+
stripeStoreMarkDomesticSessionRedirected();
|
|
1154
|
+
observer.disconnect();
|
|
1155
|
+
window.location.href = buildBigcommerceRedirectUrl('/');
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
else {
|
|
1160
|
+
// create a hidden button to trigger the click event
|
|
1161
|
+
const button = document.createElement('button');
|
|
1162
|
+
button.style.display = 'none';
|
|
1163
|
+
button.id = 'zonos--domestic-redirected-checkout-button';
|
|
1164
|
+
document.body.appendChild(button);
|
|
1165
|
+
onShippingAddressSessionFound === null || onShippingAddressSessionFound === void 0 ? void 0 : onShippingAddressSessionFound(shippingAddressSession);
|
|
1166
|
+
// disconnect the observer after we found the shipping continue button
|
|
1167
|
+
observer.disconnect();
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1151
1170
|
}
|
|
1152
|
-
const isBigcommerceDomesticCheckoutPage = window.location.pathname
|
|
1171
|
+
const isBigcommerceDomesticCheckoutPage = pathContainsCheckout(window.location.pathname) &&
|
|
1153
1172
|
window.Zonos.isBigCommerce;
|
|
1154
1173
|
// Should just disconnect the observer if it's not bigcommerce domestic checkout page
|
|
1155
1174
|
if (!isBigcommerceDomesticCheckoutPage) {
|
|
@@ -2148,9 +2167,9 @@ const ZonosCheckout = class {
|
|
|
2148
2167
|
window.location.reload();
|
|
2149
2168
|
}
|
|
2150
2169
|
handleOrderDuplication() {
|
|
2151
|
-
const existingPlacedOrderInfo = jsonParse(
|
|
2170
|
+
const existingPlacedOrderInfo = jsonParse(safeGetItem('local', 'zonos--placed-order-info'));
|
|
2152
2171
|
if (!existingPlacedOrderInfo) {
|
|
2153
|
-
|
|
2172
|
+
safeRemoveItem('local', 'zonos--placed-order-info');
|
|
2154
2173
|
return;
|
|
2155
2174
|
}
|
|
2156
2175
|
const elapsed = Date.now() - existingPlacedOrderInfo.time;
|
|
@@ -2162,7 +2181,7 @@ const ZonosCheckout = class {
|
|
|
2162
2181
|
if (elapsed > overrideExpiredDuplication) {
|
|
2163
2182
|
log(`=== Existing placed order info is older than ${overrideExpiredDuplication}ms, cleaning localStorage`, 'warn');
|
|
2164
2183
|
// remove the placed order info if it's older than 5 minutes and do nothing.
|
|
2165
|
-
|
|
2184
|
+
safeRemoveItem('local', 'zonos--placed-order-info');
|
|
2166
2185
|
return;
|
|
2167
2186
|
}
|
|
2168
2187
|
// Set placed order info to show the confirm notification to the user
|
|
@@ -2701,6 +2720,13 @@ const ZonosCheckout = class {
|
|
|
2701
2720
|
if (window.Zonos) {
|
|
2702
2721
|
this.useLegacyQueryParams();
|
|
2703
2722
|
}
|
|
2723
|
+
// Native BigCommerce checkout never loads Stripe.js. The address watcher
|
|
2724
|
+
// above still has to run. Skip the poll so checkout does not wait 10s
|
|
2725
|
+
// for a Stripe instance that will not arrive, and so attachCheckout
|
|
2726
|
+
// cannot bind the store's place-order buttons.
|
|
2727
|
+
if (isBigCommerceNativeCheckout()) {
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2704
2730
|
// only initialize checkout if visitor's country is in the shipping zones.
|
|
2705
2731
|
const interval = setInterval(() => {
|
|
2706
2732
|
stripeStore.stripe = window.Zonos.stripe;
|
|
@@ -3228,7 +3254,7 @@ const ZonosCheckout = class {
|
|
|
3228
3254
|
return;
|
|
3229
3255
|
}
|
|
3230
3256
|
// Check if the page is checkout page, if so, do nothing since they're already at the right page
|
|
3231
|
-
if (window.location.pathname
|
|
3257
|
+
if (pathContainsCheckout(window.location.pathname)) {
|
|
3232
3258
|
return;
|
|
3233
3259
|
}
|
|
3234
3260
|
const shippingCountry = addressEventData.value.address.country;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import {
|
|
2
|
+
import { h as cartStore } from './cart-b84n0nhi.js';
|
|
3
3
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.js';
|
|
4
4
|
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
5
5
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
6
6
|
import { s as styles } from './styles-BTIeCf3T.js';
|
|
7
|
-
import './localization-
|
|
8
|
-
import './handleFetch-
|
|
7
|
+
import './localization-B5CRzthT.js';
|
|
8
|
+
import './handleFetch-BFVO7oAR.js';
|
|
9
9
|
import './VarianceTest-BJmZPrZl.js';
|
|
10
10
|
import './taxIdRules-xYlx7ZXW.js';
|
|
11
11
|
import './TaxId-DMIgN_sT.js';
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-
|
|
3
|
-
import {
|
|
4
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
5
|
-
import { t as translate, s as storageStore, k as languages, l as localizationStore, y as translationStoreOnChange } from './localization-
|
|
2
|
+
import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-B_AEVONL.js';
|
|
3
|
+
import { e as stripeStore, f as stripeStoreRetrievePayment, u as trackConversionEvent, R as stripeStoreResetPromoCode, J as stripeStoreReset, S as stripeStoreMessageBasedOnStatus, h as cartStore, z as cartStoreNextStep, K as cartStoreOnChange } from './cart-b84n0nhi.js';
|
|
4
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-CF_oM0B6.js';
|
|
5
|
+
import { t as translate, s as storageStore, k as languages, l as localizationStore, y as translationStoreOnChange } from './localization-B5CRzthT.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
7
|
-
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-
|
|
7
|
+
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-BFVO7oAR.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
10
10
|
import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
11
11
|
import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-DGlnuxEX.js';
|
|
12
12
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
13
|
-
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-
|
|
14
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
15
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
13
|
+
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CJinx9-m.js';
|
|
14
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-CpeuDWx-.js';
|
|
15
|
+
import { p as placeTestOrder } from './placeTestOrder-BTpfyqPL.js';
|
|
16
16
|
import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
|
|
17
17
|
import './taxIdRules-xYlx7ZXW.js';
|
|
18
18
|
import './TaxId-DMIgN_sT.js';
|
|
19
19
|
import './isDarkColor-YdrG78th.js';
|
|
20
20
|
import './isContrastColor-CWLU13s9.js';
|
|
21
|
-
import './submitGtag-
|
|
21
|
+
import './submitGtag-C5xzFHjG.js';
|
|
22
22
|
|
|
23
23
|
var RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
24
24
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, F as Fragment } from './index-_lt63o7c.js';
|
|
2
|
-
import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-
|
|
3
|
-
import {
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
5
|
-
import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-
|
|
2
|
+
import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-B_AEVONL.js';
|
|
3
|
+
import { e as stripeStore, i as initStripeElements, h as cartStore, f as stripeStoreRetrievePayment, w as cartStoreUpdateToErrorState, j as cartStoreUpdateItems, n as stripeStoreInitCheckoutSession, o as stripeStoreGetPaymentIntent, B as stripeStoreUpdateCheckoutSessionBaseCurrency, G as stripeStoreConfirmPayment, L as stripeStoreOnChange, J as stripeStoreReset, k as cartStoreReset } from './cart-b84n0nhi.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-CF_oM0B6.js';
|
|
5
|
+
import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-B5CRzthT.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
|
|
8
|
-
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-
|
|
8
|
+
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-BFVO7oAR.js';
|
|
9
9
|
import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-DGlnuxEX.js';
|
|
10
10
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
11
11
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
@@ -15,7 +15,7 @@ import './TaxId-DMIgN_sT.js';
|
|
|
15
15
|
import './isDarkColor-YdrG78th.js';
|
|
16
16
|
import './getBorderRadius-BiGd45jw.js';
|
|
17
17
|
import './isContrastColor-CWLU13s9.js';
|
|
18
|
-
import './submitGtag-
|
|
18
|
+
import './submitGtag-C5xzFHjG.js';
|
|
19
19
|
|
|
20
20
|
var ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
21
21
|
|
|
@@ -1,42 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as stripeStore } from './cart-DmJkjiDE.js';
|
|
3
|
-
import { m as getOverridenZCountry, n as isValidSelector, o as initLocalizationStore, s as storageStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-DHM91diu.js';
|
|
4
2
|
import { z as zonosStore, a as zonosStoreFontFamily, b as zonosStoreInitSetting } from './zonosStore-BXP9FvIt.js';
|
|
3
|
+
import { m as isValidSelector, n as getOverridenZCountry, o as initLocalizationStore, s as storageStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-B5CRzthT.js';
|
|
4
|
+
import { l as logError, h as handleFetch, c as safeGetItem } from './handleFetch-BFVO7oAR.js';
|
|
5
|
+
import { e as stripeStore } from './cart-b84n0nhi.js';
|
|
5
6
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-HeAZDwVW.js';
|
|
6
|
-
import { h as handleFetch, l as logError } from './handleFetch-D5GYDF-O.js';
|
|
7
7
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
8
|
-
import { e as ensureAnalyticsRelayPing } from './submitGtag-
|
|
8
|
+
import { e as ensureAnalyticsRelayPing } from './submitGtag-C5xzFHjG.js';
|
|
9
|
+
import { i as isBigCommerceNativeCheckout } from './_isBigCommerceNativeCheckout-Bb90IMVt.js';
|
|
9
10
|
import './taxIdRules-xYlx7ZXW.js';
|
|
10
11
|
import './TaxId-DMIgN_sT.js';
|
|
11
12
|
import './isDarkColor-YdrG78th.js';
|
|
12
13
|
import './getBorderRadius-BiGd45jw.js';
|
|
13
14
|
|
|
14
|
-
const getZonosSettings = async () => {
|
|
15
|
-
if (window.Zonos.cartSettings) {
|
|
16
|
-
log('Reusing cached zonos settings');
|
|
17
|
-
return {
|
|
18
|
-
errors: [],
|
|
19
|
-
json: window.Zonos.cartSettings,
|
|
20
|
-
zonosMode: window.Zonos.zonosMode,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const overrideSettings = getGenericSettingsOverride();
|
|
24
|
-
const params = new URLSearchParams();
|
|
25
|
-
if (overrideSettings.overrideShouldEnabledCustomAddress) {
|
|
26
|
-
params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
|
|
27
|
-
}
|
|
28
|
-
const zCountry = getOverridenZCountry();
|
|
29
|
-
if (zCountry) {
|
|
30
|
-
params.set('zCountry', zCountry);
|
|
31
|
-
}
|
|
32
|
-
const { errors, json, zonosMode } = await handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
|
|
33
|
-
if (errors.length) {
|
|
34
|
-
logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
|
|
35
|
-
return { errors, json: null, zonosMode };
|
|
36
|
-
}
|
|
37
|
-
return { errors: [], json, zonosMode };
|
|
38
|
-
};
|
|
39
|
-
|
|
40
15
|
const injectCheckoutElement$2 = () => {
|
|
41
16
|
// append checkout component if doesn't exist
|
|
42
17
|
const checkoutElement = document.querySelector('zonos-checkout');
|
|
@@ -67,6 +42,43 @@ const initCheckout = (config) => {
|
|
|
67
42
|
injectCheckoutElement$2();
|
|
68
43
|
};
|
|
69
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Mount `<zonos-checkout>` without a Stripe instance.
|
|
47
|
+
*
|
|
48
|
+
* Native BigCommerce checkout must not receive Stripe.js. Creating the
|
|
49
|
+
* element still runs `zonos-checkout.init()`, which registers the
|
|
50
|
+
* international-address watcher and then returns before the Stripe poll.
|
|
51
|
+
*/
|
|
52
|
+
const mountCheckoutWithoutStripe = () => {
|
|
53
|
+
initCheckout(zonosStore.checkoutSettings);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const getZonosSettings = async () => {
|
|
57
|
+
if (window.Zonos.cartSettings) {
|
|
58
|
+
log('Reusing cached zonos settings');
|
|
59
|
+
return {
|
|
60
|
+
errors: [],
|
|
61
|
+
json: window.Zonos.cartSettings,
|
|
62
|
+
zonosMode: window.Zonos.zonosMode,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const overrideSettings = getGenericSettingsOverride();
|
|
66
|
+
const params = new URLSearchParams();
|
|
67
|
+
if (overrideSettings.overrideShouldEnabledCustomAddress) {
|
|
68
|
+
params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
|
|
69
|
+
}
|
|
70
|
+
const zCountry = getOverridenZCountry();
|
|
71
|
+
if (zCountry) {
|
|
72
|
+
params.set('zCountry', zCountry);
|
|
73
|
+
}
|
|
74
|
+
const { errors, json, zonosMode } = await handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
|
|
75
|
+
if (errors.length) {
|
|
76
|
+
logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
|
|
77
|
+
return { errors, json: null, zonosMode };
|
|
78
|
+
}
|
|
79
|
+
return { errors: [], json, zonosMode };
|
|
80
|
+
};
|
|
81
|
+
|
|
70
82
|
const injectCheckoutElement$1 = () => {
|
|
71
83
|
// append checkout component if doesn't exist
|
|
72
84
|
const collectElement = document.querySelector('zonos-collect');
|
|
@@ -777,11 +789,17 @@ const ZonosController = class {
|
|
|
777
789
|
log('Checkout failed to load -- missing publishable key', 'warn');
|
|
778
790
|
return;
|
|
779
791
|
}
|
|
792
|
+
// `_loadStripe.ts` is the only module that injects Stripe.js. This
|
|
793
|
+
// method only chooses whether to ask for it or to mount checkout
|
|
794
|
+
// without it.
|
|
795
|
+
const nativeBigCommerceCheckout = isBigCommerceNativeCheckout();
|
|
780
796
|
if (window.Zonos.isCollect || window.Zonos.isInvoice) {
|
|
781
|
-
//
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
797
|
+
// Collect and Invoice off native checkout still ask for Stripe.
|
|
798
|
+
if (!nativeBigCommerceCheckout) {
|
|
799
|
+
this.stripeInitEvent.emit({
|
|
800
|
+
publishableKey: publishableKey.token,
|
|
801
|
+
});
|
|
802
|
+
}
|
|
785
803
|
// init google places service
|
|
786
804
|
void this.initGooglePlacesService(json);
|
|
787
805
|
return;
|
|
@@ -803,16 +821,23 @@ const ZonosController = class {
|
|
|
803
821
|
// Checkout also runs without merchant cart callbacks when a cart is
|
|
804
822
|
// prefetched (e.g. `tempCartUUID` -> `cartData`) or when resuming a
|
|
805
823
|
// payment via the Stripe client secret. Stripe must still load for those.
|
|
806
|
-
const clientSecret = new URL(window.location.href).searchParams.get('payment_intent_client_secret') ||
|
|
824
|
+
const clientSecret = new URL(window.location.href).searchParams.get('payment_intent_client_secret') || safeGetItem('session', 'zonos--client-secret');
|
|
807
825
|
const hasPrefetchedCheckoutContext = !!(window.Zonos.cartId && window.Zonos.cartData) || !!clientSecret;
|
|
808
826
|
if (!hasCartCallback && !hasPrefetchedCheckoutContext) {
|
|
809
827
|
log(`Skip loading Stripe because no cart callback (buildCartDetail/createCartId), prefetched cart, or payment client secret is present`, 'warn');
|
|
810
828
|
return;
|
|
811
829
|
}
|
|
812
|
-
//
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
830
|
+
// Cart callbacks, a prefetched cart, and a client secret do not override
|
|
831
|
+
// the native BigCommerce checkout skip. Mount checkout anyway so the
|
|
832
|
+
// international-address watcher runs, without Stripe.js.
|
|
833
|
+
if (nativeBigCommerceCheckout) {
|
|
834
|
+
mountCheckoutWithoutStripe();
|
|
835
|
+
}
|
|
836
|
+
else {
|
|
837
|
+
this.stripeInitEvent.emit({
|
|
838
|
+
publishableKey: publishableKey.token,
|
|
839
|
+
});
|
|
840
|
+
}
|
|
816
841
|
// init google places service
|
|
817
842
|
void this.initGooglePlacesService(json);
|
|
818
843
|
})();
|
|
@@ -868,7 +893,7 @@ const ZonosController = class {
|
|
|
868
893
|
zonosStore.organizationName = organizationName;
|
|
869
894
|
}
|
|
870
895
|
render() {
|
|
871
|
-
return h(Host, { key: '
|
|
896
|
+
return h(Host, { key: '0d8bcffcb7e22891c082a4916b00b87bdf5fc2e8', class: "zonos--elements" });
|
|
872
897
|
}
|
|
873
898
|
};
|
|
874
899
|
ZonosController.style = zonosControllerCss();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { l as localizationStore } from './localization-
|
|
2
|
+
import { l as localizationStore } from './localization-B5CRzthT.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
4
4
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-BFVO7oAR.js';
|
|
6
6
|
import './VarianceTest-BJmZPrZl.js';
|
|
7
7
|
|
|
8
8
|
const zonosCountryFlagCss = () => `: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 .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { d as localizationStoreUpdateSelectedCountryCode, l as localizationStore, t as translate, k as languages } from './localization-
|
|
2
|
+
import { d as localizationStoreUpdateSelectedCountryCode, l as localizationStore, t as translate, k as languages } from './localization-B5CRzthT.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-BcMPqGl0.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
|
|
6
|
-
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-
|
|
6
|
+
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CJinx9-m.js';
|
|
7
7
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
8
|
-
import './handleFetch-
|
|
8
|
+
import './handleFetch-BFVO7oAR.js';
|
|
9
9
|
import './VarianceTest-BJmZPrZl.js';
|
|
10
10
|
import './isSameHostCheckoutLink-BxAHnL5J.js';
|
|
11
11
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { l as localizationStore, t as translate, j as currencyFormat } from './localization-
|
|
2
|
+
import { l as localizationStore, t as translate, j as currencyFormat } from './localization-B5CRzthT.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
4
4
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-BcMPqGl0.js';
|
|
6
|
-
import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-
|
|
6
|
+
import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-DfEiyzw7.js';
|
|
7
7
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-DAscqB23.js';
|
|
8
8
|
import { e as euCountryCodes } from './TaxId-DMIgN_sT.js';
|
|
9
|
-
import './handleFetch-
|
|
9
|
+
import './handleFetch-BFVO7oAR.js';
|
|
10
10
|
import './VarianceTest-BJmZPrZl.js';
|
|
11
11
|
import './isSameHostCheckoutLink-BxAHnL5J.js';
|
|
12
12
|
|