@zonos/elements 1.3.258 → 1.3.260
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-c618fd5b.js → cart-d08c87e2.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-58a9f15d.js → hasInclusivePrice-c781c336.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-c9cb6683.js → invoice-e64f97c6.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-93a5194a.js → isCollectMobileTablet-9675485f.js} +2 -2
- package/dist/cjs/{localization-5994d4de.js → localization-a7fac4b4.js} +3 -0
- package/dist/cjs/{paypal-091e089e.js → paypal-73a542cb.js} +2 -2
- package/dist/cjs/{placeTestOrder-b07f8edb.js → placeTestOrder-aefd31e8.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-7876a1d4.js → renderCheckoutCurrency-a374741a.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +442 -17
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +72 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +6 -6
- package/dist/collection/components/store/hello/localization.js +3 -0
- package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +6 -0
- package/dist/collection/components/utils/checkout/buildBigcommerceLoginUrl.js +65 -0
- package/dist/collection/components/utils/checkout/checkBigCommerceBypassCustomerGroup.js +12 -7
- package/dist/collection/components/utils/checkout/checkBigCommerceForceLogin.js +116 -0
- package/dist/collection/components/utils/checkout/fetchBigCommerceCheckoutSettings.js +92 -0
- package/dist/collection/components/utils/checkout/fixBigCommerceLoginCreateAccountLink.js +53 -0
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +40 -7
- package/dist/collection/types/checkout/api/BigCommerceCheckoutSettings.js +1 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +39 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/{cart-76fb528f.js → cart-c490d252.js} +1 -1
- package/dist/esm/{hasInclusivePrice-275b1048.js → hasInclusivePrice-7a0ce66a.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-9efcb941.js → invoice-3ea5715b.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-a7e5b909.js → isCollectMobileTablet-0dcbd45a.js} +2 -2
- package/dist/esm/{localization-76ce3e29.js → localization-542dbe20.js} +3 -0
- package/dist/esm/{paypal-75c5c66d.js → paypal-38ca5d21.js} +2 -2
- package/dist/esm/{placeTestOrder-22633bf2.js → placeTestOrder-d7001709.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-d27b0082.js → renderCheckoutCurrency-75f1bba3.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +443 -18
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +8 -8
- 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 +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-store-credit.entry.js +3 -3
- package/dist/esm-es5/{cart-76fb528f.js → cart-c490d252.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-275b1048.js → hasInclusivePrice-7a0ce66a.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-9efcb941.js → invoice-3ea5715b.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-a7e5b909.js → isCollectMobileTablet-0dcbd45a.js} +1 -1
- package/dist/esm-es5/{localization-76ce3e29.js → localization-542dbe20.js} +1 -1
- package/dist/esm-es5/{paypal-75c5c66d.js → paypal-38ca5d21.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-22633bf2.js → placeTestOrder-d7001709.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-d27b0082.js → renderCheckoutCurrency-75f1bba3.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.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 +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- 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-store-credit.entry.js +1 -1
- package/dist/scripts/index.d.ts +21 -5
- 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/checkout/zonos-checkout/zonos-checkout.d.ts +16 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +6 -0
- package/dist/types/components/utils/checkout/buildBigcommerceLoginUrl.d.ts +27 -0
- package/dist/types/components/utils/checkout/checkBigCommerceBypassCustomerGroup.d.ts +12 -0
- package/dist/types/components/utils/checkout/checkBigCommerceForceLogin.d.ts +50 -0
- package/dist/types/components/utils/checkout/fetchBigCommerceCheckoutSettings.d.ts +18 -0
- package/dist/types/components/utils/checkout/fixBigCommerceLoginCreateAccountLink.d.ts +17 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +6 -5
- package/dist/types/types/checkout/CheckoutConfig.d.ts +9 -0
- package/dist/types/types/checkout/api/BigCommerceCheckoutSettings.d.ts +12 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +58 -9
- package/dist/types/types/generated/graphql.internal.types.ts +69 -9
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-6d36b307.system.js → p-0699931c.system.js} +1 -1
- package/dist/zonos-elements/{p-29d16ad0.entry.js → p-0ad75f38.entry.js} +1 -1
- package/dist/zonos-elements/{p-e6168c82.system.js → p-0ec4e307.system.js} +1 -1
- package/dist/zonos-elements/p-0f89fc76.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4b138a6e.system.entry.js → p-0fc5a2cc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2ec799e4.system.js → p-196423ad.system.js} +1 -1
- package/dist/zonos-elements/{p-567abb43.system.js → p-20263609.system.js} +1 -1
- package/dist/zonos-elements/{p-a89096d6.system.entry.js → p-20842d8c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bdb3f7a2.js → p-24407504.js} +2 -2
- package/dist/zonos-elements/{p-1523f6a8.system.js → p-248bdea2.system.js} +1 -1
- package/dist/zonos-elements/{p-a4b6865d.system.entry.js → p-266a86d4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bba9af4c.entry.js → p-27f01d76.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-b34f1336.system.entry.js → p-2ac0fcb8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5fa3d1c8.system.entry.js → p-2c9714e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-edb0306c.system.entry.js → p-365d4481.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7157a5a3.entry.js → p-3a198386.entry.js} +1 -1
- package/dist/zonos-elements/{p-1e9e284e.system.entry.js → p-3e7dbe9c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-99d92a84.entry.js → p-4416fe27.entry.js} +1 -1
- package/dist/zonos-elements/{p-e8a68ce7.system.js → p-47bde0ba.system.js} +1 -1
- package/dist/zonos-elements/p-4aa5f5db.entry.js +1 -0
- package/dist/zonos-elements/{p-afdb4445.entry.js → p-5be87ae0.entry.js} +1 -1
- package/dist/zonos-elements/p-6b7beb44.system.js +1 -0
- package/dist/zonos-elements/{p-e5f48239.system.entry.js → p-70e2f9f9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ee8496e.js → p-7158a18b.js} +1 -1
- package/dist/zonos-elements/{p-867d05d7.system.js → p-720ae42c.system.js} +1 -1
- package/dist/zonos-elements/p-721fadd5.js +1 -0
- package/dist/zonos-elements/{p-24f41959.js → p-72adb40d.js} +1 -1
- package/dist/zonos-elements/p-7c5c5318.js +1 -0
- package/dist/zonos-elements/{p-9c97671b.system.entry.js → p-874ccf1c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a9741f7.entry.js → p-87eef44c.entry.js} +1 -1
- package/dist/zonos-elements/{p-6cf8fe49.system.entry.js → p-8d0bca3a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9a9c9441.system.entry.js → p-8d52ac69.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-791e13e7.entry.js → p-8dae0f0b.entry.js} +1 -1
- package/dist/zonos-elements/{p-6e50f6f5.entry.js → p-8df3c6a0.entry.js} +1 -1
- package/dist/zonos-elements/{p-5182e492.entry.js → p-9dc671f4.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d854a75.entry.js → p-a3020bc9.entry.js} +1 -1
- package/dist/zonos-elements/{p-a18adf27.js → p-a75b8ad7.js} +1 -1
- package/dist/zonos-elements/{p-bd938f80.js → p-a8bb461c.js} +1 -1
- package/dist/zonos-elements/{p-2b2b1c8c.system.entry.js → p-b21cf539.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ebb59a3.js → p-b5223840.js} +1 -1
- package/dist/zonos-elements/{p-10da499b.system.entry.js → p-bf4d2299.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-425f747b.entry.js → p-c09540bc.entry.js} +1 -1
- package/dist/zonos-elements/{p-1661f938.entry.js → p-c308c5bc.entry.js} +1 -1
- package/dist/zonos-elements/{p-9460919d.entry.js → p-cdf99051.entry.js} +1 -1
- package/dist/zonos-elements/{p-788c6839.entry.js → p-d12fa775.entry.js} +1 -1
- package/dist/zonos-elements/{p-055c8d6c.system.entry.js → p-d2ef0416.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-afca19b0.system.entry.js → p-d4f9e464.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3600280d.system.js → p-d7a9be55.system.js} +1 -1
- package/dist/zonos-elements/{p-5262f6e8.entry.js → p-da5a35a6.entry.js} +1 -1
- package/dist/zonos-elements/{p-8585c761.system.entry.js → p-df240101.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-14d35979.system.entry.js → p-df578aa9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cff66a7.entry.js → p-e684e68f.entry.js} +1 -1
- package/dist/zonos-elements/{p-a0f6910c.entry.js → p-f2a74e43.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-50b32476.system.entry.js +0 -1
- package/dist/zonos-elements/p-733f118d.entry.js +0 -1
- package/dist/zonos-elements/p-868a8667.js +0 -1
- package/dist/zonos-elements/p-c85e988d.system.js +0 -1
- package/dist/zonos-elements/p-ed03b7fd.js +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { zonosStore } from "../../store/zonosStore";
|
|
2
|
+
import { handleFetch } from "../handleFetch";
|
|
3
|
+
import { jsonParse } from "../jsonParse";
|
|
4
|
+
import { log } from "../logging/log";
|
|
5
|
+
const EMPTY = { guestCheckoutType: null };
|
|
6
|
+
/**
|
|
7
|
+
* BigCommerce's `/checkouts/settings` values almost never change after a
|
|
8
|
+
* merchant's initial setup, so we persist the result in `localStorage` and
|
|
9
|
+
* reuse it across page loads up to this TTL. Short enough that if the
|
|
10
|
+
* merchant flips `guest_checkout_type` the change still propagates within
|
|
11
|
+
* an hour.
|
|
12
|
+
*/
|
|
13
|
+
const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
14
|
+
const CACHE_KEY = 'zonos--bc-checkout-settings';
|
|
15
|
+
const readFromCache = (storeHash) => {
|
|
16
|
+
try {
|
|
17
|
+
const raw = window.localStorage.getItem(CACHE_KEY);
|
|
18
|
+
if (!raw) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const parsed = jsonParse(raw);
|
|
22
|
+
if (!parsed) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
// Different store on the same origin (e.g. zonosQaUrl preview) — ignore.
|
|
26
|
+
if (parsed.storeHash !== storeHash) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
if (parsed.expiresAt < Date.now()) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return { guestCheckoutType: parsed.guestCheckoutType };
|
|
33
|
+
}
|
|
34
|
+
catch (_a) {
|
|
35
|
+
// localStorage access can throw in blocked-storage contexts (Safari
|
|
36
|
+
// private mode, cross-origin iframes) — treat as a cache miss so the
|
|
37
|
+
// network fallback runs.
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const writeToCache = (storeHash, result) => {
|
|
42
|
+
try {
|
|
43
|
+
const payload = {
|
|
44
|
+
expiresAt: Date.now() + CACHE_TTL_MS,
|
|
45
|
+
guestCheckoutType: result.guestCheckoutType,
|
|
46
|
+
storeHash,
|
|
47
|
+
};
|
|
48
|
+
window.localStorage.setItem(CACHE_KEY, JSON.stringify(payload));
|
|
49
|
+
}
|
|
50
|
+
catch (_a) {
|
|
51
|
+
// localStorage can be disabled / quota-exceeded in some browser contexts
|
|
52
|
+
// (private mode, cross-origin iframes) — drop silently since caching
|
|
53
|
+
// is only an optimization.
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Fetch the merchant's BigCommerce `/checkouts/settings` (via the demo-app
|
|
58
|
+
* proxy) so we can inspect `guest_checkout_type` from the storefront. The
|
|
59
|
+
* Store API is auth-gated, which is why we don't call it directly.
|
|
60
|
+
*
|
|
61
|
+
* Results are cached in `localStorage` for `CACHE_TTL_MS` so navigations
|
|
62
|
+
* inside the same store don't all pay the proxy round trip — the setting
|
|
63
|
+
* is merchant-level and rarely changes.
|
|
64
|
+
*/
|
|
65
|
+
export const fetchBigCommerceCheckoutSettings = async () => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (!window.Zonos.isBigCommerce) {
|
|
68
|
+
return EMPTY;
|
|
69
|
+
}
|
|
70
|
+
const storeHash = (_a = zonosStore.checkoutSettings.bigCommerceConfig) === null || _a === void 0 ? void 0 : _a.storeHash;
|
|
71
|
+
if (!storeHash) {
|
|
72
|
+
log('BigCommerce checkout settings: no storeHash provided — skipping fetch', 'info');
|
|
73
|
+
return EMPTY;
|
|
74
|
+
}
|
|
75
|
+
const cached = readFromCache(storeHash);
|
|
76
|
+
if (cached) {
|
|
77
|
+
return cached;
|
|
78
|
+
}
|
|
79
|
+
const { errors, json } = await handleFetch('/api/bigcommerce/checkout-settings', {
|
|
80
|
+
body: { storeHash },
|
|
81
|
+
method: 'POST',
|
|
82
|
+
});
|
|
83
|
+
if (errors.length || !json) {
|
|
84
|
+
log('BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior', 'info');
|
|
85
|
+
return EMPTY;
|
|
86
|
+
}
|
|
87
|
+
const result = {
|
|
88
|
+
guestCheckoutType: json.guestCheckoutType,
|
|
89
|
+
};
|
|
90
|
+
writeToCache(storeHash, result);
|
|
91
|
+
return result;
|
|
92
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { buildBigcommerceLoginUrl } from "./buildBigcommerceLoginUrl";
|
|
2
|
+
/**
|
|
3
|
+
* Mark we've already rewritten a given anchor so the MutationObserver
|
|
4
|
+
* doesn't loop on its own mutation.
|
|
5
|
+
*/
|
|
6
|
+
const REWRITTEN_ATTR = 'data-zonos-login-from-rewritten';
|
|
7
|
+
const CREATE_ACCOUNT_SELECTOR = 'a[href*="login.php?action=create_account"]:not([' + REWRITTEN_ATTR + '])';
|
|
8
|
+
const rewriteCreateAccountLinks = () => {
|
|
9
|
+
const anchors = document.querySelectorAll(CREATE_ACCOUNT_SELECTOR);
|
|
10
|
+
if (!anchors.length) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const target = buildBigcommerceLoginUrl({ action: 'create_account' });
|
|
14
|
+
anchors.forEach(anchor => {
|
|
15
|
+
anchor.setAttribute('href', target);
|
|
16
|
+
anchor.setAttribute(REWRITTEN_ATTR, 'true');
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* On BigCommerce's `/login.php`, the default **Create account** button links
|
|
21
|
+
* to `login.php?action=create_account` without the `from=cart.php...`
|
|
22
|
+
* parameter that the shopper had when they arrived. Without this, completing
|
|
23
|
+
* signup would drop them on the account home page instead of resuming Zonos
|
|
24
|
+
* international checkout.
|
|
25
|
+
*
|
|
26
|
+
* This watcher finds any create-account anchor on the page (including ones
|
|
27
|
+
* that the BC theme renders later via Stencil bundle load) and rewrites the
|
|
28
|
+
* `href` so the account-creation round trip preserves the
|
|
29
|
+
* `isInternationalCheckout=true` flag as well as `zonosTestMode` /
|
|
30
|
+
* `zonosQaUrl`.
|
|
31
|
+
*
|
|
32
|
+
* Safe to call more than once — idempotent thanks to the `data-zonos-…`
|
|
33
|
+
* attribute on rewritten anchors.
|
|
34
|
+
*/
|
|
35
|
+
export const fixBigCommerceLoginCreateAccountLink = () => {
|
|
36
|
+
if (!window.Zonos.isBigCommerce) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!window.location.pathname.includes('/login.php')) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
rewriteCreateAccountLinks();
|
|
43
|
+
// BC's login page often renders the auth form asynchronously, so the
|
|
44
|
+
// anchor may not exist yet when this runs. Observe for a short window,
|
|
45
|
+
// then stop so we don't leak a listener for the rest of the session.
|
|
46
|
+
const observer = new MutationObserver(() => {
|
|
47
|
+
rewriteCreateAccountLinks();
|
|
48
|
+
});
|
|
49
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
50
|
+
// 10 seconds is plenty for the login form to mount; stopping the observer
|
|
51
|
+
// avoids churn from the rest of the page's normal DOM activity.
|
|
52
|
+
setTimeout(() => observer.disconnect(), 10000);
|
|
53
|
+
};
|
|
@@ -4,6 +4,7 @@ import { zonosStore } from "../../store/zonosStore";
|
|
|
4
4
|
import { fetchBigCommerceCheckout, fetchCheckoutId, } from "./bigcommerceStorefrontApi";
|
|
5
5
|
import { buildBigcommerceRedirectUrl } from "./buildBigcommerceRedirectUrl";
|
|
6
6
|
import { checkBigCommerceBypassCustomerGroup } from "./checkBigCommerceBypassCustomerGroup";
|
|
7
|
+
import { checkBigCommerceForceLogin } from "./checkBigCommerceForceLogin";
|
|
7
8
|
import { isShippableCountry } from "./isShippableCountry";
|
|
8
9
|
import { log } from "../logging/log";
|
|
9
10
|
import { logError } from "../logging/logError";
|
|
@@ -16,19 +17,27 @@ const FALLBACK_SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryC
|
|
|
16
17
|
*/
|
|
17
18
|
const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelected, onLoggedInInternationalAddressDetected, }) => {
|
|
18
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
20
|
+
// Fetch the Storefront API data once up front and thread it through every
|
|
21
|
+
// decision below (bypass, shipping-address inspection, force-login). The
|
|
22
|
+
// function always needs the checkout for the address check, so reusing one
|
|
23
|
+
// fetch avoids the earlier 4x round-trip fan-out where bypass, address
|
|
24
|
+
// lookup, and force-login each fetched independently.
|
|
25
|
+
const checkoutId = await fetchCheckoutId();
|
|
26
|
+
if (!checkoutId) {
|
|
27
|
+
return 'noAction';
|
|
28
|
+
}
|
|
29
|
+
const checkout = await fetchBigCommerceCheckout(checkoutId);
|
|
30
|
+
const preFetched = { checkout, checkoutId };
|
|
19
31
|
// Check if the customer belongs to a bypass group (e.g. resellers) before
|
|
20
32
|
// redirecting them away from BigCommerce native checkout. This delegates to
|
|
21
33
|
// the shared helper so the bypass decision has a single source of truth and
|
|
22
34
|
// reuses the cached promise warmed by `initBigCommerceBypassCheck`.
|
|
23
|
-
const { shouldBypass } = await checkBigCommerceBypassCustomerGroup(
|
|
35
|
+
const { shouldBypass } = await checkBigCommerceBypassCustomerGroup({
|
|
36
|
+
preFetched,
|
|
37
|
+
});
|
|
24
38
|
if (shouldBypass) {
|
|
25
39
|
return 'noAction';
|
|
26
40
|
}
|
|
27
|
-
const checkoutId = await fetchCheckoutId();
|
|
28
|
-
if (!checkoutId) {
|
|
29
|
-
return 'noAction';
|
|
30
|
-
}
|
|
31
|
-
const checkout = await fetchBigCommerceCheckout(checkoutId);
|
|
32
41
|
const shippingAddress = (_b = (_a = checkout === null || checkout === void 0 ? void 0 : checkout.consignments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.shippingAddress;
|
|
33
42
|
if (!(shippingAddress === null || shippingAddress === void 0 ? void 0 : shippingAddress.countryCode)) {
|
|
34
43
|
return 'noAction';
|
|
@@ -51,6 +60,14 @@ const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelecte
|
|
|
51
60
|
return 'optedOut';
|
|
52
61
|
}
|
|
53
62
|
}
|
|
63
|
+
// Force-login merchants must sign the guest shopper in before we leave
|
|
64
|
+
// BC's native checkout. Reuse the checkout we already fetched above so we
|
|
65
|
+
// don't double up on Storefront API round trips.
|
|
66
|
+
const forceLogin = await checkBigCommerceForceLogin({ preFetched });
|
|
67
|
+
if (forceLogin.shouldForceLogin && forceLogin.redirectUrl) {
|
|
68
|
+
window.location.href = forceLogin.redirectUrl;
|
|
69
|
+
return 'redirected';
|
|
70
|
+
}
|
|
54
71
|
if (onInternationalCheckoutSelected) {
|
|
55
72
|
await onInternationalCheckoutSelected();
|
|
56
73
|
}
|
|
@@ -108,9 +125,17 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
|
|
|
108
125
|
// Only check bypass after confirming the country is shippable (i.e. user is
|
|
109
126
|
// about to be redirected to Zonos international checkout). Force-refresh so
|
|
110
127
|
// we re-fetch BigCommerce checkout data every time the ship-to country
|
|
111
|
-
// changes — prevents stale customer-group data from a cached fetch.
|
|
128
|
+
// changes — prevents stale customer-group data from a cached fetch. Share
|
|
129
|
+
// one fetch between the bypass and force-login decisions so this poll
|
|
130
|
+
// tick does 2 Storefront API round trips instead of 4.
|
|
131
|
+
const checkoutId = await fetchCheckoutId();
|
|
132
|
+
const checkout = checkoutId
|
|
133
|
+
? await fetchBigCommerceCheckout(checkoutId)
|
|
134
|
+
: null;
|
|
135
|
+
const preFetched = { checkout, checkoutId };
|
|
112
136
|
const { shouldBypass } = await checkBigCommerceBypassCustomerGroup({
|
|
113
137
|
forceRefresh: true,
|
|
138
|
+
preFetched,
|
|
114
139
|
});
|
|
115
140
|
if (shouldBypass) {
|
|
116
141
|
// Logged-in customer is in a bypass group — keep them on BC native
|
|
@@ -118,6 +143,14 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
|
|
|
118
143
|
log('Bypass customer group detected on BC checkout, stopping interval', 'info');
|
|
119
144
|
return true;
|
|
120
145
|
}
|
|
146
|
+
// Same force-login gate as the logged-in-default-address path — we run
|
|
147
|
+
// it *after* the bypass check so reseller groups never see the login
|
|
148
|
+
// bounce, and *before* any UI/session state flips to the redirect.
|
|
149
|
+
const forceLogin = await checkBigCommerceForceLogin({ preFetched });
|
|
150
|
+
if (forceLogin.shouldForceLogin && forceLogin.redirectUrl) {
|
|
151
|
+
window.location.href = forceLogin.redirectUrl;
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
121
154
|
if (onInternationalCheckoutSelected) {
|
|
122
155
|
await onInternationalCheckoutSelected();
|
|
123
156
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -35,6 +35,7 @@ export const featureAspectKeyEnum = {
|
|
|
35
35
|
NewCheckoutBeta: 'new_checkout_beta',
|
|
36
36
|
NewPayoutReport: 'new_payout_report',
|
|
37
37
|
NewRefundsUx: 'new_refunds_ux',
|
|
38
|
+
OnboardingBeta: 'onboarding_beta',
|
|
38
39
|
PageAuditor: 'page_auditor',
|
|
39
40
|
PromptExplorer: 'prompt_explorer',
|
|
40
41
|
RulesUiCreate: 'rules_ui_create',
|
|
@@ -67,6 +68,7 @@ export const featureAudienceNameEnum = {
|
|
|
67
68
|
NewPayoutReportMerchant: 'new_payout_report_merchant',
|
|
68
69
|
NewRefundsUxMerchant: 'new_refunds_ux_merchant',
|
|
69
70
|
Onboarding: 'onboarding',
|
|
71
|
+
OnboardingBetaMerchant: 'onboarding_beta_merchant',
|
|
70
72
|
PrincipalEngineer: 'principal_engineer',
|
|
71
73
|
ProServeHead: 'pro_serve_head',
|
|
72
74
|
ProductManager: 'product_manager',
|
|
@@ -1701,6 +1701,19 @@ export const customsDocumentType = {
|
|
|
1701
1701
|
ShippersLetterOfInstruction: 'SHIPPERS_LETTER_OF_INSTRUCTION',
|
|
1702
1702
|
UsmcaCertificate: 'USMCA_CERTIFICATE',
|
|
1703
1703
|
};
|
|
1704
|
+
export const customsHoldReason = {
|
|
1705
|
+
Abandonment: 'ABANDONMENT',
|
|
1706
|
+
Confiscated: 'CONFISCATED',
|
|
1707
|
+
DutyNonpayment: 'DUTY_NONPAYMENT',
|
|
1708
|
+
Examination: 'EXAMINATION',
|
|
1709
|
+
GoodsNotCompliant: 'GOODS_NOT_COMPLIANT',
|
|
1710
|
+
GovernmentHold: 'GOVERNMENT_HOLD',
|
|
1711
|
+
MissingData: 'MISSING_DATA',
|
|
1712
|
+
MissingDocs: 'MISSING_DOCS',
|
|
1713
|
+
RefusedEntry: 'REFUSED_ENTRY',
|
|
1714
|
+
SecurityFail: 'SECURITY_FAIL',
|
|
1715
|
+
Unknown: 'UNKNOWN',
|
|
1716
|
+
};
|
|
1704
1717
|
export const customsIntelBucketGranularity = {
|
|
1705
1718
|
Day: 'DAY',
|
|
1706
1719
|
Hour: 'HOUR',
|
|
@@ -1767,6 +1780,13 @@ export const customsSpecSourceType = {
|
|
|
1767
1780
|
Classify: 'CLASSIFY',
|
|
1768
1781
|
OrganizationSetting: 'ORGANIZATION_SETTING',
|
|
1769
1782
|
};
|
|
1783
|
+
export const customsStage = {
|
|
1784
|
+
CustomsCleared: 'CUSTOMS_CLEARED',
|
|
1785
|
+
CustomsFailed: 'CUSTOMS_FAILED',
|
|
1786
|
+
CustomsHold: 'CUSTOMS_HOLD',
|
|
1787
|
+
InCustoms: 'IN_CUSTOMS',
|
|
1788
|
+
PreCustoms: 'PRE_CUSTOMS',
|
|
1789
|
+
};
|
|
1770
1790
|
export const dashboardUnit = {
|
|
1771
1791
|
Imperial: 'IMPERIAL',
|
|
1772
1792
|
Metric: 'METRIC',
|
|
@@ -2031,6 +2051,7 @@ export const entryStatus = {
|
|
|
2031
2051
|
Archived: 'ARCHIVED',
|
|
2032
2052
|
Draft: 'DRAFT',
|
|
2033
2053
|
Error: 'ERROR',
|
|
2054
|
+
Filed: 'FILED',
|
|
2034
2055
|
Rejected: 'REJECTED',
|
|
2035
2056
|
Submitted: 'SUBMITTED',
|
|
2036
2057
|
};
|
|
@@ -2045,6 +2066,7 @@ export const errorDetail = {
|
|
|
2045
2066
|
TcpFailure: 'TCP_FAILURE',
|
|
2046
2067
|
ThrottledConcurrency: 'THROTTLED_CONCURRENCY',
|
|
2047
2068
|
ThrottledCpu: 'THROTTLED_CPU',
|
|
2069
|
+
TooManyRequests: 'TOO_MANY_REQUESTS',
|
|
2048
2070
|
Unimplemented: 'UNIMPLEMENTED',
|
|
2049
2071
|
Unknown: 'UNKNOWN',
|
|
2050
2072
|
};
|
|
@@ -2131,6 +2153,10 @@ export const helloCountryDisplayBehavior = {
|
|
|
2131
2153
|
All: 'ALL',
|
|
2132
2154
|
OnlyShippable: 'ONLY_SHIPPABLE',
|
|
2133
2155
|
};
|
|
2156
|
+
export const helloCountryOverrideBehavior = {
|
|
2157
|
+
Session: 'SESSION',
|
|
2158
|
+
UrlParam: 'URL_PARAM',
|
|
2159
|
+
};
|
|
2134
2160
|
export const helloCurrencyBehavior = {
|
|
2135
2161
|
Disabled: 'DISABLED',
|
|
2136
2162
|
Enabled: 'ENABLED',
|
|
@@ -4487,6 +4513,11 @@ export const reverseAmountType = {
|
|
|
4487
4513
|
Tax: 'TAX',
|
|
4488
4514
|
TaxFee: 'TAX_FEE',
|
|
4489
4515
|
};
|
|
4516
|
+
export const riskLevel = {
|
|
4517
|
+
High: 'HIGH',
|
|
4518
|
+
Low: 'LOW',
|
|
4519
|
+
Medium: 'MEDIUM',
|
|
4520
|
+
};
|
|
4490
4521
|
export const roundingMethod = {
|
|
4491
4522
|
Custom: 'CUSTOM',
|
|
4492
4523
|
Hundredth: 'HUNDREDTH',
|
|
@@ -4685,6 +4716,9 @@ export const shipmentPackagingTypeCode = {
|
|
|
4685
4716
|
Ups_25KgBox: 'UPS_25KG_BOX',
|
|
4686
4717
|
YourPackaging: 'YOUR_PACKAGING',
|
|
4687
4718
|
};
|
|
4719
|
+
export const shipmentRatingAdjustmentType = {
|
|
4720
|
+
CartTotal: 'CART_TOTAL',
|
|
4721
|
+
};
|
|
4688
4722
|
export const shipmentRatingAmountTargetType = {
|
|
4689
4723
|
BillingCompany: 'BILLING_COMPANY',
|
|
4690
4724
|
MerchantBase: 'MERCHANT_BASE',
|
|
@@ -5188,6 +5222,11 @@ export const volumeUnitCode = {
|
|
|
5188
5222
|
QuartUk: 'QUART_UK',
|
|
5189
5223
|
QuartUsDry: 'QUART_US_DRY',
|
|
5190
5224
|
};
|
|
5225
|
+
export const watchStatus = {
|
|
5226
|
+
Active: 'ACTIVE',
|
|
5227
|
+
Completed: 'COMPLETED',
|
|
5228
|
+
Expired: 'EXPIRED',
|
|
5229
|
+
};
|
|
5191
5230
|
export const wcoVersion = {
|
|
5192
5231
|
Wco_1997: 'WCO_1997',
|
|
5193
5232
|
Wco_2002: 'WCO_2002',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
2
2
|
import "./global.d";
|
|
3
3
|
export * from '../components.d';
|
|
4
|
+
export * from './checkout/api/BigCommerceCheckoutSettings';
|
|
4
5
|
export * from './checkout/api/CalculateLandedCost';
|
|
5
6
|
export * from './checkout/api/CheckoutSession';
|
|
6
7
|
export * from './checkout/api/CreateParty';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-
|
|
2
|
+
import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-542dbe20.js';
|
|
3
3
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
4
4
|
import { h as handleFetch, l as logError, f as fallbackApiList, g as getIsTestMode, a as getIsStagingMode, s as sendErrorLog, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -131,7 +131,7 @@ const getZonosQaUrl = () => {
|
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
133
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
134
|
-
const cdnUrl = "https://v1.3.
|
|
134
|
+
const cdnUrl = "https://v1.3.260.js.zonos.com";
|
|
135
135
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
136
136
|
if (!qaUrl &&
|
|
137
137
|
(cdnUrl.includes('test.') ||
|
|
@@ -379,10 +379,10 @@ const zonosLoadUrl = (() => {
|
|
|
379
379
|
return null;
|
|
380
380
|
})();
|
|
381
381
|
const startLoadTime = Date.now();
|
|
382
|
-
const ZONOS_URL = "https://v1.3.
|
|
383
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
384
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
385
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
382
|
+
const ZONOS_URL = "https://v1.3.260.js.zonos.com";
|
|
383
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.260";
|
|
384
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.260";
|
|
385
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.260";
|
|
386
386
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
387
387
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
388
388
|
class Zonos {
|
|
@@ -400,7 +400,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
400
400
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
401
401
|
: null;
|
|
402
402
|
Zonos.isBigCommerce = false;
|
|
403
|
-
Zonos.releaseDate = "
|
|
403
|
+
Zonos.releaseDate = "1776892835210";
|
|
404
404
|
Zonos.isLegacyCheckout = false;
|
|
405
405
|
Zonos.googleAnalyticId = null;
|
|
406
406
|
Zonos.googleAnalyticReady = false;
|
|
@@ -423,7 +423,7 @@ Zonos.isNpm = true;
|
|
|
423
423
|
Zonos.zonosQaUrl = null;
|
|
424
424
|
Zonos.zonosQaUrlApi = null;
|
|
425
425
|
Zonos.trackEventLogs = [];
|
|
426
|
-
Zonos.version = `v${"1.3.
|
|
426
|
+
Zonos.version = `v${"1.3.260"}`;
|
|
427
427
|
Zonos.modeAlerted = false;
|
|
428
428
|
Zonos.cartData = null;
|
|
429
429
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
2
|
+
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-c490d252.js';
|
|
3
|
+
import { s as storageStore } from './localization-542dbe20.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
2
|
+
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-c490d252.js';
|
|
3
|
+
import { s as storageStore } from './localization-542dbe20.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|
|
@@ -17308,6 +17308,9 @@ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelecte
|
|
|
17308
17308
|
localizationStore.countryLandedCost = null;
|
|
17309
17309
|
localizationStore.inclusivePricingConfigurations = [];
|
|
17310
17310
|
currencyDisplay();
|
|
17311
|
+
if (!isInitializing) {
|
|
17312
|
+
void getCustomMessages();
|
|
17313
|
+
}
|
|
17311
17314
|
// Clear session so the next visit falls back to geolocation, but keep
|
|
17312
17315
|
// the current shopper's explicit selection visible in the URL (so a
|
|
17313
17316
|
// same-tab reload still honors it) and on the hello element.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { t as trackConversionEvent, y as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, z as storeCreditStoreCreateOrder, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval, F as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { t as translate, s as storageStore } from './localization-
|
|
2
|
+
import { t as trackConversionEvent, y as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, z as storeCreditStoreCreateOrder, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval, F as storeCreditStoreGetEffectiveAmount } from './cart-c490d252.js';
|
|
3
|
+
import { t as translate, s as storageStore } from './localization-542dbe20.js';
|
|
4
4
|
import { h as handleFetch, l as logError, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { i as isContrastColor } from './isContrastColor-f9e65e70.js';
|
|
6
6
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-c490d252.js';
|
|
2
|
+
import { s as storageStore } from './localization-542dbe20.js';
|
|
3
3
|
import { l as logError, h as handleFetch } from './handleFetch-a844cac1.js';
|
|
4
4
|
|
|
5
5
|
const placeTestOrder = async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-c490d252.js';
|
|
2
|
+
import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-542dbe20.js';
|
|
3
3
|
|
|
4
4
|
const getDisplayCurrency = () => {
|
|
5
5
|
var _a, _b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, d as createEvent, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-
|
|
2
|
+
import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-542dbe20.js';
|
|
3
3
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
4
|
-
import { Q as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-
|
|
4
|
+
import { Q as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-c490d252.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
7
7
|
import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
2
|
import { t as throttle_1 } from './throttle-5a66b4fd.js';
|
|
3
|
-
import { b as stripeStore, t as trackConversionEvent, Q as extractName, E as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-
|
|
4
|
-
import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-
|
|
3
|
+
import { b as stripeStore, t as trackConversionEvent, Q as extractName, E as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-c490d252.js';
|
|
4
|
+
import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-542dbe20.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
6
6
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-2572bf77.js';
|
|
@@ -2,10 +2,10 @@ import { r as registerInstance, h, a as Host, g as getElement, d as createEvent
|
|
|
2
2
|
import { f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
5
|
-
import { b as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
5
|
+
import { b as stripeStore, t as trackConversionEvent } from './cart-c490d252.js';
|
|
6
|
+
import { s as storageStore } from './localization-542dbe20.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-38ca5d21.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-8092a9fb.js';
|
|
11
11
|
import './isContrastColor-f9e65e70.js';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { d as cartStore, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, b as stripeStore, C as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, N as storeCreditStore, O as storeCreditStoreReset, x as storeCreditStoreCoversFullAmount, r as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as extractName, D as cartStoreOnChange, R as stripeStoreAsyncAddressUpdate, H as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as cartStoreGetMethod, U as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { d as cartStore, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, b as stripeStore, C as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, N as storeCreditStore, O as storeCreditStoreReset, x as storeCreditStoreCoversFullAmount, r as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as extractName, D as cartStoreOnChange, R as stripeStoreAsyncAddressUpdate, H as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as cartStoreGetMethod, U as sortServiceLevelOptionsByAmount } from './cart-c490d252.js';
|
|
3
|
+
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-542dbe20.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-75f1bba3.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-5f7856f2.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
7
|
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
8
|
-
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-
|
|
9
|
-
import { c as paypalStoreReset, a as paypalStore } from './paypal-
|
|
8
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-7a0ce66a.js';
|
|
9
|
+
import { c as paypalStoreReset, a as paypalStore } from './paypal-38ca5d21.js';
|
|
10
10
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
11
11
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
12
12
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
13
13
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
14
14
|
import { s as submitGtag } from './submitGtag-543058f9.js';
|
|
15
15
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
16
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
16
|
+
import { p as placeTestOrder } from './placeTestOrder-d7001709.js';
|
|
17
17
|
import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
|
|
18
18
|
import { g as getContrastColor } from './getContrastColor-e14f95a7.js';
|
|
19
19
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|