@zonos/elements 1.3.257 → 1.3.259
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/{cart-cd0a054b.js → cart-c618fd5b.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-3650109c.js → hasInclusivePrice-58a9f15d.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-1cea739b.js → invoice-c9cb6683.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-65c71740.js → isCollectMobileTablet-93a5194a.js} +2 -2
- package/dist/cjs/{localization-adaab93f.js → localization-5994d4de.js} +25 -3
- package/dist/cjs/{paypal-326d7bc5.js → paypal-091e089e.js} +2 -2
- package/dist/cjs/{placeTestOrder-53f2fe97.js → placeTestOrder-b07f8edb.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-cf2e3b93.js → renderCheckoutCurrency-7876a1d4.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +442 -17
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +45 -12
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +72 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +43 -10
- package/dist/collection/components/store/hello/localization.js +25 -3
- package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +6 -0
- package/dist/collection/components/utils/checkout/buildBigcommerceLoginUrl.js +65 -0
- package/dist/collection/components/utils/checkout/checkBigCommerceBypassCustomerGroup.js +12 -7
- package/dist/collection/components/utils/checkout/checkBigCommerceForceLogin.js +116 -0
- package/dist/collection/components/utils/checkout/fetchBigCommerceCheckoutSettings.js +92 -0
- package/dist/collection/components/utils/checkout/fixBigCommerceLoginCreateAccountLink.js +53 -0
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +40 -7
- package/dist/collection/types/checkout/api/BigCommerceCheckoutSettings.js +1 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +39 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/{cart-4cd47a1b.js → cart-76fb528f.js} +1 -1
- package/dist/esm/{hasInclusivePrice-7a3dc4c3.js → hasInclusivePrice-275b1048.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-03ff7bbb.js → invoice-9efcb941.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-9eb77c9a.js → isCollectMobileTablet-a7e5b909.js} +2 -2
- package/dist/esm/{localization-79e08480.js → localization-76ce3e29.js} +25 -3
- package/dist/esm/{paypal-67c86683.js → paypal-75c5c66d.js} +2 -2
- package/dist/esm/{placeTestOrder-e81fff15.js → placeTestOrder-22633bf2.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-1fc00db4.js → renderCheckoutCurrency-d27b0082.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +443 -18
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +45 -12
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-store-credit.entry.js +3 -3
- package/dist/esm-es5/{cart-4cd47a1b.js → cart-76fb528f.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-7a3dc4c3.js → hasInclusivePrice-275b1048.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-03ff7bbb.js → invoice-9efcb941.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-9eb77c9a.js → isCollectMobileTablet-a7e5b909.js} +1 -1
- package/dist/esm-es5/{localization-79e08480.js → localization-76ce3e29.js} +1 -1
- package/dist/esm-es5/{paypal-67c86683.js → paypal-75c5c66d.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-e81fff15.js → placeTestOrder-22633bf2.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-1fc00db4.js → renderCheckoutCurrency-d27b0082.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.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-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
- package/dist/scripts/index.d.ts +21 -5
- 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/checkout/zonos-checkout/zonos-checkout.d.ts +16 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +6 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +6 -0
- package/dist/types/components/utils/checkout/buildBigcommerceLoginUrl.d.ts +27 -0
- package/dist/types/components/utils/checkout/checkBigCommerceBypassCustomerGroup.d.ts +12 -0
- package/dist/types/components/utils/checkout/checkBigCommerceForceLogin.d.ts +50 -0
- package/dist/types/components/utils/checkout/fetchBigCommerceCheckoutSettings.d.ts +18 -0
- package/dist/types/components/utils/checkout/fixBigCommerceLoginCreateAccountLink.d.ts +17 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +6 -5
- package/dist/types/types/checkout/CheckoutConfig.d.ts +9 -0
- package/dist/types/types/checkout/api/BigCommerceCheckoutSettings.d.ts +12 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +58 -9
- package/dist/types/types/generated/graphql.internal.types.ts +69 -9
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-aa3e3438.system.entry.js → p-055c8d6c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ce2fd652.entry.js → p-0a9741f7.entry.js} +1 -1
- package/dist/zonos-elements/{p-3fc43187.system.entry.js → p-10da499b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2c1c6d60.system.entry.js → p-14d35979.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-271eebd3.system.js → p-1523f6a8.system.js} +1 -1
- package/dist/zonos-elements/{p-c585d169.entry.js → p-1661f938.entry.js} +1 -1
- package/dist/zonos-elements/{p-3092ec40.system.entry.js → p-1e9e284e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7559c494.js → p-1ebb59a3.js} +1 -1
- package/dist/zonos-elements/{p-4e2262e8.js → p-24f41959.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-0ca6ee9b.entry.js → p-29d16ad0.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f4822cc.system.entry.js → p-2b2b1c8c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-91eeccaa.entry.js → p-2d854a75.entry.js} +1 -1
- package/dist/zonos-elements/{p-a90c977a.system.js → p-2ec799e4.system.js} +1 -1
- package/dist/zonos-elements/{p-d0690cdc.system.js → p-3600280d.system.js} +1 -1
- package/dist/zonos-elements/p-3ee8496e.js +1 -0
- package/dist/zonos-elements/{p-21519ebe.entry.js → p-425f747b.entry.js} +1 -1
- package/dist/zonos-elements/p-439dc620.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9f3aab4e.system.entry.js → p-4b138a6e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aeb496e.entry.js → p-5262f6e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-b53856bf.system.js → p-567abb43.system.js} +1 -1
- package/dist/zonos-elements/{p-9d435f12.system.entry.js → p-5fa3d1c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e9f36d6b.system.entry.js → p-6cf8fe49.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8adc0a13.system.js → p-6d36b307.system.js} +1 -1
- package/dist/zonos-elements/{p-380143db.entry.js → p-6e50f6f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-80ba5f70.entry.js → p-7157a5a3.entry.js} +1 -1
- package/dist/zonos-elements/{p-3675766a.entry.js → p-788c6839.entry.js} +1 -1
- package/dist/zonos-elements/{p-a7b0345b.entry.js → p-791e13e7.entry.js} +1 -1
- package/dist/zonos-elements/{p-e173fbd1.system.entry.js → p-8585c761.system.entry.js} +1 -1
- package/dist/zonos-elements/p-868a8667.js +1 -0
- package/dist/zonos-elements/{p-c2139758.entry.js → p-9460919d.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b83ac7f.entry.js → p-99d92a84.entry.js} +1 -1
- package/dist/zonos-elements/{p-0740f8a4.system.entry.js → p-9a9c9441.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9cbac993.entry.js +1 -0
- package/dist/zonos-elements/{p-a60544cc.entry.js → p-9cff66a7.entry.js} +1 -1
- package/dist/zonos-elements/{p-b3824361.entry.js → p-a0f6910c.entry.js} +1 -1
- package/dist/zonos-elements/{p-7caa75bb.js → p-a18adf27.js} +1 -1
- package/dist/zonos-elements/{p-8b35e475.system.entry.js → p-a4b6865d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c23e2501.system.entry.js → p-a89096d6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e3f9779a.system.entry.js → p-afca19b0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-429c1d0c.entry.js → p-afdb4445.entry.js} +1 -1
- package/dist/zonos-elements/{p-4a84387a.system.entry.js → p-b34f1336.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5818f4a7.entry.js → p-bba9af4c.entry.js} +1 -1
- package/dist/zonos-elements/{p-e62342c3.js → p-bd938f80.js} +1 -1
- package/dist/zonos-elements/{p-8ed0fad5.js → p-bdb3f7a2.js} +2 -2
- package/dist/zonos-elements/p-c85e988d.system.js +1 -0
- package/dist/zonos-elements/{p-e5f5b086.system.js → p-cc645667.system.js} +1 -1
- package/dist/zonos-elements/p-d13120f6.entry.js +1 -0
- package/dist/zonos-elements/{p-e80832cb.system.entry.js → p-e5f48239.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-22bb7836.system.js → p-e6168c82.system.js} +1 -1
- package/dist/zonos-elements/{p-e56f5954.system.js → p-e8a68ce7.system.js} +1 -1
- package/dist/zonos-elements/p-ed03b7fd.js +1 -0
- package/dist/zonos-elements/{p-b414b484.system.entry.js → p-edb0306c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e6feafc1.system.entry.js → p-f4e54f09.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-0e83d193.js +0 -1
- package/dist/zonos-elements/p-6bcbe651.js +0 -1
- package/dist/zonos-elements/p-7cbbf483.system.js +0 -1
- package/dist/zonos-elements/p-ac7b93c9.js +0 -1
- package/dist/zonos-elements/p-da7e1143.system.entry.js +0 -1
- package/dist/zonos-elements/p-ddb27b4a.entry.js +0 -1
- package/dist/zonos-elements/p-fed19033.entry.js +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* On BigCommerce's `/login.php`, the default **Create account** button links
|
|
3
|
+
* to `login.php?action=create_account` without the `from=cart.php...`
|
|
4
|
+
* parameter that the shopper had when they arrived. Without this, completing
|
|
5
|
+
* signup would drop them on the account home page instead of resuming Zonos
|
|
6
|
+
* international checkout.
|
|
7
|
+
*
|
|
8
|
+
* This watcher finds any create-account anchor on the page (including ones
|
|
9
|
+
* that the BC theme renders later via Stencil bundle load) and rewrites the
|
|
10
|
+
* `href` so the account-creation round trip preserves the
|
|
11
|
+
* `isInternationalCheckout=true` flag as well as `zonosTestMode` /
|
|
12
|
+
* `zonosQaUrl`.
|
|
13
|
+
*
|
|
14
|
+
* Safe to call more than once — idempotent thanks to the `data-zonos-…`
|
|
15
|
+
* attribute on rewritten anchors.
|
|
16
|
+
*/
|
|
17
|
+
export declare const fixBigCommerceLoginCreateAccountLink: () => void;
|
|
@@ -147,24 +147,25 @@ export declare const setupCartDataWithSettings: (cartId: string) => Promise<{
|
|
|
147
147
|
includedCountries: Array<import("../..").CountryCode>;
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
+
countryOverrideBehavior: import("../../types/generated/graphql.internal.types").HelloCountryOverrideBehavior;
|
|
150
151
|
createdAt: string;
|
|
151
|
-
|
|
152
|
+
createdBy: string;
|
|
152
153
|
currencyBehavior: import("../../types/generated/graphql.internal.types").HelloCurrencyBehavior;
|
|
153
154
|
currencyElementSelector: string;
|
|
154
155
|
desktopLocation: import("../../types/generated/graphql.internal.types").HelloDesktopLocation;
|
|
155
156
|
dutyTaxEstimationBehavior: import("../../types/generated/graphql.internal.types").HelloEstimateBehavior;
|
|
156
157
|
excludedUrlPatterns: Array<string>;
|
|
157
|
-
|
|
158
|
+
organization: string;
|
|
158
159
|
id: string;
|
|
159
160
|
mobileLocation: import("../..").HelloMobileLocation;
|
|
160
161
|
mode: import("../../types/generated/graphql.internal.types").Mode;
|
|
161
|
-
|
|
162
|
+
homepageUrlPattern: string | null;
|
|
162
163
|
peekMessageBehavior: import("../../types/generated/graphql.internal.types").HelloPeekMessageBehavior;
|
|
163
164
|
peekMessageDelay: number;
|
|
164
|
-
productAddToCartElementSelector: string | null;
|
|
165
165
|
productListUrlPattern: string | null;
|
|
166
|
+
productAddToCartElementSelector: string | null;
|
|
166
167
|
productDetailUrlPattern: string | null;
|
|
167
|
-
|
|
168
|
+
productTitleElementSelector: string | null;
|
|
168
169
|
productPriceElementSelector: string | null;
|
|
169
170
|
productDescriptionElementSelector: string | null;
|
|
170
171
|
restrictionBehavior: import("../../types/generated/graphql.internal.types").HelloRestrictionBehavior;
|
|
@@ -62,6 +62,15 @@ export type CheckoutConfig = {
|
|
|
62
62
|
status: AnalyticsProviderStatus;
|
|
63
63
|
type: AnalyticsProviderType;
|
|
64
64
|
}>;
|
|
65
|
+
/**
|
|
66
|
+
* BigCommerce-specific identifiers forwarded by the Zonos loader script.
|
|
67
|
+
* Consumed by runtime code that needs to hit the demo-app proxy on behalf
|
|
68
|
+
* of a specific BigCommerce store (e.g. the `/checkouts/settings`
|
|
69
|
+
* force-login check).
|
|
70
|
+
*/
|
|
71
|
+
bigCommerceConfig?: {
|
|
72
|
+
storeHash: string;
|
|
73
|
+
};
|
|
65
74
|
/**
|
|
66
75
|
* Time that payment will be captured after the order is placed. Can't be overridden in Zonos.init
|
|
67
76
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value surfaced by BigCommerce's `/v3/checkouts/settings` endpoint for the
|
|
3
|
+
* `guest_checkout_type` field. `no_guest_checkout` is the signal Zonos uses
|
|
4
|
+
* to require login before opening the international checkout.
|
|
5
|
+
*/
|
|
6
|
+
export type BcGuestCheckoutType = 'allow_guest' | 'guest_checkout' | 'no_guest_checkout' | (string & {});
|
|
7
|
+
export type BigCommerceCheckoutSettingsPayload = {
|
|
8
|
+
storeHash: string;
|
|
9
|
+
};
|
|
10
|
+
export type BigCommerceCheckoutSettingsResponse = {
|
|
11
|
+
guestCheckoutType: BcGuestCheckoutType | null;
|
|
12
|
+
};
|
|
@@ -106,6 +106,7 @@ export declare const featureAspectKeyEnum: {
|
|
|
106
106
|
readonly NewCheckoutBeta: "new_checkout_beta";
|
|
107
107
|
readonly NewPayoutReport: "new_payout_report";
|
|
108
108
|
readonly NewRefundsUx: "new_refunds_ux";
|
|
109
|
+
readonly OnboardingBeta: "onboarding_beta";
|
|
109
110
|
readonly PageAuditor: "page_auditor";
|
|
110
111
|
readonly PromptExplorer: "prompt_explorer";
|
|
111
112
|
readonly RulesUiCreate: "rules_ui_create";
|
|
@@ -139,6 +140,7 @@ export declare const featureAudienceNameEnum: {
|
|
|
139
140
|
readonly NewPayoutReportMerchant: "new_payout_report_merchant";
|
|
140
141
|
readonly NewRefundsUxMerchant: "new_refunds_ux_merchant";
|
|
141
142
|
readonly Onboarding: "onboarding";
|
|
143
|
+
readonly OnboardingBetaMerchant: "onboarding_beta_merchant";
|
|
142
144
|
readonly PrincipalEngineer: "principal_engineer";
|
|
143
145
|
readonly ProServeHead: "pro_serve_head";
|
|
144
146
|
readonly ProductManager: "product_manager";
|
|
@@ -727,7 +729,7 @@ export type FailToGetQuoteErrorsQuery = {
|
|
|
727
729
|
};
|
|
728
730
|
export type LocaleCountryMessagesQuery = {
|
|
729
731
|
locale_countryCodesPage: Array<{
|
|
730
|
-
countryCodes: Array<string
|
|
732
|
+
countryCodes: Array<string> | null;
|
|
731
733
|
countryCodesPageMessageLinks: Array<{
|
|
732
734
|
id: number;
|
|
733
735
|
message: {
|
|
@@ -85,6 +85,7 @@ export const featureAspectKeyEnum = {
|
|
|
85
85
|
NewCheckoutBeta: 'new_checkout_beta',
|
|
86
86
|
NewPayoutReport: 'new_payout_report',
|
|
87
87
|
NewRefundsUx: 'new_refunds_ux',
|
|
88
|
+
OnboardingBeta: 'onboarding_beta',
|
|
88
89
|
PageAuditor: 'page_auditor',
|
|
89
90
|
PromptExplorer: 'prompt_explorer',
|
|
90
91
|
RulesUiCreate: 'rules_ui_create',
|
|
@@ -123,6 +124,7 @@ export const featureAudienceNameEnum = {
|
|
|
123
124
|
NewPayoutReportMerchant: 'new_payout_report_merchant',
|
|
124
125
|
NewRefundsUxMerchant: 'new_refunds_ux_merchant',
|
|
125
126
|
Onboarding: 'onboarding',
|
|
127
|
+
OnboardingBetaMerchant: 'onboarding_beta_merchant',
|
|
126
128
|
PrincipalEngineer: 'principal_engineer',
|
|
127
129
|
ProServeHead: 'pro_serve_head',
|
|
128
130
|
ProductManager: 'product_manager',
|
|
@@ -684,7 +686,7 @@ export type FailToGetQuoteErrorsQuery = {
|
|
|
684
686
|
|
|
685
687
|
export type LocaleCountryMessagesQuery = {
|
|
686
688
|
locale_countryCodesPage: Array<{
|
|
687
|
-
countryCodes: Array<string
|
|
689
|
+
countryCodes: Array<string> | null;
|
|
688
690
|
countryCodesPageMessageLinks: Array<{
|
|
689
691
|
id: number;
|
|
690
692
|
message: {
|
|
@@ -1906,6 +1906,20 @@ export declare const customsDocumentType: {
|
|
|
1906
1906
|
readonly UsmcaCertificate: "USMCA_CERTIFICATE";
|
|
1907
1907
|
};
|
|
1908
1908
|
export type CustomsDocumentType = (typeof customsDocumentType)[keyof typeof customsDocumentType];
|
|
1909
|
+
export declare const customsHoldReason: {
|
|
1910
|
+
readonly Abandonment: "ABANDONMENT";
|
|
1911
|
+
readonly Confiscated: "CONFISCATED";
|
|
1912
|
+
readonly DutyNonpayment: "DUTY_NONPAYMENT";
|
|
1913
|
+
readonly Examination: "EXAMINATION";
|
|
1914
|
+
readonly GoodsNotCompliant: "GOODS_NOT_COMPLIANT";
|
|
1915
|
+
readonly GovernmentHold: "GOVERNMENT_HOLD";
|
|
1916
|
+
readonly MissingData: "MISSING_DATA";
|
|
1917
|
+
readonly MissingDocs: "MISSING_DOCS";
|
|
1918
|
+
readonly RefusedEntry: "REFUSED_ENTRY";
|
|
1919
|
+
readonly SecurityFail: "SECURITY_FAIL";
|
|
1920
|
+
readonly Unknown: "UNKNOWN";
|
|
1921
|
+
};
|
|
1922
|
+
export type CustomsHoldReason = (typeof customsHoldReason)[keyof typeof customsHoldReason];
|
|
1909
1923
|
export declare const customsIntelBucketGranularity: {
|
|
1910
1924
|
readonly Day: "DAY";
|
|
1911
1925
|
readonly Hour: "HOUR";
|
|
@@ -1982,6 +1996,14 @@ export declare const customsSpecSourceType: {
|
|
|
1982
1996
|
readonly OrganizationSetting: "ORGANIZATION_SETTING";
|
|
1983
1997
|
};
|
|
1984
1998
|
export type CustomsSpecSourceType = (typeof customsSpecSourceType)[keyof typeof customsSpecSourceType];
|
|
1999
|
+
export declare const customsStage: {
|
|
2000
|
+
readonly CustomsCleared: "CUSTOMS_CLEARED";
|
|
2001
|
+
readonly CustomsFailed: "CUSTOMS_FAILED";
|
|
2002
|
+
readonly CustomsHold: "CUSTOMS_HOLD";
|
|
2003
|
+
readonly InCustoms: "IN_CUSTOMS";
|
|
2004
|
+
readonly PreCustoms: "PRE_CUSTOMS";
|
|
2005
|
+
};
|
|
2006
|
+
export type CustomsStage = (typeof customsStage)[keyof typeof customsStage];
|
|
1985
2007
|
export declare const dashboardUnit: {
|
|
1986
2008
|
readonly Imperial: "IMPERIAL";
|
|
1987
2009
|
readonly Metric: "METRIC";
|
|
@@ -2281,6 +2303,7 @@ export declare const entryStatus: {
|
|
|
2281
2303
|
readonly Archived: "ARCHIVED";
|
|
2282
2304
|
readonly Draft: "DRAFT";
|
|
2283
2305
|
readonly Error: "ERROR";
|
|
2306
|
+
readonly Filed: "FILED";
|
|
2284
2307
|
readonly Rejected: "REJECTED";
|
|
2285
2308
|
readonly Submitted: "SUBMITTED";
|
|
2286
2309
|
};
|
|
@@ -2296,6 +2319,7 @@ export declare const errorDetail: {
|
|
|
2296
2319
|
readonly TcpFailure: "TCP_FAILURE";
|
|
2297
2320
|
readonly ThrottledConcurrency: "THROTTLED_CONCURRENCY";
|
|
2298
2321
|
readonly ThrottledCpu: "THROTTLED_CPU";
|
|
2322
|
+
readonly TooManyRequests: "TOO_MANY_REQUESTS";
|
|
2299
2323
|
readonly Unimplemented: "UNIMPLEMENTED";
|
|
2300
2324
|
readonly Unknown: "UNKNOWN";
|
|
2301
2325
|
};
|
|
@@ -2399,6 +2423,11 @@ export declare const helloCountryDisplayBehavior: {
|
|
|
2399
2423
|
readonly OnlyShippable: "ONLY_SHIPPABLE";
|
|
2400
2424
|
};
|
|
2401
2425
|
export type HelloCountryDisplayBehavior = (typeof helloCountryDisplayBehavior)[keyof typeof helloCountryDisplayBehavior];
|
|
2426
|
+
export declare const helloCountryOverrideBehavior: {
|
|
2427
|
+
readonly Session: "SESSION";
|
|
2428
|
+
readonly UrlParam: "URL_PARAM";
|
|
2429
|
+
};
|
|
2430
|
+
export type HelloCountryOverrideBehavior = (typeof helloCountryOverrideBehavior)[keyof typeof helloCountryOverrideBehavior];
|
|
2402
2431
|
export declare const helloCurrencyBehavior: {
|
|
2403
2432
|
readonly Disabled: "DISABLED";
|
|
2404
2433
|
readonly Enabled: "ENABLED";
|
|
@@ -4966,6 +4995,12 @@ export declare const reverseAmountType: {
|
|
|
4966
4995
|
readonly TaxFee: "TAX_FEE";
|
|
4967
4996
|
};
|
|
4968
4997
|
export type ReverseAmountType = (typeof reverseAmountType)[keyof typeof reverseAmountType];
|
|
4998
|
+
export declare const riskLevel: {
|
|
4999
|
+
readonly High: "HIGH";
|
|
5000
|
+
readonly Low: "LOW";
|
|
5001
|
+
readonly Medium: "MEDIUM";
|
|
5002
|
+
};
|
|
5003
|
+
export type RiskLevel = (typeof riskLevel)[keyof typeof riskLevel];
|
|
4969
5004
|
export declare const roundingMethod: {
|
|
4970
5005
|
readonly Custom: "CUSTOM";
|
|
4971
5006
|
readonly Hundredth: "HUNDREDTH";
|
|
@@ -5184,6 +5219,10 @@ export declare const shipmentPackagingTypeCode: {
|
|
|
5184
5219
|
readonly YourPackaging: "YOUR_PACKAGING";
|
|
5185
5220
|
};
|
|
5186
5221
|
export type ShipmentPackagingTypeCode = (typeof shipmentPackagingTypeCode)[keyof typeof shipmentPackagingTypeCode];
|
|
5222
|
+
export declare const shipmentRatingAdjustmentType: {
|
|
5223
|
+
readonly CartTotal: "CART_TOTAL";
|
|
5224
|
+
};
|
|
5225
|
+
export type ShipmentRatingAdjustmentType = (typeof shipmentRatingAdjustmentType)[keyof typeof shipmentRatingAdjustmentType];
|
|
5187
5226
|
export declare const shipmentRatingAmountTargetType: {
|
|
5188
5227
|
readonly BillingCompany: "BILLING_COMPANY";
|
|
5189
5228
|
readonly MerchantBase: "MERCHANT_BASE";
|
|
@@ -5758,6 +5797,12 @@ export declare const volumeUnitCode: {
|
|
|
5758
5797
|
readonly QuartUsDry: "QUART_US_DRY";
|
|
5759
5798
|
};
|
|
5760
5799
|
export type VolumeUnitCode = (typeof volumeUnitCode)[keyof typeof volumeUnitCode];
|
|
5800
|
+
export declare const watchStatus: {
|
|
5801
|
+
readonly Active: "ACTIVE";
|
|
5802
|
+
readonly Completed: "COMPLETED";
|
|
5803
|
+
readonly Expired: "EXPIRED";
|
|
5804
|
+
};
|
|
5805
|
+
export type WatchStatus = (typeof watchStatus)[keyof typeof watchStatus];
|
|
5761
5806
|
export declare const wcoVersion: {
|
|
5762
5807
|
readonly Wco_1997: "WCO_1997";
|
|
5763
5808
|
readonly Wco_2002: "WCO_2002";
|
|
@@ -7176,24 +7221,25 @@ export type CartCheckoutWorkflowQuery = {
|
|
|
7176
7221
|
includedCountries: Array<CountryCode>;
|
|
7177
7222
|
};
|
|
7178
7223
|
};
|
|
7224
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
7179
7225
|
createdAt: string;
|
|
7180
|
-
|
|
7226
|
+
createdBy: string;
|
|
7181
7227
|
currencyBehavior: HelloCurrencyBehavior;
|
|
7182
7228
|
currencyElementSelector: string;
|
|
7183
7229
|
desktopLocation: HelloDesktopLocation;
|
|
7184
7230
|
dutyTaxEstimationBehavior: HelloEstimateBehavior;
|
|
7185
7231
|
excludedUrlPatterns: Array<string>;
|
|
7186
|
-
|
|
7232
|
+
organization: string;
|
|
7187
7233
|
id: string;
|
|
7188
7234
|
mobileLocation: HelloMobileLocation;
|
|
7189
7235
|
mode: Mode;
|
|
7190
|
-
|
|
7236
|
+
homepageUrlPattern: string | null;
|
|
7191
7237
|
peekMessageBehavior: HelloPeekMessageBehavior;
|
|
7192
7238
|
peekMessageDelay: number;
|
|
7193
|
-
productAddToCartElementSelector: string | null;
|
|
7194
7239
|
productListUrlPattern: string | null;
|
|
7240
|
+
productAddToCartElementSelector: string | null;
|
|
7195
7241
|
productDetailUrlPattern: string | null;
|
|
7196
|
-
|
|
7242
|
+
productTitleElementSelector: string | null;
|
|
7197
7243
|
productPriceElementSelector: string | null;
|
|
7198
7244
|
productDescriptionElementSelector: string | null;
|
|
7199
7245
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
@@ -7876,8 +7922,9 @@ export type ZonosSettingsQuery = {
|
|
|
7876
7922
|
includedCountries: Array<CountryCode>;
|
|
7877
7923
|
};
|
|
7878
7924
|
};
|
|
7925
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
7879
7926
|
createdAt: string;
|
|
7880
|
-
|
|
7927
|
+
createdBy: string;
|
|
7881
7928
|
currencyBehavior: HelloCurrencyBehavior;
|
|
7882
7929
|
currencyElementSelector: string;
|
|
7883
7930
|
desktopLocation: HelloDesktopLocation;
|
|
@@ -7891,11 +7938,11 @@ export type ZonosSettingsQuery = {
|
|
|
7891
7938
|
peekMessageBehavior: HelloPeekMessageBehavior;
|
|
7892
7939
|
peekMessageDelay: number;
|
|
7893
7940
|
productAddToCartElementSelector: string | null;
|
|
7894
|
-
createdBy: string;
|
|
7895
|
-
productDetailUrlPattern: string | null;
|
|
7896
7941
|
productListUrlPattern: string | null;
|
|
7897
|
-
|
|
7942
|
+
productDetailUrlPattern: string | null;
|
|
7898
7943
|
productDescriptionElementSelector: string | null;
|
|
7944
|
+
productPriceElementSelector: string | null;
|
|
7945
|
+
productTitleElementSelector: string | null;
|
|
7899
7946
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
7900
7947
|
updatedAt: string;
|
|
7901
7948
|
updatedBy: string;
|
|
@@ -7930,6 +7977,7 @@ export type HelloSettingsQuery = {
|
|
|
7930
7977
|
includedCountries: Array<CountryCode>;
|
|
7931
7978
|
};
|
|
7932
7979
|
};
|
|
7980
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
7933
7981
|
createdAt: string;
|
|
7934
7982
|
createdBy: string;
|
|
7935
7983
|
currencyBehavior: HelloCurrencyBehavior;
|
|
@@ -8108,6 +8156,7 @@ export type HelloSettingFragment = {
|
|
|
8108
8156
|
includedCountries: Array<CountryCode>;
|
|
8109
8157
|
};
|
|
8110
8158
|
};
|
|
8159
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
8111
8160
|
createdAt: string;
|
|
8112
8161
|
createdBy: string;
|
|
8113
8162
|
currencyBehavior: HelloCurrencyBehavior;
|
|
@@ -2221,6 +2221,23 @@ export const customsDocumentType = {
|
|
|
2221
2221
|
export type CustomsDocumentType =
|
|
2222
2222
|
(typeof customsDocumentType)[keyof typeof customsDocumentType];
|
|
2223
2223
|
|
|
2224
|
+
export const customsHoldReason = {
|
|
2225
|
+
Abandonment: 'ABANDONMENT',
|
|
2226
|
+
Confiscated: 'CONFISCATED',
|
|
2227
|
+
DutyNonpayment: 'DUTY_NONPAYMENT',
|
|
2228
|
+
Examination: 'EXAMINATION',
|
|
2229
|
+
GoodsNotCompliant: 'GOODS_NOT_COMPLIANT',
|
|
2230
|
+
GovernmentHold: 'GOVERNMENT_HOLD',
|
|
2231
|
+
MissingData: 'MISSING_DATA',
|
|
2232
|
+
MissingDocs: 'MISSING_DOCS',
|
|
2233
|
+
RefusedEntry: 'REFUSED_ENTRY',
|
|
2234
|
+
SecurityFail: 'SECURITY_FAIL',
|
|
2235
|
+
Unknown: 'UNKNOWN',
|
|
2236
|
+
} as const;
|
|
2237
|
+
|
|
2238
|
+
export type CustomsHoldReason =
|
|
2239
|
+
(typeof customsHoldReason)[keyof typeof customsHoldReason];
|
|
2240
|
+
|
|
2224
2241
|
export const customsIntelBucketGranularity = {
|
|
2225
2242
|
Day: 'DAY',
|
|
2226
2243
|
Hour: 'HOUR',
|
|
@@ -2322,6 +2339,15 @@ export const customsSpecSourceType = {
|
|
|
2322
2339
|
export type CustomsSpecSourceType =
|
|
2323
2340
|
(typeof customsSpecSourceType)[keyof typeof customsSpecSourceType];
|
|
2324
2341
|
|
|
2342
|
+
export const customsStage = {
|
|
2343
|
+
CustomsCleared: 'CUSTOMS_CLEARED',
|
|
2344
|
+
CustomsFailed: 'CUSTOMS_FAILED',
|
|
2345
|
+
CustomsHold: 'CUSTOMS_HOLD',
|
|
2346
|
+
InCustoms: 'IN_CUSTOMS',
|
|
2347
|
+
PreCustoms: 'PRE_CUSTOMS',
|
|
2348
|
+
} as const;
|
|
2349
|
+
|
|
2350
|
+
export type CustomsStage = (typeof customsStage)[keyof typeof customsStage];
|
|
2325
2351
|
export const dashboardUnit = {
|
|
2326
2352
|
Imperial: 'IMPERIAL',
|
|
2327
2353
|
Metric: 'METRIC',
|
|
@@ -2698,6 +2724,7 @@ export const entryStatus = {
|
|
|
2698
2724
|
Archived: 'ARCHIVED',
|
|
2699
2725
|
Draft: 'DRAFT',
|
|
2700
2726
|
Error: 'ERROR',
|
|
2727
|
+
Filed: 'FILED',
|
|
2701
2728
|
Rejected: 'REJECTED',
|
|
2702
2729
|
Submitted: 'SUBMITTED',
|
|
2703
2730
|
} as const;
|
|
@@ -2714,6 +2741,7 @@ export const errorDetail = {
|
|
|
2714
2741
|
TcpFailure: 'TCP_FAILURE',
|
|
2715
2742
|
ThrottledConcurrency: 'THROTTLED_CONCURRENCY',
|
|
2716
2743
|
ThrottledCpu: 'THROTTLED_CPU',
|
|
2744
|
+
TooManyRequests: 'TOO_MANY_REQUESTS',
|
|
2717
2745
|
Unimplemented: 'UNIMPLEMENTED',
|
|
2718
2746
|
Unknown: 'UNKNOWN',
|
|
2719
2747
|
} as const;
|
|
@@ -2858,6 +2886,13 @@ export const helloCountryDisplayBehavior = {
|
|
|
2858
2886
|
export type HelloCountryDisplayBehavior =
|
|
2859
2887
|
(typeof helloCountryDisplayBehavior)[keyof typeof helloCountryDisplayBehavior];
|
|
2860
2888
|
|
|
2889
|
+
export const helloCountryOverrideBehavior = {
|
|
2890
|
+
Session: 'SESSION',
|
|
2891
|
+
UrlParam: 'URL_PARAM',
|
|
2892
|
+
} as const;
|
|
2893
|
+
|
|
2894
|
+
export type HelloCountryOverrideBehavior =
|
|
2895
|
+
(typeof helloCountryOverrideBehavior)[keyof typeof helloCountryOverrideBehavior];
|
|
2861
2896
|
export const helloCurrencyBehavior = {
|
|
2862
2897
|
Disabled: 'DISABLED',
|
|
2863
2898
|
Enabled: 'ENABLED',
|
|
@@ -5298,6 +5333,7 @@ export const pickupCategory = {
|
|
|
5298
5333
|
|
|
5299
5334
|
export type PickupCategory =
|
|
5300
5335
|
(typeof pickupCategory)[keyof typeof pickupCategory];
|
|
5336
|
+
|
|
5301
5337
|
export const platformType = {
|
|
5302
5338
|
Bigcommerce: 'BIGCOMMERCE',
|
|
5303
5339
|
CustomApi: 'CUSTOM_API',
|
|
@@ -5955,6 +5991,13 @@ export const reverseAmountType = {
|
|
|
5955
5991
|
|
|
5956
5992
|
export type ReverseAmountType =
|
|
5957
5993
|
(typeof reverseAmountType)[keyof typeof reverseAmountType];
|
|
5994
|
+
export const riskLevel = {
|
|
5995
|
+
High: 'HIGH',
|
|
5996
|
+
Low: 'LOW',
|
|
5997
|
+
Medium: 'MEDIUM',
|
|
5998
|
+
} as const;
|
|
5999
|
+
|
|
6000
|
+
export type RiskLevel = (typeof riskLevel)[keyof typeof riskLevel];
|
|
5958
6001
|
|
|
5959
6002
|
export const roundingMethod = {
|
|
5960
6003
|
Custom: 'CUSTOM',
|
|
@@ -6227,6 +6270,12 @@ export const shipmentPackagingTypeCode = {
|
|
|
6227
6270
|
export type ShipmentPackagingTypeCode =
|
|
6228
6271
|
(typeof shipmentPackagingTypeCode)[keyof typeof shipmentPackagingTypeCode];
|
|
6229
6272
|
|
|
6273
|
+
export const shipmentRatingAdjustmentType = {
|
|
6274
|
+
CartTotal: 'CART_TOTAL',
|
|
6275
|
+
} as const;
|
|
6276
|
+
|
|
6277
|
+
export type ShipmentRatingAdjustmentType =
|
|
6278
|
+
(typeof shipmentRatingAdjustmentType)[keyof typeof shipmentRatingAdjustmentType];
|
|
6230
6279
|
export const shipmentRatingAmountTargetType = {
|
|
6231
6280
|
BillingCompany: 'BILLING_COMPANY',
|
|
6232
6281
|
MerchantBase: 'MERCHANT_BASE',
|
|
@@ -6955,6 +7004,13 @@ export const volumeUnitCode = {
|
|
|
6955
7004
|
|
|
6956
7005
|
export type VolumeUnitCode =
|
|
6957
7006
|
(typeof volumeUnitCode)[keyof typeof volumeUnitCode];
|
|
7007
|
+
export const watchStatus = {
|
|
7008
|
+
Active: 'ACTIVE',
|
|
7009
|
+
Completed: 'COMPLETED',
|
|
7010
|
+
Expired: 'EXPIRED',
|
|
7011
|
+
} as const;
|
|
7012
|
+
|
|
7013
|
+
export type WatchStatus = (typeof watchStatus)[keyof typeof watchStatus];
|
|
6958
7014
|
export const wcoVersion = {
|
|
6959
7015
|
Wco_1997: 'WCO_1997',
|
|
6960
7016
|
Wco_2002: 'WCO_2002',
|
|
@@ -8236,24 +8292,25 @@ export type CartCheckoutWorkflowQuery = {
|
|
|
8236
8292
|
includedCountries: Array<CountryCode>;
|
|
8237
8293
|
};
|
|
8238
8294
|
};
|
|
8295
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
8239
8296
|
createdAt: string;
|
|
8240
|
-
|
|
8297
|
+
createdBy: string;
|
|
8241
8298
|
currencyBehavior: HelloCurrencyBehavior;
|
|
8242
8299
|
currencyElementSelector: string;
|
|
8243
8300
|
desktopLocation: HelloDesktopLocation;
|
|
8244
8301
|
dutyTaxEstimationBehavior: HelloEstimateBehavior;
|
|
8245
8302
|
excludedUrlPatterns: Array<string>;
|
|
8246
|
-
|
|
8303
|
+
organization: string;
|
|
8247
8304
|
id: string;
|
|
8248
8305
|
mobileLocation: HelloMobileLocation;
|
|
8249
8306
|
mode: Mode;
|
|
8250
|
-
|
|
8307
|
+
homepageUrlPattern: string | null;
|
|
8251
8308
|
peekMessageBehavior: HelloPeekMessageBehavior;
|
|
8252
8309
|
peekMessageDelay: number;
|
|
8253
|
-
productAddToCartElementSelector: string | null;
|
|
8254
8310
|
productListUrlPattern: string | null;
|
|
8311
|
+
productAddToCartElementSelector: string | null;
|
|
8255
8312
|
productDetailUrlPattern: string | null;
|
|
8256
|
-
|
|
8313
|
+
productTitleElementSelector: string | null;
|
|
8257
8314
|
productPriceElementSelector: string | null;
|
|
8258
8315
|
productDescriptionElementSelector: string | null;
|
|
8259
8316
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
@@ -8836,8 +8893,9 @@ export type ZonosSettingsQuery = {
|
|
|
8836
8893
|
includedCountries: Array<CountryCode>;
|
|
8837
8894
|
};
|
|
8838
8895
|
};
|
|
8896
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
8839
8897
|
createdAt: string;
|
|
8840
|
-
|
|
8898
|
+
createdBy: string;
|
|
8841
8899
|
currencyBehavior: HelloCurrencyBehavior;
|
|
8842
8900
|
currencyElementSelector: string;
|
|
8843
8901
|
desktopLocation: HelloDesktopLocation;
|
|
@@ -8851,11 +8909,11 @@ export type ZonosSettingsQuery = {
|
|
|
8851
8909
|
peekMessageBehavior: HelloPeekMessageBehavior;
|
|
8852
8910
|
peekMessageDelay: number;
|
|
8853
8911
|
productAddToCartElementSelector: string | null;
|
|
8854
|
-
createdBy: string;
|
|
8855
|
-
productDetailUrlPattern: string | null;
|
|
8856
8912
|
productListUrlPattern: string | null;
|
|
8857
|
-
|
|
8913
|
+
productDetailUrlPattern: string | null;
|
|
8858
8914
|
productDescriptionElementSelector: string | null;
|
|
8915
|
+
productPriceElementSelector: string | null;
|
|
8916
|
+
productTitleElementSelector: string | null;
|
|
8859
8917
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
8860
8918
|
updatedAt: string;
|
|
8861
8919
|
updatedBy: string;
|
|
@@ -8886,6 +8944,7 @@ export type HelloSettingsQuery = {
|
|
|
8886
8944
|
includedCountries: Array<CountryCode>;
|
|
8887
8945
|
};
|
|
8888
8946
|
};
|
|
8947
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
8889
8948
|
createdAt: string;
|
|
8890
8949
|
createdBy: string;
|
|
8891
8950
|
currencyBehavior: HelloCurrencyBehavior;
|
|
@@ -9059,6 +9118,7 @@ export type HelloSettingFragment = {
|
|
|
9059
9118
|
includedCountries: Array<CountryCode>;
|
|
9060
9119
|
};
|
|
9061
9120
|
};
|
|
9121
|
+
countryOverrideBehavior: HelloCountryOverrideBehavior;
|
|
9062
9122
|
createdAt: string;
|
|
9063
9123
|
createdBy: string;
|
|
9064
9124
|
currencyBehavior: HelloCurrencyBehavior;
|
|
@@ -2,6 +2,7 @@ import './global.d';
|
|
|
2
2
|
export * from '../components.d';
|
|
3
3
|
export type { CartItem, ItemMeasurement, } from '../components/store/checkout/cart';
|
|
4
4
|
export type { CountryLandedCost } from '../components/utils/api/getCountryLandedCost';
|
|
5
|
+
export * from './checkout/api/BigCommerceCheckoutSettings';
|
|
5
6
|
export * from './checkout/api/CalculateLandedCost';
|
|
6
7
|
export * from './checkout/api/CheckoutSession';
|
|
7
8
|
export * from './checkout/api/CreateParty';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as h}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireShortAddressCode}from"./p-1d42cd20.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-6b361d2b.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],v="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.257.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,z="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=Promise.resolve().then((()=>{return e=null,null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(z),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&j.test(o.src))return o}return null})();t&&e?console.warn(z):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b;var e}));let I=!1;N.catch((e=>{I||console.warn(e)}));const k=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),k({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var R;const T=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),$=Date.now(),Z="https://v1.3.257.js.zonos.com",A=T||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.257",L="https://fonts.googleapis.com",U=/^https:\/\/fonts\.googleapis\.com/;class C{}R=C,C.doneInit=!1,C.cartSettings=null,C.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),C.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),C._paypalMockResponse=null,C.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,C.isBigCommerce=!1,C.releaseDate="1776719353822",C.isLegacyCheckout=!1,C.googleAnalyticId=null,C.googleAnalyticReady=!1,C.startLoadTime=$,C.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",C.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),C.overrideUseCustomAddressForm=!1,C.isCollect=!1,C.isInvoice=!1,C.isNpm=!0,C.zonosQaUrl=null,C.zonosQaUrlApi=null,C.trackEventLogs=[],C.version="v1.3.257",C.modeAlerted=!1,C.cartData=null,C.paypal=null,C.zonosMode=null,C.IframeService=t,C.getCurrentTimestamp=()=>(new Date).getTime(),C.zonosController=null,C.loadTimeApiInfoList=[],C.logIntervalId=null,C.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(R.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),R.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${R.version}) ======`),R.zonosApiKey=p,R.storeId=a,"undefined"!=typeof window&&window.parent===window&&(R.googleAnalyticReady=!0),R.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=R.isNpm,window.Zonos.isBigCommerce=R.isBigCommerce,window.Zonos.isLegacyCheckout=R.isLegacyCheckout,window.Zonos.zonosMode=R.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!R.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!R.cartData&&R.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await k({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(R.cartId);if(!e)return void m("Failed to get cart data");R.cartData=e.cartData,R.zonosApiKey=e.zonosApiKey,R.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(R.zonosApiKey=o)}const h=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(R.cartId&&R.cartData||h){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),R.restoreNativeBrowserFunctions(),R.injectCustomScriptForHostedCheckout(),R.injectZonosCdn(),R.injectZonosCss(),R.injectFonts(),R.injectCheckoutInternationalButton(),R.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),R.doneInit=!0},C.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${h}`)){const e=document.createElement("button");e.id=h,e.style.display="none",document.body.appendChild(e)}},C.injectCustomScriptForHostedCheckout=()=>{const e=R.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},C.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},C.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${h}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},C.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},C.showNotification=e=>{var n;null===(n=R.zonosController)||void 0===n||n.showNotification(e)},C.updateOrganizationName=e=>{var n;null===(n=R.zonosController)||void 0===n||n.updateOrganizationName(e)},C.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},C.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},C.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=R.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{I=!0;const n=Date.now();return N.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):window.Zonos.isInvoice?t.initInvoiceElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),R.zonosController=t,r("Zonos controller injected!")},C.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${R.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&R.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},C.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return A;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.257";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.257";case"vercel":return Z}};return R.isNpm&&S()||n()},C.injectZonosCdn=()=>{R.injectScript({cdnType:v,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),R.injectScript({cdnType:v,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},C.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=R.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&R.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},C.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(R.injectStylesheet({cdnType:v,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},C.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${L}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!U.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=L,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${L}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},C.setupGoogleFont=e=>{var n;null===(n=R.zonosController)||void 0===n||n.setupGoogleFont(e)},C.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${L}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=L,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const E=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],P=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],F=[...E,...P];export{C as Zonos,F as checkoutSessionAttributeKeys,P as checkoutSessionImmutableAttributeKeys,E as checkoutSessionMutableAttributeKeys}
|
|
1
|
+
import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as h}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireShortAddressCode}from"./p-1d42cd20.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-6b361d2b.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],v="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.259.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,z="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=Promise.resolve().then((()=>{return e=null,null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(z),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&j.test(o.src))return o}return null})();t&&e?console.warn(z):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b;var e}));let I=!1;N.catch((e=>{I||console.warn(e)}));const k=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),k({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var R;const T=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),$=Date.now(),Z="https://v1.3.259.js.zonos.com",A=T||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.259",L="https://fonts.googleapis.com",U=/^https:\/\/fonts\.googleapis\.com/;class C{}R=C,C.doneInit=!1,C.cartSettings=null,C.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),C.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),C._paypalMockResponse=null,C.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,C.isBigCommerce=!1,C.releaseDate="1776888320252",C.isLegacyCheckout=!1,C.googleAnalyticId=null,C.googleAnalyticReady=!1,C.startLoadTime=$,C.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",C.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),C.overrideUseCustomAddressForm=!1,C.isCollect=!1,C.isInvoice=!1,C.isNpm=!0,C.zonosQaUrl=null,C.zonosQaUrlApi=null,C.trackEventLogs=[],C.version="v1.3.259",C.modeAlerted=!1,C.cartData=null,C.paypal=null,C.zonosMode=null,C.IframeService=t,C.getCurrentTimestamp=()=>(new Date).getTime(),C.zonosController=null,C.loadTimeApiInfoList=[],C.logIntervalId=null,C.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(R.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),R.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${R.version}) ======`),R.zonosApiKey=p,R.storeId=a,"undefined"!=typeof window&&window.parent===window&&(R.googleAnalyticReady=!0),R.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=R.isNpm,window.Zonos.isBigCommerce=R.isBigCommerce,window.Zonos.isLegacyCheckout=R.isLegacyCheckout,window.Zonos.zonosMode=R.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!R.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!R.cartData&&R.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await k({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(R.cartId);if(!e)return void m("Failed to get cart data");R.cartData=e.cartData,R.zonosApiKey=e.zonosApiKey,R.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(R.zonosApiKey=o)}const h=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(R.cartId&&R.cartData||h){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),R.restoreNativeBrowserFunctions(),R.injectCustomScriptForHostedCheckout(),R.injectZonosCdn(),R.injectZonosCss(),R.injectFonts(),R.injectCheckoutInternationalButton(),R.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),R.doneInit=!0},C.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${h}`)){const e=document.createElement("button");e.id=h,e.style.display="none",document.body.appendChild(e)}},C.injectCustomScriptForHostedCheckout=()=>{const e=R.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},C.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},C.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${h}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},C.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},C.showNotification=e=>{var n;null===(n=R.zonosController)||void 0===n||n.showNotification(e)},C.updateOrganizationName=e=>{var n;null===(n=R.zonosController)||void 0===n||n.updateOrganizationName(e)},C.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},C.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},C.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{R.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=R.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{I=!0;const n=Date.now();return N.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):window.Zonos.isInvoice?t.initInvoiceElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),R.zonosController=t,r("Zonos controller injected!")},C.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${R.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&R.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},C.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return A;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.259";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.259";case"vercel":return Z}};return R.isNpm&&S()||n()},C.injectZonosCdn=()=>{R.injectScript({cdnType:v,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),R.injectScript({cdnType:v,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},C.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=R.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&R.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},C.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(R.injectStylesheet({cdnType:v,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},C.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${L}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!U.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=L,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${L}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},C.setupGoogleFont=e=>{var n;null===(n=R.zonosController)||void 0===n||n.setupGoogleFont(e)},C.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${L}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=L,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const E=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],P=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],F=[...E,...P];export{C as Zonos,F as checkoutSessionAttributeKeys,P as checkoutSessionImmutableAttributeKeys,E as checkoutSessionMutableAttributeKeys}
|