@zonos/elements 1.3.54 → 1.3.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{CheckoutConfig-ca67953a.js → CheckoutConfig-c75fe0fe.js} +1 -1
- package/dist/cjs/{cart-03b08131.js → cart-6095475b.js} +1 -1
- package/dist/cjs/{createCustomEvent-532569f1.js → createCustomEvent-0cef191b.js} +2 -2
- package/dist/cjs/{handleFetch-4b296adc.js → handleFetch-57c46afa.js} +3 -0
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/{paypal-bdc19559.js → paypal-ac2f82ef.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-badge_13.cjs.entry.js +4 -4
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -1
- package/dist/collection/components/utils/logging/sendErrorLog.js +3 -0
- package/dist/esm/{CheckoutConfig-bf2a28bd.js → CheckoutConfig-49ba0fef.js} +1 -1
- package/dist/esm/{cart-008dea87.js → cart-0467d5ac.js} +1 -1
- package/dist/esm/{createCustomEvent-a10320c1.js → createCustomEvent-ccb2f324.js} +2 -2
- package/dist/esm/{handleFetch-99b944a2.js → handleFetch-de935ec3.js} +3 -0
- package/dist/esm/index.js +10 -10
- package/dist/esm/{paypal-b90fc7ff.js → paypal-e68cf8df.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +2 -2
- package/dist/esm/zonos-badge_13.entry.js +4 -4
- package/dist/esm/zonos-checkout.entry.js +9 -6
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +3 -3
- package/dist/esm-es5/{CheckoutConfig-bf2a28bd.js → CheckoutConfig-49ba0fef.js} +1 -1
- package/dist/esm-es5/{cart-008dea87.js → cart-0467d5ac.js} +1 -1
- package/dist/esm-es5/{createCustomEvent-a10320c1.js → createCustomEvent-ccb2f324.js} +1 -1
- package/dist/esm-es5/handleFetch-de935ec3.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-b90fc7ff.js → paypal-e68cf8df.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-b914e98e.js → p-068c9ba4.js} +1 -1
- package/dist/zonos-elements/p-0f198151.entry.js +1 -0
- package/dist/zonos-elements/{p-e672e4de.entry.js → p-1b071708.entry.js} +1 -1
- package/dist/zonos-elements/{p-3149985c.entry.js → p-29ad5aa6.entry.js} +1 -1
- package/dist/zonos-elements/{p-baff865d.entry.js → p-386bef53.entry.js} +1 -1
- package/dist/zonos-elements/p-41871fbd.js +17 -0
- package/dist/zonos-elements/p-478b5c7d.entry.js +1 -0
- package/dist/zonos-elements/{p-710b8292.js → p-4c30186a.js} +1 -1
- package/dist/zonos-elements/{p-ca4efb81.system.entry.js → p-59c51734.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e6b9cf45.system.js → p-60129618.system.js} +1 -1
- package/dist/zonos-elements/p-6be07fde.js +1 -0
- package/dist/zonos-elements/{p-f5bac726.system.entry.js → p-726cef64.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-72cfc372.system.entry.js → p-7b18892a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-546aabc0.system.entry.js → p-7e431f33.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c29081a.js → p-8d9112e9.js} +1 -1
- package/dist/zonos-elements/p-93f12fa9.system.js +1 -0
- package/dist/zonos-elements/{p-4b7c05a8.system.entry.js → p-974ce80b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3566044a.entry.js → p-9a1a2aa2.entry.js} +1 -1
- package/dist/zonos-elements/{p-997cc826.entry.js → p-a164f76d.entry.js} +1 -1
- package/dist/zonos-elements/p-ac162a0f.system.js +1 -0
- package/dist/zonos-elements/{p-f9bfbf42.system.js → p-aff41c41.system.js} +1 -1
- package/dist/zonos-elements/{p-ada937d6.system.entry.js → p-b2e18e34.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2673dd6d.system.entry.js → p-b80ef150.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-7f93c97a.system.js → p-c7a8a6bb.system.js} +1 -1
- package/dist/zonos-elements/{p-f6e385f8.system.entry.js → p-ce149fc7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-66cc2bbd.system.js → p-de2bd8da.system.js} +1 -1
- package/dist/zonos-elements/{p-88c2057e.entry.js → p-e65dd068.entry.js} +1 -1
- package/dist/zonos-elements/{p-3cfbbf17.system.entry.js → p-f0ebd55a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-18802362.entry.js → p-f32d7972.entry.js} +1 -1
- package/dist/zonos-elements/{p-2bc6342f.system.entry.js → p-fb3c4b52.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fb28f27f.entry.js → p-ffa7d4c2.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/handleFetch-99b944a2.js +0 -1
- package/dist/zonos-elements/p-7400bcd3.js +0 -1
- package/dist/zonos-elements/p-7a3118e7.entry.js +0 -1
- package/dist/zonos-elements/p-7eac524d.system.js +0 -1
- package/dist/zonos-elements/p-92faa378.system.js +0 -1
- package/dist/zonos-elements/p-dfbc9605.js +0 -17
- package/dist/zonos-elements/p-e7e22128.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const handleFetch = require('./handleFetch-
|
|
3
|
+
const handleFetch = require('./handleFetch-57c46afa.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-
|
|
4
|
+
const handleFetch = require('./handleFetch-57c46afa.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-
|
|
3
|
+
const cart = require('./cart-6095475b.js');
|
|
4
4
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
5
|
+
const handleFetch = require('./handleFetch-57c46afa.js');
|
|
6
6
|
|
|
7
7
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
8
8
|
var _a, _b;
|
|
@@ -116,6 +116,9 @@ const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostReleaseError
|
|
|
116
116
|
// use native fetch because in handleFetch also calls sendErrorLog and it will possibly cause circular dependencies issue
|
|
117
117
|
void fetch(`${MAIN_BASE_API}/api/zonos-elements/log-error`, {
|
|
118
118
|
body: JSON.stringify(errorObject),
|
|
119
|
+
headers: {
|
|
120
|
+
'Zonos-Referer': window.location.hostname,
|
|
121
|
+
},
|
|
119
122
|
method: 'POST',
|
|
120
123
|
});
|
|
121
124
|
}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
5
|
+
const handleFetch = require('./handleFetch-57c46afa.js');
|
|
6
|
+
const CheckoutConfig = require('./CheckoutConfig-c75fe0fe.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.
|
|
99
|
+
const cdnUrl = "https://v1.3.55.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.
|
|
284
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
285
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
286
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
283
|
+
const ZONOS_URL = "https://v1.3.55.js.zonos.com";
|
|
284
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.55";
|
|
285
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.55";
|
|
286
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.55";
|
|
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 = "
|
|
301
|
+
Zonos.releaseDate = "1726679495773";
|
|
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.
|
|
308
|
+
Zonos.version = `v${"1.3.55"}`;
|
|
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-
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const cart = require('./cart-6095475b.js');
|
|
5
|
+
const handleFetch = require('./handleFetch-57c46afa.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-
|
|
6
|
+
const cart = require('./cart-6095475b.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-57c46afa.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-
|
|
9
|
-
const paypal = require('./paypal-
|
|
10
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
8
|
+
const cart = require('./cart-6095475b.js');
|
|
9
|
+
const paypal = require('./paypal-ac2f82ef.js');
|
|
10
|
+
const createCustomEvent = require('./createCustomEvent-0cef191b.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-a6a3b35e.js');
|
|
12
|
-
const handleFetch = require('./handleFetch-
|
|
12
|
+
const handleFetch = require('./handleFetch-57c46afa.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-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-6095475b.js');
|
|
7
|
+
const paypal = require('./paypal-ac2f82ef.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
9
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
9
|
+
const createCustomEvent = require('./createCustomEvent-0cef191b.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
|
-
const handleFetch = require('./handleFetch-
|
|
11
|
+
const handleFetch = require('./handleFetch-57c46afa.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-
|
|
15
|
+
const CheckoutConfig = require('./CheckoutConfig-c75fe0fe.js');
|
|
16
16
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -411,7 +411,9 @@ const ZonosCheckout = class {
|
|
|
411
411
|
useLegacyQueryParam() {
|
|
412
412
|
const urlParams = new URLSearchParams(window.location.search);
|
|
413
413
|
const legacyShippingInfo = {
|
|
414
|
-
country:
|
|
414
|
+
country:
|
|
415
|
+
// fallback to selected country code if country is not provided
|
|
416
|
+
urlParams.get('country') || cart.localizationStore.selectedCountryCode,
|
|
415
417
|
customerAddress1: urlParams.get('customerAddress1'),
|
|
416
418
|
customerAddress2: urlParams.get('customerAddress2'),
|
|
417
419
|
customerCity: urlParams.get('customerCity'),
|
|
@@ -429,6 +431,7 @@ const ZonosCheckout = class {
|
|
|
429
431
|
!legacyShippingInfo.customerState ||
|
|
430
432
|
!legacyShippingInfo.customerZip ||
|
|
431
433
|
!legacyShippingInfo.country) {
|
|
434
|
+
handleFetch.log('Missing some query params so it can not be prefilled', 'info', legacyShippingInfo);
|
|
432
435
|
return;
|
|
433
436
|
}
|
|
434
437
|
this.defaultAddress = {
|
|
@@ -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-
|
|
6
|
+
const cart = require('./cart-6095475b.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-57c46afa.js');
|
|
9
9
|
require('./isDarkColor-7a056d05.js');
|
|
10
10
|
require('./getBorderRadius-a6a3b35e.js');
|
|
11
11
|
|
|
@@ -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-
|
|
6
|
+
const cart = require('./cart-6095475b.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-57c46afa.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-
|
|
6
|
+
const cart = require('./cart-6095475b.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-
|
|
11
|
+
require('./handleFetch-57c46afa.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-
|
|
6
|
+
const cart = require('./cart-6095475b.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-
|
|
11
|
+
require('./handleFetch-57c46afa.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-
|
|
7
|
+
const cart = require('./cart-6095475b.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-57c46afa.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-
|
|
6
|
+
const cart = require('./cart-6095475b.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-57c46afa.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-
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
-
const paypal = require('./paypal-
|
|
8
|
+
const cart = require('./cart-6095475b.js');
|
|
9
|
+
const handleFetch = require('./handleFetch-57c46afa.js');
|
|
10
|
+
const paypal = require('./paypal-ac2f82ef.js');
|
|
11
11
|
require('./isDarkColor-7a056d05.js');
|
|
12
12
|
require('./getBorderRadius-a6a3b35e.js');
|
|
13
13
|
|
|
@@ -267,7 +267,9 @@ export class ZonosCheckout {
|
|
|
267
267
|
useLegacyQueryParam() {
|
|
268
268
|
const urlParams = new URLSearchParams(window.location.search);
|
|
269
269
|
const legacyShippingInfo = {
|
|
270
|
-
country:
|
|
270
|
+
country:
|
|
271
|
+
// fallback to selected country code if country is not provided
|
|
272
|
+
urlParams.get('country') || localizationStore.selectedCountryCode,
|
|
271
273
|
customerAddress1: urlParams.get('customerAddress1'),
|
|
272
274
|
customerAddress2: urlParams.get('customerAddress2'),
|
|
273
275
|
customerCity: urlParams.get('customerCity'),
|
|
@@ -285,6 +287,7 @@ export class ZonosCheckout {
|
|
|
285
287
|
!legacyShippingInfo.customerState ||
|
|
286
288
|
!legacyShippingInfo.customerZip ||
|
|
287
289
|
!legacyShippingInfo.country) {
|
|
290
|
+
log('Missing some query params so it can not be prefilled', 'info', legacyShippingInfo);
|
|
288
291
|
return;
|
|
289
292
|
}
|
|
290
293
|
this.defaultAddress = {
|
|
@@ -28,6 +28,9 @@ export const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostRelea
|
|
|
28
28
|
// use native fetch because in handleFetch also calls sendErrorLog and it will possibly cause circular dependencies issue
|
|
29
29
|
void fetch(`${MAIN_BASE_API}/api/zonos-elements/log-error`, {
|
|
30
30
|
body: JSON.stringify(errorObject),
|
|
31
|
+
headers: {
|
|
32
|
+
'Zonos-Referer': window.location.hostname,
|
|
33
|
+
},
|
|
31
34
|
method: 'POST',
|
|
32
35
|
});
|
|
33
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as handleFetch, l as log, a as logError } from './handleFetch-
|
|
1
|
+
import { h as handleFetch, l as log, a as logError } from './handleFetch-de935ec3.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-
|
|
2
|
+
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-de935ec3.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-
|
|
1
|
+
import { d as cartStore, l as localizationStore } from './cart-0467d5ac.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-473f4654.js';
|
|
3
|
-
import { h as handleFetch } from './handleFetch-
|
|
3
|
+
import { h as handleFetch } from './handleFetch-de935ec3.js';
|
|
4
4
|
|
|
5
5
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
6
6
|
var _a, _b;
|
|
@@ -114,6 +114,9 @@ const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostReleaseError
|
|
|
114
114
|
// use native fetch because in handleFetch also calls sendErrorLog and it will possibly cause circular dependencies issue
|
|
115
115
|
void fetch(`${MAIN_BASE_API}/api/zonos-elements/log-error`, {
|
|
116
116
|
body: JSON.stringify(errorObject),
|
|
117
|
+
headers: {
|
|
118
|
+
'Zonos-Referer': window.location.hostname,
|
|
119
|
+
},
|
|
117
120
|
method: 'POST',
|
|
118
121
|
});
|
|
119
122
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as log, a as logError } from './handleFetch-
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { l as log, a as logError } from './handleFetch-de935ec3.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-49ba0fef.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-49ba0fef.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.
|
|
96
|
+
const cdnUrl = "https://v1.3.55.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.
|
|
281
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
282
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
283
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
280
|
+
const ZONOS_URL = "https://v1.3.55.js.zonos.com";
|
|
281
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.55";
|
|
282
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.55";
|
|
283
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.55";
|
|
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 = "
|
|
298
|
+
Zonos.releaseDate = "1726679495773";
|
|
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.
|
|
305
|
+
Zonos.version = `v${"1.3.55"}`;
|
|
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-
|
|
3
|
-
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-0467d5ac.js';
|
|
3
|
+
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-de935ec3.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-
|
|
2
|
+
import { j as stripeStore, l as localizationStore, t as translate } from './cart-0467d5ac.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
|
-
import { a as logError } from './handleFetch-
|
|
4
|
+
import { a as logError } from './handleFetch-de935ec3.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-
|
|
5
|
-
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-
|
|
6
|
-
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-
|
|
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-0467d5ac.js';
|
|
5
|
+
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-e68cf8df.js';
|
|
6
|
+
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-ccb2f324.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
|
|
8
|
-
import { h as handleFetch, s as sendErrorLog } from './handleFetch-
|
|
8
|
+
import { h as handleFetch, s as sendErrorLog } from './handleFetch-de935ec3.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-
|
|
3
|
-
import { s as submitGtag, p as paypalInitScript } from './paypal-
|
|
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-0467d5ac.js';
|
|
3
|
+
import { s as submitGtag, p as paypalInitScript } from './paypal-e68cf8df.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-
|
|
5
|
+
import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-ccb2f324.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
7
|
-
import { l as log, a as logError, s as sendErrorLog } from './handleFetch-
|
|
7
|
+
import { l as log, a as logError, s as sendErrorLog } from './handleFetch-de935ec3.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-
|
|
11
|
+
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-49ba0fef.js';
|
|
12
12
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -407,7 +407,9 @@ const ZonosCheckout = class {
|
|
|
407
407
|
useLegacyQueryParam() {
|
|
408
408
|
const urlParams = new URLSearchParams(window.location.search);
|
|
409
409
|
const legacyShippingInfo = {
|
|
410
|
-
country:
|
|
410
|
+
country:
|
|
411
|
+
// fallback to selected country code if country is not provided
|
|
412
|
+
urlParams.get('country') || localizationStore.selectedCountryCode,
|
|
411
413
|
customerAddress1: urlParams.get('customerAddress1'),
|
|
412
414
|
customerAddress2: urlParams.get('customerAddress2'),
|
|
413
415
|
customerCity: urlParams.get('customerCity'),
|
|
@@ -425,6 +427,7 @@ const ZonosCheckout = class {
|
|
|
425
427
|
!legacyShippingInfo.customerState ||
|
|
426
428
|
!legacyShippingInfo.customerZip ||
|
|
427
429
|
!legacyShippingInfo.country) {
|
|
430
|
+
log('Missing some query params so it can not be prefilled', 'info', legacyShippingInfo);
|
|
428
431
|
return;
|
|
429
432
|
}
|
|
430
433
|
this.defaultAddress = {
|
|
@@ -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-
|
|
2
|
+
import { w as isValidSelector, j as stripeStore, x as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-0467d5ac.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-
|
|
4
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-de935ec3.js';
|
|
5
5
|
import './isDarkColor-c927f77d.js';
|
|
6
6
|
import './getBorderRadius-23398fc6.js';
|
|
7
7
|
|
|
@@ -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-
|
|
2
|
+
import { l as localizationStore } from './cart-0467d5ac.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-de935ec3.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-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-0467d5ac.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-
|
|
7
|
+
import './handleFetch-de935ec3.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-
|
|
2
|
+
import { t as translate, l as localizationStore, D as currencyFormat } from './cart-0467d5ac.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-
|
|
7
|
+
import './handleFetch-de935ec3.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-
|
|
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-0467d5ac.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { h as handleFetch, a as logError, l as log } from './handleFetch-
|
|
5
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-de935ec3.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-
|
|
2
|
+
import { K as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-0467d5ac.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
4
4
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-de935ec3.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-
|
|
5
|
-
import { a as logError, l as log } from './handleFetch-
|
|
6
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
4
|
+
import { j as stripeStore } from './cart-0467d5ac.js';
|
|
5
|
+
import { a as logError, l as log } from './handleFetch-de935ec3.js';
|
|
6
|
+
import { d as paypalStoreInitButtons } from './paypal-e68cf8df.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-
|
|
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-de935ec3.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};
|