@zonos/elements 1.3.168 → 1.3.170
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-626b48e5.js → CheckoutConfig-f5e68e14.js} +1 -1
- package/dist/cjs/{cart-dbeee1e9.js → cart-36799bbe.js} +4 -4
- package/dist/cjs/{getBorderRadius-d184b623.js → getBorderRadius-94ef609c.js} +1 -1
- package/dist/cjs/{handleFetch-3673a0c2.js → handleFetch-7b7f9f7c.js} +79 -1
- package/dist/cjs/index.cjs.js +11 -9
- package/dist/cjs/{isDarkColor-08d92ed7.js → isDarkColor-ec4a4e7d.js} +1 -1
- package/dist/cjs/{paypal-ea1693b0.js → paypal-3eae38bd.js} +4 -4
- package/dist/cjs/zonos-address_7.cjs.entry.js +5 -5
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +65 -40
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-7975e4b6.js → zonosStore-3812b318.js} +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +15 -0
- package/dist/collection/components/store/zonosStore.js +3 -0
- package/dist/collection/components/utils/handleFetch.js +14 -1
- package/dist/collection/components/utils/logging/getAdditionalLogMetadata.js +19 -0
- package/dist/collection/components/utils/logging/prepLoadTimeApiLog.js +29 -0
- package/dist/collection/components/utils/logging/sendBulkLoadTimeApiLog.js +30 -0
- package/dist/collection/components/utils/logging/sendLoadCheckoutFacadeLog.js +1 -1
- package/dist/collection/components/utils/logging/sendLoadNativeCheckoutLog.js +23 -0
- package/dist/collection/components/utils/logging/sendLoadScriptLog.js +1 -17
- package/dist/collection/scripts/_zonosBase.js +2 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
- package/dist/esm/{CheckoutConfig-646aae20.js → CheckoutConfig-2994efd9.js} +1 -1
- package/dist/esm/{cart-f2f5f13f.js → cart-b2e57589.js} +4 -4
- package/dist/esm/{getBorderRadius-740610fb.js → getBorderRadius-ada3ccad.js} +1 -1
- package/dist/esm/{handleFetch-b4633675.js → handleFetch-8d72c8cd.js} +79 -2
- package/dist/esm/index.js +12 -10
- package/dist/esm/{isDarkColor-2f59d721.js → isDarkColor-446fccb7.js} +1 -1
- package/dist/esm/{paypal-a4f2a79c.js → paypal-38da5d52.js} +4 -4
- package/dist/esm/zonos-address_7.entry.js +5 -5
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +2 -2
- package/dist/esm/zonos-cart-items_13.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +64 -39
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +5 -5
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_4.entry.js +5 -5
- package/dist/esm/zonos-empty-state-payment_4.entry.js +6 -6
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-71d7e02f.js → zonosStore-d3c5a0a5.js} +3 -0
- package/dist/esm-es5/{CheckoutConfig-646aae20.js → CheckoutConfig-2994efd9.js} +1 -1
- package/dist/esm-es5/{cart-f2f5f13f.js → cart-b2e57589.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-740610fb.js → getBorderRadius-ada3ccad.js} +1 -1
- package/dist/esm-es5/handleFetch-8d72c8cd.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-2f59d721.js → isDarkColor-446fccb7.js} +1 -1
- package/dist/esm-es5/{paypal-a4f2a79c.js → paypal-38da5d52.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.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-empty-state-payment_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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-71d7e02f.js → zonosStore-d3c5a0a5.js} +1 -1
- package/dist/scripts/index.d.ts +20 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/utils/logging/getAdditionalLogMetadata.d.ts +15 -0
- package/dist/types/components/utils/logging/prepLoadTimeApiLog.d.ts +23 -0
- package/dist/types/components/utils/logging/sendBulkLoadTimeApiLog.d.ts +1 -0
- package/dist/types/components/utils/logging/sendLoadNativeCheckoutLog.d.ts +3 -0
- package/dist/types/components/utils/logging/sendLoadScriptLog.d.ts +0 -12
- package/dist/types/scripts/_getNextFallbackUrl.d.ts +1 -1
- package/dist/types/scripts/_zonosBase.d.ts +5 -0
- package/dist/types/types/LogLoadScript.d.ts +1 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +11 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +21 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-af107510.entry.js → p-00ad3c73.entry.js} +1 -1
- package/dist/zonos-elements/{p-25ad92dc.system.entry.js → p-0bfca3a9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0dc78be4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-18af4af9.system.entry.js → p-0def1397.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-09e4f412.system.entry.js → p-0e63259c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-466de014.system.entry.js → p-1a20922f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-16413274.system.entry.js → p-1edbfb1f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c7219337.system.entry.js → p-236f32c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd999b44.js → p-30fdcbee.js} +1 -1
- package/dist/zonos-elements/{p-acabfba5.entry.js → p-3731e7f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-6549915d.entry.js → p-3eac4b10.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c028742.entry.js → p-41dfc828.entry.js} +1 -1
- package/dist/zonos-elements/{p-163425d9.entry.js → p-461ca324.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-c9035262.js → p-47f79a6d.js} +1 -1
- package/dist/zonos-elements/{p-b21c0d7f.js → p-48173901.js} +2 -2
- package/dist/zonos-elements/{p-a9a95fae.system.js → p-5187ba8f.system.js} +1 -1
- package/dist/zonos-elements/{p-e427c0d6.system.entry.js → p-53cb8867.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-75b8db34.system.entry.js → p-56758218.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3edccfff.system.entry.js → p-56a8b1f6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0febd074.system.entry.js → p-58f660d4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6fdbbf4.system.js → p-69255ed2.system.js} +1 -1
- package/dist/zonos-elements/{p-57281d6c.system.entry.js → p-6c0c8722.system.entry.js} +1 -1
- package/dist/zonos-elements/p-71539c8a.js +1 -0
- package/dist/zonos-elements/{p-ed74742d.system.entry.js → p-739014f8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-073bc210.entry.js → p-8048932d.entry.js} +1 -1
- package/dist/zonos-elements/{p-77581c1c.entry.js → p-829f6a40.entry.js} +1 -1
- package/dist/zonos-elements/{p-7011d8e2.entry.js → p-864c7c7d.entry.js} +1 -1
- package/dist/zonos-elements/p-8b179fdc.entry.js +1 -0
- package/dist/zonos-elements/{p-73e9a8f5.entry.js → p-90633d63.entry.js} +1 -1
- package/dist/zonos-elements/p-9261869c.system.js +1 -0
- package/dist/zonos-elements/{p-672707ce.js → p-98aa88b1.js} +1 -1
- package/dist/zonos-elements/{p-e4a52de7.entry.js → p-9f9e4f74.entry.js} +1 -1
- package/dist/zonos-elements/{p-98e9c9cf.js → p-a1cfbd0a.js} +1 -1
- package/dist/zonos-elements/{p-3bff5a9f.system.js → p-a3888f1d.system.js} +1 -1
- package/dist/zonos-elements/{p-405f70b1.entry.js → p-b0c39400.entry.js} +1 -1
- package/dist/zonos-elements/{p-72319b4d.entry.js → p-b5b9aa6c.entry.js} +1 -1
- package/dist/zonos-elements/{p-20ca31fd.system.entry.js → p-be9e1818.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7f69ad17.system.js → p-bf113a46.system.js} +1 -1
- package/dist/zonos-elements/{p-0e524fae.entry.js → p-bfa028a2.entry.js} +1 -1
- package/dist/zonos-elements/{p-85235fa0.system.entry.js → p-c4fa8524.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-73a3e5bb.system.js → p-c5c2976f.system.js} +1 -1
- package/dist/zonos-elements/{p-41688151.system.entry.js → p-c82f488b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab699c84.entry.js → p-cb52cfdf.entry.js} +1 -1
- package/dist/zonos-elements/{p-75a8e67d.entry.js → p-cc6d9f7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-82166888.system.entry.js → p-ce853f8f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-15971b78.entry.js → p-cedf08f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-e174b37b.system.entry.js → p-d0944cc8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d24e0b90.system.js +1 -0
- package/dist/zonos-elements/{p-eb5835d1.system.entry.js → p-d49c6a3e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c556ff98.js → p-dd0259f4.js} +1 -1
- package/dist/zonos-elements/{p-a7246199.entry.js → p-e09cea9c.entry.js} +1 -1
- package/dist/zonos-elements/p-e4f8114a.system.js +1 -0
- package/dist/zonos-elements/{p-c371558a.system.entry.js → p-e99e75dd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-83645bb4.entry.js → p-eb294265.entry.js} +1 -1
- package/dist/zonos-elements/{p-8addb07b.system.entry.js → p-f378b4d3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-718c9603.system.entry.js → p-fd352222.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa15b9b5.entry.js → p-fe2c27c4.entry.js} +1 -1
- package/dist/zonos-elements/{p-607a6750.entry.js → p-febb90e0.entry.js} +1 -1
- package/dist/zonos-elements/{p-93499c9b.entry.js → p-ff1c6d9a.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/handleFetch-b4633675.js +0 -1
- package/dist/zonos-elements/p-18e5b741.system.js +0 -1
- package/dist/zonos-elements/p-5af56bda.system.js +0 -1
- package/dist/zonos-elements/p-6658cc02.system.js +0 -1
- package/dist/zonos-elements/p-a9425cb3.system.entry.js +0 -1
- package/dist/zonos-elements/p-bcfb4e10.entry.js +0 -1
- package/dist/zonos-elements/p-f0c8150e.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const zonosStore = require('./zonosStore-
|
|
4
|
-
const handleFetch = require('./handleFetch-
|
|
5
|
-
const isDarkColor = require('./isDarkColor-
|
|
6
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
3
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
4
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
5
|
+
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
6
|
+
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
7
7
|
|
|
8
8
|
const stringsArabic = {
|
|
9
9
|
' (Duties due at door)': {
|
|
@@ -126,6 +126,71 @@ const jsonParse = (_data) => {
|
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
+
const getNavigatorConnection = () => {
|
|
130
|
+
const connection = 'connection' in window.navigator
|
|
131
|
+
? // connection is not yet supported in all browsers
|
|
132
|
+
window.navigator.connection
|
|
133
|
+
: null;
|
|
134
|
+
const mozConnection = 'mozConnection' in window.navigator
|
|
135
|
+
? // mozConnection is not yet supported in all browsers
|
|
136
|
+
window.navigator.mozConnection
|
|
137
|
+
: null;
|
|
138
|
+
const webkitConnection = 'webkitConnection' in window.navigator
|
|
139
|
+
? // webkitConnection is not yet supported in all browsers
|
|
140
|
+
window.navigator.webkitConnection
|
|
141
|
+
: null;
|
|
142
|
+
const baseConnection = connection || mozConnection || webkitConnection;
|
|
143
|
+
return baseConnection;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const getAdditionalLogMetadata = () => {
|
|
147
|
+
const userAgentData = 'userAgentData' in window.navigator
|
|
148
|
+
? // userAgentData is not yet supported in all browsers
|
|
149
|
+
window.navigator.userAgentData
|
|
150
|
+
: null;
|
|
151
|
+
const baseConnection = getNavigatorConnection();
|
|
152
|
+
return {
|
|
153
|
+
connectionDownlink: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.downlink,
|
|
154
|
+
connectionEffectiveType: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.effectiveType,
|
|
155
|
+
connectionRtt: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.rtt,
|
|
156
|
+
connectionSaveData: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.saveData,
|
|
157
|
+
screenHeight: window.screen.height,
|
|
158
|
+
screenWidth: window.screen.width,
|
|
159
|
+
userAgent: userAgentData && userAgentData.brands.length > 0
|
|
160
|
+
? userAgentData
|
|
161
|
+
: window.navigator.userAgent,
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const blackListPaths = [
|
|
166
|
+
'/api/zonos-elements/log-script-load',
|
|
167
|
+
'/api/zonos-elements/log-bulk-load',
|
|
168
|
+
];
|
|
169
|
+
/**
|
|
170
|
+
* Prepares the load time api log for the given API call to send to the server later
|
|
171
|
+
* This function is used to prepare the load time api log for the given API call.
|
|
172
|
+
* It adds the load time api log to the loadTimeApiInfoList.
|
|
173
|
+
*/
|
|
174
|
+
const prepLoadTimeApiLog = ({ apiPath, apiType, loadTimeInternal, loadTimeTotal, }) => {
|
|
175
|
+
if (blackListPaths.includes(apiPath)) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const apiPathWithoutParams = apiPath.split('?')[0] || apiPath;
|
|
179
|
+
const scriptLoadLogBody = {
|
|
180
|
+
cache: 'miss',
|
|
181
|
+
cdnLoadTime: loadTimeTotal - loadTimeInternal,
|
|
182
|
+
eventName: 'jsdelivr',
|
|
183
|
+
flag: 'LOG_LOAD_TIME_API',
|
|
184
|
+
href: apiPathWithoutParams,
|
|
185
|
+
loadTime: loadTimeInternal,
|
|
186
|
+
metadata: Object.assign(Object.assign({ apiType }, getAdditionalLogMetadata()), { loadTimeClientMiddleware: loadTimeTotal - loadTimeInternal, loadTimeInternal,
|
|
187
|
+
loadTimeTotal }),
|
|
188
|
+
scriptLoadUrl: apiType,
|
|
189
|
+
storeId: window.Zonos.storeId,
|
|
190
|
+
};
|
|
191
|
+
window.Zonos.loadTimeApiInfoList.push(scriptLoadLogBody);
|
|
192
|
+
};
|
|
193
|
+
|
|
129
194
|
/**
|
|
130
195
|
* This is the time in milliseconds after release time that we will start sending error logs to the new API
|
|
131
196
|
* @default 1 hour
|
|
@@ -323,11 +388,24 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
|
|
|
323
388
|
const basePathType = isBigcommerceEndpoint
|
|
324
389
|
? 'vercel'
|
|
325
390
|
: _basePathType;
|
|
391
|
+
const startTime = performance.now();
|
|
326
392
|
const _c = await handleRequest({
|
|
327
393
|
basePathType,
|
|
328
394
|
options,
|
|
329
395
|
path,
|
|
330
396
|
}), { errors, response } = _c, rest = __rest(_c, ["errors", "response"]);
|
|
397
|
+
const endTime = performance.now();
|
|
398
|
+
const duration = endTime - startTime;
|
|
399
|
+
// Send the load time api log
|
|
400
|
+
log(`${path} (${duration.toFixed(2)}ms)`, 'info');
|
|
401
|
+
// No need to send the load time api log for the log-script-load endpoint
|
|
402
|
+
const internalDuration = response === null || response === void 0 ? void 0 : response.headers.get('Zonos-Duration');
|
|
403
|
+
prepLoadTimeApiLog({
|
|
404
|
+
apiPath: path,
|
|
405
|
+
apiType: basePathType,
|
|
406
|
+
loadTimeInternal: internalDuration ? Number(internalDuration) : 0,
|
|
407
|
+
loadTimeTotal: duration,
|
|
408
|
+
});
|
|
331
409
|
const nextFallbackApiType = getNextFallbackApiType(basePathType);
|
|
332
410
|
const unknownError = errors.find(({ type }) => type === 'unknown');
|
|
333
411
|
const isUnknownError = !!unknownError || (response === null || response === void 0 ? void 0 : response.status) === 404;
|
|
@@ -379,7 +457,6 @@ const handleFetch = async (path, _opts) => {
|
|
|
379
457
|
method });
|
|
380
458
|
// This is for testing fallback API, set fallback API type to start with
|
|
381
459
|
const useFallbackApi = new URLSearchParams(window.location.search).get('useFallbackApi');
|
|
382
|
-
log(path, 'info');
|
|
383
460
|
return handleRequestWithFallback({
|
|
384
461
|
basePathType: useFallbackApi || MAIN_BASE_API_TYPE,
|
|
385
462
|
options,
|
|
@@ -389,6 +466,7 @@ const handleFetch = async (path, _opts) => {
|
|
|
389
466
|
|
|
390
467
|
exports.allLogs = allLogs;
|
|
391
468
|
exports.fallbackApiList = fallbackApiList;
|
|
469
|
+
exports.getAdditionalLogMetadata = getAdditionalLogMetadata;
|
|
392
470
|
exports.getElapsedTime = getElapsedTime;
|
|
393
471
|
exports.getIsStagingMode = getIsStagingMode;
|
|
394
472
|
exports.getIsTestMode = getIsTestMode;
|
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-7b7f9f7c.js');
|
|
6
|
+
const CheckoutConfig = require('./CheckoutConfig-f5e68e14.js');
|
|
7
7
|
const TaxId = require('./TaxId-4632639d.js');
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -129,7 +129,7 @@ const getZonosQaUrl = () => {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
132
|
-
const cdnUrl = "https://v1.3.
|
|
132
|
+
const cdnUrl = "https://v1.3.170.js.zonos.com";
|
|
133
133
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
134
134
|
if (!qaUrl &&
|
|
135
135
|
(cdnUrl.includes('test.') ||
|
|
@@ -313,10 +313,10 @@ const zonosLoadUrl = (() => {
|
|
|
313
313
|
}
|
|
314
314
|
return null;
|
|
315
315
|
})();
|
|
316
|
-
const ZONOS_URL = "https://v1.3.
|
|
317
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
318
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
319
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
316
|
+
const ZONOS_URL = "https://v1.3.170.js.zonos.com";
|
|
317
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.170";
|
|
318
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.170";
|
|
319
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.170";
|
|
320
320
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
321
321
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
322
322
|
class Zonos {
|
|
@@ -330,7 +330,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
330
330
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
331
331
|
Zonos._paypalMockResponse = null;
|
|
332
332
|
Zonos.isBigCommerce = false;
|
|
333
|
-
Zonos.releaseDate = "
|
|
333
|
+
Zonos.releaseDate = "1741970849426";
|
|
334
334
|
Zonos.isLegacyCheckout = false;
|
|
335
335
|
Zonos.domain = typeof window !== 'undefined'
|
|
336
336
|
? // domain that embeds the iframe
|
|
@@ -346,12 +346,14 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
346
346
|
Zonos.isNpm = true;
|
|
347
347
|
Zonos.zonosQaUrl = null;
|
|
348
348
|
Zonos.zonosQaUrlApi = null;
|
|
349
|
-
Zonos.version = `v${"1.3.
|
|
349
|
+
Zonos.version = `v${"1.3.170"}`;
|
|
350
350
|
Zonos.modeAlerted = false;
|
|
351
351
|
Zonos.cartData = null;
|
|
352
352
|
Zonos.paypal = null;
|
|
353
353
|
Zonos.getCurrentTimestamp = () => new Date().getTime();
|
|
354
354
|
Zonos.zonosController = null;
|
|
355
|
+
Zonos.loadTimeApiInfoList = [];
|
|
356
|
+
Zonos.logIntervalId = null;
|
|
355
357
|
Zonos.init = async (params) => {
|
|
356
358
|
const { appearance, checkoutSettings, currencyConverter, helloSettings, onCountryChange, overrideCurrencyFormat, storeId, zonosApiKey, } = params;
|
|
357
359
|
_a.cartId = getCartIdFromQueryParam();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const zonosStore = require('./zonosStore-
|
|
4
|
-
const cart = require('./cart-
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
-
const isDarkColor = require('./isDarkColor-
|
|
3
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
4
|
+
const cart = require('./cart-36799bbe.js');
|
|
5
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
6
|
+
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
7
7
|
|
|
8
8
|
/*!
|
|
9
9
|
* paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-36799bbe.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
10
10
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
12
12
|
const RemoveIcon$1 = require('./RemoveIcon-081ac073.js');
|
|
13
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
14
|
-
const isDarkColor = require('./isDarkColor-
|
|
13
|
+
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
14
|
+
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
15
15
|
|
|
16
16
|
const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--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:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
|
|
17
17
|
const ZonosAddressStyle0 = zonosAddressCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const RemoveLineIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosBannerCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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(--zonos-elements-radius-10);padding:16px;background:var(--zonos-elements-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:0px;grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:4px}:host(.info){background-color:var(--zonos-elements-blue-100);border:1px solid var(--zonos-elements-blue-200)}:host(.success){background-color:var(--zonos-elements-green-100);border:1px solid var(--zonos-elements-green-200)}:host(.error){background-color:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host(.warning){background-color:var(--zonos-elements-orange-100);border:1px solid var(--zonos-elements-orange-200)}";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
10
|
-
const isDarkColor = require('./isDarkColor-
|
|
10
|
+
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
11
11
|
const styles = require('./styles-d1e64fb9.js');
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
9
9
|
|
|
10
10
|
const zonosCardCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-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, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";
|
|
11
11
|
const ZonosCardStyle0 = zonosCardCss;
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-36799bbe.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
9
|
-
const zonosStore = require('./zonosStore-
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const paypal = require('./paypal-3eae38bd.js');
|
|
9
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
10
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
11
11
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
12
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
12
|
+
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
13
13
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
14
14
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
15
|
-
const isDarkColor = require('./isDarkColor-
|
|
15
|
+
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
16
16
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
17
17
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
18
18
|
const TaxId = require('./TaxId-4632639d.js');
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
8
|
-
const zonosStore = require('./zonosStore-
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
+
const cart = require('./cart-36799bbe.js');
|
|
7
|
+
const paypal = require('./paypal-3eae38bd.js');
|
|
8
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
9
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
12
12
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
13
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
14
|
-
const isDarkColor = require('./isDarkColor-
|
|
13
|
+
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
14
|
+
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
15
15
|
const styles = require('./styles-d1e64fb9.js');
|
|
16
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
16
|
+
const CheckoutConfig = require('./CheckoutConfig-f5e68e14.js');
|
|
17
17
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -184,38 +184,33 @@ const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector, onShi
|
|
|
184
184
|
});
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
connectionSaveData: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.saveData,
|
|
215
|
-
userAgent: userAgentData && userAgentData.brands.length > 0
|
|
216
|
-
? userAgentData
|
|
217
|
-
: window.navigator.userAgent,
|
|
218
|
-
};
|
|
187
|
+
let numberOfFailures = 0;
|
|
188
|
+
const sendBulkLoadTimeApiLog = async () => {
|
|
189
|
+
// Don't send the log if there are no API calls to send
|
|
190
|
+
if (window.Zonos.loadTimeApiInfoList.length === 0) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
handleFetch.log('Sending bulk load time api log', 'info', {
|
|
194
|
+
loadTimeApiInfoList: window.Zonos.loadTimeApiInfoList,
|
|
195
|
+
});
|
|
196
|
+
// Clone the list so we can clear it after sending the log
|
|
197
|
+
const loadTimeApiInfoListArray = [...window.Zonos.loadTimeApiInfoList];
|
|
198
|
+
// Clear the list after sending the log successfully
|
|
199
|
+
window.Zonos.loadTimeApiInfoList.length = 0;
|
|
200
|
+
// Clear the list after sending the log successfully
|
|
201
|
+
const { errors } = await handleFetch.handleFetch('/api/zonos-elements/log-bulk-load', {
|
|
202
|
+
body: loadTimeApiInfoListArray,
|
|
203
|
+
method: 'POST',
|
|
204
|
+
});
|
|
205
|
+
if (errors.length) {
|
|
206
|
+
// If there are errors, add the logs back to the list so we can try again later
|
|
207
|
+
window.Zonos.loadTimeApiInfoList.push(...loadTimeApiInfoListArray);
|
|
208
|
+
numberOfFailures++;
|
|
209
|
+
if (numberOfFailures > 5 && window.Zonos.logIntervalId) {
|
|
210
|
+
// If there are more than 3 failures, stop the interval
|
|
211
|
+
clearInterval(window.Zonos.logIntervalId);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
219
214
|
};
|
|
220
215
|
|
|
221
216
|
const sendLoadCheckoutFacadeLog = async () => {
|
|
@@ -226,7 +221,7 @@ const sendLoadCheckoutFacadeLog = async () => {
|
|
|
226
221
|
flag: 'LOG_CHECKOUT_FACADE_LOAD',
|
|
227
222
|
href: window.location.href,
|
|
228
223
|
loadTime: elapsedTime,
|
|
229
|
-
metadata: Object.assign({ allLogs: handleFetch.allLogs }, getAdditionalLogMetadata()),
|
|
224
|
+
metadata: Object.assign({ allLogs: handleFetch.allLogs }, handleFetch.getAdditionalLogMetadata()),
|
|
230
225
|
scriptLoadUrl: 'checkoutFacade',
|
|
231
226
|
storeId: window.Zonos.storeId,
|
|
232
227
|
};
|
|
@@ -236,6 +231,23 @@ const sendLoadCheckoutFacadeLog = async () => {
|
|
|
236
231
|
});
|
|
237
232
|
};
|
|
238
233
|
|
|
234
|
+
const sendLoadNativeCheckoutLog = async ({ loadTime, }) => {
|
|
235
|
+
const scriptLoadLogBody = {
|
|
236
|
+
cache: 'miss',
|
|
237
|
+
eventName: 'jsdelivr',
|
|
238
|
+
flag: 'LOG_NATIVE_CHECKOUT_LOAD',
|
|
239
|
+
href: window.location.href,
|
|
240
|
+
loadTime,
|
|
241
|
+
metadata: Object.assign({ allLogs: handleFetch.allLogs }, handleFetch.getAdditionalLogMetadata()),
|
|
242
|
+
scriptLoadUrl: 'nativeCheckout',
|
|
243
|
+
storeId: window.Zonos.storeId,
|
|
244
|
+
};
|
|
245
|
+
void handleFetch.handleFetch('/api/zonos-elements/log-script-load', {
|
|
246
|
+
body: scriptLoadLogBody,
|
|
247
|
+
method: 'POST',
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
|
|
239
251
|
const MessageIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
240
252
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>
|
|
241
253
|
</svg>
|
|
@@ -633,6 +645,14 @@ const ZonosCheckout = class {
|
|
|
633
645
|
});
|
|
634
646
|
button.addEventListener('click', async (e) => {
|
|
635
647
|
var _a;
|
|
648
|
+
if (!window.Zonos.logIntervalId) {
|
|
649
|
+
// log the load time of all API calls every 2 seconds. This is to track the load time of all API calls for checkout user
|
|
650
|
+
window.Zonos.logIntervalId = setInterval(() => {
|
|
651
|
+
void sendBulkLoadTimeApiLog();
|
|
652
|
+
}, 2000);
|
|
653
|
+
}
|
|
654
|
+
// Start tracking load time
|
|
655
|
+
const startTime = performance.now();
|
|
636
656
|
// Allow no country set for legacy facades. Otherwise enforce it being a shippable country and not disabled.
|
|
637
657
|
if (!window.Zonos.isLegacyCheckout &&
|
|
638
658
|
(!isShippableCountry() || isDisabledCountry())) {
|
|
@@ -681,6 +701,11 @@ const ZonosCheckout = class {
|
|
|
681
701
|
if (window.Zonos.isLegacyCheckout) {
|
|
682
702
|
void sendLoadCheckoutFacadeLog();
|
|
683
703
|
}
|
|
704
|
+
else {
|
|
705
|
+
const endTime = performance.now();
|
|
706
|
+
const loadTime = endTime - startTime;
|
|
707
|
+
void sendLoadNativeCheckoutLog({ loadTime });
|
|
708
|
+
}
|
|
684
709
|
}
|
|
685
710
|
catch (err) {
|
|
686
711
|
// stop loading
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
7
|
|
|
8
8
|
const zonosCollapseCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";
|
|
9
9
|
const ZonosCollapseStyle0 = zonosCollapseCss;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
6
|
+
const cart = require('./cart-36799bbe.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
9
|
+
require('./isDarkColor-ec4a4e7d.js');
|
|
10
|
+
require('./getBorderRadius-94ef609c.js');
|
|
11
11
|
|
|
12
12
|
const getZonosSettings = async () => {
|
|
13
13
|
const { errors, json, zonosMode } = await handleFetch.handleFetch('/api/zonos-elements/zonos-settings');
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-36799bbe.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
10
|
-
require('./isDarkColor-
|
|
11
|
-
require('./getBorderRadius-
|
|
9
|
+
require('./handleFetch-7b7f9f7c.js');
|
|
10
|
+
require('./isDarkColor-ec4a4e7d.js');
|
|
11
|
+
require('./getBorderRadius-94ef609c.js');
|
|
12
12
|
|
|
13
13
|
const zonosCountryFlagCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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}";
|
|
14
14
|
const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-36799bbe.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
|
-
const isDarkColor = require('./isDarkColor-
|
|
9
|
+
const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
11
|
-
require('./handleFetch-
|
|
12
|
-
require('./getBorderRadius-
|
|
11
|
+
require('./handleFetch-7b7f9f7c.js');
|
|
12
|
+
require('./getBorderRadius-94ef609c.js');
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io)
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
9
|
-
const cart = require('./cart-
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
11
|
-
const paypal = require('./paypal-
|
|
12
|
-
require('./isDarkColor-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
9
|
+
const cart = require('./cart-36799bbe.js');
|
|
10
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
11
|
+
const paypal = require('./paypal-3eae38bd.js');
|
|
12
|
+
require('./isDarkColor-ec4a4e7d.js');
|
|
13
13
|
|
|
14
14
|
const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
15
15
|
<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-36799bbe.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-3812b318.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-
|
|
12
|
-
require('./isDarkColor-
|
|
13
|
-
require('./getBorderRadius-
|
|
11
|
+
require('./handleFetch-7b7f9f7c.js');
|
|
12
|
+
require('./isDarkColor-ec4a4e7d.js');
|
|
13
|
+
require('./getBorderRadius-94ef609c.js');
|
|
14
14
|
|
|
15
15
|
const getHasMoreSpaceAbove = (ref) => {
|
|
16
16
|
const componentRect = ref.getBoundingClientRect();
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
7
|
-
const cart = require('./cart-
|
|
6
|
+
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
|
+
const cart = require('./cart-36799bbe.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-7b7f9f7c.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
|
-
require('./isDarkColor-
|
|
12
|
-
require('./getBorderRadius-
|
|
11
|
+
require('./isDarkColor-ec4a4e7d.js');
|
|
12
|
+
require('./getBorderRadius-94ef609c.js');
|
|
13
13
|
|
|
14
14
|
var root = zonosStore._root;
|
|
15
15
|
|