@zonos/elements 1.5.2 → 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-BJpqPdFU.js → cart-C39TMSgB.js} +14 -0
- package/dist/cjs/{collect-CyUttsvB.js → collect-lF9DenLk.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-DEbNbRAZ.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
- package/dist/cjs/index.cjs.js +61 -42
- package/dist/cjs/{invoice-DzRkkpLu.js → invoice-BD3pCr8P.js} +1 -1
- package/dist/cjs/{paypal-DCSqbdjW.js → paypal-Bd1qmwiv.js} +1 -1
- package/dist/cjs/{placeTestOrder-Bkip4PUT.js → placeTestOrder-BMQRvX2q.js} +1 -1
- package/dist/cjs/{renderCheckoutCurrency-BDvEZ3Hv.js → renderCheckoutCurrency-DE2p8CT8.js} +1 -1
- package/dist/cjs/{taxIdFields-e4OCgr8K.js → taxIdFields-BKbk2bhi.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +4 -4
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +5 -5
- package/dist/cjs/zonos-checkout.cjs.entry.js +41 -15
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +5 -5
- package/dist/cjs/zonos-collect.cjs.entry.js +3 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +63 -38
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice.cjs.entry.js +3 -3
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +10 -1
- package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
- package/dist/collection/components/main/zonos-controller.js +24 -9
- package/dist/collection/components/store/checkout/stripe.js +13 -1
- package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
- package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
- package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
- package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
- package/dist/collection/scripts/_loadStripe.js +15 -4
- package/dist/collection/scripts/_zonosBase.js +40 -31
- package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
- package/dist/esm/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +14 -2
- package/dist/esm/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +3 -3
- package/dist/esm/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
- package/dist/esm/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm/index.js +61 -42
- package/dist/esm/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +2 -2
- package/dist/esm/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
- package/dist/esm/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +2 -2
- package/dist/esm/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +5 -5
- package/dist/esm/zonos-address-display_2.entry.js +1 -1
- package/dist/esm/zonos-address_4.entry.js +3 -3
- package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +42 -16
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +63 -38
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm-es5/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
- package/dist/esm-es5/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +9 -9
- package/dist/esm-es5/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +2 -2
- package/dist/esm-es5/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm-es5/index.js +76 -65
- package/dist/esm-es5/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +1 -1
- package/dist/esm-es5/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
- package/dist/esm-es5/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +4 -4
- package/dist/esm-es5/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm-es5/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
- 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 +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +20 -9
- 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 +6 -6
- package/dist/esm-es5/zonos-controller.entry.js +22 -13
- 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 +1 -1
- 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 +16 -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/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/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-08b01c96.entry.js → p-02faff47.entry.js} +1 -1
- package/dist/zonos-elements/{p-573a4e7c.system.entry.js → p-0c68cbbb.system.entry.js} +6 -6
- package/dist/zonos-elements/{p-68325c5a.system.entry.js → p-1cd2d097.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-af741506.entry.js → p-255e411a.entry.js} +1 -1
- package/dist/zonos-elements/{p-dJcbnNlE.system.js → p-2c_UqKJL.system.js} +2 -2
- package/dist/zonos-elements/{p-BUfCTQXY.system.js → p-3AUMK-5E.system.js} +113 -113
- package/dist/zonos-elements/{p-dd003161.entry.js → p-3ee87d8b.entry.js} +1 -1
- package/dist/zonos-elements/{p-8f9f859f.system.entry.js → p-42fa5694.system.entry.js} +5 -5
- package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
- package/dist/zonos-elements/{p-ebc7ea54.system.entry.js → p-4ce4c49f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b3668a4.system.entry.js → p-5622fc50.system.entry.js} +263 -252
- package/dist/zonos-elements/{p-3a506614.system.entry.js → p-59457fd9.system.entry.js} +71 -62
- package/dist/zonos-elements/{p-7fe83919.entry.js → p-66398133.entry.js} +1 -1
- package/dist/zonos-elements/{p-9df31243.system.entry.js → p-674323ac.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-97729873.entry.js → p-71d9a5b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-30bf4700.system.entry.js → p-81780f8f.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-1986cc37.entry.js → p-821b83a2.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a296dbc.system.entry.js → p-877a82d2.system.entry.js} +61 -61
- package/dist/zonos-elements/p-8daec112.entry.js +1 -0
- package/dist/zonos-elements/{p-150047b3.system.entry.js → p-93bc75fd.system.entry.js} +19 -19
- package/dist/zonos-elements/{p-b540c636.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4b65f192.entry.js → p-9a4947a5.entry.js} +1 -1
- package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
- package/dist/zonos-elements/{p-D4xpkSsK.js → p-BIJM2Kj-.js} +1 -1
- package/dist/zonos-elements/{p-D-Lnf8mS.system.js → p-BOh4ifdL.system.js} +2 -2
- 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-DC1OPJDq.system.js → p-BvoPE_nb.system.js} +1 -1
- package/dist/zonos-elements/{p-C5fs3rIR.js → p-C3E55OqH.js} +1 -1
- package/dist/zonos-elements/{p-BnQyot7Y.system.js → p-C3gF3UV5.system.js} +29 -29
- package/dist/zonos-elements/{p-BKUlQxBd.system.js → p-CD2ahEZn.system.js} +1 -1
- package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
- package/dist/zonos-elements/{p-Cp1IAJvW.system.js → p-CEV0O_IQ.system.js} +4 -4
- package/dist/zonos-elements/{p-yv7ekcdG.system.js → p-CZ-uYiCo.system.js} +2 -2
- package/dist/zonos-elements/{p-CP7KnfR3.system.js → p-Cn2xE-9t.system.js} +79 -68
- package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
- package/dist/zonos-elements/{p-Dv5a-V6w.system.js → p-Cw_Qnyow.system.js} +1 -1
- package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
- package/dist/zonos-elements/{p-CVRbGFV3.js → p-D9OPKqLg.js} +1 -1
- package/dist/zonos-elements/{p-DrbN3rPL.js → p-Df62LRNs.js} +2 -2
- package/dist/zonos-elements/{p-DKnphvmJ.js → p-Lsqrpzc5.js} +1 -1
- package/dist/zonos-elements/{p-DrS-0mk7.system.js → p-YQFbWtjn.system.js} +1 -1
- package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
- package/dist/zonos-elements/{p-bb1b414a.system.entry.js → p-a6bb296c.system.entry.js} +6 -6
- package/dist/zonos-elements/{p-13015d34.system.entry.js → p-abb85879.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-383343c7.entry.js → p-b8653024.entry.js} +1 -1
- package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
- package/dist/zonos-elements/{p-96b250d8.system.entry.js → p-be067e12.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-Cl5yV0ak.js → p-bmrOH9oh.js} +1 -1
- package/dist/zonos-elements/{p-71d29603.entry.js → p-c185bc23.entry.js} +1 -1
- package/dist/zonos-elements/{p-13d5b2f9.entry.js → p-c6e78de2.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3c147d2.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-0909ef77.entry.js → p-cbb96382.entry.js} +1 -1
- package/dist/zonos-elements/{p-6db7317a.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-e43470f7.system.entry.js → p-df240119.system.entry.js} +17 -17
- package/dist/zonos-elements/{p-f2ed52bc.system.entry.js → p-e16e4db6.system.entry.js} +15 -15
- package/dist/zonos-elements/{p-7214c953.system.entry.js → p-eb016dd8.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-709d1561.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e374aaa4.entry.js → p-ed8a7a7f.entry.js} +1 -1
- package/dist/zonos-elements/{p-3466bcba.entry.js → p-ef932fda.entry.js} +1 -1
- package/dist/zonos-elements/{p-bfa9e32a.entry.js → p-f792ba5f.entry.js} +1 -1
- package/dist/zonos-elements/{p-aK18R41t.js → p-fZcKMzE-.js} +1 -1
- package/dist/zonos-elements/{p-C-zdj7MK.js → p-fdritVtG.js} +1 -1
- package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
- package/dist/zonos-elements/{p-CMneHjck.system.js → p-v8IEjQ2z.system.js} +10 -10
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +10 -10
- package/dist/zonos-elements/p-43c0ebe9.entry.js +0 -1
- package/dist/zonos-elements/p-8ac26831.entry.js +0 -1
- package/dist/zonos-elements/p-BI6VAB5B.js +0 -1
- package/dist/zonos-elements/p-BJ_kE5rM.js +0 -1
- package/dist/zonos-elements/p-DATNIakn.js +0 -1
- package/dist/zonos-elements/p-af4ad54b.entry.js +0 -1
- package/dist/zonos-elements/p-bac94956.entry.js +0 -1
- package/dist/zonos-elements/p-cf6bf7a4.entry.js +0 -1
- package/dist/zonos-elements/p-db40b9c3.entry.js +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { g as getGenericSettingsOverride, I as IframeService } from './getGeneri
|
|
|
4
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';
|
|
5
5
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
6
6
|
export { a as availableTestKeys } from './VarianceTest-BJmZPrZl.js';
|
|
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';
|
|
@@ -223,7 +224,7 @@ const getZonosQaUrl = () => {
|
|
|
223
224
|
return null;
|
|
224
225
|
}
|
|
225
226
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
226
|
-
const cdnUrl = "https://v1.5.
|
|
227
|
+
const cdnUrl = "https://v1.5.3.js.zonos.com";
|
|
227
228
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
228
229
|
if (!qaUrl &&
|
|
229
230
|
(cdnUrl.includes('test.') ||
|
|
@@ -399,13 +400,23 @@ const hasCheckoutCartCallback = () => {
|
|
|
399
400
|
(typeof ((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.createCartId) === 'function' ||
|
|
400
401
|
typeof ((_b = window.Zonos) === null || _b === void 0 ? void 0 : _b.buildCartDetail) === 'function');
|
|
401
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
|
+
};
|
|
402
414
|
const stripePromise = Promise.resolve().then(() => {
|
|
403
|
-
//
|
|
404
|
-
// (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.
|
|
405
416
|
if (!hasCheckoutCartCallback()) {
|
|
406
417
|
return null;
|
|
407
418
|
}
|
|
408
|
-
return
|
|
419
|
+
return loadStripeScript();
|
|
409
420
|
});
|
|
410
421
|
let loadCalled = false;
|
|
411
422
|
stripePromise.catch((err) => {
|
|
@@ -421,7 +432,7 @@ const zonosLoadStripe = async (...args) => {
|
|
|
421
432
|
// Fall back to loading Stripe on demand if the eager preload was skipped
|
|
422
433
|
// (callbacks set after the microtask, or Collect/Invoice flows that don't
|
|
423
434
|
// use cart callbacks). `zonosStripeLoadScript` is idempotent.
|
|
424
|
-
const maybeStripe = (_a = (await stripePromise)) !== null && _a !== void 0 ? _a : (await
|
|
435
|
+
const maybeStripe = (_a = (await stripePromise)) !== null && _a !== void 0 ? _a : (await loadStripeScript());
|
|
425
436
|
return initStripe(maybeStripe, args, startTime);
|
|
426
437
|
};
|
|
427
438
|
|
|
@@ -512,10 +523,10 @@ const zonosLoadUrl = (() => {
|
|
|
512
523
|
return null;
|
|
513
524
|
})();
|
|
514
525
|
const startLoadTime = Date.now();
|
|
515
|
-
const ZONOS_URL = "https://v1.5.
|
|
516
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.5.
|
|
517
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.5.
|
|
518
|
-
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";
|
|
519
530
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
520
531
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
521
532
|
class Zonos {
|
|
@@ -533,7 +544,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
533
544
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
534
545
|
: null;
|
|
535
546
|
Zonos.isBigCommerce = false;
|
|
536
|
-
Zonos.releaseDate = "
|
|
547
|
+
Zonos.releaseDate = "1794098254078";
|
|
537
548
|
Zonos.isLegacyCheckout = false;
|
|
538
549
|
Zonos.googleAnalyticId = null;
|
|
539
550
|
Zonos.googleAnalyticReady = false;
|
|
@@ -558,7 +569,7 @@ Zonos.isNpm = true;
|
|
|
558
569
|
Zonos.zonosQaUrl = null;
|
|
559
570
|
Zonos.zonosQaUrlApi = null;
|
|
560
571
|
Zonos.trackEventLogs = [];
|
|
561
|
-
Zonos.version = `v${"1.5.
|
|
572
|
+
Zonos.version = `v${"1.5.3"}`;
|
|
562
573
|
Zonos.modeAlerted = false;
|
|
563
574
|
Zonos.cartData = null;
|
|
564
575
|
Zonos.paypal = null;
|
|
@@ -581,6 +592,9 @@ Zonos.init = async (params) => {
|
|
|
581
592
|
// do nothing if zonos is already initialized
|
|
582
593
|
return;
|
|
583
594
|
}
|
|
595
|
+
// Host detection has already copied `isBigCommerce`. Settle the
|
|
596
|
+
// native-checkout answer once, before buttons or Stripe are touched.
|
|
597
|
+
markBigCommerceHostChecked();
|
|
584
598
|
log(`====== ZONOS DEBUG MODE: on (${_a.version}) ======`);
|
|
585
599
|
_a.zonosApiKey = zonosApiKey;
|
|
586
600
|
_a.storeId = storeId;
|
|
@@ -837,47 +851,52 @@ Zonos.injectController = ({ config, }) => {
|
|
|
837
851
|
if (document.querySelector('zonos-controller')) {
|
|
838
852
|
return;
|
|
839
853
|
}
|
|
840
|
-
//
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
placeOrderButtonSelector
|
|
847
|
-
});
|
|
848
|
-
// create a mutation observer to see if any new elements that match our selector is added to the DOM
|
|
849
|
-
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;
|
|
850
861
|
_a.disablePlaceOrderButtons({
|
|
851
862
|
config,
|
|
852
863
|
disable: true,
|
|
853
864
|
placeOrderButtonSelector,
|
|
854
865
|
});
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
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;
|
|
871
882
|
_a.disablePlaceOrderButtons({
|
|
872
883
|
config,
|
|
873
884
|
disable: true,
|
|
874
885
|
placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
|
|
875
886
|
});
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
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
|
+
}
|
|
881
900
|
}
|
|
882
901
|
const zonosController = document.createElement('zonos-controller');
|
|
883
902
|
zonosController.config = config;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
2
|
-
import {
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
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
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
|
|
|
@@ -19542,4 +19542,4 @@ const initLocalizationStore = async () => {
|
|
|
19542
19542
|
}
|
|
19543
19543
|
};
|
|
19544
19544
|
|
|
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,
|
|
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,6 +1,6 @@
|
|
|
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-
|
|
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
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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { h as cartStore } from './cart-b84n0nhi.js';
|
|
2
|
+
import { s as storageStore } from './localization-B5CRzthT.js';
|
|
3
3
|
import { l as logError, h as handleFetch } from './handleFetch-BFVO7oAR.js';
|
|
4
4
|
|
|
5
5
|
const placeTestOrder = async () => {
|
|
@@ -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,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;
|