@zonos/elements 1.3.52 → 1.3.54

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 (95) hide show
  1. package/dist/cjs/{CheckoutConfig-65376e00.js → CheckoutConfig-ca67953a.js} +1 -1
  2. package/dist/cjs/{cart-61a8983d.js → cart-03b08131.js} +1 -1
  3. package/dist/cjs/{createCustomEvent-228027b5.js → createCustomEvent-532569f1.js} +2 -2
  4. package/dist/cjs/{handleFetch-842c95b0.js → handleFetch-4b296adc.js} +1 -1
  5. package/dist/cjs/index.cjs.js +9 -9
  6. package/dist/cjs/{paypal-f1eb6621.js → paypal-bdc19559.js} +2 -2
  7. package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-badge_13.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
  10. package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
  11. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
  17. package/dist/collection/components/main/zonos-controller.js +2 -2
  18. package/dist/collection/components/utils/handleFetch.js +1 -1
  19. package/dist/collection/types/generated/graphql.customer.types.js +4 -0
  20. package/dist/esm/{CheckoutConfig-57350b28.js → CheckoutConfig-bf2a28bd.js} +1 -1
  21. package/dist/esm/{cart-45d2861f.js → cart-008dea87.js} +1 -1
  22. package/dist/esm/{createCustomEvent-3fcc948a.js → createCustomEvent-a10320c1.js} +2 -2
  23. package/dist/esm/{handleFetch-37cea185.js → handleFetch-99b944a2.js} +1 -1
  24. package/dist/esm/index.js +10 -10
  25. package/dist/esm/{paypal-ee310945.js → paypal-b90fc7ff.js} +2 -2
  26. package/dist/esm/zonos-address_8.entry.js +2 -2
  27. package/dist/esm/zonos-badge_13.entry.js +4 -4
  28. package/dist/esm/zonos-checkout.entry.js +5 -5
  29. package/dist/esm/zonos-controller.entry.js +4 -4
  30. package/dist/esm/zonos-country-flag.entry.js +2 -2
  31. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  32. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  33. package/dist/esm/zonos-hello.entry.js +2 -2
  34. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  35. package/dist/esm/zonos-notification_3.entry.js +3 -3
  36. package/dist/esm-es5/{CheckoutConfig-57350b28.js → CheckoutConfig-bf2a28bd.js} +1 -1
  37. package/dist/esm-es5/{cart-45d2861f.js → cart-008dea87.js} +1 -1
  38. package/dist/esm-es5/{createCustomEvent-3fcc948a.js → createCustomEvent-a10320c1.js} +1 -1
  39. package/dist/esm-es5/{handleFetch-37cea185.js → handleFetch-99b944a2.js} +1 -1
  40. package/dist/esm-es5/index.js +1 -1
  41. package/dist/esm-es5/{paypal-ee310945.js → paypal-b90fc7ff.js} +1 -1
  42. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  43. package/dist/esm-es5/zonos-badge_13.entry.js +1 -1
  44. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  45. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  46. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  47. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  48. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  49. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  50. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  51. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  52. package/dist/scripts/index.js +1 -1
  53. package/dist/scripts/loadZonos.js +1 -1
  54. package/dist/scripts/zonos.js +1 -1
  55. package/dist/types/types/generated/graphql.customer.types.d.ts +4 -0
  56. package/dist/types/types/generated/graphql.customer.types.ts +4 -0
  57. package/dist/zonos-elements/index.esm.js +1 -1
  58. package/dist/zonos-elements/{p-259ccf8d.entry.js → p-18802362.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-895fdefb.js → p-1c29081a.js} +1 -1
  60. package/dist/zonos-elements/{p-dc12f30a.system.entry.js → p-2673dd6d.system.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-b842b96a.system.entry.js → p-2bc6342f.system.entry.js} +1 -1
  62. package/dist/zonos-elements/{p-827868e6.entry.js → p-3149985c.entry.js} +1 -1
  63. package/dist/zonos-elements/{p-36360905.entry.js → p-3566044a.entry.js} +1 -1
  64. package/dist/zonos-elements/{p-8228e87c.system.entry.js → p-3cfbbf17.system.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-3703b814.system.entry.js → p-4b7c05a8.system.entry.js} +1 -1
  66. package/dist/zonos-elements/{p-f826b979.system.entry.js → p-546aabc0.system.entry.js} +1 -1
  67. package/dist/zonos-elements/{p-f124e459.system.js → p-66cc2bbd.system.js} +1 -1
  68. package/dist/zonos-elements/{p-eb2aedd0.js → p-710b8292.js} +1 -1
  69. package/dist/zonos-elements/{p-d62e6bb0.system.entry.js → p-72cfc372.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-4146feec.js → p-7400bcd3.js} +1 -1
  71. package/dist/zonos-elements/{p-6eedc3f8.entry.js → p-7a3118e7.entry.js} +1 -1
  72. package/dist/zonos-elements/{p-a74a7afa.system.js → p-7eac524d.system.js} +1 -1
  73. package/dist/zonos-elements/{p-8f7773b0.system.js → p-7f93c97a.system.js} +1 -1
  74. package/dist/zonos-elements/{p-31eb835c.entry.js → p-88c2057e.entry.js} +1 -1
  75. package/dist/zonos-elements/p-92faa378.system.js +1 -0
  76. package/dist/zonos-elements/{p-8fa49d94.entry.js → p-997cc826.entry.js} +1 -1
  77. package/dist/zonos-elements/{p-042c466d.system.entry.js → p-ada937d6.system.entry.js} +1 -1
  78. package/dist/zonos-elements/{p-588396df.js → p-b914e98e.js} +1 -1
  79. package/dist/zonos-elements/p-baff865d.entry.js +1 -0
  80. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  81. package/dist/zonos-elements/{p-c008648a.system.entry.js → p-ca4efb81.system.entry.js} +1 -1
  82. package/dist/zonos-elements/p-dfbc9605.js +17 -0
  83. package/dist/zonos-elements/{p-88005b94.entry.js → p-e672e4de.entry.js} +1 -1
  84. package/dist/zonos-elements/{p-5590f90c.system.js → p-e6b9cf45.system.js} +1 -1
  85. package/dist/zonos-elements/p-e7e22128.entry.js +1 -0
  86. package/dist/zonos-elements/{p-446c8f02.system.entry.js → p-f5bac726.system.entry.js} +1 -1
  87. package/dist/zonos-elements/{p-cd4ad1be.system.entry.js → p-f6e385f8.system.entry.js} +1 -1
  88. package/dist/zonos-elements/{p-b1861e64.system.js → p-f9bfbf42.system.js} +1 -1
  89. package/dist/zonos-elements/{p-bb186075.entry.js → p-fb28f27f.entry.js} +1 -1
  90. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  91. package/package.json +1 -1
  92. package/dist/zonos-elements/p-10cb0064.entry.js +0 -1
  93. package/dist/zonos-elements/p-6e59c6e4.js +0 -17
  94. package/dist/zonos-elements/p-f527cd5b.entry.js +0 -1
  95. package/dist/zonos-elements/p-f87a635b.system.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const handleFetch = require('./handleFetch-842c95b0.js');
3
+ const handleFetch = require('./handleFetch-4b296adc.js');
4
4
 
5
5
  const getTempCartById = async (cartId) => {
6
6
  const { errors, json } = await handleFetch.handleFetch('/api/zonos-elements/get-temp-cart', {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-67139f0e.js');
4
- const handleFetch = require('./handleFetch-842c95b0.js');
4
+ const handleFetch = require('./handleFetch-4b296adc.js');
5
5
  const isDarkColor = require('./isDarkColor-7a056d05.js');
6
6
  const getBorderRadius = require('./getBorderRadius-a6a3b35e.js');
7
7
 
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-61a8983d.js');
3
+ const cart = require('./cart-03b08131.js');
4
4
  const zonosStore = require('./zonosStore-67139f0e.js');
5
- const handleFetch = require('./handleFetch-842c95b0.js');
5
+ const handleFetch = require('./handleFetch-4b296adc.js');
6
6
 
7
7
  const trackConversionEvent = async (eventName, metadata) => {
8
8
  var _a, _b;
@@ -268,7 +268,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
268
268
  if (isUnknownError) {
269
269
  void sendErrorLog({
270
270
  endpoint: fallbackApiList[basePathType] + path,
271
- errors: errors.map(({ message }) => message),
271
+ errors: errors.map(({ message }) => `API: ${message}`),
272
272
  metadata: {
273
273
  currentBasePath: basePathType,
274
274
  nextFallbackApiType,
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const handleFetch = require('./handleFetch-842c95b0.js');
6
- const CheckoutConfig = require('./CheckoutConfig-65376e00.js');
5
+ const handleFetch = require('./handleFetch-4b296adc.js');
6
+ const CheckoutConfig = require('./CheckoutConfig-ca67953a.js');
7
7
 
8
8
  /**
9
9
  * Get the load version and url based on the loadScriptSrc and version
@@ -96,7 +96,7 @@ const getZonosQaUrl = () => {
96
96
  return null;
97
97
  }
98
98
  const qaUrl = extractZonosQaUrl(window.location.href);
99
- const cdnUrl = "https://v1.3.52.js.zonos.com";
99
+ const cdnUrl = "https://v1.3.54.js.zonos.com";
100
100
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
101
101
  if (!qaUrl &&
102
102
  (cdnUrl.includes('test.') ||
@@ -280,10 +280,10 @@ const zonosLoadUrl = (() => {
280
280
  }
281
281
  return null;
282
282
  })();
283
- const ZONOS_URL = "https://v1.3.52.js.zonos.com";
284
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.52";
285
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.52";
286
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.52";
283
+ const ZONOS_URL = "https://v1.3.54.js.zonos.com";
284
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.54";
285
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.54";
286
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.54";
287
287
  const INTER_FONT_URL = 'https://rsms.me';
288
288
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
289
289
  const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
@@ -298,14 +298,14 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
298
298
  !!window.location.search.match(/\?.*(&*)zonosConversionTest/);
299
299
  Zonos._paypalMockResponse = null;
300
300
  Zonos.isBigCommerce = false;
301
- Zonos.releaseDate = "1726602626855";
301
+ Zonos.releaseDate = "1726615112859";
302
302
  Zonos.isLegacyCheckout = false;
303
303
  /**
304
304
  * By default, the package will load from npm
305
305
  */
306
306
  Zonos.isNpm = true;
307
307
  Zonos.zonosQaUrl = null;
308
- Zonos.version = `v${"1.3.52"}`;
308
+ Zonos.version = `v${"1.3.54"}`;
309
309
  Zonos.modeAlerted = false;
310
310
  Zonos.cartData = null;
311
311
  Zonos.paypal = null;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-67139f0e.js');
4
- const cart = require('./cart-61a8983d.js');
5
- const handleFetch = require('./handleFetch-842c95b0.js');
4
+ const cart = require('./cart-03b08131.js');
5
+ const handleFetch = require('./handleFetch-4b296adc.js');
6
6
  const isDarkColor = require('./isDarkColor-7a056d05.js');
7
7
 
8
8
  /*!
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-61a8983d.js');
6
+ const cart = require('./cart-03b08131.js');
7
7
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
8
- const handleFetch = require('./handleFetch-842c95b0.js');
8
+ const handleFetch = require('./handleFetch-4b296adc.js');
9
9
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
10
10
  const zonosStore = require('./zonosStore-67139f0e.js');
11
11
  const classes = require('./classes-b7918f56.js');
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-d56e0a8b.js');
6
6
  const zonosStore = require('./zonosStore-67139f0e.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-61a8983d.js');
9
- const paypal = require('./paypal-f1eb6621.js');
10
- const createCustomEvent = require('./createCustomEvent-228027b5.js');
8
+ const cart = require('./cart-03b08131.js');
9
+ const paypal = require('./paypal-bdc19559.js');
10
+ const createCustomEvent = require('./createCustomEvent-532569f1.js');
11
11
  const getBorderRadius = require('./getBorderRadius-a6a3b35e.js');
12
- const handleFetch = require('./handleFetch-842c95b0.js');
12
+ const handleFetch = require('./handleFetch-4b296adc.js');
13
13
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
14
14
  const ILanguage = require('./ILanguage-98b04442.js');
15
15
  const isDarkColor = require('./isDarkColor-7a056d05.js');
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-61a8983d.js');
7
- const paypal = require('./paypal-f1eb6621.js');
6
+ const cart = require('./cart-03b08131.js');
7
+ const paypal = require('./paypal-bdc19559.js');
8
8
  const zonosStore = require('./zonosStore-67139f0e.js');
9
- const createCustomEvent = require('./createCustomEvent-228027b5.js');
9
+ const createCustomEvent = require('./createCustomEvent-532569f1.js');
10
10
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
11
- const handleFetch = require('./handleFetch-842c95b0.js');
11
+ const handleFetch = require('./handleFetch-4b296adc.js');
12
12
  const classes = require('./classes-b7918f56.js');
13
13
  const getBorderRadius = require('./getBorderRadius-a6a3b35e.js');
14
14
  const isDarkColor = require('./isDarkColor-7a056d05.js');
15
- const CheckoutConfig = require('./CheckoutConfig-65376e00.js');
15
+ const CheckoutConfig = require('./CheckoutConfig-ca67953a.js');
16
16
  const RemoveIcon = require('./RemoveIcon-081ac073.js');
17
17
 
18
18
  /**
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-61a8983d.js');
6
+ const cart = require('./cart-03b08131.js');
7
7
  const zonosStore = require('./zonosStore-67139f0e.js');
8
- const handleFetch = require('./handleFetch-842c95b0.js');
8
+ const handleFetch = require('./handleFetch-4b296adc.js');
9
9
  require('./isDarkColor-7a056d05.js');
10
10
  require('./getBorderRadius-a6a3b35e.js');
11
11
 
@@ -179,7 +179,7 @@ const ZonosController = class {
179
179
  searchParams.set('family', fontSelected);
180
180
  const { errors, json } = await handleFetch.handleFetch(`/api/zonos-elements/get-font-detail?${searchParams.toString()}`);
181
181
  // Keep using Inter font, font in the setting maybe outdated and not found in google font, API will return Inter font instead
182
- if (errors.length > 0 || !json) {
182
+ if (errors.length > 0 || !(json === null || json === void 0 ? void 0 : json.fontUrl)) {
183
183
  handleFetch.log(`Failed to load font ${fontSelected}`, 'warn');
184
184
  zonosStore.zonosStore.appearance = Object.assign(Object.assign({}, zonosStore.zonosStore.appearance), { fontFamily: 'Inter' });
185
185
  return;
@@ -319,7 +319,7 @@ const ZonosController = class {
319
319
  zonosStore.zonosStore.organizationName = organizationName;
320
320
  }
321
321
  render() {
322
- return index.h(index.Host, { key: '10fe4b2e7b375fa25484bb55077b73d2421735ae', class: "zonos--elements" });
322
+ return index.h(index.Host, { key: '4d7d784a50ebcb61ee4658198f3dcf756daf8d70', class: "zonos--elements" });
323
323
  }
324
324
  };
325
325
  ZonosController.style = ZonosControllerStyle0;
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-61a8983d.js');
6
+ const cart = require('./cart-03b08131.js');
7
7
  const zonosStore = require('./zonosStore-67139f0e.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- require('./handleFetch-842c95b0.js');
9
+ require('./handleFetch-4b296adc.js');
10
10
  require('./isDarkColor-7a056d05.js');
11
11
  require('./getBorderRadius-a6a3b35e.js');
12
12
 
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-61a8983d.js');
6
+ const cart = require('./cart-03b08131.js');
7
7
  const zonosStore = require('./zonosStore-67139f0e.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
9
  const isDarkColor = require('./isDarkColor-7a056d05.js');
10
10
  const ILanguage = require('./ILanguage-98b04442.js');
11
- require('./handleFetch-842c95b0.js');
11
+ require('./handleFetch-4b296adc.js');
12
12
  require('./getBorderRadius-a6a3b35e.js');
13
13
 
14
14
  /**
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-61a8983d.js');
6
+ const cart = require('./cart-03b08131.js');
7
7
  const zonosStore = require('./zonosStore-67139f0e.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
11
- require('./handleFetch-842c95b0.js');
11
+ require('./handleFetch-4b296adc.js');
12
12
  require('./isDarkColor-7a056d05.js');
13
13
  require('./getBorderRadius-a6a3b35e.js');
14
14
 
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
6
  const zonosStore = require('./zonosStore-67139f0e.js');
7
- const cart = require('./cart-61a8983d.js');
7
+ const cart = require('./cart-03b08131.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- const handleFetch = require('./handleFetch-842c95b0.js');
9
+ const handleFetch = require('./handleFetch-4b296adc.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
11
11
  require('./isDarkColor-7a056d05.js');
12
12
  require('./getBorderRadius-a6a3b35e.js');
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-61a8983d.js');
6
+ const cart = require('./cart-03b08131.js');
7
7
  const zonosStore = require('./zonosStore-67139f0e.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
- require('./handleFetch-842c95b0.js');
9
+ require('./handleFetch-4b296adc.js');
10
10
  require('./isDarkColor-7a056d05.js');
11
11
  require('./getBorderRadius-a6a3b35e.js');
12
12
 
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-d56e0a8b.js');
6
6
  const zonosStore = require('./zonosStore-67139f0e.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-61a8983d.js');
9
- const handleFetch = require('./handleFetch-842c95b0.js');
10
- const paypal = require('./paypal-f1eb6621.js');
8
+ const cart = require('./cart-03b08131.js');
9
+ const handleFetch = require('./handleFetch-4b296adc.js');
10
+ const paypal = require('./paypal-bdc19559.js');
11
11
  require('./isDarkColor-7a056d05.js');
12
12
  require('./getBorderRadius-a6a3b35e.js');
13
13
 
@@ -55,7 +55,7 @@ export class ZonosController {
55
55
  searchParams.set('family', fontSelected);
56
56
  const { errors, json } = await handleFetch(`/api/zonos-elements/get-font-detail?${searchParams.toString()}`);
57
57
  // Keep using Inter font, font in the setting maybe outdated and not found in google font, API will return Inter font instead
58
- if (errors.length > 0 || !json) {
58
+ if (errors.length > 0 || !(json === null || json === void 0 ? void 0 : json.fontUrl)) {
59
59
  log(`Failed to load font ${fontSelected}`, 'warn');
60
60
  zonosStore.appearance = Object.assign(Object.assign({}, zonosStore.appearance), { fontFamily: 'Inter' });
61
61
  return;
@@ -195,7 +195,7 @@ export class ZonosController {
195
195
  zonosStore.organizationName = organizationName;
196
196
  }
197
197
  render() {
198
- return h(Host, { key: '10fe4b2e7b375fa25484bb55077b73d2421735ae', class: "zonos--elements" });
198
+ return h(Host, { key: '4d7d784a50ebcb61ee4658198f3dcf756daf8d70', class: "zonos--elements" });
199
199
  }
200
200
  static get is() { return "zonos-controller"; }
201
201
  static get encapsulation() { return "shadow"; }
@@ -139,7 +139,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
139
139
  if (isUnknownError) {
140
140
  void sendErrorLog({
141
141
  endpoint: fallbackApiList[basePathType] + path,
142
- errors: errors.map(({ message }) => message),
142
+ errors: errors.map(({ message }) => `API: ${message}`),
143
143
  metadata: {
144
144
  currentBasePath: basePathType,
145
145
  nextFallbackApiType,
@@ -5,6 +5,10 @@ export const accountHolderType = {
5
5
  export const accountingFeeType = {
6
6
  BugFix: 'BUG_FIX',
7
7
  DutyTaxFee: 'DUTY_TAX_FEE',
8
+ ExistingConnectAdjustmentCredits: 'EXISTING_CONNECT_ADJUSTMENT_CREDITS',
9
+ ExistingCreditNotes: 'EXISTING_CREDIT_NOTES',
10
+ ExistingInvoiceLineRecordCredits: 'EXISTING_INVOICE_LINE_RECORD_CREDITS',
11
+ ExistingInvoiceVoided: 'EXISTING_INVOICE_VOIDED',
8
12
  General: 'GENERAL',
9
13
  Item: 'ITEM',
10
14
  LandedCostGuarantee: 'LANDED_COST_GUARANTEE',
@@ -1,4 +1,4 @@
1
- import { h as handleFetch, l as log, a as logError } from './handleFetch-37cea185.js';
1
+ import { h as handleFetch, l as log, a as logError } from './handleFetch-99b944a2.js';
2
2
 
3
3
  const getTempCartById = async (cartId) => {
4
4
  const { errors, json } = await handleFetch('/api/zonos-elements/get-temp-cart', {
@@ -1,5 +1,5 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-473f4654.js';
2
- import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-37cea185.js';
2
+ import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-99b944a2.js';
3
3
  import { i as isDarkColor } from './isDarkColor-c927f77d.js';
4
4
  import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
5
5
 
@@ -1,6 +1,6 @@
1
- import { d as cartStore, l as localizationStore } from './cart-45d2861f.js';
1
+ import { d as cartStore, l as localizationStore } from './cart-008dea87.js';
2
2
  import { z as zonosStore } from './zonosStore-473f4654.js';
3
- import { h as handleFetch } from './handleFetch-37cea185.js';
3
+ import { h as handleFetch } from './handleFetch-99b944a2.js';
4
4
 
5
5
  const trackConversionEvent = async (eventName, metadata) => {
6
6
  var _a, _b;
@@ -266,7 +266,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
266
266
  if (isUnknownError) {
267
267
  void sendErrorLog({
268
268
  endpoint: fallbackApiList[basePathType] + path,
269
- errors: errors.map(({ message }) => message),
269
+ errors: errors.map(({ message }) => `API: ${message}`),
270
270
  metadata: {
271
271
  currentBasePath: basePathType,
272
272
  nextFallbackApiType,
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { l as log, a as logError } from './handleFetch-37cea185.js';
2
- import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-57350b28.js';
3
- export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-57350b28.js';
1
+ import { l as log, a as logError } from './handleFetch-99b944a2.js';
2
+ import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-bf2a28bd.js';
3
+ export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-bf2a28bd.js';
4
4
 
5
5
  /**
6
6
  * Get the load version and url based on the loadScriptSrc and version
@@ -93,7 +93,7 @@ const getZonosQaUrl = () => {
93
93
  return null;
94
94
  }
95
95
  const qaUrl = extractZonosQaUrl(window.location.href);
96
- const cdnUrl = "https://v1.3.52.js.zonos.com";
96
+ const cdnUrl = "https://v1.3.54.js.zonos.com";
97
97
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
98
98
  if (!qaUrl &&
99
99
  (cdnUrl.includes('test.') ||
@@ -277,10 +277,10 @@ const zonosLoadUrl = (() => {
277
277
  }
278
278
  return null;
279
279
  })();
280
- const ZONOS_URL = "https://v1.3.52.js.zonos.com";
281
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.52";
282
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.52";
283
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.52";
280
+ const ZONOS_URL = "https://v1.3.54.js.zonos.com";
281
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.54";
282
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.54";
283
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.54";
284
284
  const INTER_FONT_URL = 'https://rsms.me';
285
285
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
286
286
  const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
@@ -295,14 +295,14 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
295
295
  !!window.location.search.match(/\?.*(&*)zonosConversionTest/);
296
296
  Zonos._paypalMockResponse = null;
297
297
  Zonos.isBigCommerce = false;
298
- Zonos.releaseDate = "1726602626855";
298
+ Zonos.releaseDate = "1726615112859";
299
299
  Zonos.isLegacyCheckout = false;
300
300
  /**
301
301
  * By default, the package will load from npm
302
302
  */
303
303
  Zonos.isNpm = true;
304
304
  Zonos.zonosQaUrl = null;
305
- Zonos.version = `v${"1.3.52"}`;
305
+ Zonos.version = `v${"1.3.54"}`;
306
306
  Zonos.modeAlerted = false;
307
307
  Zonos.cartData = null;
308
308
  Zonos.paypal = null;
@@ -1,6 +1,6 @@
1
1
  import { z as zonosStore, c as createStore } from './zonosStore-473f4654.js';
2
- import { d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-45d2861f.js';
3
- import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-37cea185.js';
2
+ import { d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-008dea87.js';
3
+ import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-99b944a2.js';
4
4
  import { t as tinycolor } from './isDarkColor-c927f77d.js';
5
5
 
6
6
  /*!
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { j as stripeStore, l as localizationStore, t as translate } from './cart-45d2861f.js';
2
+ import { j as stripeStore, l as localizationStore, t as translate } from './cart-008dea87.js';
3
3
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
4
- import { a as logError } from './handleFetch-37cea185.js';
4
+ import { a as logError } from './handleFetch-99b944a2.js';
5
5
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
6
6
  import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
7
7
  import { c as classes } from './classes-0d95c529.js';
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, h, H as Host, a as getAssetPath, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
2
2
  import { d as zonosStoreFontFamily, z as zonosStore, g as getZonosStoreTheme } from './zonosStore-473f4654.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { d as cartStore, D as currencyFormat, E as cartStoreHasOneEligibleItem, t as translate, u as stripeStoreReset, j as stripeStore, F as stripeStoreRetrievePayment, G as stripeStoreMessageBasedOnStatus, l as localizationStore, H as stripeStoreTranslateAddressToLatin, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo } from './cart-45d2861f.js';
5
- import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-ee310945.js';
6
- import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-3fcc948a.js';
4
+ import { d as cartStore, D as currencyFormat, E as cartStoreHasOneEligibleItem, t as translate, u as stripeStoreReset, j as stripeStore, F as stripeStoreRetrievePayment, G as stripeStoreMessageBasedOnStatus, l as localizationStore, H as stripeStoreTranslateAddressToLatin, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo } from './cart-008dea87.js';
5
+ import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-b90fc7ff.js';
6
+ import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-a10320c1.js';
7
7
  import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
8
- import { h as handleFetch, s as sendErrorLog } from './handleFetch-37cea185.js';
8
+ import { h as handleFetch, s as sendErrorLog } from './handleFetch-99b944a2.js';
9
9
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
10
10
  import { l as languages } from './ILanguage-cd6acb72.js';
11
11
  import { i as isDarkColor, t as tinycolor } from './isDarkColor-c927f77d.js';
@@ -1,14 +1,14 @@
1
1
  import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
2
- import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v as localizationStoreOnUpdate } from './cart-45d2861f.js';
3
- import { s as submitGtag, p as paypalInitScript } from './paypal-ee310945.js';
2
+ import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v as localizationStoreOnUpdate } from './cart-008dea87.js';
3
+ import { s as submitGtag, p as paypalInitScript } from './paypal-b90fc7ff.js';
4
4
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-473f4654.js';
5
- import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-3fcc948a.js';
5
+ import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-a10320c1.js';
6
6
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
7
- import { l as log, a as logError, s as sendErrorLog } from './handleFetch-37cea185.js';
7
+ import { l as log, a as logError, s as sendErrorLog } from './handleFetch-99b944a2.js';
8
8
  import { c as classes } from './classes-0d95c529.js';
9
9
  import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
10
10
  import { i as isDarkColor } from './isDarkColor-c927f77d.js';
11
- import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-57350b28.js';
11
+ import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-bf2a28bd.js';
12
12
  import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
13
13
 
14
14
  /**
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
2
- import { w as isValidSelector, j as stripeStore, x as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-45d2861f.js';
2
+ import { w as isValidSelector, j as stripeStore, x as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-008dea87.js';
3
3
  import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
4
- import { h as handleFetch, a as logError, l as log } from './handleFetch-37cea185.js';
4
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-99b944a2.js';
5
5
  import './isDarkColor-c927f77d.js';
6
6
  import './getBorderRadius-23398fc6.js';
7
7
 
@@ -175,7 +175,7 @@ const ZonosController = class {
175
175
  searchParams.set('family', fontSelected);
176
176
  const { errors, json } = await handleFetch(`/api/zonos-elements/get-font-detail?${searchParams.toString()}`);
177
177
  // Keep using Inter font, font in the setting maybe outdated and not found in google font, API will return Inter font instead
178
- if (errors.length > 0 || !json) {
178
+ if (errors.length > 0 || !(json === null || json === void 0 ? void 0 : json.fontUrl)) {
179
179
  log(`Failed to load font ${fontSelected}`, 'warn');
180
180
  zonosStore.appearance = Object.assign(Object.assign({}, zonosStore.appearance), { fontFamily: 'Inter' });
181
181
  return;
@@ -315,7 +315,7 @@ const ZonosController = class {
315
315
  zonosStore.organizationName = organizationName;
316
316
  }
317
317
  render() {
318
- return h(Host, { key: '10fe4b2e7b375fa25484bb55077b73d2421735ae', class: "zonos--elements" });
318
+ return h(Host, { key: '4d7d784a50ebcb61ee4658198f3dcf756daf8d70', class: "zonos--elements" });
319
319
  }
320
320
  };
321
321
  ZonosController.style = ZonosControllerStyle0;
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { l as localizationStore } from './cart-45d2861f.js';
2
+ import { l as localizationStore } from './cart-008dea87.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import './handleFetch-37cea185.js';
5
+ import './handleFetch-99b944a2.js';
6
6
  import './isDarkColor-c927f77d.js';
7
7
  import './getBorderRadius-23398fc6.js';
8
8
 
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-45d2861f.js';
2
+ import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-008dea87.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
5
  import { i as isDarkColor } from './isDarkColor-c927f77d.js';
6
6
  import { l as languages } from './ILanguage-cd6acb72.js';
7
- import './handleFetch-37cea185.js';
7
+ import './handleFetch-99b944a2.js';
8
8
  import './getBorderRadius-23398fc6.js';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
2
- import { t as translate, l as localizationStore, D as currencyFormat } from './cart-45d2861f.js';
2
+ import { t as translate, l as localizationStore, D as currencyFormat } from './cart-008dea87.js';
3
3
  import { z as zonosStore } from './zonosStore-473f4654.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
7
- import './handleFetch-37cea185.js';
7
+ import './handleFetch-99b944a2.js';
8
8
  import './isDarkColor-c927f77d.js';
9
9
  import './getBorderRadius-23398fc6.js';
10
10
 
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
2
2
  import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-473f4654.js';
3
- import { l as localizationStore, w as isValidSelector, t as translate, y as getZCountryUrlParam, z as setZCountryUrlParam, A as currencyDisplay, B as currencyConvertAndFormat, C as currencyConvert, D as currencyFormat } from './cart-45d2861f.js';
3
+ import { l as localizationStore, w as isValidSelector, t as translate, y as getZCountryUrlParam, z as setZCountryUrlParam, A as currencyDisplay, B as currencyConvertAndFormat, C as currencyConvert, D as currencyFormat } from './cart-008dea87.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import { h as handleFetch, a as logError, l as log } from './handleFetch-37cea185.js';
5
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-99b944a2.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
7
7
  import './isDarkColor-c927f77d.js';
8
8
  import './getBorderRadius-23398fc6.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
2
- import { K as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-45d2861f.js';
2
+ import { K as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-008dea87.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
4
4
  import { l as languages } from './ILanguage-cd6acb72.js';
5
- import './handleFetch-37cea185.js';
5
+ import './handleFetch-99b944a2.js';
6
6
  import './isDarkColor-c927f77d.js';
7
7
  import './getBorderRadius-23398fc6.js';
8
8
 
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement, c as createEvent } from './index-86b8247e.js';
2
2
  import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { j as stripeStore } from './cart-45d2861f.js';
5
- import { a as logError, l as log } from './handleFetch-37cea185.js';
6
- import { d as paypalStoreInitButtons } from './paypal-ee310945.js';
4
+ import { j as stripeStore } from './cart-008dea87.js';
5
+ import { a as logError, l as log } from './handleFetch-99b944a2.js';
6
+ import { d as paypalStoreInitButtons } from './paypal-b90fc7ff.js';
7
7
  import './isDarkColor-c927f77d.js';
8
8
  import './getBorderRadius-23398fc6.js';
9
9
 
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):o(t.value).then(i,c)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(r=0)),r)try{if(n=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;o=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1];a=c;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=e.call(t,r)}catch(t){c=[6,t];o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-37cea185.js";var getTempCartById=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,r,n;return __generator(this,(function(o){switch(o.label){case 0:return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:e=o.sent(),r=e.errors,n=e.json;if(!n||r.length){return[2,null]}return[2,n]}}))}))};var setupCartData=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,getTempCartById(t)];case 1:e=r.sent();log("[ZONOS - loadZonos] getting temp cart data","info",e);if(!e){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:e.cartData,storeFavicon:e.storeFaviconUrl,storeId:e.cartData.storeId,storeLogo:e.storeLogoUrl,zonosApiKey:e.cartData.credentialToken}]}}))}))};var checkoutHiddenBtnSelector="zonos--checkout-hidden-button";var domesticRedirectedBtnSelector="zonos--domestic-redirected-checkout-button";export{checkoutHiddenBtnSelector as c,domesticRedirectedBtnSelector as d,setupCartData as s};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):o(t.value).then(i,c)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(r=0)),r)try{if(n=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;o=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1];a=c;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=e.call(t,r)}catch(t){c=[6,t];o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-99b944a2.js";var getTempCartById=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,r,n;return __generator(this,(function(o){switch(o.label){case 0:return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:e=o.sent(),r=e.errors,n=e.json;if(!n||r.length){return[2,null]}return[2,n]}}))}))};var setupCartData=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,getTempCartById(t)];case 1:e=r.sent();log("[ZONOS - loadZonos] getting temp cart data","info",e);if(!e){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:e.cartData,storeFavicon:e.storeFaviconUrl,storeId:e.cartData.storeId,storeLogo:e.storeLogoUrl,zonosApiKey:e.cartData.credentialToken}]}}))}))};var checkoutHiddenBtnSelector="zonos--checkout-hidden-button";var domesticRedirectedBtnSelector="zonos--domestic-redirected-checkout-button";export{checkoutHiddenBtnSelector as c,domesticRedirectedBtnSelector as d,setupCartData as s};