@zonos/elements 1.3.266 → 1.3.267

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 (166) hide show
  1. package/dist/cjs/{cart-efc42379.js → cart-ed2de167.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-400be1b2.js → hasInclusivePrice-bf31fbdb.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-9e4d479f.js → invoice-542c23e7.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-630fcf87.js → isCollectMobileTablet-fe8149a5.js} +2 -2
  6. package/dist/cjs/{localization-4b17c530.js → localization-66d378ab.js} +51 -0
  7. package/dist/cjs/{paypal-3bb55914.js → paypal-d8282578.js} +2 -2
  8. package/dist/cjs/{placeTestOrder-313cbd78.js → placeTestOrder-0a4b9dd7.js} +2 -2
  9. package/dist/cjs/{renderCheckoutCurrency-e0436f1c.js → renderCheckoutCurrency-ac9083d9.js} +2 -2
  10. package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
  15. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  17. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-controller.cjs.entry.js +122 -3
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  20. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  24. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
  25. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  26. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  27. package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
  28. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +1 -1
  29. package/dist/collection/components/main/zonos-controller.js +6 -2
  30. package/dist/collection/components/store/hello/localization.js +6 -0
  31. package/dist/collection/components/utils/checkout/injectDomesticElementHideStyle.js +116 -0
  32. package/dist/collection/types/generated/graphql.internal.types.js +287 -73
  33. package/dist/collection/utils/toggleBigcommerceNativeCurrencySelector.js +48 -0
  34. package/dist/esm/{cart-62c166fc.js → cart-49082718.js} +1 -1
  35. package/dist/esm/{hasInclusivePrice-a73f64b7.js → hasInclusivePrice-2323d514.js} +1 -1
  36. package/dist/esm/index.js +7 -7
  37. package/dist/esm/{invoice-fa4ff6fb.js → invoice-16c688e7.js} +2 -2
  38. package/dist/esm/{isCollectMobileTablet-5f50ec81.js → isCollectMobileTablet-910aea2e.js} +2 -2
  39. package/dist/esm/{localization-d2631105.js → localization-33a9f7ff.js} +51 -0
  40. package/dist/esm/{paypal-424d040d.js → paypal-2e9aa4ba.js} +2 -2
  41. package/dist/esm/{placeTestOrder-cf237d95.js → placeTestOrder-35c9b460.js} +2 -2
  42. package/dist/esm/{renderCheckoutCurrency-513ead96.js → renderCheckoutCurrency-b84a6da7.js} +2 -2
  43. package/dist/esm/zonos-address-display_8.entry.js +2 -2
  44. package/dist/esm/zonos-address_4.entry.js +2 -2
  45. package/dist/esm/zonos-card_5.entry.js +3 -3
  46. package/dist/esm/zonos-cart-items_12.entry.js +6 -6
  47. package/dist/esm/zonos-checkout.entry.js +3 -3
  48. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  49. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  50. package/dist/esm/zonos-collect.entry.js +4 -4
  51. package/dist/esm/zonos-controller.entry.js +122 -3
  52. package/dist/esm/zonos-country-flag.entry.js +1 -1
  53. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  54. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  55. package/dist/esm/zonos-hello.entry.js +1 -1
  56. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  57. package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
  58. package/dist/esm/zonos-invoice.entry.js +4 -4
  59. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  60. package/dist/esm/zonos-store-credit.entry.js +3 -3
  61. package/dist/esm-es5/{cart-62c166fc.js → cart-49082718.js} +1 -1
  62. package/dist/esm-es5/{hasInclusivePrice-a73f64b7.js → hasInclusivePrice-2323d514.js} +1 -1
  63. package/dist/esm-es5/index.js +1 -1
  64. package/dist/esm-es5/{invoice-fa4ff6fb.js → invoice-16c688e7.js} +1 -1
  65. package/dist/esm-es5/{isCollectMobileTablet-5f50ec81.js → isCollectMobileTablet-910aea2e.js} +1 -1
  66. package/dist/esm-es5/{localization-d2631105.js → localization-33a9f7ff.js} +1 -1
  67. package/dist/esm-es5/{paypal-424d040d.js → paypal-2e9aa4ba.js} +2 -2
  68. package/dist/esm-es5/{placeTestOrder-cf237d95.js → placeTestOrder-35c9b460.js} +1 -1
  69. package/dist/esm-es5/{renderCheckoutCurrency-513ead96.js → renderCheckoutCurrency-b84a6da7.js} +1 -1
  70. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  71. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  72. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  73. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  74. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  75. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  76. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  77. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  78. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  79. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  80. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  81. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  82. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  83. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  84. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  85. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  86. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  87. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  88. package/dist/scripts/index.d.ts +33 -13
  89. package/dist/scripts/index.js +1 -1
  90. package/dist/scripts/loadZonos.js +1 -1
  91. package/dist/scripts/zonos.js +1 -1
  92. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  93. package/dist/types/components/utils/checkout/injectDomesticElementHideStyle.d.ts +18 -0
  94. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +14 -13
  95. package/dist/types/types/checkout/CheckoutConfig.d.ts +9 -0
  96. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  97. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  98. package/dist/types/types/generated/graphql.internal.types.d.ts +341 -106
  99. package/dist/types/types/generated/graphql.internal.types.ts +419 -141
  100. package/dist/types/types/utils/ZonosSettings.d.ts +9 -0
  101. package/dist/types/utils/toggleBigcommerceNativeCurrencySelector.d.ts +17 -0
  102. package/dist/zonos-elements/index.esm.js +1 -1
  103. package/dist/zonos-elements/{p-acf42bc1.entry.js → p-01497a20.entry.js} +1 -1
  104. package/dist/zonos-elements/p-029be4a8.entry.js +1 -0
  105. package/dist/zonos-elements/{p-5e10d4ff.system.entry.js → p-034ab928.system.entry.js} +1 -1
  106. package/dist/zonos-elements/p-07a76716.system.js +1 -0
  107. package/dist/zonos-elements/{p-08934304.system.entry.js → p-087520f2.system.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-889e5db0.entry.js → p-0ed70279.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-0ea16658.system.entry.js → p-1325bbd6.system.entry.js} +1 -1
  110. package/dist/zonos-elements/{p-305e2dd8.system.js → p-175c04a4.system.js} +1 -1
  111. package/dist/zonos-elements/{p-bb77b580.entry.js → p-180d3e3d.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-f76d5249.entry.js → p-1ec9b3b0.entry.js} +1 -1
  113. package/dist/zonos-elements/{p-9aaa1d80.entry.js → p-1f256673.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-7b74e5f2.system.entry.js → p-22ba60f6.system.entry.js} +1 -1
  115. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  116. package/dist/zonos-elements/{p-781cc8de.system.entry.js → p-2a8fcb71.system.entry.js} +1 -1
  117. package/dist/zonos-elements/p-2c854197.system.entry.js +1 -0
  118. package/dist/zonos-elements/{p-01384124.system.js → p-311ba000.system.js} +1 -1
  119. package/dist/zonos-elements/{p-7c101a92.system.entry.js → p-3516340a.system.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-a9425900.system.js → p-3b1b3598.system.js} +1 -1
  121. package/dist/zonos-elements/p-458df669.js +1 -0
  122. package/dist/zonos-elements/{p-ce44c942.system.js → p-4f718ef9.system.js} +1 -1
  123. package/dist/zonos-elements/p-5d823ea7.system.js +1 -0
  124. package/dist/zonos-elements/{p-2431f95c.entry.js → p-5e1799bc.entry.js} +1 -1
  125. package/dist/zonos-elements/{p-72187e00.entry.js → p-601bb27e.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-1d6f3ab9.js → p-6987f9c9.js} +1 -1
  127. package/dist/zonos-elements/{p-7b640194.entry.js → p-703fc360.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-7677c45a.entry.js → p-71c7a1ff.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-06c4d422.system.js → p-77c2e465.system.js} +1 -1
  130. package/dist/zonos-elements/{p-a75baf3e.js → p-843ced6c.js} +1 -1
  131. package/dist/zonos-elements/{p-cd88efdb.js → p-84dbf474.js} +1 -1
  132. package/dist/zonos-elements/{p-2b30beea.system.js → p-8570e88a.system.js} +1 -1
  133. package/dist/zonos-elements/{p-ea88f7f5.system.entry.js → p-8d5f413c.system.entry.js} +1 -1
  134. package/dist/zonos-elements/{p-03e95598.entry.js → p-8f9e95c2.entry.js} +1 -1
  135. package/dist/zonos-elements/{p-227ef22f.entry.js → p-90c932fd.entry.js} +1 -1
  136. package/dist/zonos-elements/{p-9b660cd3.js → p-9a5a2043.js} +1 -1
  137. package/dist/zonos-elements/{p-209d7728.system.entry.js → p-9b0a6fe5.system.entry.js} +1 -1
  138. package/dist/zonos-elements/{p-72efa5b7.system.entry.js → p-9e0cb5b3.system.entry.js} +1 -1
  139. package/dist/zonos-elements/{p-6ab742d9.system.entry.js → p-a1bad0c3.system.entry.js} +1 -1
  140. package/dist/zonos-elements/{p-d63e18a8.entry.js → p-a6db8883.entry.js} +1 -1
  141. package/dist/zonos-elements/{p-f1bbad73.entry.js → p-a78bc004.entry.js} +1 -1
  142. package/dist/zonos-elements/{p-0efd2d5a.js → p-adb9827c.js} +1 -1
  143. package/dist/zonos-elements/{p-bbbbae9a.system.entry.js → p-b5a26334.system.entry.js} +1 -1
  144. package/dist/zonos-elements/{p-37207963.system.js → p-b6a36c25.system.js} +1 -1
  145. package/dist/zonos-elements/{p-4d433020.system.entry.js → p-b7e4a020.system.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-8cd0a098.system.entry.js → p-baf0b24c.system.entry.js} +1 -1
  147. package/dist/zonos-elements/p-becac995.js +1 -0
  148. package/dist/zonos-elements/{p-4495f149.system.entry.js → p-c9c17d08.system.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-27513bfe.system.entry.js → p-cb966d16.system.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-6b682a6b.system.entry.js → p-ce103c66.system.entry.js} +1 -1
  151. package/dist/zonos-elements/p-cfb0059f.js +1 -0
  152. package/dist/zonos-elements/{p-02d812c8.entry.js → p-d950b0b4.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-5ae695a3.entry.js → p-db5f6b8c.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-daeb57cb.entry.js → p-e056ae6b.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-bce7bfcc.system.entry.js → p-e850e6e7.system.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-456a600b.entry.js → p-fb712719.entry.js} +1 -1
  157. package/dist/zonos-elements/zonos-elements.css +1 -1
  158. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  159. package/package.json +1 -1
  160. package/dist/zonos-elements/p-1a470353.entry.js +0 -1
  161. package/dist/zonos-elements/p-27eeaf56.system.js +0 -1
  162. package/dist/zonos-elements/p-40a45837.system.entry.js +0 -1
  163. package/dist/zonos-elements/p-61d73d69.js +0 -1
  164. package/dist/zonos-elements/p-8ccd6d3f.js +0 -1
  165. package/dist/zonos-elements/p-a371f770.system.js +0 -1
  166. package/dist/zonos-elements/p-c7047a1c.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-0662b95f.js');
4
- const localization = require('./localization-4b17c530.js');
4
+ const localization = require('./localization-66d378ab.js');
5
5
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
6
6
  const handleFetch = require('./handleFetch-954f30e1.js');
7
7
  const isDarkColor = require('./isDarkColor-e317bb06.js');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const localization = require('./localization-4b17c530.js');
3
+ const localization = require('./localization-66d378ab.js');
4
4
 
5
5
  /**
6
6
  * Since the backend and the frontend are using the same keys,
@@ -133,7 +133,7 @@ const getZonosQaUrl = () => {
133
133
  return null;
134
134
  }
135
135
  const qaUrl = extractZonosQaUrl(window.location.href);
136
- const cdnUrl = "https://v1.3.266.js.zonos.com";
136
+ const cdnUrl = "https://v1.3.267.js.zonos.com";
137
137
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
138
138
  if (!qaUrl &&
139
139
  (cdnUrl.includes('test.') ||
@@ -381,10 +381,10 @@ const zonosLoadUrl = (() => {
381
381
  return null;
382
382
  })();
383
383
  const startLoadTime = Date.now();
384
- const ZONOS_URL = "https://v1.3.266.js.zonos.com";
385
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.266";
386
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.266";
387
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.266";
384
+ const ZONOS_URL = "https://v1.3.267.js.zonos.com";
385
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.267";
386
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.267";
387
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.267";
388
388
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
389
389
  const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
390
390
  class Zonos {
@@ -402,7 +402,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
402
402
  ? new URLSearchParams(window.location.search).get('iframeLogType')
403
403
  : null;
404
404
  Zonos.isBigCommerce = false;
405
- Zonos.releaseDate = "1779310983053";
405
+ Zonos.releaseDate = "1779911513615";
406
406
  Zonos.isLegacyCheckout = false;
407
407
  Zonos.googleAnalyticId = null;
408
408
  Zonos.googleAnalyticReady = false;
@@ -427,7 +427,7 @@ Zonos.isNpm = true;
427
427
  Zonos.zonosQaUrl = null;
428
428
  Zonos.zonosQaUrlApi = null;
429
429
  Zonos.trackEventLogs = [];
430
- Zonos.version = `v${"1.3.266"}`;
430
+ Zonos.version = `v${"1.3.267"}`;
431
431
  Zonos.modeAlerted = false;
432
432
  Zonos.cartData = null;
433
433
  Zonos.paypal = null;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-0662b95f.js');
4
- const cart = require('./cart-efc42379.js');
5
- const localization = require('./localization-4b17c530.js');
4
+ const cart = require('./cart-ed2de167.js');
5
+ const localization = require('./localization-66d378ab.js');
6
6
  const handleFetch = require('./handleFetch-954f30e1.js');
7
7
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
8
8
 
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-0662b95f.js');
4
- const cart = require('./cart-efc42379.js');
5
- const localization = require('./localization-4b17c530.js');
4
+ const cart = require('./cart-ed2de167.js');
5
+ const localization = require('./localization-66d378ab.js');
6
6
  const handleFetch = require('./handleFetch-954f30e1.js');
7
7
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
8
8
 
@@ -17127,6 +17127,52 @@ const setZCountryUrlParam = (selectedCountryCode) => {
17127
17127
  }
17128
17128
  };
17129
17129
 
17130
+ const HIDE_CLASSNAME = 'z--bc-currency-hide';
17131
+ /**
17132
+ * Hides BigCommerce's native currency selector while Hello is actively
17133
+ * converting prices, and restores it otherwise. The selector is hidden
17134
+ * only when all of the following hold:
17135
+ *
17136
+ * - the host storefront is BigCommerce (`window.Zonos.isBigCommerce`),
17137
+ * - the shopper is in a Zonos shipping zone
17138
+ * (`localizationStore.isShippableCountry`), and
17139
+ * - BC's currently selected native currency
17140
+ * (`document.body.dataset.currencyCode`) equals `zonosStore.sourceCurrency`
17141
+ * — i.e. BC has not pre-converted the prices Hello reads from the DOM.
17142
+ *
17143
+ * If those conditions don't hold (non-BC platform, non-shippable country,
17144
+ * BC currency differs from source, or the selector is not configured), the
17145
+ * function removes the class so any previously hidden element re-appears.
17146
+ */
17147
+ const toggleBigcommerceNativeCurrencySelector = () => {
17148
+ var _a, _b;
17149
+ if (typeof window === 'undefined' || !((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.isBigCommerce)) {
17150
+ return;
17151
+ }
17152
+ const selector = (_b = zonosStore.zonosStore.genericSettings) === null || _b === void 0 ? void 0 : _b.bigcommerceNativeCurrencySelector;
17153
+ if (!selector) {
17154
+ return;
17155
+ }
17156
+ const bigcommerceCurrencyCode = document.body.dataset.currencyCode;
17157
+ const shouldHide = localizationStore.isShippableCountry &&
17158
+ !!bigcommerceCurrencyCode &&
17159
+ bigcommerceCurrencyCode === zonosStore.zonosStore.sourceCurrency;
17160
+ try {
17161
+ const elements = document.querySelectorAll(selector);
17162
+ elements.forEach(element => {
17163
+ if (shouldHide) {
17164
+ element.classList.add(HIDE_CLASSNAME);
17165
+ }
17166
+ else {
17167
+ element.classList.remove(HIDE_CLASSNAME);
17168
+ }
17169
+ });
17170
+ }
17171
+ catch (error) {
17172
+ handleFetch.logError(`Error toggling BigCommerce native currency selector: ${error}`);
17173
+ }
17174
+ };
17175
+
17130
17176
  const { dispose: localizationDispose, onChange: localizationStoreOnChange, state: localizationStore, } = zonosStore.createStore({
17131
17177
  countryLandedCost: null,
17132
17178
  customMessages: [],
@@ -17288,6 +17334,11 @@ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelecte
17288
17334
  localizationStore.isDisabledCountry = isDisabledCountry;
17289
17335
  VarianceTest.log(`${localizationStore.selectedCountryCode} is a disabled country: ${localizationStore.isDisabledCountry}`);
17290
17336
  addInternationalHideClass();
17337
+ // Hide / restore BC's native currency selector based on the new
17338
+ // shipping-zone state. Runs here (rather than inside `currencyDisplay`)
17339
+ // because `currencyDisplay` is also invoked from the price-mutation
17340
+ // observer in `zonos-hello.tsx`, which fires on every DOM render.
17341
+ toggleBigcommerceNativeCurrencySelector();
17291
17342
  if (!selectedCountryCode) {
17292
17343
  return;
17293
17344
  }
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-0662b95f.js');
4
- const cart = require('./cart-efc42379.js');
5
- const localization = require('./localization-4b17c530.js');
4
+ const cart = require('./cart-ed2de167.js');
5
+ const localization = require('./localization-66d378ab.js');
6
6
  const handleFetch = require('./handleFetch-954f30e1.js');
7
7
  const isContrastColor = require('./isContrastColor-a02c4889.js');
8
8
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-efc42379.js');
4
- const localization = require('./localization-4b17c530.js');
3
+ const cart = require('./cart-ed2de167.js');
4
+ const localization = require('./localization-66d378ab.js');
5
5
  const handleFetch = require('./handleFetch-954f30e1.js');
6
6
 
7
7
  const placeTestOrder = async () => {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-efc42379.js');
4
- const localization = require('./localization-4b17c530.js');
3
+ const cart = require('./cart-ed2de167.js');
4
+ const localization = require('./localization-66d378ab.js');
5
5
 
6
6
  const getDisplayCurrency = () => {
7
7
  var _a, _b;
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-4b17c530.js');
6
+ const localization = require('./localization-66d378ab.js');
7
7
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
8
- const cart = require('./cart-efc42379.js');
8
+ const cart = require('./cart-ed2de167.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const getBorderRadius = require('./getBorderRadius-a91911e7.js');
11
11
  const zonosStore = require('./zonosStore-0662b95f.js');
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
6
  const throttle = require('./throttle-8aebac7d.js');
7
- const cart = require('./cart-efc42379.js');
8
- const localization = require('./localization-4b17c530.js');
7
+ const cart = require('./cart-ed2de167.js');
8
+ const localization = require('./localization-66d378ab.js');
9
9
  const zonosStore = require('./zonosStore-0662b95f.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
11
11
  const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-b8abf6de.js');
@@ -6,10 +6,10 @@ const index = require('./index-b1f95d96.js');
6
6
  const zonosStore = require('./zonosStore-0662b95f.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  const getBorderRadius = require('./getBorderRadius-a91911e7.js');
9
- const cart = require('./cart-efc42379.js');
10
- const localization = require('./localization-4b17c530.js');
9
+ const cart = require('./cart-ed2de167.js');
10
+ const localization = require('./localization-66d378ab.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
12
- const paypal = require('./paypal-3bb55914.js');
12
+ const paypal = require('./paypal-d8282578.js');
13
13
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
14
  require('./isDarkColor-e317bb06.js');
15
15
  require('./isContrastColor-a02c4889.js');
@@ -3,20 +3,20 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const localization = require('./localization-4b17c530.js');
8
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-e0436f1c.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const localization = require('./localization-66d378ab.js');
8
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-ac9083d9.js');
9
9
  const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-31da84b7.js');
10
10
  const classes = require('./classes-b7918f56.js');
11
11
  const zonosStore = require('./zonosStore-0662b95f.js');
12
- const hasInclusivePrice = require('./hasInclusivePrice-400be1b2.js');
13
- const paypal = require('./paypal-3bb55914.js');
12
+ const hasInclusivePrice = require('./hasInclusivePrice-bf31fbdb.js');
13
+ const paypal = require('./paypal-d8282578.js');
14
14
  const handleFetch = require('./handleFetch-954f30e1.js');
15
15
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
16
16
  const getBorderRadius = require('./getBorderRadius-a91911e7.js');
17
17
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
18
18
  const ILanguage = require('./ILanguage-98b04442.js');
19
- const placeTestOrder = require('./placeTestOrder-313cbd78.js');
19
+ const placeTestOrder = require('./placeTestOrder-0a4b9dd7.js');
20
20
  const isDarkColor = require('./isDarkColor-e317bb06.js');
21
21
  const getContrastColor = require('./getContrastColor-ce80dbe7.js');
22
22
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const paypal = require('./paypal-3bb55914.js');
8
- const localization = require('./localization-4b17c530.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const paypal = require('./paypal-d8282578.js');
8
+ const localization = require('./localization-66d378ab.js');
9
9
  const zonosStore = require('./zonosStore-0662b95f.js');
10
10
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
6
+ const cart = require('./cart-ed2de167.js');
7
7
  const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-31da84b7.js');
8
8
  const zonosStore = require('./zonosStore-0662b95f.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const styles = require('./styles-d1e64fb9.js');
11
- require('./localization-4b17c530.js');
11
+ require('./localization-66d378ab.js');
12
12
  require('./handleFetch-954f30e1.js');
13
13
  require('./VarianceTest-bec00ea8.js');
14
14
  require('./isDarkColor-e317bb06.js');
@@ -3,19 +3,19 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const paypal = require('./paypal-3bb55914.js');
8
- const localization = require('./localization-4b17c530.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const paypal = require('./paypal-d8282578.js');
8
+ const localization = require('./localization-66d378ab.js');
9
9
  const zonosStore = require('./zonosStore-0662b95f.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
11
11
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
12
12
  const getBorderRadius = require('./getBorderRadius-a91911e7.js');
13
13
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
- const isCollectMobileTablet = require('./isCollectMobileTablet-630fcf87.js');
14
+ const isCollectMobileTablet = require('./isCollectMobileTablet-fe8149a5.js');
15
15
  const classes = require('./classes-b7918f56.js');
16
16
  const ILanguage = require('./ILanguage-98b04442.js');
17
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-e0436f1c.js');
18
- const placeTestOrder = require('./placeTestOrder-313cbd78.js');
17
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-ac9083d9.js');
18
+ const placeTestOrder = require('./placeTestOrder-0a4b9dd7.js');
19
19
  const renderFallback = require('./renderFallback-bc20ee20.js');
20
20
  require('./isDarkColor-e317bb06.js');
21
21
  require('./isContrastColor-a02c4889.js');
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const isCollectMobileTablet = require('./isCollectMobileTablet-630fcf87.js');
8
- const paypal = require('./paypal-3bb55914.js');
9
- const localization = require('./localization-4b17c530.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const isCollectMobileTablet = require('./isCollectMobileTablet-fe8149a5.js');
8
+ const paypal = require('./paypal-d8282578.js');
9
+ const localization = require('./localization-66d378ab.js');
10
10
  const zonosStore = require('./zonosStore-0662b95f.js');
11
11
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
12
12
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const localization = require('./localization-4b17c530.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const localization = require('./localization-66d378ab.js');
8
8
  const zonosStore = require('./zonosStore-0662b95f.js');
9
9
  const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -101,6 +101,122 @@ const initInvoice = () => {
101
101
  injectCheckoutElement();
102
102
  };
103
103
 
104
+ const STYLE_ID = 'zonos-domestic-element-hide-style';
105
+ /**
106
+ * Probe whether the host parser understands `:is(...)`. Real browsers do
107
+ * (Chrome 88+, Firefox 78+, Safari 14+); older environments and some test
108
+ * runtimes don't. When supported, we wrap the merchant selector in a single
109
+ * `:is(...)` so a single `body.z-intl ` ancestor scopes the whole group.
110
+ * When not supported, we distribute the prefix across each top-level
111
+ * comma-separated piece instead — so the rule still applies in that
112
+ * environment.
113
+ */
114
+ const supportsIsSelector = typeof document !== 'undefined' &&
115
+ (() => {
116
+ try {
117
+ document.querySelector(':is(.zonos-is-probe)');
118
+ return true;
119
+ }
120
+ catch (_a) {
121
+ return false;
122
+ }
123
+ })();
124
+ /**
125
+ * Split a CSS selector string on top-level commas. Commas inside parentheses
126
+ * (`:not(.a, .b)`, `:nth-child(2n+1)`) or attribute brackets
127
+ * (`[data-foo=","]`) are preserved as part of the piece.
128
+ */
129
+ const splitTopLevelCommas = (input) => {
130
+ const parts = [];
131
+ let parenDepth = 0;
132
+ let bracketDepth = 0;
133
+ let current = '';
134
+ for (let i = 0; i < input.length; i++) {
135
+ const char = input[i];
136
+ if (char === '(') {
137
+ parenDepth++;
138
+ }
139
+ else if (char === ')') {
140
+ parenDepth--;
141
+ }
142
+ else if (char === '[') {
143
+ bracketDepth++;
144
+ }
145
+ else if (char === ']') {
146
+ bracketDepth--;
147
+ }
148
+ if (char === ',' && parenDepth === 0 && bracketDepth === 0) {
149
+ const trimmed = current.trim();
150
+ if (trimmed) {
151
+ parts.push(trimmed);
152
+ }
153
+ current = '';
154
+ }
155
+ else {
156
+ current += char;
157
+ }
158
+ }
159
+ const trimmed = current.trim();
160
+ if (trimmed) {
161
+ parts.push(trimmed);
162
+ }
163
+ return parts;
164
+ };
165
+ /**
166
+ * Build the fully-scoped selector that will land in the injected `<style>`
167
+ * tag. Exported so tests can exercise both branches of the `:is()`-support
168
+ * fallback without having to mock the module-level probe.
169
+ */
170
+ const buildDomesticHideSelector = ({ merchantSelector, supportsIs, }) => {
171
+ if (supportsIs) {
172
+ return `body.z-intl :is(${merchantSelector})`;
173
+ }
174
+ // Fallback: distribute the `body.z-intl ` ancestor prefix across each
175
+ // top-level comma-separated piece. Parentheses/brackets are respected,
176
+ // so pseudo-classes that take selector lists (`:not(.a, .b)`) and
177
+ // attribute selectors that contain commas stay intact.
178
+ return splitTopLevelCommas(merchantSelector)
179
+ .map(part => `body.z-intl ${part}`)
180
+ .join(', ');
181
+ };
182
+ /**
183
+ * Inject a `<style>` tag that hides storefront elements matching the
184
+ * merchant-configured `checkoutSettings.domesticElementSelector`, scoped to
185
+ * `body.z-intl` so the rule only takes effect when the shopper is in a
186
+ * shipping zone (Hello sets the body class). The exact selector we emit is
187
+ * also the selector we validate — see [[buildDomesticHideSelector]] for the
188
+ * `:is()`-support branching.
189
+ */
190
+ const injectDomesticElementHideStyle = (domesticElementSelector) => {
191
+ if (typeof document === 'undefined' || !domesticElementSelector) {
192
+ return;
193
+ }
194
+ const fullSelector = buildDomesticHideSelector({
195
+ merchantSelector: domesticElementSelector,
196
+ supportsIs: supportsIsSelector,
197
+ });
198
+ // The browser's own parser is the source of truth — `document.querySelector`
199
+ // throws `DOMException(SyntaxError)` for syntactically invalid selectors.
200
+ // Validating the exact string we're about to emit catches both malformed
201
+ // input and payloads that close `:is(` early to escape the wrapper.
202
+ try {
203
+ document.querySelector(fullSelector);
204
+ }
205
+ catch (_a) {
206
+ VarianceTest.log(`Skip domesticElementSelector injection: "${domesticElementSelector}" produced an invalid CSS selector ("${fullSelector}")`, 'warn');
207
+ return;
208
+ }
209
+ // Already injected — settings can re-emit on hot reload during dev.
210
+ if (document.getElementById(STYLE_ID)) {
211
+ return;
212
+ }
213
+ const style = document.createElement('style');
214
+ style.id = STYLE_ID;
215
+ style.textContent = `${fullSelector} { display: none !important; }`;
216
+ (document.head || document.body).appendChild(style);
217
+ VarianceTest.log('Zonos domestic element hide style injected');
218
+ };
219
+
104
220
  const injectHelloComponent = (anchorElementSelector) => {
105
221
  const triggerAnchorElement = document.querySelector(anchorElementSelector);
106
222
  // append checkout component if doesn't exist
@@ -633,6 +749,9 @@ const ZonosController = class {
633
749
  zonosSettings: json,
634
750
  });
635
751
  zonosStore.zonosStore.zonosMode = zonosMode;
752
+ // Inject the merchant's domestic-element hide style now that
753
+ // checkoutSettings have been merged into the store.
754
+ injectDomesticElementHideStyle(zonosStore.zonosStore.checkoutSettings.domesticElementSelector);
636
755
  // setup google font after store loaded
637
756
  void this.setupGoogleFont();
638
757
  if (zonosStore.zonosStore.helloSettings.visibilityStatus === 'DISABLED') {
@@ -730,7 +849,7 @@ const ZonosController = class {
730
849
  zonosStore.zonosStore.organizationName = organizationName;
731
850
  }
732
851
  render() {
733
- return index.h(index.Host, { key: '681a81baa59bfe91e9fe0927aee49fa720fcb35b', class: "zonos--elements" });
852
+ return index.h(index.Host, { key: 'fe1f262a2bfbf4f6f39c0f23783c132bde8d2dd7', class: "zonos--elements" });
734
853
  }
735
854
  };
736
855
  ZonosController.style = ZonosControllerStyle0;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-4b17c530.js');
6
+ const localization = require('./localization-66d378ab.js');
7
7
  const zonosStore = require('./zonosStore-0662b95f.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  require('./handleFetch-954f30e1.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-4b17c530.js');
6
+ const localization = require('./localization-66d378ab.js');
7
7
  const zonosStore = require('./zonosStore-0662b95f.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
9
  const isDarkColor = require('./isDarkColor-e317bb06.js');
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-4b17c530.js');
6
+ const localization = require('./localization-66d378ab.js');
7
7
  const zonosStore = require('./zonosStore-0662b95f.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
10
- const hasInclusivePrice = require('./hasInclusivePrice-400be1b2.js');
10
+ const hasInclusivePrice = require('./hasInclusivePrice-bf31fbdb.js');
11
11
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
12
12
  const TaxId = require('./TaxId-12acedde.js');
13
13
  require('./handleFetch-954f30e1.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
6
  const debounce = require('./debounce-606d1801.js');
7
- const localization = require('./localization-4b17c530.js');
7
+ const localization = require('./localization-66d378ab.js');
8
8
  const zonosStore = require('./zonosStore-0662b95f.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const localization = require('./localization-4b17c530.js');
8
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-e0436f1c.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const localization = require('./localization-66d378ab.js');
8
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-ac9083d9.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
- const invoice = require('./invoice-9e4d479f.js');
10
+ const invoice = require('./invoice-542c23e7.js');
11
11
  const renderFallback = require('./renderFallback-bc20ee20.js');
12
12
  require('./zonosStore-0662b95f.js');
13
13
  require('./VarianceTest-bec00ea8.js');
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const paypal = require('./paypal-3bb55914.js');
8
- const localization = require('./localization-4b17c530.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const paypal = require('./paypal-d8282578.js');
8
+ const localization = require('./localization-66d378ab.js');
9
9
  const zonosStore = require('./zonosStore-0662b95f.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
11
11
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
@@ -14,9 +14,9 @@ const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
14
  const isInvoiceMobileTablet = require('./isInvoiceMobileTablet-dde41e4e.js');
15
15
  const classes = require('./classes-b7918f56.js');
16
16
  const ILanguage = require('./ILanguage-98b04442.js');
17
- const invoice = require('./invoice-9e4d479f.js');
18
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-e0436f1c.js');
19
- const placeTestOrder = require('./placeTestOrder-313cbd78.js');
17
+ const invoice = require('./invoice-542c23e7.js');
18
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-ac9083d9.js');
19
+ const placeTestOrder = require('./placeTestOrder-0a4b9dd7.js');
20
20
  const renderFallback = require('./renderFallback-bc20ee20.js');
21
21
  require('./isDarkColor-e317bb06.js');
22
22
  require('./isContrastColor-a02c4889.js');
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const invoice = require('./invoice-9e4d479f.js');
8
- const paypal = require('./paypal-3bb55914.js');
9
- const localization = require('./localization-4b17c530.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const invoice = require('./invoice-542c23e7.js');
8
+ const paypal = require('./paypal-d8282578.js');
9
+ const localization = require('./localization-66d378ab.js');
10
10
  const zonosStore = require('./zonosStore-0662b95f.js');
11
11
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
12
12
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-4b17c530.js');
6
+ const localization = require('./localization-66d378ab.js');
7
7
  const zonosStore = require('./zonosStore-0662b95f.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
9
  require('./handleFetch-954f30e1.js');
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-efc42379.js');
7
- const localization = require('./localization-4b17c530.js');
6
+ const cart = require('./cart-ed2de167.js');
7
+ const localization = require('./localization-66d378ab.js');
8
8
  const zonosStore = require('./zonosStore-0662b95f.js');
9
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-e0436f1c.js');
9
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-ac9083d9.js');
10
10
  const getBorderRadius = require('./getBorderRadius-a91911e7.js');
11
11
  require('./VarianceTest-bec00ea8.js');
12
12
  require('./handleFetch-954f30e1.js');