@zonos/elements 1.2.4-alpha.7 → 1.3.2

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 (170) hide show
  1. package/README.md +80 -1
  2. package/dist/cjs/{cart-90f7c8c0.js → cart-cfa5d5fd.js} +4 -4
  3. package/dist/cjs/{getBorderRadius-bf4a4276.js → getBorderRadius-c3c63ee6.js} +1 -1
  4. package/dist/cjs/index.cjs.js +5 -5
  5. package/dist/cjs/{isDarkColor-ff6ff183.js → isDarkColor-fc8c294a.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{localization-9caf3397.js → localization-4746acf7.js} +2 -2
  8. package/dist/cjs/{submitGtag-b141b45d.js → submitGtag-ca175427.js} +2 -2
  9. package/dist/cjs/zonos-address_2.cjs.entry.js +5 -5
  10. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-button_2.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-cart-items_10.cjs.entry.js +9 -15
  15. package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
  16. package/dist/cjs/zonos-controller.cjs.entry.js +15 -9
  17. package/dist/cjs/zonos-country-flag_4.cjs.entry.js +3 -3
  18. package/dist/cjs/zonos-elements.cjs.js +1 -1
  19. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-hello.cjs.entry.js +8 -5
  21. package/dist/cjs/zonos-icon.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
  24. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  26. package/dist/cjs/{zonosStore-b43ef5db.js → zonosStore-10d1d6ff.js} +0 -8
  27. package/dist/collection/__tests__/build-utils/urlCheckOne.js +4 -1
  28. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -10
  29. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +6 -3
  30. package/dist/collection/components/main/zonos-controller.js +35 -8
  31. package/dist/collection/components/store/zonosStore.js +0 -8
  32. package/dist/collection/components/utils/api/{getZonosSetting.js → getZonosSettings.js} +3 -3
  33. package/dist/collection/components/utils/handleFetch.js +1 -1
  34. package/dist/collection/environment.js +14 -3
  35. package/dist/collection/scripts/{zonos.js → zonosBase.js} +7 -19
  36. package/dist/collection/types/generated/graphql.customer.types.js +52 -4
  37. package/dist/collection/types/generated/graphql.frontend.types.js +22 -16
  38. package/dist/components/localization.js +1 -1
  39. package/dist/components/zonos-checkout-finish2.js +5 -10
  40. package/dist/components/zonos-controller.js +12 -5
  41. package/dist/components/zonos-hello.js +6 -3
  42. package/dist/components/zonosStore.js +0 -8
  43. package/dist/esm/{cart-b439be00.js → cart-d81b92ea.js} +4 -4
  44. package/dist/esm/{getBorderRadius-178a0a05.js → getBorderRadius-77e97943.js} +1 -1
  45. package/dist/esm/index.js +5 -5
  46. package/dist/esm/{isDarkColor-416d6047.js → isDarkColor-69090b29.js} +1 -1
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm/{localization-a51ccbc2.js → localization-0c5b29fd.js} +2 -2
  49. package/dist/esm/{submitGtag-521826a2.js → submitGtag-8a0fbd41.js} +2 -2
  50. package/dist/esm/zonos-address_2.entry.js +5 -5
  51. package/dist/esm/zonos-badge.entry.js +1 -1
  52. package/dist/esm/zonos-banner.entry.js +1 -1
  53. package/dist/esm/zonos-button_2.entry.js +3 -3
  54. package/dist/esm/zonos-card_2.entry.js +1 -1
  55. package/dist/esm/zonos-cart-items_10.entry.js +9 -15
  56. package/dist/esm/zonos-checkout.entry.js +6 -6
  57. package/dist/esm/zonos-controller.entry.js +15 -9
  58. package/dist/esm/zonos-country-flag_4.entry.js +3 -3
  59. package/dist/esm/zonos-elements.js +1 -1
  60. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  61. package/dist/esm/zonos-hello.entry.js +8 -5
  62. package/dist/esm/zonos-icon.entry.js +1 -1
  63. package/dist/esm/zonos-notification.entry.js +1 -1
  64. package/dist/esm/zonos-payment.entry.js +5 -5
  65. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  66. package/dist/esm/zonos-text.entry.js +1 -1
  67. package/dist/esm/{zonosStore-61e74f58.js → zonosStore-34f07ee8.js} +0 -8
  68. package/dist/esm-es5/{cart-b439be00.js → cart-d81b92ea.js} +1 -1
  69. package/dist/esm-es5/{getBorderRadius-178a0a05.js → getBorderRadius-77e97943.js} +1 -1
  70. package/dist/esm-es5/index.js +1 -1
  71. package/dist/esm-es5/{isDarkColor-416d6047.js → isDarkColor-69090b29.js} +1 -1
  72. package/dist/esm-es5/loader.js +1 -1
  73. package/dist/esm-es5/{localization-a51ccbc2.js → localization-0c5b29fd.js} +1 -1
  74. package/dist/esm-es5/{submitGtag-521826a2.js → submitGtag-8a0fbd41.js} +1 -1
  75. package/dist/esm-es5/zonos-address_2.entry.js +1 -1
  76. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  77. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  78. package/dist/esm-es5/zonos-button_2.entry.js +1 -1
  79. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  80. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
  81. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  82. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  83. package/dist/esm-es5/zonos-country-flag_4.entry.js +1 -1
  84. package/dist/esm-es5/zonos-elements.js +1 -1
  85. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  86. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  87. package/dist/esm-es5/zonos-icon.entry.js +1 -1
  88. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  89. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  90. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  91. package/dist/esm-es5/zonos-text.entry.js +1 -1
  92. package/dist/esm-es5/{zonosStore-61e74f58.js → zonosStore-34f07ee8.js} +1 -1
  93. package/dist/scripts/extractZonosQaUrl.js +1 -30
  94. package/dist/scripts/loadStripe.js +1 -118
  95. package/dist/scripts/loadZonos.js +1 -565
  96. package/dist/scripts/stripe.js +1 -126
  97. package/dist/scripts/zonos.js +1 -565
  98. package/dist/scripts/zonosBase.js +1 -0
  99. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +2 -3
  100. package/dist/types/components/main/zonos-controller.d.ts +5 -1
  101. package/dist/types/components/store/zonosStore.d.ts +1 -3
  102. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  103. package/dist/types/components/utils/api/{getZonosSetting.d.ts → getZonosSettings.d.ts} +1 -1
  104. package/dist/types/components.d.ts +6 -2
  105. package/dist/types/scripts/{zonos.d.ts → zonosBase.d.ts} +6 -3
  106. package/dist/types/types/checkout/CheckoutConfig.d.ts +3 -2
  107. package/dist/types/types/generated/graphql.customer.types.d.ts +64 -5
  108. package/dist/types/types/generated/graphql.customer.types.ts +81 -8
  109. package/dist/types/types/generated/graphql.frontend.types.d.ts +107 -86
  110. package/dist/types/types/generated/graphql.frontend.types.ts +159 -110
  111. package/dist/types/types/global.d.ts +10 -2
  112. package/dist/types/types/hello/HelloConfig.d.ts +0 -1
  113. package/dist/zonos-elements/index.esm.js +1 -1
  114. package/dist/zonos-elements/{p-1685c8df.js → p-06a332cd.js} +1 -1
  115. package/dist/zonos-elements/{p-4ed71bd7.entry.js → p-124857ae.entry.js} +1 -1
  116. package/dist/zonos-elements/{p-e98be2d0.system.entry.js → p-1f494581.system.entry.js} +1 -1
  117. package/dist/zonos-elements/p-24fbe845.system.js +1 -1
  118. package/dist/zonos-elements/{p-4846796a.js → p-2b41549a.js} +1 -1
  119. package/dist/zonos-elements/p-2e1e9074.js +1 -0
  120. package/dist/zonos-elements/{p-2801d868.entry.js → p-3509ffaa.entry.js} +1 -1
  121. package/dist/zonos-elements/{p-1d4a970b.entry.js → p-3c8763a7.entry.js} +1 -1
  122. package/dist/zonos-elements/{p-49f09b91.entry.js → p-3e7444c6.entry.js} +1 -1
  123. package/dist/zonos-elements/p-436faf98.system.entry.js +1 -0
  124. package/dist/zonos-elements/{p-55f49f1e.js → p-4b3baf99.js} +1 -1
  125. package/dist/zonos-elements/{p-a504f64f.system.js → p-5066955b.system.js} +1 -1
  126. package/dist/zonos-elements/{p-e5ae22a9.system.entry.js → p-53ea93c2.system.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-f367f2fe.system.entry.js → p-5bada106.system.entry.js} +1 -1
  128. package/dist/zonos-elements/p-5e87609f.entry.js +1 -0
  129. package/dist/zonos-elements/{p-b85be1ab.system.js → p-7730250d.system.js} +1 -1
  130. package/dist/zonos-elements/{p-089ba905.js → p-86f22026.js} +1 -1
  131. package/dist/zonos-elements/{p-a0e36ed3.entry.js → p-88600956.entry.js} +1 -1
  132. package/dist/zonos-elements/{p-89c210d6.entry.js → p-8b1cb8a4.entry.js} +1 -1
  133. package/dist/zonos-elements/p-8bd04aaa.entry.js +1 -0
  134. package/dist/zonos-elements/{p-47390db7.system.entry.js → p-935fa685.system.entry.js} +1 -1
  135. package/dist/zonos-elements/{p-639396bb.entry.js → p-9c1f19b6.entry.js} +1 -1
  136. package/dist/zonos-elements/{p-4d93275c.entry.js → p-a063c4b7.entry.js} +1 -1
  137. package/dist/zonos-elements/p-a174d834.system.js +1 -0
  138. package/dist/zonos-elements/{p-3c6988d7.js → p-a244579e.js} +1 -1
  139. package/dist/zonos-elements/{p-24eed2a8.system.js → p-a54d8db3.system.js} +1 -1
  140. package/dist/zonos-elements/{p-e1f6ab97.entry.js → p-ab00288a.entry.js} +1 -1
  141. package/dist/zonos-elements/{p-b51de536.system.js → p-ab179c88.system.js} +1 -1
  142. package/dist/zonos-elements/{p-afe26069.entry.js → p-ad2b4bda.entry.js} +1 -1
  143. package/dist/zonos-elements/{p-4bee0bff.system.entry.js → p-b3a71ae4.system.entry.js} +1 -1
  144. package/dist/zonos-elements/{p-d856a200.system.entry.js → p-b3e034bb.system.entry.js} +1 -1
  145. package/dist/zonos-elements/p-b7e061e7.entry.js +1 -0
  146. package/dist/zonos-elements/{p-3cea383b.system.entry.js → p-bb7de2c4.system.entry.js} +1 -1
  147. package/dist/zonos-elements/{p-da060b1c.system.js → p-c1665c4f.system.js} +1 -1
  148. package/dist/zonos-elements/{p-2f43da39.system.entry.js → p-c1e298d5.system.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-8c5595d9.system.entry.js → p-c520d819.system.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-c9348bb0.system.entry.js → p-ca875e60.system.entry.js} +1 -1
  151. package/dist/zonos-elements/{p-b4601210.system.entry.js → p-ccd1794a.system.entry.js} +1 -1
  152. package/dist/zonos-elements/{p-f141519c.system.entry.js → p-daa10b8c.system.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-b6148206.entry.js → p-e3bca405.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-a376a37f.entry.js → p-e58cc024.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-938803f4.entry.js → p-e6556b0d.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-d2217f09.system.js → p-ed074fbf.system.js} +1 -1
  157. package/dist/zonos-elements/{p-560aa686.system.entry.js → p-f1e9b431.system.entry.js} +1 -1
  158. package/dist/zonos-elements/p-f7b07128.system.entry.js +1 -0
  159. package/dist/zonos-elements/{p-4a15c5c7.system.entry.js → p-fbc09dae.system.entry.js} +1 -1
  160. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  161. package/package.json +9 -6
  162. package/dist/collection/types/online-store/OnlineStoreConfig.js +0 -1
  163. package/dist/types/types/online-store/OnlineStoreConfig.d.ts +0 -3
  164. package/dist/zonos-elements/p-06fb9d1f.system.entry.js +0 -1
  165. package/dist/zonos-elements/p-33137e7d.system.entry.js +0 -1
  166. package/dist/zonos-elements/p-494c77a7.entry.js +0 -1
  167. package/dist/zonos-elements/p-8c48b75e.system.js +0 -1
  168. package/dist/zonos-elements/p-e9b832c5.entry.js +0 -1
  169. package/dist/zonos-elements/p-eb392924.entry.js +0 -1
  170. package/dist/zonos-elements/p-ff95f098.js +0 -1
@@ -5,11 +5,11 @@ import { z as zonosStore, e as zonosStoreInitSetting, d as zonosStoreFontFamily
5
5
  import { d as defineCustomElement$3 } from './zonos-notification2.js';
6
6
  import { d as defineCustomElement$2 } from './zonos-text2.js';
7
7
 
8
- const getZonosSetting = async () => {
9
- const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-setting`;
8
+ const getZonosSettings = async () => {
9
+ const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-settings`;
10
10
  const { errors, json } = await handleFetch(url);
11
11
  if (errors.length) {
12
- logError(`Error occurs when getting zonos settings. If this is not an unauthorized error, it will use user setting or default setting`);
12
+ logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
13
13
  return { errors, json: null };
14
14
  }
15
15
  return { errors: [], json };
@@ -168,7 +168,7 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
168
168
  // running with scope async function to avoid blocking the main thread
169
169
  (async () => {
170
170
  var _a, _b;
171
- const { errors, json } = await getZonosSetting();
171
+ const { errors, json } = await getZonosSettings();
172
172
  if (((_a = errors[0]) === null || _a === void 0 ? void 0 : _a.type.toString()) === '403') {
173
173
  log('Failed to load zonos settings. This domain may not have access', 'warn');
174
174
  return;
@@ -247,6 +247,12 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
247
247
  async getAppearanceSetting() {
248
248
  return zonosStore.appearance;
249
249
  }
250
+ /**
251
+ * Update the organizationName
252
+ */
253
+ async updateOrganizationName(organizationName) {
254
+ zonosStore.organizationName = organizationName;
255
+ }
250
256
  render() {
251
257
  return h(Host, { class: "zonos--elements" });
252
258
  }
@@ -259,7 +265,8 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
259
265
  "showNotification": [64],
260
266
  "overrideConfig": [64],
261
267
  "overrideCountry": [64],
262
- "getAppearanceSetting": [64]
268
+ "getAppearanceSetting": [64],
269
+ "updateOrganizationName": [64]
263
270
  }]);
264
271
  function defineCustomElement$1() {
265
272
  if (typeof customElements === "undefined") {
@@ -468,7 +468,7 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
468
468
  super();
469
469
  this.__registerHost();
470
470
  this.__attachShadow();
471
- this.getHelloPeekMessage = () => {
471
+ this.getHelloPeekMessage = (organizationName) => {
472
472
  const isRestrictionPage = zonosStore.currentHelloPage === 'productDetail' ||
473
473
  zonosStore.currentHelloPage === 'productList';
474
474
  if (isRestrictionPage && this.allRestrictedItems.length) {
@@ -485,7 +485,7 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
485
485
  case 'productDetail':
486
486
  return translate(`See duty and tax thresholds`);
487
487
  default:
488
- return `${translate('Welcome to')} ${zonosStore.organizationName}`;
488
+ return `${translate('Welcome to')} ${organizationName}`;
489
489
  }
490
490
  };
491
491
  this.enableShowPeekMessage = () => {
@@ -505,7 +505,7 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
505
505
  return newRestrictions;
506
506
  };
507
507
  this.triggerShowPeekMessage = () => {
508
- this.peekMessage = this.getHelloPeekMessage();
508
+ this.peekMessage = this.getHelloPeekMessage(zonosStore.organizationName);
509
509
  const { peekMessageBehavior, peekMessageDelay } = zonosStore.helloSettings;
510
510
  // peek message delay is passed in seconds, but setTimeout expects milliseconds
511
511
  const peekMessageDelayToUse = peekMessageDelay * 1000;
@@ -701,6 +701,9 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
701
701
  const appearanceSettings = mergeConfig(zonosStore.appearance, this.appearanceSettingsOverride);
702
702
  const { theme } = appearanceSettings;
703
703
  const restrictedItemsOnPage = (_b = this.allRestrictedItems) === null || _b === void 0 ? void 0 : _b.filter(product => this.productsOnPage.some(restriction => restriction.description === product.itemDescription));
704
+ // The organization name can be changed after init with the updateOrganizationName method.
705
+ // This will cause the element to rerender with the new org name when it changes. (used for preview on dashboard)
706
+ this.peekMessage = this.getHelloPeekMessage(zonosStore.organizationName);
704
707
  const showHello = this.isShippableCountry() && !!selectedCountryCode;
705
708
  return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
706
709
  'zonos--hello-widget',
@@ -2527,7 +2527,6 @@ const { reset, state: zonosStore } = createStore(() => ({
2527
2527
  zonosAttribution: 'DISABLED',
2528
2528
  },
2529
2529
  checkoutSettings: {
2530
- allowedDomains: [],
2531
2530
  analyticsProviders: [],
2532
2531
  orderNotifications: {
2533
2532
  abandonedCart: {
@@ -2561,7 +2560,6 @@ const { reset, state: zonosStore } = createStore(() => ({
2561
2560
  },
2562
2561
  currentHelloPage: '',
2563
2562
  helloSettings: {
2564
- allowedDomains: [],
2565
2563
  anchorElementSelector: '',
2566
2564
  cartUrlPattern: '',
2567
2565
  currencyBehavior: 'ENABLED',
@@ -2583,9 +2581,6 @@ const { reset, state: zonosStore } = createStore(() => ({
2583
2581
  restrictionBehavior: 'DISABLED',
2584
2582
  },
2585
2583
  loadedConfig: false,
2586
- onlineStoreSettings: {
2587
- allowedDomains: [],
2588
- },
2589
2584
  organizationName: '',
2590
2585
  sourceCurrency: 'USD',
2591
2586
  storeId: null,
@@ -2611,9 +2606,6 @@ const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
2611
2606
  (zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.checkoutSettings) ||
2612
2607
  null, overrideSettings.checkoutSettings);
2613
2608
  zonosStore.helloSettings = mergeConfig(zonosStore.helloSettings, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.helloSettings) || (zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.helloSettings) || null, overrideSettings.helloSettings);
2614
- zonosStore.onlineStoreSettings = mergeConfig(zonosStore.onlineStoreSettings, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.onlineStoreSettings) ||
2615
- (zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.onlineStoreSettings) ||
2616
- null, overrideSettings.onlineStoreSettings);
2617
2609
  // set flag to true to indicate that config is ready
2618
2610
  zonosStore.loadedConfig = true;
2619
2611
  zonosStore.organizationName = ((_a = zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.organization) === null || _a === void 0 ? void 0 : _a.name) || '';
@@ -1,7 +1,7 @@
1
- import { z as zonosStore, c as createStore } from './zonosStore-61e74f58.js';
2
- import { h as handleFetch, l as log, a as localizationStore, b as logError, t as translate } from './localization-a51ccbc2.js';
3
- import { i as isDarkColor } from './isDarkColor-416d6047.js';
4
- import { g as getBorderRadius } from './getBorderRadius-178a0a05.js';
1
+ import { z as zonosStore, c as createStore } from './zonosStore-34f07ee8.js';
2
+ import { h as handleFetch, l as log, a as localizationStore, b as logError, t as translate } from './localization-0c5b29fd.js';
3
+ import { i as isDarkColor } from './isDarkColor-69090b29.js';
4
+ import { g as getBorderRadius } from './getBorderRadius-77e97943.js';
5
5
 
6
6
  const prepCalculateLandedCost = () => {
7
7
  // maybe we don't need email now for prefetch the landed cost
@@ -1,4 +1,4 @@
1
- import { z as zonosStore } from './zonosStore-61e74f58.js';
1
+ import { z as zonosStore } from './zonosStore-34f07ee8.js';
2
2
 
3
3
  /**
4
4
  * Get the border radius for the elements based on the style
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { c as cartStore, a as cartStoreApplySubtotals, b as cartStoreGetShippingTransitInfo, d as cartStoreNextStep, e as cartStorePreviousStep, f as cartStoreReCalculateTotal, g as cartStoreReset, h as cartStoreUpdateItems, i as cartStoreUpdateSelectedShippingOption, j as cartStoreUpdateToErrorState } from './cart-b439be00.js';
2
- import './zonosStore-61e74f58.js';
1
+ export { c as cartStore, a as cartStoreApplySubtotals, b as cartStoreGetShippingTransitInfo, d as cartStoreNextStep, e as cartStorePreviousStep, f as cartStoreReCalculateTotal, g as cartStoreReset, h as cartStoreUpdateItems, i as cartStoreUpdateSelectedShippingOption, j as cartStoreUpdateToErrorState } from './cart-d81b92ea.js';
2
+ import './zonosStore-34f07ee8.js';
3
3
  import './index-36ff6342.js';
4
- import './localization-a51ccbc2.js';
5
- import './isDarkColor-416d6047.js';
6
- import './getBorderRadius-178a0a05.js';
4
+ import './localization-0c5b29fd.js';
5
+ import './isDarkColor-69090b29.js';
6
+ import './getBorderRadius-77e97943.js';
@@ -1,4 +1,4 @@
1
- import { a as createCommonjsModule, b as commonjsGlobal } from './zonosStore-61e74f58.js';
1
+ import { a as createCommonjsModule, b as commonjsGlobal } from './zonosStore-34f07ee8.js';
2
2
 
3
3
  var tinycolor = createCommonjsModule(function (module, exports) {
4
4
  // This file is autogenerated. It's used to publish CJS to npm.
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-36ff6342.js';
3
3
 
4
4
  const defineCustomElements = (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
- return bootstrapLazy([["zonos-text",[[1,"zonos-text",{"class":[1],"color":[1],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-country-flag_4",[[1,"zonos-country-select",{"closeCountrySelect":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[1,"zonos-country-flag",{"class":[1],"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"class":[1],"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"color":[1],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"class":[1]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-address_2",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"class":[1],"hasContent":[32]}]]],["zonos-card_2",[[1,"zonos-card",{"actions":[16],"class":[1],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-v-stack",{"spacing":[2],"class":[1]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"color":[1],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"class":[1],"color":[1],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"color":[1]}]]],["zonos-cart-items_10",[[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32]}],[1,"zonos-logo",{"theme":[1],"width":[1],"class":[1]}]]]], options);
6
+ return bootstrapLazy([["zonos-text",[[1,"zonos-text",{"class":[1],"color":[1],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-country-flag_4",[[1,"zonos-country-select",{"closeCountrySelect":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[1,"zonos-country-flag",{"class":[1],"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"class":[1],"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"color":[1],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"class":[1]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-address_2",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"class":[1],"hasContent":[32]}]]],["zonos-card_2",[[1,"zonos-card",{"actions":[16],"class":[1],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-v-stack",{"spacing":[2],"class":[1]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"color":[1],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"class":[1],"color":[1],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"color":[1]}]]],["zonos-cart-items_10",[[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32]}],[1,"zonos-logo",{"theme":[1],"width":[1],"class":[1]}]]]], options);
7
7
  };
8
8
 
9
9
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { c as createStore, z as zonosStore } from './zonosStore-61e74f58.js';
1
+ import { c as createStore, z as zonosStore } from './zonosStore-34f07ee8.js';
2
2
 
3
3
  const stringsArabic = {
4
4
  'Above de minimis threshold for': {
@@ -3180,7 +3180,7 @@ const handleFetch = async (url, _opts) => {
3180
3180
  const opts = __rest(_opts || {}, []);
3181
3181
  const body = opts.body ? JSON.stringify(opts.body) : undefined;
3182
3182
  const method = opts.method || 'GET';
3183
- // adding credentialtoken to the url so that the request will be cached differently for each store
3183
+ // adding random encoded token to the url so that the request will be cached differently for each store
3184
3184
  const modifiedUrl = new URL(url);
3185
3185
  modifiedUrl.searchParams.set('zToken', encodeString(window.location.hostname));
3186
3186
  // headers content type
@@ -1,5 +1,5 @@
1
- import { z as zonosStore } from './zonosStore-61e74f58.js';
2
- import { l as log } from './localization-a51ccbc2.js';
1
+ import { z as zonosStore } from './zonosStore-34f07ee8.js';
2
+ import { l as log } from './localization-0c5b29fd.js';
3
3
 
4
4
  const checkoutBreakpoint = 890;
5
5
  const isCheckoutMobile = (isMobile) => {
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-36ff6342.js';
2
- import { s as stripeStore, m as stripeStorePrefetchLandedCost } from './cart-b439be00.js';
3
- import { b as logError, a as localizationStore } from './localization-a51ccbc2.js';
4
- import './zonosStore-61e74f58.js';
5
- import './isDarkColor-416d6047.js';
6
- import './getBorderRadius-178a0a05.js';
2
+ import { s as stripeStore, m as stripeStorePrefetchLandedCost } from './cart-d81b92ea.js';
3
+ import { b as logError, a as localizationStore } from './localization-0c5b29fd.js';
4
+ import './zonosStore-34f07ee8.js';
5
+ import './isDarkColor-69090b29.js';
6
+ import './getBorderRadius-77e97943.js';
7
7
 
8
8
  const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";
9
9
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
2
- import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
 
5
5
  const zonosBadgeCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
2
- import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
 
5
5
  const zonosBannerCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:\"icon header\" \". content\";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}";
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-36ff6342.js';
2
- import { z as zonosStore, e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { z as zonosStore, e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { g as getBorderRadius } from './getBorderRadius-178a0a05.js';
4
+ import { g as getBorderRadius } from './getBorderRadius-77e97943.js';
5
5
  import { i as isColorVariable } from './isColorVariable-91c33804.js';
6
- import { i as isDarkColor } from './isDarkColor-416d6047.js';
6
+ import { i as isDarkColor } from './isDarkColor-69090b29.js';
7
7
 
8
8
  /**
9
9
  * Get theme for button text based on background color
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
2
- import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
 
5
5
  const zonosCardCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-36ff6342.js';
2
- import { c as cartStore, s as stripeStore, p as stripeStoreRetrievePayment, o as stripeStoreReset, i as cartStoreUpdateSelectedShippingOption, b as cartStoreGetShippingTransitInfo } from './cart-b439be00.js';
3
- import { t as translate, h as handleFetch, b as logError } from './localization-a51ccbc2.js';
4
- import { g as getBorderRadius } from './getBorderRadius-178a0a05.js';
5
- import { s as submitGtag, i as isCheckoutMobile } from './submitGtag-521826a2.js';
6
- import { e as zonosStoreFontFamily, z as zonosStore } from './zonosStore-61e74f58.js';
2
+ import { c as cartStore, s as stripeStore, p as stripeStoreRetrievePayment, o as stripeStoreReset, i as cartStoreUpdateSelectedShippingOption, b as cartStoreGetShippingTransitInfo } from './cart-d81b92ea.js';
3
+ import { t as translate, h as handleFetch } from './localization-0c5b29fd.js';
4
+ import { z as zonosStore, e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
5
+ import { g as getBorderRadius } from './getBorderRadius-77e97943.js';
6
+ import { s as submitGtag, i as isCheckoutMobile } from './submitGtag-8a0fbd41.js';
7
7
  import { c as classes } from './classes-0d95c529.js';
8
- import './isDarkColor-416d6047.js';
8
+ import './isDarkColor-69090b29.js';
9
9
 
10
10
  const formatCurrency = ({ amount, currency, showCurrencyText, }) => showCurrencyText
11
11
  ? `${new Intl.NumberFormat('en-US', {
@@ -109,17 +109,11 @@ const ZonosCheckoutFinish = class {
109
109
  if (errors.length || !(json === null || json === void 0 ? void 0 : json.id)) {
110
110
  return null;
111
111
  }
112
- // TODO: This method of triggering /success for BigCommerce is for MVP. Remove when eventRegistry is fixed to handle by webhooks
113
- if (window.Zonos.isBigCommerce) {
114
- const orderId = json === null || json === void 0 ? void 0 : json.id;
115
- const storeHash = (_b = (_a = json === null || json === void 0 ? void 0 : json.metadata) === null || _a === void 0 ? void 0 : _a.find(x => (x === null || x === void 0 ? void 0 : x.key) === 'storeHash')) === null || _b === void 0 ? void 0 : _b.value;
116
- if (!orderId || !storeHash) {
117
- return logError('Unable to trigger BigCommerce /success: Missing orderId or storeHash');
118
- }
119
- void handleFetch(`${baseUrl}/api/bigcommerce/success?orderId=${orderId}&storeHash=${storeHash}`);
120
- }
112
+ // onOrderSuccess callback may be provided on Zonos.init
113
+ await ((_b = (_a = zonosStore.checkoutSettings).onOrderSuccess) === null || _b === void 0 ? void 0 : _b.call(_a, json));
121
114
  return json;
122
115
  };
116
+ // TODO: This method of pulling orders is temporary. Once we have a working event registry system, we will rely on that to tell us when the order is ready to trigger onOrderSuccess
123
117
  this.getPullOrder = async (attempts = 0) => {
124
118
  const order = await this.pullOrder();
125
119
  if (order) {
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, h, F as Fragment, H as Host } from './index-36ff6342.js';
2
- import { k as initStripeElements, c as cartStore, h as cartStoreUpdateItems, g as cartStoreReset, s as stripeStore, l as stripeStoreInitCheckoutSession, j as cartStoreUpdateToErrorState, m as stripeStorePrefetchLandedCost, d as cartStoreNextStep, n as stripeStoreConfirmPayment, o as stripeStoreReset, e as cartStorePreviousStep } from './cart-b439be00.js';
3
- import { a as localizationStore, l as log, t as translate } from './localization-a51ccbc2.js';
4
- import { z as zonosStore, m as mergeConfig } from './zonosStore-61e74f58.js';
5
- import { s as submitGtag, i as isCheckoutMobile } from './submitGtag-521826a2.js';
2
+ import { k as initStripeElements, c as cartStore, h as cartStoreUpdateItems, g as cartStoreReset, s as stripeStore, l as stripeStoreInitCheckoutSession, j as cartStoreUpdateToErrorState, m as stripeStorePrefetchLandedCost, d as cartStoreNextStep, n as stripeStoreConfirmPayment, o as stripeStoreReset, e as cartStorePreviousStep } from './cart-d81b92ea.js';
3
+ import { a as localizationStore, l as log, t as translate } from './localization-0c5b29fd.js';
4
+ import { z as zonosStore, m as mergeConfig } from './zonosStore-34f07ee8.js';
5
+ import { s as submitGtag, i as isCheckoutMobile } from './submitGtag-8a0fbd41.js';
6
6
  import { c as classes } from './classes-0d95c529.js';
7
- import { g as getBorderRadius } from './getBorderRadius-178a0a05.js';
8
- import { i as isDarkColor } from './isDarkColor-416d6047.js';
7
+ import { g as getBorderRadius } from './getBorderRadius-77e97943.js';
8
+ import { i as isDarkColor } from './isDarkColor-69090b29.js';
9
9
 
10
10
  const LeftArrow = `<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
11
11
 
@@ -1,15 +1,15 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-36ff6342.js';
2
- import { s as stripeStore } from './cart-b439be00.js';
3
- import { h as handleFetch, b as logError, i as isValidSelector, l as log, c as initLocalizationStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-a51ccbc2.js';
4
- import { z as zonosStore, d as zonosStoreInitSetting, e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
5
- import './isDarkColor-416d6047.js';
6
- import './getBorderRadius-178a0a05.js';
2
+ import { s as stripeStore } from './cart-d81b92ea.js';
3
+ import { h as handleFetch, b as logError, i as isValidSelector, l as log, c as initLocalizationStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-0c5b29fd.js';
4
+ import { z as zonosStore, d as zonosStoreInitSetting, e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
5
+ import './isDarkColor-69090b29.js';
6
+ import './getBorderRadius-77e97943.js';
7
7
 
8
- const getZonosSetting = async () => {
9
- const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-setting`;
8
+ const getZonosSettings = async () => {
9
+ const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-settings`;
10
10
  const { errors, json } = await handleFetch(url);
11
11
  if (errors.length) {
12
- logError(`Error occurs when getting zonos settings. If this is not an unauthorized error, it will use user setting or default setting`);
12
+ logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
13
13
  return { errors, json: null };
14
14
  }
15
15
  return { errors: [], json };
@@ -166,7 +166,7 @@ const ZonosController = class {
166
166
  // running with scope async function to avoid blocking the main thread
167
167
  (async () => {
168
168
  var _a, _b;
169
- const { errors, json } = await getZonosSetting();
169
+ const { errors, json } = await getZonosSettings();
170
170
  if (((_a = errors[0]) === null || _a === void 0 ? void 0 : _a.type.toString()) === '403') {
171
171
  log('Failed to load zonos settings. This domain may not have access', 'warn');
172
172
  return;
@@ -245,6 +245,12 @@ const ZonosController = class {
245
245
  async getAppearanceSetting() {
246
246
  return zonosStore.appearance;
247
247
  }
248
+ /**
249
+ * Update the organizationName
250
+ */
251
+ async updateOrganizationName(organizationName) {
252
+ zonosStore.organizationName = organizationName;
253
+ }
248
254
  render() {
249
255
  return h(Host, { class: "zonos--elements" });
250
256
  }
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-36ff6342.js';
2
- import { a as localizationStore, d as localizationStoreUpdateSelectedCountryCode, t as translate } from './localization-a51ccbc2.js';
3
- import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { a as localizationStore, d as localizationStoreUpdateSelectedCountryCode, t as translate } from './localization-0c5b29fd.js';
3
+ import { e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import { i as isDarkColor } from './isDarkColor-416d6047.js';
5
+ import { i as isDarkColor } from './isDarkColor-69090b29.js';
6
6
 
7
7
  const zonosCountryFlagCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
8
8
 
@@ -14,5 +14,5 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy([["zonos-text",[[1,"zonos-text",{"class":[1],"color":[1],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-country-flag_4",[[1,"zonos-country-select",{"closeCountrySelect":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[1,"zonos-country-flag",{"class":[1],"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"class":[1],"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"color":[1],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"class":[1]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-address_2",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"class":[1],"hasContent":[32]}]]],["zonos-card_2",[[1,"zonos-card",{"actions":[16],"class":[1],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-v-stack",{"spacing":[2],"class":[1]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"color":[1],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"class":[1],"color":[1],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"color":[1]}]]],["zonos-cart-items_10",[[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32]}],[1,"zonos-logo",{"theme":[1],"width":[1],"class":[1]}]]]], options);
17
+ return bootstrapLazy([["zonos-text",[[1,"zonos-text",{"class":[1],"color":[1],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-country-flag_4",[[1,"zonos-country-select",{"closeCountrySelect":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[1,"zonos-country-flag",{"class":[1],"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"class":[1],"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"color":[1],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"class":[1]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-address_2",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"class":[1],"hasContent":[32]}]]],["zonos-card_2",[[1,"zonos-card",{"actions":[16],"class":[1],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-v-stack",{"spacing":[2],"class":[1]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"color":[1],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"class":[1],"color":[1],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"color":[1]}]]],["zonos-cart-items_10",[[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32]}],[1,"zonos-logo",{"theme":[1],"width":[1],"class":[1]}]]]], options);
18
18
  });
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-36ff6342.js';
2
- import { k as currencyFormat, a as localizationStore, t as translate } from './localization-a51ccbc2.js';
3
- import { z as zonosStore } from './zonosStore-61e74f58.js';
2
+ import { k as currencyFormat, a as localizationStore, t as translate } from './localization-0c5b29fd.js';
3
+ import { z as zonosStore } from './zonosStore-34f07ee8.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
2
- import { _ as _root, i as isObjectLike_1, f as _baseGetTag, g as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore-61e74f58.js';
3
- import { h as handleFetch, b as logError, a as localizationStore, i as isValidSelector, t as translate, g as getZCountryUrlParam, s as setZCountryUrlParam, l as log, e as currencyDisplay, f as currencyConvertAndFormat, j as currencyConvert, k as currencyFormat } from './localization-a51ccbc2.js';
2
+ import { _ as _root, i as isObjectLike_1, f as _baseGetTag, g as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore-34f07ee8.js';
3
+ import { h as handleFetch, b as logError, a as localizationStore, i as isValidSelector, t as translate, g as getZCountryUrlParam, s as setZCountryUrlParam, l as log, e as currencyDisplay, f as currencyConvertAndFormat, j as currencyConvert, k as currencyFormat } from './localization-0c5b29fd.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
6
6
 
@@ -455,7 +455,7 @@ const RESIZE_DEBOUNCE_DELAY_MS = 500;
455
455
  const ZonosHello = class {
456
456
  constructor(hostRef) {
457
457
  registerInstance(this, hostRef);
458
- this.getHelloPeekMessage = () => {
458
+ this.getHelloPeekMessage = (organizationName) => {
459
459
  const isRestrictionPage = zonosStore.currentHelloPage === 'productDetail' ||
460
460
  zonosStore.currentHelloPage === 'productList';
461
461
  if (isRestrictionPage && this.allRestrictedItems.length) {
@@ -472,7 +472,7 @@ const ZonosHello = class {
472
472
  case 'productDetail':
473
473
  return translate(`See duty and tax thresholds`);
474
474
  default:
475
- return `${translate('Welcome to')} ${zonosStore.organizationName}`;
475
+ return `${translate('Welcome to')} ${organizationName}`;
476
476
  }
477
477
  };
478
478
  this.enableShowPeekMessage = () => {
@@ -492,7 +492,7 @@ const ZonosHello = class {
492
492
  return newRestrictions;
493
493
  };
494
494
  this.triggerShowPeekMessage = () => {
495
- this.peekMessage = this.getHelloPeekMessage();
495
+ this.peekMessage = this.getHelloPeekMessage(zonosStore.organizationName);
496
496
  const { peekMessageBehavior, peekMessageDelay } = zonosStore.helloSettings;
497
497
  // peek message delay is passed in seconds, but setTimeout expects milliseconds
498
498
  const peekMessageDelayToUse = peekMessageDelay * 1000;
@@ -688,6 +688,9 @@ const ZonosHello = class {
688
688
  const appearanceSettings = mergeConfig(zonosStore.appearance, this.appearanceSettingsOverride);
689
689
  const { theme } = appearanceSettings;
690
690
  const restrictedItemsOnPage = (_b = this.allRestrictedItems) === null || _b === void 0 ? void 0 : _b.filter(product => this.productsOnPage.some(restriction => restriction.description === product.itemDescription));
691
+ // The organization name can be changed after init with the updateOrganizationName method.
692
+ // This will cause the element to rerender with the new org name when it changes. (used for preview on dashboard)
693
+ this.peekMessage = this.getHelloPeekMessage(zonosStore.organizationName);
691
694
  const showHello = this.isShippableCountry() && !!selectedCountryCode;
692
695
  return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
693
696
  'zonos--hello-widget',
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, d as getElement, H as Host } from './index-36ff6342.js';
2
- import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
3
3
 
4
4
  const zonosIconCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
2
- import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
 
5
5
  const zonosNotificationCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999;bottom:var(--amino-space-24);gap:var(--amino-space-8);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:var(--amino-space-8);border-radius:var(--border-radius, var(--amino-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--amino-green-700)}:host .zonos--notification-item.error{background-color:var(--amino-red-700)}:host .zonos--notification-item.warning{background-color:var(--amino-orange-700)}";
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-36ff6342.js';
2
- import { s as stripeStore } from './cart-b439be00.js';
3
- import './zonosStore-61e74f58.js';
4
- import './localization-a51ccbc2.js';
5
- import './isDarkColor-416d6047.js';
6
- import './getBorderRadius-178a0a05.js';
2
+ import { s as stripeStore } from './cart-d81b92ea.js';
3
+ import './zonosStore-34f07ee8.js';
4
+ import './localization-0c5b29fd.js';
5
+ import './isDarkColor-69090b29.js';
6
+ import './getBorderRadius-77e97943.js';
7
7
 
8
8
  const zonosPaymentCss = ".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";
9
9
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-36ff6342.js';
2
- import { e as zonosStoreFontFamily, z as zonosStore } from './zonosStore-61e74f58.js';
2
+ import { e as zonosStoreFontFamily, z as zonosStore } from './zonosStore-34f07ee8.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { g as getBorderRadius } from './getBorderRadius-178a0a05.js';
4
+ import { g as getBorderRadius } from './getBorderRadius-77e97943.js';
5
5
  import { i as isColorVariable } from './isColorVariable-91c33804.js';
6
6
 
7
7
  const zonosShippingRichRadioCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10));border-bottom-left-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
2
- import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
2
+ import { e as zonosStoreFontFamily } from './zonosStore-34f07ee8.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
 
5
5
  const textOptions = {