@zonos/elements 1.3.255 → 1.3.256

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.
Files changed (208) hide show
  1. package/dist/cjs/{cart-4ef52500.js → cart-e156c1e3.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-4419d03e.js → hasInclusivePrice-d6d274bd.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-3494b21e.js → invoice-f4b5d538.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-92955ce6.js → isCollectMobileTablet-c9369cd8.js} +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{localization-75f4ec05.js → localization-5bb1e598.js} +240 -0
  8. package/dist/cjs/{paypal-cc3a730b.js → paypal-f9641595.js} +2 -2
  9. package/dist/cjs/{placeTestOrder-13901275.js → placeTestOrder-7ac7f91a.js} +2 -2
  10. package/dist/cjs/{renderCheckoutCurrency-0003992c.js → renderCheckoutCurrency-6b59a718.js} +2 -2
  11. package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
  15. package/dist/cjs/zonos-checkout.cjs.entry.js +357 -78
  16. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  17. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  18. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  19. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  21. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-elements.cjs.js +1 -1
  23. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  24. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  26. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
  27. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  28. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +60 -2
  31. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  32. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  33. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  34. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  35. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  36. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  37. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  38. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  39. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  40. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  41. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  42. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  43. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  44. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  45. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  46. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  47. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  48. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  49. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  50. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  51. package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +52 -0
  52. package/dist/collection/components/utils/checkout/buildBigcommerceRedirectUrl.js +22 -0
  53. package/dist/collection/components/utils/checkout/checkBigCommerceBypassCustomerGroup.js +122 -0
  54. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +5 -2
  55. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +120 -86
  56. package/dist/esm/{cart-f4e43d1a.js → cart-55b8dd7c.js} +1 -1
  57. package/dist/esm/{hasInclusivePrice-0439b7f4.js → hasInclusivePrice-ddae18fd.js} +1 -1
  58. package/dist/esm/index.js +7 -7
  59. package/dist/esm/{invoice-3d8f3fa8.js → invoice-dbe85a18.js} +2 -2
  60. package/dist/esm/{isCollectMobileTablet-0402aa32.js → isCollectMobileTablet-8af0d16d.js} +2 -2
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/{localization-026da80b.js → localization-d11c973f.js} +240 -0
  63. package/dist/esm/{paypal-07bd6b7c.js → paypal-f87fbee0.js} +2 -2
  64. package/dist/esm/{placeTestOrder-39de11f4.js → placeTestOrder-8e8e97be.js} +2 -2
  65. package/dist/esm/{renderCheckoutCurrency-743f7c77.js → renderCheckoutCurrency-45c74af2.js} +2 -2
  66. package/dist/esm/zonos-address-display_8.entry.js +2 -2
  67. package/dist/esm/zonos-address_4.entry.js +2 -2
  68. package/dist/esm/zonos-card_5.entry.js +3 -3
  69. package/dist/esm/zonos-cart-items_12.entry.js +6 -6
  70. package/dist/esm/zonos-checkout.entry.js +358 -79
  71. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  72. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  73. package/dist/esm/zonos-collect.entry.js +4 -4
  74. package/dist/esm/zonos-controller.entry.js +2 -2
  75. package/dist/esm/zonos-country-flag.entry.js +1 -1
  76. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  77. package/dist/esm/zonos-elements.js +1 -1
  78. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  79. package/dist/esm/zonos-hello.entry.js +1 -1
  80. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  81. package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
  82. package/dist/esm/zonos-invoice.entry.js +4 -4
  83. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  84. package/dist/esm/zonos-store-credit.entry.js +3 -3
  85. package/dist/esm-es5/{cart-f4e43d1a.js → cart-55b8dd7c.js} +1 -1
  86. package/dist/esm-es5/{hasInclusivePrice-0439b7f4.js → hasInclusivePrice-ddae18fd.js} +1 -1
  87. package/dist/esm-es5/index.js +1 -1
  88. package/dist/esm-es5/{invoice-3d8f3fa8.js → invoice-dbe85a18.js} +1 -1
  89. package/dist/esm-es5/{isCollectMobileTablet-0402aa32.js → isCollectMobileTablet-8af0d16d.js} +1 -1
  90. package/dist/esm-es5/loader.js +1 -1
  91. package/dist/esm-es5/localization-d11c973f.js +1 -0
  92. package/dist/esm-es5/{paypal-07bd6b7c.js → paypal-f87fbee0.js} +2 -2
  93. package/dist/esm-es5/{placeTestOrder-39de11f4.js → placeTestOrder-8e8e97be.js} +1 -1
  94. package/dist/esm-es5/{renderCheckoutCurrency-743f7c77.js → renderCheckoutCurrency-45c74af2.js} +1 -1
  95. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  96. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  97. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  98. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  99. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  100. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  101. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  102. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  103. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  104. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  105. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  106. package/dist/esm-es5/zonos-elements.js +1 -1
  107. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  108. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  109. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  110. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  111. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  112. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  113. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  114. package/dist/scripts/index.d.ts +19 -0
  115. package/dist/scripts/index.js +1 -1
  116. package/dist/scripts/loadZonos.js +1 -1
  117. package/dist/scripts/zonos.js +1 -1
  118. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +13 -0
  119. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  120. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  121. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  122. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  123. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  124. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  125. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  126. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  127. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  128. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  129. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  130. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  131. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  132. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  133. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  134. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  135. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  136. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  137. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  138. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  139. package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +36 -0
  140. package/dist/types/components/utils/checkout/buildBigcommerceRedirectUrl.d.ts +11 -0
  141. package/dist/types/components/utils/checkout/checkBigCommerceBypassCustomerGroup.d.ts +30 -0
  142. package/dist/types/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.d.ts +16 -1
  143. package/dist/types/types/utils/ZonosSettings.d.ts +7 -0
  144. package/dist/zonos-elements/index.esm.js +1 -1
  145. package/dist/zonos-elements/{p-5359ba71.entry.js → p-00728af1.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-b45538a7.system.entry.js → p-08830a50.system.entry.js} +1 -1
  147. package/dist/zonos-elements/{p-1ed9ef0b.js → p-179bbeae.js} +1 -1
  148. package/dist/zonos-elements/{p-568c5700.system.entry.js → p-1c9e9692.system.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-231edcca.entry.js → p-225957b9.entry.js} +1 -1
  150. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  151. package/dist/zonos-elements/{p-16a80e3c.system.js → p-2a28c7ac.system.js} +1 -1
  152. package/dist/zonos-elements/{p-12f480c9.system.entry.js → p-2cb5ef7d.system.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-3730d555.system.entry.js → p-2eeda8a9.system.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-66758e30.system.entry.js → p-32365d6a.system.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-db993fdb.entry.js → p-399f5ad6.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-af83f0c2.js → p-3a8925e9.js} +1 -1
  157. package/dist/zonos-elements/{p-5e3e5e3e.system.js → p-3f141999.system.js} +1 -1
  158. package/dist/zonos-elements/{p-dafafa07.js → p-3fae811a.js} +1 -1
  159. package/dist/zonos-elements/{p-33fc0c8f.entry.js → p-50d31f4f.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-d397560e.system.entry.js → p-52b70520.system.entry.js} +1 -1
  161. package/dist/zonos-elements/{p-cc364b26.system.entry.js → p-53275a0d.system.entry.js} +1 -1
  162. package/dist/zonos-elements/{p-2b10f633.system.js → p-5343c32b.system.js} +1 -1
  163. package/dist/zonos-elements/{p-0aa1c8c2.system.js → p-57b5d3e3.system.js} +1 -1
  164. package/dist/zonos-elements/{p-27e41b44.system.entry.js → p-59025df9.system.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-3814aac3.system.entry.js → p-5d0b0126.system.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-5678c5b5.system.entry.js → p-664aff48.system.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-a1835bae.system.entry.js → p-6b45e9f3.system.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-50aac43c.system.js → p-70e069d3.system.js} +1 -1
  169. package/dist/zonos-elements/{p-9e98a256.system.entry.js → p-72de2fdc.system.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-3e03b2e8.entry.js → p-7d4a1565.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-9d9792b9.system.entry.js → p-8608c123.system.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-1bdac1d3.entry.js → p-89757efe.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-f888db89.entry.js → p-8a593061.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-0649737d.entry.js → p-8ccf97ce.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-835c0bd4.js → p-93c64387.js} +1 -1
  176. package/dist/zonos-elements/p-93d6e13f.entry.js +1 -0
  177. package/dist/zonos-elements/p-9631c373.system.js +1 -0
  178. package/dist/zonos-elements/p-99e1734a.js +1 -0
  179. package/dist/zonos-elements/{p-d168be79.system.entry.js → p-9b42f0ad.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-d938fb86.entry.js → p-aad014df.entry.js} +1 -1
  181. package/dist/zonos-elements/p-ae397ff8.system.entry.js +1 -0
  182. package/dist/zonos-elements/{p-9b12f023.system.entry.js → p-b439d38f.system.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-e12f7a97.entry.js → p-b85d4286.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-a6cc56ba.entry.js → p-befad3c4.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-274a5d11.system.entry.js → p-c66649fe.system.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-d2bba4dc.entry.js → p-d14e5c81.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-6ce8374e.entry.js → p-d155b9c6.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-06b4aa32.system.js → p-d280e9b6.system.js} +1 -1
  189. package/dist/zonos-elements/{p-fbe22363.entry.js → p-dba635e6.entry.js} +1 -1
  190. package/dist/zonos-elements/{p-b20c7f8c.entry.js → p-ddde268d.entry.js} +1 -1
  191. package/dist/zonos-elements/p-e2adf04b.system.js +1 -0
  192. package/dist/zonos-elements/p-ee2c7a1e.js +1 -0
  193. package/dist/zonos-elements/{p-2affd4e6.entry.js → p-f36e907e.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-c398711f.js → p-f6733ffb.js} +1 -1
  195. package/dist/zonos-elements/{p-2baa21b1.entry.js → p-f9ffff4e.entry.js} +1 -1
  196. package/dist/zonos-elements/p-fa0c5017.js +1 -0
  197. package/dist/zonos-elements/{p-aabb921f.system.js → p-fbd44c55.system.js} +1 -1
  198. package/dist/zonos-elements/{p-db0b35a2.system.entry.js → p-fc1c7fe5.system.entry.js} +1 -1
  199. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  200. package/package.json +1 -1
  201. package/dist/esm-es5/localization-026da80b.js +0 -1
  202. package/dist/zonos-elements/p-0d4af7e9.system.entry.js +0 -1
  203. package/dist/zonos-elements/p-31d1b874.system.js +0 -1
  204. package/dist/zonos-elements/p-3ac97c01.js +0 -1
  205. package/dist/zonos-elements/p-768430fe.js +0 -1
  206. package/dist/zonos-elements/p-b6c78f82.entry.js +0 -1
  207. package/dist/zonos-elements/p-b84be447.js +0 -1
  208. package/dist/zonos-elements/p-f9705736.system.js +0 -1
@@ -0,0 +1,22 @@
1
+ import { getIsTestMode } from "./getIsTestMode";
2
+ /**
3
+ * Build an absolute redirect URL used by the BigCommerce checkout flows to
4
+ * navigate between the BC native `/checkout` page and the Zonos international
5
+ * checkout at `/`.
6
+ *
7
+ * Carries over the `zonosQaUrl` query param from the current URL (when
8
+ * present) so the preview Zonos elements build keeps loading after the
9
+ * redirect, and sets `zonosTestMode=1` when test mode is active so the
10
+ * destination page continues to use the test credentials.
11
+ */
12
+ export const buildBigcommerceRedirectUrl = (pathname) => {
13
+ const url = new URL(pathname, window.location.origin);
14
+ const zonosQaUrl = new URLSearchParams(window.location.search).get('zonosQaUrl');
15
+ if (zonosQaUrl) {
16
+ url.searchParams.set('zonosQaUrl', zonosQaUrl);
17
+ }
18
+ if (getIsTestMode()) {
19
+ url.searchParams.set('zonosTestMode', '1');
20
+ }
21
+ return url.toString();
22
+ };
@@ -0,0 +1,122 @@
1
+ import { zonosStore } from "../../store/zonosStore";
2
+ import { fetchBigCommerceCheckout, fetchCheckoutId, } from "./bigcommerceStorefrontApi";
3
+ import { log } from "../logging/log";
4
+ const DEFAULT_RESULT = {
5
+ customerGroupId: null,
6
+ shouldBypass: false,
7
+ };
8
+ /**
9
+ * Performs the actual fetch logic to determine if the customer
10
+ * belongs to a bypass group.
11
+ */
12
+ const fetchBypassOutcome = async () => {
13
+ var _a, _b, _c, _d;
14
+ // Only relevant for BigCommerce stores — permanent no-op on other platforms
15
+ if (!window.Zonos.isBigCommerce) {
16
+ return { conclusive: true, result: DEFAULT_RESULT };
17
+ }
18
+ const bypassGroupIds = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.bigcommerceBypassCustomerGroupIds;
19
+ if (!(bypassGroupIds === null || bypassGroupIds === void 0 ? void 0 : bypassGroupIds.length)) {
20
+ if (zonosStore.loadedConfig) {
21
+ // Settings have finished loading and there are no bypass groups
22
+ // configured — this is a permanent "bypass not configured" answer.
23
+ return { conclusive: true, result: DEFAULT_RESULT };
24
+ }
25
+ // Settings haven't loaded yet — the empty list may be transient.
26
+ // Mark as inconclusive so a later caller retries after config loads.
27
+ return { conclusive: false, result: DEFAULT_RESULT };
28
+ }
29
+ // Fetch customer group from BigCommerce Storefront API
30
+ const checkoutId = await fetchCheckoutId();
31
+ if (!checkoutId) {
32
+ // No active cart yet — inconclusive. Common on fresh sessions where
33
+ // `initBigCommerceBypassCheck` runs before the user has added anything
34
+ // to their cart; once the cart exists we need to re-fetch.
35
+ log('BigCommerce bypass check: no active cart yet, will retry on next call', 'info');
36
+ return { conclusive: false, result: DEFAULT_RESULT };
37
+ }
38
+ const checkout = await fetchBigCommerceCheckout(checkoutId);
39
+ if (!checkout) {
40
+ // API call failed (network error, non-200, etc.) — inconclusive.
41
+ // Caching this would permanently disable bypass for the session if
42
+ // the logged-in user is actually a reseller.
43
+ log('BigCommerce bypass check: failed to fetch checkout data, will retry', 'info');
44
+ return { conclusive: false, result: DEFAULT_RESULT };
45
+ }
46
+ const customerGroupId = (_d = (_c = (_b = checkout.customer) === null || _b === void 0 ? void 0 : _b.customerGroup) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : null;
47
+ if (customerGroupId === null) {
48
+ log('BigCommerce bypass check: no customer group found (guest user)', 'info');
49
+ // Guest user with an active cart — a definitive "no bypass" answer.
50
+ return { conclusive: true, result: DEFAULT_RESULT };
51
+ }
52
+ const shouldBypass = bypassGroupIds.includes(customerGroupId);
53
+ const result = { customerGroupId, shouldBypass };
54
+ if (shouldBypass) {
55
+ log(`BigCommerce bypass check: customer group ${String(customerGroupId)} is in bypass list; caller should keep the user on BC native checkout`, 'info');
56
+ }
57
+ else {
58
+ log(`BigCommerce bypass check: customer group ${String(customerGroupId)} is not in bypass list`, 'info');
59
+ }
60
+ return { conclusive: true, result };
61
+ };
62
+ /**
63
+ * Module-level promise that holds the in-flight or resolved bypass check.
64
+ * Set by `initBigCommerceBypassCheck` on page load so the result is ready
65
+ * by the time checkout opens or the watcher fires.
66
+ *
67
+ * Automatically invalidated when a fetch resolves to an inconclusive outcome,
68
+ * so subsequent callers retry (e.g. after the user adds an item to their
69
+ * cart or after settings finish loading).
70
+ */
71
+ let bypassCheckPromise = null;
72
+ const startBypassCheck = () => {
73
+ const outcomePromise = fetchBypassOutcome();
74
+ const resultPromise = outcomePromise.then(({ conclusive, result }) => {
75
+ if (!conclusive && bypassCheckPromise === resultPromise) {
76
+ // Invalidate cache so the next caller performs a fresh fetch.
77
+ bypassCheckPromise = null;
78
+ }
79
+ return result;
80
+ });
81
+ bypassCheckPromise = resultPromise;
82
+ return resultPromise;
83
+ };
84
+ /**
85
+ * Start fetching the BigCommerce customer group on page load.
86
+ * Call this once during initialization (e.g. in `zonos-checkout.init()`).
87
+ * The fetch runs in the background; `checkBigCommerceBypassCustomerGroup`
88
+ * will await the result when needed.
89
+ */
90
+ export const initBigCommerceBypassCheck = () => {
91
+ var _a;
92
+ if (!window.Zonos.isBigCommerce) {
93
+ return;
94
+ }
95
+ const bypassGroupIds = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.bigcommerceBypassCustomerGroupIds;
96
+ if (!(bypassGroupIds === null || bypassGroupIds === void 0 ? void 0 : bypassGroupIds.length)) {
97
+ return;
98
+ }
99
+ // Fire the fetch immediately; consumers will await the same promise
100
+ void startBypassCheck();
101
+ };
102
+ /**
103
+ * Check if the current BigCommerce customer belongs to a customer group
104
+ * that should bypass Zonos Checkout.
105
+ *
106
+ * If `initBigCommerceBypassCheck` was called on page load and the resulting
107
+ * outcome was conclusive, this returns the already-resolved (or in-flight)
108
+ * result without making additional API calls. If the previous outcome was
109
+ * inconclusive (no cart, settings not loaded), the cache was invalidated
110
+ * automatically and this triggers a fresh fetch.
111
+ *
112
+ * @param options.forceRefresh - When true, bypasses any cached result and
113
+ * always fetches fresh BigCommerce checkout data. Use this on the
114
+ * BigCommerce domestic checkout page when the shipping country changes,
115
+ * to ensure the customer group reflects the current checkout state.
116
+ */
117
+ export const checkBigCommerceBypassCustomerGroup = async (options = {}) => {
118
+ if (options.forceRefresh || !bypassCheckPromise) {
119
+ return startBypassCheck();
120
+ }
121
+ return bypassCheckPromise;
122
+ };
@@ -1,6 +1,7 @@
1
1
  import { stripeStoreCleanupDomesticShippingSession, stripeStoreGetDomesticShippingSession, stripeStoreSaveDomesticShippingSession, } from "../../store/checkout/stripe";
2
2
  import { localizationStoreUpdateSelectedCountryCode } from "../../store/hello/localization";
3
3
  import { zonosStore } from "../../store/zonosStore";
4
+ import { buildBigcommerceRedirectUrl } from "./buildBigcommerceRedirectUrl";
4
5
  import { isShippableCountry } from "./isShippableCountry";
5
6
  import { logError } from "../logging/logError";
6
7
  import { sendErrorLog } from "../logging/sendErrorLog";
@@ -102,8 +103,10 @@ export const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector
102
103
  });
103
104
  e.preventDefault();
104
105
  e.stopPropagation();
105
- // redirect to home page, home page then will open the checkout dialog if having domestic shipping session
106
- window.location.href = '/';
106
+ // redirect to home page, home page then will open the checkout dialog if
107
+ // having domestic shipping session. Carry over zonosQaUrl / zonosTestMode
108
+ // so the destination page keeps using the same build/env.
109
+ window.location.href = buildBigcommerceRedirectUrl('/');
107
110
  });
108
111
  });
109
112
  observer.observe(document.body, {
@@ -1,81 +1,56 @@
1
1
  import { stripeStoreGetDomesticShippingSession, stripeStoreSaveDomesticShippingSession, } from "../../store/checkout/stripe";
2
2
  import { localizationStoreUpdateSelectedCountryCode } from "../../store/hello/localization";
3
3
  import { zonosStore } from "../../store/zonosStore";
4
+ import { fetchBigCommerceCheckout, fetchCheckoutId, } from "./bigcommerceStorefrontApi";
5
+ import { buildBigcommerceRedirectUrl } from "./buildBigcommerceRedirectUrl";
6
+ import { checkBigCommerceBypassCustomerGroup } from "./checkBigCommerceBypassCustomerGroup";
4
7
  import { isShippableCountry } from "./isShippableCountry";
5
8
  import { log } from "../logging/log";
6
9
  import { logError } from "../logging/logError";
7
10
  const FALLBACK_SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryCode"]';
8
- /**
9
- * Fetch the checkout/cart ID from the BigCommerce Storefront Cart API.
10
- * The `/checkout` page URL does not include the checkout ID, so we
11
- * retrieve it from `/api/storefront/cart` which returns the active cart(s).
12
- */
13
- const fetchCheckoutId = async () => {
14
- var _a, _b;
15
- try {
16
- const response = await fetch('/api/storefront/cart', {
17
- credentials: 'same-origin',
18
- headers: {
19
- Accept: 'application/json',
20
- },
21
- });
22
- if (!response.ok) {
23
- log(`Failed to fetch BigCommerce cart: ${String(response.status)}`, 'error');
24
- return null;
25
- }
26
- const carts = (await response.json());
27
- return (_b = (_a = carts === null || carts === void 0 ? void 0 : carts[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;
28
- }
29
- catch (error) {
30
- logError('Error fetching BigCommerce cart data', error);
31
- return null;
32
- }
33
- };
34
- /**
35
- * Fetch checkout data from the BigCommerce Storefront API.
36
- * This API is cookie-authenticated (same-origin), so no token is needed.
37
- */
38
- const fetchBigCommerceCheckout = async (checkoutId) => {
39
- try {
40
- const response = await fetch(`/api/storefront/checkouts/${checkoutId}`, {
41
- credentials: 'same-origin',
42
- headers: {
43
- Accept: 'application/json',
44
- 'Content-Type': 'application/json',
45
- },
46
- });
47
- if (!response.ok) {
48
- log(`Failed to fetch BigCommerce checkout: ${String(response.status)}`, 'error');
49
- return null;
50
- }
51
- return (await response.json());
52
- }
53
- catch (error) {
54
- logError('Error fetching BigCommerce checkout data', error);
55
- return null;
56
- }
57
- };
58
11
  /**
59
12
  * Check if the logged-in user already has a shipping address on the checkout
60
- * that is internationally shippable. If so, save the address to session
61
- * and redirect to the home page to open the international checkout.
13
+ * that is internationally shippable. If so, optionally prompt the user to
14
+ * confirm before saving the address to session and redirecting to the home
15
+ * page to open the international checkout.
62
16
  */
63
- const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelected, }) => {
17
+ const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelected, onLoggedInInternationalAddressDetected, }) => {
64
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19
+ // Check if the customer belongs to a bypass group (e.g. resellers) before
20
+ // redirecting them away from BigCommerce native checkout. This delegates to
21
+ // the shared helper so the bypass decision has a single source of truth and
22
+ // reuses the cached promise warmed by `initBigCommerceBypassCheck`.
23
+ const { shouldBypass } = await checkBigCommerceBypassCustomerGroup();
24
+ if (shouldBypass) {
25
+ return 'noAction';
26
+ }
65
27
  const checkoutId = await fetchCheckoutId();
66
28
  if (!checkoutId) {
67
- return false;
29
+ return 'noAction';
68
30
  }
69
31
  const checkout = await fetchBigCommerceCheckout(checkoutId);
70
32
  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;
71
33
  if (!(shippingAddress === null || shippingAddress === void 0 ? void 0 : shippingAddress.countryCode)) {
72
- return false;
34
+ return 'noAction';
73
35
  }
74
36
  const countryCode = shippingAddress.countryCode;
75
37
  if (!isShippableCountry(false, countryCode)) {
76
- return false;
38
+ return 'noAction';
39
+ }
40
+ log(onLoggedInInternationalAddressDetected
41
+ ? `Logged-in user has international shipping address: ${countryCode}, prompting user to choose checkout`
42
+ : `Logged-in user has international shipping address: ${countryCode}, redirecting automatically (legacy behavior)`, 'info');
43
+ // Ask the consumer (zonos-checkout) whether to redirect or stay on BC.
44
+ // Without this prompt the user can get stuck in a redirect loop when their
45
+ // saved default address is international but they want to use a different
46
+ // (domestic) saved address in BigCommerce native checkout.
47
+ if (onLoggedInInternationalAddressDetected) {
48
+ const action = await onLoggedInInternationalAddressDetected();
49
+ if (action === 'stay') {
50
+ log('User opted to stay on BigCommerce native checkout despite international default address', 'info');
51
+ return 'optedOut';
52
+ }
77
53
  }
78
- log(`Logged-in user has international shipping address: ${countryCode}, redirecting`, 'info');
79
54
  if (onInternationalCheckoutSelected) {
80
55
  await onInternationalCheckoutSelected();
81
56
  }
@@ -97,20 +72,24 @@ const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelecte
97
72
  state: (_k = shippingAddress.stateOrProvince) !== null && _k !== void 0 ? _k : '',
98
73
  });
99
74
  // Redirect to home page — the home page will open the international checkout
100
- // when it detects the domestic shipping session
101
- window.location.href = '/';
102
- return true;
75
+ // when it detects the domestic shipping session. Carry over zonosQaUrl /
76
+ // zonosTestMode so the destination page keeps using the same build/env.
77
+ window.location.href = buildBigcommerceRedirectUrl('/');
78
+ return 'redirected';
103
79
  };
104
80
  /**
105
81
  * Watch for changes in domestic checkout step. Redirects user to home page to open international checkout when user selects a country in the international shipping zone.
106
82
  * @note Only works on default bigcommerce checkout page
107
83
  */
108
- export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedBtnSelector, onInternationalCheckoutSelected, onShippingAddressSessionFound, }) => {
84
+ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedBtnSelector, onInternationalCheckoutSelected, onLoggedInInternationalAddressDetected, onShippingAddressSessionFound, }) => {
109
85
  if (!window.Zonos.isBigCommerce) {
110
86
  return;
111
87
  }
112
88
  /**
113
- * Keep checking
89
+ * Keep checking.
90
+ * @returns `true` if the caller should stop polling — either because the user
91
+ * is being redirected to Zonos international checkout, or because the
92
+ * logged-in customer is in a bypass group and should stay on BC checkout.
114
93
  */
115
94
  const handleInternationalCheckoutSelected = async (overrideShippingCountry) => {
116
95
  var _a;
@@ -126,6 +105,19 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
126
105
  // do nothing if shipping country is not shippable
127
106
  return false;
128
107
  }
108
+ // Only check bypass after confirming the country is shippable (i.e. user is
109
+ // about to be redirected to Zonos international checkout). Force-refresh so
110
+ // we re-fetch BigCommerce checkout data every time the ship-to country
111
+ // changes — prevents stale customer-group data from a cached fetch.
112
+ const { shouldBypass } = await checkBigCommerceBypassCustomerGroup({
113
+ forceRefresh: true,
114
+ });
115
+ if (shouldBypass) {
116
+ // Logged-in customer is in a bypass group — keep them on BC native
117
+ // checkout and stop polling / fetching further.
118
+ log('Bypass customer group detected on BC checkout, stopping interval', 'info');
119
+ return true;
120
+ }
129
121
  if (onInternationalCheckoutSelected) {
130
122
  await onInternationalCheckoutSelected();
131
123
  }
@@ -157,13 +149,40 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
157
149
  postalCode: shippingAddress.postalCode,
158
150
  state: shippingAddress.stateOrProvince,
159
151
  });
160
- // redirect to home page, home page then will open the checkout dialog if having domestic shipping session
161
- window.location.href = '/';
152
+ // redirect to home page, home page then will open the checkout dialog if
153
+ // having domestic shipping session. Carry over zonosQaUrl / zonosTestMode
154
+ // so the destination page keeps using the same build/env.
155
+ window.location.href = buildBigcommerceRedirectUrl('/');
162
156
  return true;
163
157
  };
164
158
  let isProcessing = false;
165
159
  let intervalCreated = false;
166
160
  let isCheckingLoggedInUserShippingAddress = false;
161
+ /**
162
+ * Set to `true` once the logged-in user has been prompted about a detected
163
+ * international default address and chose to stay on the BigCommerce native
164
+ * checkout. Prevents the observer from re-prompting on subsequent DOM
165
+ * mutations.
166
+ */
167
+ let loggedInAddressCheckSkipped = false;
168
+ /**
169
+ * Set to `true` while the logged-in international-address confirmation
170
+ * dialog is open and we are awaiting the user's response. While this
171
+ * flag is set the polling interval must not call
172
+ * `handleInternationalCheckoutSelected` — otherwise the interval would
173
+ * detect the pre-filled international country, show the loading dialog,
174
+ * and redirect before the user has responded to the confirm prompt.
175
+ */
176
+ let isAwaitingLoggedInConfirmation = false;
177
+ // NOTE: We intentionally do NOT await `checkBigCommerceBypassCustomerGroup()`
178
+ // here before attaching the MutationObserver. The bypass check involves two
179
+ // Storefront API round-trips, and awaiting it synchronously would delay
180
+ // observer registration — on fast-rendering BC pages that window can cause
181
+ // us to miss the initial DOM mutations and never trigger the redirect.
182
+ // Bypass is already enforced inside `checkLoggedInUserShippingAddress` and
183
+ // `handleInternationalCheckoutSelected` (both consult the helper), so the
184
+ // top-level gate is redundant. `initBigCommerceBypassCheck()` is called on
185
+ // page load so those inner calls typically resolve against a warm cache.
167
186
  const observer = new MutationObserver(async () => {
168
187
  var _a;
169
188
  const domesticRedirectedButton = document.querySelector(domesticRedirectedBtnSelector);
@@ -190,24 +209,35 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
190
209
  // For logged-in users, check if their saved address on the checkout is international
191
210
  // before the shipping form is even rendered.
192
211
  // Guard against repeated calls — the observer fires on every DOM mutation.
193
- if (isCheckingLoggedInUserShippingAddress) {
194
- return;
195
- }
196
- isCheckingLoggedInUserShippingAddress = true;
197
- try {
198
- const redirected = await checkLoggedInUserShippingAddress({
199
- onInternationalCheckoutSelected,
200
- });
201
- if (redirected) {
202
- observer.disconnect();
203
- return;
212
+ // Also skip if the user already chose to stay on BC native checkout.
213
+ if (!loggedInAddressCheckSkipped &&
214
+ !isCheckingLoggedInUserShippingAddress) {
215
+ isCheckingLoggedInUserShippingAddress = true;
216
+ isAwaitingLoggedInConfirmation = true;
217
+ try {
218
+ const result = await checkLoggedInUserShippingAddress({
219
+ onInternationalCheckoutSelected,
220
+ onLoggedInInternationalAddressDetected,
221
+ });
222
+ if (result === 'redirected') {
223
+ observer.disconnect();
224
+ return;
225
+ }
226
+ if (result === 'optedOut') {
227
+ // User elected to stay on BC native checkout — don't prompt again
228
+ // for the rest of this session. Continue with the rest of the
229
+ // observer logic so the country-change watcher still fires when
230
+ // the user manually picks an international country in BC's UI.
231
+ loggedInAddressCheckSkipped = true;
232
+ }
233
+ }
234
+ catch (error) {
235
+ logError('Error checking logged-in user shipping address', error);
236
+ }
237
+ finally {
238
+ isCheckingLoggedInUserShippingAddress = false;
239
+ isAwaitingLoggedInConfirmation = false;
204
240
  }
205
- }
206
- catch (error) {
207
- logError('Error checking logged-in user shipping address', error);
208
- }
209
- finally {
210
- isCheckingLoggedInUserShippingAddress = false;
211
241
  }
212
242
  const shipToCountryElement = document.querySelector(((_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.bigcommerceDomesticCheckoutCountrySelector) ||
213
243
  FALLBACK_SHIP_TO_COUNTRY_SELECTOR);
@@ -227,14 +257,18 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
227
257
  // disconnect the observer after we know that's bigcommerce domestic checkout page
228
258
  observer.disconnect();
229
259
  const interval = setInterval(async () => {
230
- if (isProcessing) {
260
+ // Don't redirect while the logged-in international-address confirm
261
+ // dialog is open — the user hasn't made their choice yet.
262
+ if (isProcessing || isAwaitingLoggedInConfirmation) {
231
263
  return;
232
264
  }
233
265
  isProcessing = true;
234
266
  try {
235
- const isInternationalCountrySelected = await handleInternationalCheckoutSelected();
236
- // When isInternationalCountrySelected is true, user will be redirected shortly, so we can stop the checking interval here
237
- if (isInternationalCountrySelected) {
267
+ const shouldStopPolling = await handleInternationalCheckoutSelected();
268
+ // Stop the interval once either:
269
+ // - the user is being redirected to Zonos international checkout
270
+ // - the logged-in customer is in a bypass group (stay on BC checkout)
271
+ if (shouldStopPolling) {
238
272
  clearInterval(interval);
239
273
  return;
240
274
  }
@@ -258,7 +292,7 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
258
292
  clearInterval(stripeBcListenerInterval);
259
293
  addressElement.on('change', event => {
260
294
  const shippingCountry = event.value.address.country;
261
- if (shippingCountry) {
295
+ if (shippingCountry && !isAwaitingLoggedInConfirmation) {
262
296
  void handleInternationalCheckoutSelected(shippingCountry);
263
297
  }
264
298
  });
@@ -1,5 +1,5 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-5242a58d.js';
2
- import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-026da80b.js';
2
+ import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-d11c973f.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-3537021b.js';
@@ -1,4 +1,4 @@
1
- import { l as localizationStore } from './localization-026da80b.js';
1
+ import { l as localizationStore } from './localization-d11c973f.js';
2
2
 
3
3
  /**
4
4
  * Since the backend and the frontend are using the same keys,
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.255.js.zonos.com";
134
+ const cdnUrl = "https://v1.3.256.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.255.js.zonos.com";
383
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.255";
384
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.255";
385
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.255";
382
+ const ZONOS_URL = "https://v1.3.256.js.zonos.com";
383
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.256";
384
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.256";
385
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.256";
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 = "1776282443962";
403
+ Zonos.releaseDate = "1776369543866";
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.255"}`;
426
+ Zonos.version = `v${"1.3.256"}`;
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-5242a58d.js';
2
- import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-f4e43d1a.js';
3
- import { s as storageStore } from './localization-026da80b.js';
2
+ import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-55b8dd7c.js';
3
+ import { s as storageStore } from './localization-d11c973f.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-5242a58d.js';
2
- import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-f4e43d1a.js';
3
- import { s as storageStore } from './localization-026da80b.js';
2
+ import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-55b8dd7c.js';
3
+ import { s as storageStore } from './localization-d11c973f.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