@zonos/elements 1.3.184 → 1.3.186
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-3d0c0f0b.js → cart-f9df3ac8.js} +3209 -10
- package/dist/cjs/debounce-3eaa4f7e.js +357 -0
- package/dist/cjs/{getBorderRadius-94ef609c.js → getBorderRadius-87f3b69c.js} +1 -1
- package/dist/cjs/getGenericSettingsOverride-c0ca32b9.js +104 -0
- package/dist/cjs/helpers-5bdbb68c.js +100 -0
- package/dist/cjs/{index-2f90486e.js → index-0993f42d.js} +15 -3
- package/dist/cjs/index.cjs.js +19 -8
- package/dist/cjs/{isDarkColor-ec4a4e7d.js → isDarkColor-d0c67c3d.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{paypal-9eaa9196.js → paypal-5e73c8f5.js} +3 -3
- package/dist/cjs/zonos-address_11.cjs.entry.js +7919 -0
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +18 -7
- package/dist/cjs/zonos-card.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +113 -21
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -7
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +225 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -9
- package/dist/cjs/zonos-hello.cjs.entry.js +7 -358
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +31 -12
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
- package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
- package/dist/cjs/{zonosStore-3812b318.js → zonosStore-adc42868.js} +2 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +11 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +22 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +162 -17
- package/dist/collection/components/common/zonos-button/zonos-button.js +14 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +5 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +0 -6
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +2 -2
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +2 -3
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +105 -8
- package/dist/collection/components/common/zonos-stripe-phone-input/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.css +222 -0
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +481 -0
- package/dist/collection/components/common/zonos-stripe-select/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/common/zonos-stripe-select/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.css +178 -0
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +455 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +24 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/stripe.js +24 -7
- package/dist/collection/components/store/translationStore/strings.arabic.js +159 -0
- package/dist/collection/components/store/translationStore/strings.base.js +161 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +159 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +159 -0
- package/dist/collection/components/store/translationStore/strings.french.js +159 -0
- package/dist/collection/components/store/translationStore/strings.german.js +159 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +159 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +159 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +159 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +159 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +159 -0
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/assets/RemoveIcon.svg +1 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.css +86 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +192 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +67 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +980 -0
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/getGenericSettingsOverride.js +10 -0
- package/dist/collection/components/utils/api/getZonosSettings.js +7 -1
- package/dist/collection/components/utils/checkout/form/helpers.js +95 -0
- package/dist/collection/components/utils/checkout/form/isValidZip.js +18 -0
- package/dist/collection/components/utils/iframe/CheckoutAddressService.js +193 -0
- package/dist/collection/components/utils/iframe/IframeHelpers.js +86 -0
- package/dist/collection/components/utils/mergeAddress.js +5 -0
- package/dist/collection/constants/phone-formats.js +658 -0
- package/dist/collection/scripts/_getCartInfoById.js +7 -1
- package/dist/collection/scripts/_zonosBase.js +7 -0
- package/dist/collection/types/CountryFields.js +1 -0
- package/dist/collection/types/checkout/form/CustomAddressErrors.js +1 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +9 -0
- package/dist/collection/types/generated/graphql.internal.types.js +96 -0
- package/dist/collection/types/index.js +0 -1
- package/dist/esm/{cart-3fb04f1f.js → cart-4725a63b.js} +3209 -10
- package/dist/esm/debounce-3cf0793c.js +355 -0
- package/dist/esm/{getBorderRadius-ada3ccad.js → getBorderRadius-a9a48f79.js} +1 -1
- package/dist/esm/getGenericSettingsOverride-0bc3e118.js +99 -0
- package/dist/esm/helpers-2f6955b1.js +97 -0
- package/dist/esm/{index-d82f06f2.js → index-a457c60c.js} +15 -3
- package/dist/esm/index.js +19 -8
- package/dist/esm/{isDarkColor-446fccb7.js → isDarkColor-62cbddb5.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{paypal-1f2e863c.js → paypal-a09943f4.js} +3 -3
- package/dist/esm/zonos-address_11.entry.js +7905 -0
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +18 -7
- package/dist/esm/zonos-card.entry.js +3 -3
- package/dist/esm/zonos-cart-items_13.entry.js +113 -21
- package/dist/esm/zonos-checkout.entry.js +9 -7
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +225 -7
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-empty-state-payment_4.entry.js +8 -8
- package/dist/esm/zonos-hello-dialog.entry.js +9 -9
- package/dist/esm/zonos-hello.entry.js +6 -357
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +31 -12
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +4 -4
- package/dist/esm/zonos-tooltip.entry.js +3 -3
- package/dist/esm/zonos-v-stack.entry.js +4 -4
- package/dist/esm/{zonosStore-d3c5a0a5.js → zonosStore-1ce34e04.js} +2 -1
- package/dist/esm-es5/cart-4725a63b.js +1 -0
- package/dist/esm-es5/debounce-3cf0793c.js +1 -0
- package/dist/esm-es5/{getBorderRadius-ada3ccad.js → getBorderRadius-a9a48f79.js} +1 -1
- package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +1 -0
- package/dist/esm-es5/helpers-2f6955b1.js +1 -0
- package/dist/esm-es5/index-a457c60c.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-446fccb7.js → isDarkColor-62cbddb5.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-1f2e863c.js → paypal-a09943f4.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -0
- 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-component.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-elements.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-link.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-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-d3c5a0a5.js → zonosStore-1ce34e04.js} +1 -1
- package/dist/scripts/index.d.ts +3985 -3371
- 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 +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +28 -1
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +4 -0
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
- package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +22 -0
- package/dist/types/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.d.ts +88 -0
- package/dist/types/components/common/zonos-stripe-select/zonos-stripe-select.d.ts +86 -0
- package/dist/types/components/main/zonos-controller.d.ts +1 -0
- package/dist/types/components/store/checkout/stripe.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +159 -0
- package/dist/types/components/store/zonosStore.d.ts +6 -1
- package/dist/types/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.d.ts +38 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +150 -0
- package/dist/types/components/utils/api/getGenericSettingsOverride.d.ts +5 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/getZonosSettings.d.ts +2 -2
- package/dist/types/components/utils/checkout/form/helpers.d.ts +19 -0
- package/dist/types/components/utils/checkout/form/isValidZip.d.ts +5 -0
- package/dist/types/components/utils/iframe/CheckoutAddressService.d.ts +38 -0
- package/dist/types/components/utils/iframe/IframeHelpers.d.ts +81 -0
- package/dist/types/components/utils/mergeAddress.d.ts +4 -0
- package/dist/types/components/utils/resetToSelectedTab.d.ts +1 -1
- package/dist/types/components.d.ts +472 -4
- package/dist/types/constants/phone-formats.d.ts +5 -0
- package/dist/types/environment.d.ts +1 -1
- package/dist/types/scripts/_zonosBase.d.ts +13 -1
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
- package/dist/types/types/CountryFields.d.ts +40 -0
- package/dist/types/types/checkout/form/CustomAddressErrors.d.ts +13 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +164 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +145 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +127 -0
- package/dist/types/types/generated/graphql.internal.types.ts +155 -0
- package/dist/types/types/global.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/utils/ZonosSettings.d.ts +17 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-4622cca6.entry.js → p-0104d3ba.entry.js} +1 -1
- package/dist/zonos-elements/{p-7cb87ea7.system.entry.js → p-04303b56.system.entry.js} +1 -1
- package/dist/zonos-elements/p-06f798ee.system.js +1 -0
- package/dist/zonos-elements/p-0bf6e163.system.entry.js +1 -0
- package/dist/zonos-elements/p-0c676de4.entry.js +1 -0
- package/dist/zonos-elements/{p-739014f8.system.entry.js → p-0fdd7034.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a1cfbd0a.js → p-17299200.js} +1 -1
- package/dist/zonos-elements/p-175e242e.entry.js +1 -0
- package/dist/zonos-elements/{p-58f660d4.system.entry.js → p-1b29bc5f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fe2c27c4.entry.js → p-1e612c29.entry.js} +1 -1
- package/dist/zonos-elements/{p-98aa88b1.js → p-2097fae5.js} +1 -1
- package/dist/zonos-elements/{p-81084be5.system.entry.js → p-240ee490.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2416aaa1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-cedf08f0.entry.js → p-313ef896.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa65b53d.entry.js → p-314fbfe1.entry.js} +1 -1
- package/dist/zonos-elements/{p-5187ba8f.system.js → p-31e90130.system.js} +1 -1
- package/dist/zonos-elements/{p-4ca666ea.system.entry.js → p-341f40c2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d49c6a3e.system.entry.js → p-35f33601.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4160bbc2.system.js +1 -0
- package/dist/zonos-elements/p-43633269.system.js +2 -0
- package/dist/zonos-elements/p-443b5db2.entry.js +1 -0
- package/dist/zonos-elements/p-46d3e378.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3d221556.system.entry.js → p-488ad646.system.entry.js} +1 -1
- package/dist/zonos-elements/p-53ffdb91.js +1 -0
- package/dist/zonos-elements/p-56b56caa.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3eac4b10.entry.js → p-5f896e9a.entry.js} +1 -1
- package/dist/zonos-elements/{p-e8c70c7d.system.entry.js → p-609c32a3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-64ea232c.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f378b4d3.system.entry.js → p-678ccc3f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8048932d.entry.js → p-67b904c2.entry.js} +1 -1
- package/dist/zonos-elements/p-6b40da70.system.js +1 -0
- package/dist/zonos-elements/p-6fd6af48.system.entry.js +1 -0
- package/dist/zonos-elements/p-70d4d436.entry.js +1 -0
- package/dist/zonos-elements/{p-64dbc282.entry.js → p-818d6f17.entry.js} +1 -1
- package/dist/zonos-elements/{p-b5b9aa6c.entry.js → p-81ee1683.entry.js} +1 -1
- package/dist/zonos-elements/{p-236f32c8.system.entry.js → p-89fcd305.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4fa8524.system.entry.js → p-94a80d93.system.entry.js} +1 -1
- package/dist/zonos-elements/p-961620ae.entry.js +1 -0
- package/dist/zonos-elements/{p-4eff2f8a.system.entry.js → p-98e4a965.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5bebcfc2.system.js → p-9913c186.system.js} +1 -1
- package/dist/zonos-elements/{p-29e8c9e8.system.entry.js → p-991c85f1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-995761ea.system.entry.js +1 -0
- package/dist/zonos-elements/p-9a7a9b1c.entry.js +1 -0
- package/dist/zonos-elements/{p-d367c9ae.system.entry.js → p-9f7b9d66.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-587568b5.entry.js → p-aaff5dcc.entry.js} +1 -1
- package/dist/zonos-elements/{p-3731e7f5.entry.js → p-abc66a0b.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb294265.entry.js → p-aca3a2bb.entry.js} +1 -1
- package/dist/zonos-elements/{p-69f84611.entry.js → p-b2241919.entry.js} +1 -1
- package/dist/zonos-elements/p-b5edee66.system.js +1 -0
- package/dist/zonos-elements/p-b610f70c.system.js +1 -0
- package/dist/zonos-elements/{p-69255ed2.system.js → p-bbbaea3a.system.js} +1 -1
- package/dist/zonos-elements/p-c04b3f14.system.js +1 -0
- package/dist/zonos-elements/p-c137dc82.js +2 -0
- package/dist/zonos-elements/{p-be9e1818.system.entry.js → p-c140a0bd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de221545.entry.js → p-cf6ae7dc.entry.js} +1 -1
- package/dist/zonos-elements/{p-90633d63.entry.js → p-d0f4b6c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-112aecac.js → p-de462b9b.js} +2 -2
- package/dist/zonos-elements/{p-107b08c1.entry.js → p-e5d081d8.entry.js} +1 -1
- package/dist/zonos-elements/p-e7b0c156.js +1 -0
- package/dist/zonos-elements/{p-30fdcbee.js → p-e892fb29.js} +1 -1
- package/dist/zonos-elements/p-e90cb997.entry.js +1 -0
- package/dist/zonos-elements/{p-db3f381d.entry.js → p-e91b244c.entry.js} +1 -1
- package/dist/zonos-elements/{p-41dfc828.entry.js → p-e99354d5.entry.js} +1 -1
- package/dist/zonos-elements/p-ea6d87a1.system.js +1 -0
- package/dist/zonos-elements/p-eef5b0cc.js +1 -0
- package/dist/zonos-elements/{p-d0944cc8.system.entry.js → p-f3f27bf2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e63259c.system.entry.js → p-f4cc688e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cc6d9f7d.entry.js → p-f7d3e48b.entry.js} +1 -1
- package/dist/zonos-elements/p-fa6de0f3.js +1 -0
- package/dist/zonos-elements/{p-c5c8f803.system.entry.js → p-fd348fd4.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +3 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +0 -772
- package/dist/esm/zonos-address_7.entry.js +0 -762
- package/dist/esm-es5/cart-3fb04f1f.js +0 -1
- package/dist/esm-es5/index-d82f06f2.js +0 -2
- package/dist/esm-es5/zonos-address_7.entry.js +0 -1
- package/dist/zonos-elements/p-09041efe.entry.js +0 -1
- package/dist/zonos-elements/p-16e4cdb1.entry.js +0 -1
- package/dist/zonos-elements/p-43feb95e.entry.js +0 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +0 -1
- package/dist/zonos-elements/p-4caffd96.system.js +0 -2
- package/dist/zonos-elements/p-642bf613.system.entry.js +0 -1
- package/dist/zonos-elements/p-6c0c8722.system.entry.js +0 -1
- package/dist/zonos-elements/p-7decb19b.entry.js +0 -1
- package/dist/zonos-elements/p-829f6a40.entry.js +0 -1
- package/dist/zonos-elements/p-8f640b28.entry.js +0 -1
- package/dist/zonos-elements/p-a69dbe14.js +0 -1
- package/dist/zonos-elements/p-ab68ad11.js +0 -2
- package/dist/zonos-elements/p-b1020237.system.js +0 -1
- package/dist/zonos-elements/p-bc0f885e.system.entry.js +0 -1
- package/dist/zonos-elements/p-c6d96a42.system.js +0 -1
- package/dist/zonos-elements/p-ce853f8f.system.entry.js +0 -1
- package/dist/zonos-elements/p-d5d39db4.system.entry.js +0 -1
- package/dist/zonos-elements/p-e4f8114a.system.js +0 -1
- package/dist/zonos-elements/p-e99e75dd.system.entry.js +0 -1
- package/dist/zonos-elements/p-f66a5c7c.system.entry.js +0 -1
- package/dist/zonos-elements/p-febb90e0.entry.js +0 -1
|
@@ -445,6 +445,11 @@ export declare const catalogStatus: {
|
|
|
445
445
|
readonly Enabled: "ENABLED";
|
|
446
446
|
};
|
|
447
447
|
export type CatalogStatus = (typeof catalogStatus)[keyof typeof catalogStatus];
|
|
448
|
+
export declare const checkoutCompanyFieldsStatus: {
|
|
449
|
+
readonly Disabled: "DISABLED";
|
|
450
|
+
readonly Enabled: "ENABLED";
|
|
451
|
+
};
|
|
452
|
+
export type CheckoutCompanyFieldsStatus = (typeof checkoutCompanyFieldsStatus)[keyof typeof checkoutCompanyFieldsStatus];
|
|
448
453
|
export declare const checkoutMerchantOfRecordType: {
|
|
449
454
|
readonly Merchant: "MERCHANT";
|
|
450
455
|
readonly Zonos: "ZONOS";
|
|
@@ -2017,6 +2022,16 @@ export declare const landedCostAdjustmentType: {
|
|
|
2017
2022
|
readonly Shipping: "SHIPPING";
|
|
2018
2023
|
};
|
|
2019
2024
|
export type LandedCostAdjustmentType = (typeof landedCostAdjustmentType)[keyof typeof landedCostAdjustmentType];
|
|
2025
|
+
export declare const landedCostAmountTargetType: {
|
|
2026
|
+
readonly BillingCompany: "BILLING_COMPANY";
|
|
2027
|
+
readonly ItemProvided: "ITEM_PROVIDED";
|
|
2028
|
+
readonly MerchantBase: "MERCHANT_BASE";
|
|
2029
|
+
readonly MerchantProvided: "MERCHANT_PROVIDED";
|
|
2030
|
+
readonly MerchantSettled: "MERCHANT_SETTLED";
|
|
2031
|
+
readonly ShopperPresented: "SHOPPER_PRESENTED";
|
|
2032
|
+
readonly ZonosBase: "ZONOS_BASE";
|
|
2033
|
+
};
|
|
2034
|
+
export type LandedCostAmountTargetType = (typeof landedCostAmountTargetType)[keyof typeof landedCostAmountTargetType];
|
|
2020
2035
|
export declare const landedCostBillingPartyType: {
|
|
2021
2036
|
readonly Customer: "CUSTOMER";
|
|
2022
2037
|
readonly Merchant: "MERCHANT";
|
|
@@ -2024,6 +2039,40 @@ export declare const landedCostBillingPartyType: {
|
|
|
2024
2039
|
readonly Zonos: "ZONOS";
|
|
2025
2040
|
};
|
|
2026
2041
|
export type LandedCostBillingPartyType = (typeof landedCostBillingPartyType)[keyof typeof landedCostBillingPartyType];
|
|
2042
|
+
export declare const landedCostBillingRuleDetailCategoryIdCreateType: {
|
|
2043
|
+
readonly Adjustment: "ADJUSTMENT";
|
|
2044
|
+
readonly ApiCrossDocking: "API_CROSS_DOCKING";
|
|
2045
|
+
readonly ApiCurrencyConversionFeeDiscount: "API_CURRENCY_CONVERSION_FEE_DISCOUNT";
|
|
2046
|
+
readonly ApiGuaranteeOrder: "API_GUARANTEE_ORDER";
|
|
2047
|
+
readonly ApiGuaranteeOrderLegacy: "API_GUARANTEE_ORDER_LEGACY";
|
|
2048
|
+
readonly ApiGuaranteePercent: "API_GUARANTEE_PERCENT";
|
|
2049
|
+
readonly ApiGuaranteePercentInclusive: "API_GUARANTEE_PERCENT_INCLUSIVE";
|
|
2050
|
+
readonly ApiGuaranteePercentRevenueShare: "API_GUARANTEE_PERCENT_REVENUE_SHARE";
|
|
2051
|
+
readonly ApiTransactionPercent: "API_TRANSACTION_PERCENT";
|
|
2052
|
+
readonly CheckoutCrossDocking: "CHECKOUT_CROSS_DOCKING";
|
|
2053
|
+
readonly CheckoutDutyTaxFeeIglobal: "CHECKOUT_DUTY_TAX_FEE_IGLOBAL";
|
|
2054
|
+
readonly CheckoutFraudCoverage: "CHECKOUT_FRAUD_COVERAGE";
|
|
2055
|
+
readonly CheckoutGuaranteeOrder: "CHECKOUT_GUARANTEE_ORDER";
|
|
2056
|
+
readonly CheckoutGuaranteeOrderLegacy: "CHECKOUT_GUARANTEE_ORDER_LEGACY";
|
|
2057
|
+
readonly CheckoutGuaranteePercent: "CHECKOUT_GUARANTEE_PERCENT";
|
|
2058
|
+
readonly CheckoutGuaranteePercentIglobal: "CHECKOUT_GUARANTEE_PERCENT_IGLOBAL";
|
|
2059
|
+
readonly CheckoutItemDiscountIglobal: "CHECKOUT_ITEM_DISCOUNT_IGLOBAL";
|
|
2060
|
+
readonly CheckoutMerchantFeeAdditionalInternational: "CHECKOUT_MERCHANT_FEE_ADDITIONAL_INTERNATIONAL";
|
|
2061
|
+
readonly CheckoutMerchantFeeAmount: "CHECKOUT_MERCHANT_FEE_AMOUNT";
|
|
2062
|
+
readonly CheckoutMerchantFeePaypalPercent: "CHECKOUT_MERCHANT_FEE_PAYPAL_PERCENT";
|
|
2063
|
+
readonly CheckoutMerchantFeePercent: "CHECKOUT_MERCHANT_FEE_PERCENT";
|
|
2064
|
+
readonly CheckoutMerchantProcessing: "CHECKOUT_MERCHANT_PROCESSING";
|
|
2065
|
+
readonly CheckoutShippingIglobal: "CHECKOUT_SHIPPING_IGLOBAL";
|
|
2066
|
+
readonly CheckoutTransactionPercent: "CHECKOUT_TRANSACTION_PERCENT";
|
|
2067
|
+
readonly GuaranteeOrder: "GUARANTEE_ORDER";
|
|
2068
|
+
readonly ShopifyGuaranteeOrder: "SHOPIFY_GUARANTEE_ORDER";
|
|
2069
|
+
readonly ShopifyGuaranteeOrderLegacy: "SHOPIFY_GUARANTEE_ORDER_LEGACY";
|
|
2070
|
+
readonly ShopifyGuaranteePercent: "SHOPIFY_GUARANTEE_PERCENT";
|
|
2071
|
+
readonly ShopifyGuaranteePercentInclusive: "SHOPIFY_GUARANTEE_PERCENT_INCLUSIVE";
|
|
2072
|
+
readonly ShopifyTransactionPercent: "SHOPIFY_TRANSACTION_PERCENT";
|
|
2073
|
+
readonly Tax: "TAX";
|
|
2074
|
+
};
|
|
2075
|
+
export type LandedCostBillingRuleDetailCategoryIdCreateType = (typeof landedCostBillingRuleDetailCategoryIdCreateType)[keyof typeof landedCostBillingRuleDetailCategoryIdCreateType];
|
|
2027
2076
|
export declare const landedCostCalculationMethod: {
|
|
2028
2077
|
readonly Dap: "DAP";
|
|
2029
2078
|
readonly Ddp: "DDP";
|
|
@@ -2054,10 +2103,12 @@ export declare const landedCostFeeType: {
|
|
|
2054
2103
|
readonly InclusivePriceAdjustment: "INCLUSIVE_PRICE_ADJUSTMENT";
|
|
2055
2104
|
readonly InclusivePricing: "INCLUSIVE_PRICING";
|
|
2056
2105
|
readonly Item: "ITEM";
|
|
2106
|
+
readonly LandedCost: "LANDED_COST";
|
|
2057
2107
|
readonly Other: "OTHER";
|
|
2058
2108
|
readonly PartnerRevShare: "PARTNER_REV_SHARE";
|
|
2059
2109
|
readonly Shipping: "SHIPPING";
|
|
2060
2110
|
readonly Tax: "TAX";
|
|
2111
|
+
readonly Transaction: "TRANSACTION";
|
|
2061
2112
|
readonly ZonosAccessFee: "ZONOS_ACCESS_FEE";
|
|
2062
2113
|
readonly ZonosLandedCost: "ZONOS_LANDED_COST";
|
|
2063
2114
|
readonly ZonosLandedCostGuarantee: "ZONOS_LANDED_COST_GUARANTEE";
|
|
@@ -2095,6 +2146,7 @@ export declare const landedCostQuoteType: {
|
|
|
2095
2146
|
readonly Api: "API";
|
|
2096
2147
|
readonly Auditing: "AUDITING";
|
|
2097
2148
|
readonly Checkout: "CHECKOUT";
|
|
2149
|
+
readonly Hello: "HELLO";
|
|
2098
2150
|
readonly InclusivePrice: "INCLUSIVE_PRICE";
|
|
2099
2151
|
};
|
|
2100
2152
|
export type LandedCostQuoteType = (typeof landedCostQuoteType)[keyof typeof landedCostQuoteType];
|
|
@@ -2815,6 +2867,48 @@ export declare const signatureOptionType: {
|
|
|
2815
2867
|
readonly None: "NONE";
|
|
2816
2868
|
};
|
|
2817
2869
|
export type SignatureOptionType = (typeof signatureOptionType)[keyof typeof signatureOptionType];
|
|
2870
|
+
export declare const storeFeeRuleDetailCategoryIdCreateType: {
|
|
2871
|
+
readonly AdditionalTariffLines: "ADDITIONAL_TARIFF_LINES";
|
|
2872
|
+
readonly Advancement: "ADVANCEMENT";
|
|
2873
|
+
readonly AdvancementMin: "ADVANCEMENT_MIN";
|
|
2874
|
+
readonly AdvancementPercent: "ADVANCEMENT_PERCENT";
|
|
2875
|
+
readonly ApiCrossDockingBuffer: "API_CROSS_DOCKING_BUFFER";
|
|
2876
|
+
readonly ApiGuaranteeOrder: "API_GUARANTEE_ORDER";
|
|
2877
|
+
readonly ApiGuaranteeOrderLegacy: "API_GUARANTEE_ORDER_LEGACY";
|
|
2878
|
+
readonly ApiGuaranteePercent: "API_GUARANTEE_PERCENT";
|
|
2879
|
+
readonly ApiGuaranteePercentLegacy: "API_GUARANTEE_PERCENT_LEGACY";
|
|
2880
|
+
readonly BigcommerceCrossDockingBuffer: "BIGCOMMERCE_CROSS_DOCKING_BUFFER";
|
|
2881
|
+
readonly BigcommerceGuaranteeOrder: "BIGCOMMERCE_GUARANTEE_ORDER";
|
|
2882
|
+
readonly BigcommerceGuaranteePercent: "BIGCOMMERCE_GUARANTEE_PERCENT";
|
|
2883
|
+
readonly BrexitFee: "BREXIT_FEE";
|
|
2884
|
+
readonly BrokerageFee: "BROKERAGE_FEE";
|
|
2885
|
+
readonly CheckoutGuaranteeOrder: "CHECKOUT_GUARANTEE_ORDER";
|
|
2886
|
+
readonly CheckoutGuaranteeOrderLegacy: "CHECKOUT_GUARANTEE_ORDER_LEGACY";
|
|
2887
|
+
readonly CheckoutGuaranteePercent: "CHECKOUT_GUARANTEE_PERCENT";
|
|
2888
|
+
readonly Cod: "COD";
|
|
2889
|
+
readonly Country: "COUNTRY";
|
|
2890
|
+
readonly CrossDockBuffer: "CROSS_DOCK_BUFFER";
|
|
2891
|
+
readonly CurrencyConversionFee: "CURRENCY_CONVERSION_FEE";
|
|
2892
|
+
readonly Custom: "CUSTOM";
|
|
2893
|
+
readonly DdpServiceFee: "DDP_SERVICE_FEE";
|
|
2894
|
+
readonly DutyBuffer: "DUTY_BUFFER";
|
|
2895
|
+
readonly DutyTaxBuffer: "DUTY_TAX_BUFFER";
|
|
2896
|
+
readonly MagentoCrossDockingBuffer: "MAGENTO_CROSS_DOCKING_BUFFER";
|
|
2897
|
+
readonly MagentoGuaranteeOrder: "MAGENTO_GUARANTEE_ORDER";
|
|
2898
|
+
readonly MagentoGuaranteePercent: "MAGENTO_GUARANTEE_PERCENT";
|
|
2899
|
+
readonly ShippingFee: "SHIPPING_FEE";
|
|
2900
|
+
readonly ShopifyCrossDockingBuffer: "SHOPIFY_CROSS_DOCKING_BUFFER";
|
|
2901
|
+
readonly ShopifyDutyTaxBuffer: "SHOPIFY_DUTY_TAX_BUFFER";
|
|
2902
|
+
readonly ShopifyDutyTaxFeeBuffer: "SHOPIFY_DUTY_TAX_FEE_BUFFER";
|
|
2903
|
+
readonly ShopifyGuaranteeOrder: "SHOPIFY_GUARANTEE_ORDER";
|
|
2904
|
+
readonly ShopifyGuaranteeOrderLegacy: "SHOPIFY_GUARANTEE_ORDER_LEGACY";
|
|
2905
|
+
readonly ShopifyGuaranteePercent: "SHOPIFY_GUARANTEE_PERCENT";
|
|
2906
|
+
readonly ShopifyGuaranteePercentGuaranteeOrder: "SHOPIFY_GUARANTEE_PERCENT_GUARANTEE_ORDER";
|
|
2907
|
+
readonly TaxBuffer: "TAX_BUFFER";
|
|
2908
|
+
readonly ZonosExportProcessing: "ZONOS_EXPORT_PROCESSING";
|
|
2909
|
+
readonly ZonosExportProcessingOffset: "ZONOS_EXPORT_PROCESSING_OFFSET";
|
|
2910
|
+
};
|
|
2911
|
+
export type StoreFeeRuleDetailCategoryIdCreateType = (typeof storeFeeRuleDetailCategoryIdCreateType)[keyof typeof storeFeeRuleDetailCategoryIdCreateType];
|
|
2818
2912
|
export declare const storeFeeRuleType: {
|
|
2819
2913
|
readonly Custom: "CUSTOM";
|
|
2820
2914
|
readonly Negotiable: "NEGOTIABLE";
|
|
@@ -3299,6 +3393,30 @@ export type CheckoutCustomerProfileAuthenticateMutation = {
|
|
|
3299
3393
|
phone: string | null;
|
|
3300
3394
|
};
|
|
3301
3395
|
};
|
|
3396
|
+
export type OrganizationByStoreIdQuery = {
|
|
3397
|
+
organizations: {
|
|
3398
|
+
edges: Array<{
|
|
3399
|
+
node: {
|
|
3400
|
+
id: string;
|
|
3401
|
+
name: string;
|
|
3402
|
+
} | null;
|
|
3403
|
+
}>;
|
|
3404
|
+
} | null;
|
|
3405
|
+
};
|
|
3406
|
+
export type OrganizationsQuery = {
|
|
3407
|
+
organizations: {
|
|
3408
|
+
edges: Array<{
|
|
3409
|
+
node: {
|
|
3410
|
+
id: string;
|
|
3411
|
+
name: string;
|
|
3412
|
+
references: {
|
|
3413
|
+
companyId: number | null;
|
|
3414
|
+
storeId: number | null;
|
|
3415
|
+
} | null;
|
|
3416
|
+
} | null;
|
|
3417
|
+
}>;
|
|
3418
|
+
} | null;
|
|
3419
|
+
};
|
|
3302
3420
|
export type CartCalculateLandedCostMutation = {
|
|
3303
3421
|
cartWorkflow: {
|
|
3304
3422
|
id: string;
|
|
@@ -4012,6 +4130,7 @@ export type CartCheckoutWorkflowQuery = {
|
|
|
4012
4130
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
4013
4131
|
updatedAt: string;
|
|
4014
4132
|
updatedBy: string;
|
|
4133
|
+
visibilityStatus: HelloVisibilityStatus;
|
|
4015
4134
|
};
|
|
4016
4135
|
onlineStoreSettings: {
|
|
4017
4136
|
allowedDomains: Array<string>;
|
|
@@ -4330,6 +4449,7 @@ export type ZonosSettingsQuery = {
|
|
|
4330
4449
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
4331
4450
|
updatedAt: string;
|
|
4332
4451
|
updatedBy: string;
|
|
4452
|
+
visibilityStatus: HelloVisibilityStatus;
|
|
4333
4453
|
} | null;
|
|
4334
4454
|
onlineStoreSettings: {
|
|
4335
4455
|
allowedDomains: Array<string>;
|
|
@@ -4419,6 +4539,7 @@ export type HelloSettingFragment = {
|
|
|
4419
4539
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
4420
4540
|
updatedAt: string;
|
|
4421
4541
|
updatedBy: string;
|
|
4542
|
+
visibilityStatus: HelloVisibilityStatus;
|
|
4422
4543
|
};
|
|
4423
4544
|
export type AppearanceSettingFragment = {
|
|
4424
4545
|
colorPrimary: string;
|
|
@@ -4784,6 +4905,12 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
4784
4905
|
organization(variables?: {
|
|
4785
4906
|
[x: string]: never;
|
|
4786
4907
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<OrganizationQuery>;
|
|
4908
|
+
organizationByStoreId(variables?: {
|
|
4909
|
+
[x: string]: never;
|
|
4910
|
+
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<OrganizationByStoreIdQuery>;
|
|
4911
|
+
organizations(variables?: {
|
|
4912
|
+
[x: string]: never;
|
|
4913
|
+
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<OrganizationsQuery>;
|
|
4787
4914
|
partyInfo(variables?: {
|
|
4788
4915
|
[x: string]: never;
|
|
4789
4916
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<PartyInfoQuery>;
|
|
@@ -554,6 +554,13 @@ export const catalogStatus = {
|
|
|
554
554
|
} as const;
|
|
555
555
|
|
|
556
556
|
export type CatalogStatus = (typeof catalogStatus)[keyof typeof catalogStatus];
|
|
557
|
+
export const checkoutCompanyFieldsStatus = {
|
|
558
|
+
Disabled: 'DISABLED',
|
|
559
|
+
Enabled: 'ENABLED',
|
|
560
|
+
} as const;
|
|
561
|
+
|
|
562
|
+
export type CheckoutCompanyFieldsStatus =
|
|
563
|
+
(typeof checkoutCompanyFieldsStatus)[keyof typeof checkoutCompanyFieldsStatus];
|
|
557
564
|
|
|
558
565
|
export const checkoutMerchantOfRecordType = {
|
|
559
566
|
Merchant: 'MERCHANT',
|
|
@@ -2429,6 +2436,18 @@ export const landedCostAdjustmentType = {
|
|
|
2429
2436
|
|
|
2430
2437
|
export type LandedCostAdjustmentType =
|
|
2431
2438
|
(typeof landedCostAdjustmentType)[keyof typeof landedCostAdjustmentType];
|
|
2439
|
+
export const landedCostAmountTargetType = {
|
|
2440
|
+
BillingCompany: 'BILLING_COMPANY',
|
|
2441
|
+
ItemProvided: 'ITEM_PROVIDED',
|
|
2442
|
+
MerchantBase: 'MERCHANT_BASE',
|
|
2443
|
+
MerchantProvided: 'MERCHANT_PROVIDED',
|
|
2444
|
+
MerchantSettled: 'MERCHANT_SETTLED',
|
|
2445
|
+
ShopperPresented: 'SHOPPER_PRESENTED',
|
|
2446
|
+
ZonosBase: 'ZONOS_BASE',
|
|
2447
|
+
} as const;
|
|
2448
|
+
|
|
2449
|
+
export type LandedCostAmountTargetType =
|
|
2450
|
+
(typeof landedCostAmountTargetType)[keyof typeof landedCostAmountTargetType];
|
|
2432
2451
|
|
|
2433
2452
|
export const landedCostBillingPartyType = {
|
|
2434
2453
|
Customer: 'CUSTOMER',
|
|
@@ -2440,6 +2459,44 @@ export const landedCostBillingPartyType = {
|
|
|
2440
2459
|
export type LandedCostBillingPartyType =
|
|
2441
2460
|
(typeof landedCostBillingPartyType)[keyof typeof landedCostBillingPartyType];
|
|
2442
2461
|
|
|
2462
|
+
export const landedCostBillingRuleDetailCategoryIdCreateType = {
|
|
2463
|
+
Adjustment: 'ADJUSTMENT',
|
|
2464
|
+
ApiCrossDocking: 'API_CROSS_DOCKING',
|
|
2465
|
+
ApiCurrencyConversionFeeDiscount: 'API_CURRENCY_CONVERSION_FEE_DISCOUNT',
|
|
2466
|
+
ApiGuaranteeOrder: 'API_GUARANTEE_ORDER',
|
|
2467
|
+
ApiGuaranteeOrderLegacy: 'API_GUARANTEE_ORDER_LEGACY',
|
|
2468
|
+
ApiGuaranteePercent: 'API_GUARANTEE_PERCENT',
|
|
2469
|
+
ApiGuaranteePercentInclusive: 'API_GUARANTEE_PERCENT_INCLUSIVE',
|
|
2470
|
+
ApiGuaranteePercentRevenueShare: 'API_GUARANTEE_PERCENT_REVENUE_SHARE',
|
|
2471
|
+
ApiTransactionPercent: 'API_TRANSACTION_PERCENT',
|
|
2472
|
+
CheckoutCrossDocking: 'CHECKOUT_CROSS_DOCKING',
|
|
2473
|
+
CheckoutDutyTaxFeeIglobal: 'CHECKOUT_DUTY_TAX_FEE_IGLOBAL',
|
|
2474
|
+
CheckoutFraudCoverage: 'CHECKOUT_FRAUD_COVERAGE',
|
|
2475
|
+
CheckoutGuaranteeOrder: 'CHECKOUT_GUARANTEE_ORDER',
|
|
2476
|
+
CheckoutGuaranteeOrderLegacy: 'CHECKOUT_GUARANTEE_ORDER_LEGACY',
|
|
2477
|
+
CheckoutGuaranteePercent: 'CHECKOUT_GUARANTEE_PERCENT',
|
|
2478
|
+
CheckoutGuaranteePercentIglobal: 'CHECKOUT_GUARANTEE_PERCENT_IGLOBAL',
|
|
2479
|
+
CheckoutItemDiscountIglobal: 'CHECKOUT_ITEM_DISCOUNT_IGLOBAL',
|
|
2480
|
+
CheckoutMerchantFeeAdditionalInternational:
|
|
2481
|
+
'CHECKOUT_MERCHANT_FEE_ADDITIONAL_INTERNATIONAL',
|
|
2482
|
+
CheckoutMerchantFeeAmount: 'CHECKOUT_MERCHANT_FEE_AMOUNT',
|
|
2483
|
+
CheckoutMerchantFeePaypalPercent: 'CHECKOUT_MERCHANT_FEE_PAYPAL_PERCENT',
|
|
2484
|
+
CheckoutMerchantFeePercent: 'CHECKOUT_MERCHANT_FEE_PERCENT',
|
|
2485
|
+
CheckoutMerchantProcessing: 'CHECKOUT_MERCHANT_PROCESSING',
|
|
2486
|
+
CheckoutShippingIglobal: 'CHECKOUT_SHIPPING_IGLOBAL',
|
|
2487
|
+
CheckoutTransactionPercent: 'CHECKOUT_TRANSACTION_PERCENT',
|
|
2488
|
+
GuaranteeOrder: 'GUARANTEE_ORDER',
|
|
2489
|
+
ShopifyGuaranteeOrder: 'SHOPIFY_GUARANTEE_ORDER',
|
|
2490
|
+
ShopifyGuaranteeOrderLegacy: 'SHOPIFY_GUARANTEE_ORDER_LEGACY',
|
|
2491
|
+
ShopifyGuaranteePercent: 'SHOPIFY_GUARANTEE_PERCENT',
|
|
2492
|
+
ShopifyGuaranteePercentInclusive: 'SHOPIFY_GUARANTEE_PERCENT_INCLUSIVE',
|
|
2493
|
+
ShopifyTransactionPercent: 'SHOPIFY_TRANSACTION_PERCENT',
|
|
2494
|
+
Tax: 'TAX',
|
|
2495
|
+
} as const;
|
|
2496
|
+
|
|
2497
|
+
export type LandedCostBillingRuleDetailCategoryIdCreateType =
|
|
2498
|
+
(typeof landedCostBillingRuleDetailCategoryIdCreateType)[keyof typeof landedCostBillingRuleDetailCategoryIdCreateType];
|
|
2499
|
+
|
|
2443
2500
|
export const landedCostCalculationMethod = {
|
|
2444
2501
|
Dap: 'DAP',
|
|
2445
2502
|
Ddp: 'DDP',
|
|
@@ -2475,10 +2532,12 @@ export const landedCostFeeType = {
|
|
|
2475
2532
|
InclusivePriceAdjustment: 'INCLUSIVE_PRICE_ADJUSTMENT',
|
|
2476
2533
|
InclusivePricing: 'INCLUSIVE_PRICING',
|
|
2477
2534
|
Item: 'ITEM',
|
|
2535
|
+
LandedCost: 'LANDED_COST',
|
|
2478
2536
|
Other: 'OTHER',
|
|
2479
2537
|
PartnerRevShare: 'PARTNER_REV_SHARE',
|
|
2480
2538
|
Shipping: 'SHIPPING',
|
|
2481
2539
|
Tax: 'TAX',
|
|
2540
|
+
Transaction: 'TRANSACTION',
|
|
2482
2541
|
ZonosAccessFee: 'ZONOS_ACCESS_FEE',
|
|
2483
2542
|
ZonosLandedCost: 'ZONOS_LANDED_COST',
|
|
2484
2543
|
ZonosLandedCostGuarantee: 'ZONOS_LANDED_COST_GUARANTEE',
|
|
@@ -2528,6 +2587,7 @@ export const landedCostQuoteType = {
|
|
|
2528
2587
|
Api: 'API',
|
|
2529
2588
|
Auditing: 'AUDITING',
|
|
2530
2589
|
Checkout: 'CHECKOUT',
|
|
2590
|
+
Hello: 'HELLO',
|
|
2531
2591
|
InclusivePrice: 'INCLUSIVE_PRICE',
|
|
2532
2592
|
} as const;
|
|
2533
2593
|
|
|
@@ -3457,6 +3517,52 @@ export const signatureOptionType = {
|
|
|
3457
3517
|
export type SignatureOptionType =
|
|
3458
3518
|
(typeof signatureOptionType)[keyof typeof signatureOptionType];
|
|
3459
3519
|
|
|
3520
|
+
export const storeFeeRuleDetailCategoryIdCreateType = {
|
|
3521
|
+
AdditionalTariffLines: 'ADDITIONAL_TARIFF_LINES',
|
|
3522
|
+
Advancement: 'ADVANCEMENT',
|
|
3523
|
+
AdvancementMin: 'ADVANCEMENT_MIN',
|
|
3524
|
+
AdvancementPercent: 'ADVANCEMENT_PERCENT',
|
|
3525
|
+
ApiCrossDockingBuffer: 'API_CROSS_DOCKING_BUFFER',
|
|
3526
|
+
ApiGuaranteeOrder: 'API_GUARANTEE_ORDER',
|
|
3527
|
+
ApiGuaranteeOrderLegacy: 'API_GUARANTEE_ORDER_LEGACY',
|
|
3528
|
+
ApiGuaranteePercent: 'API_GUARANTEE_PERCENT',
|
|
3529
|
+
ApiGuaranteePercentLegacy: 'API_GUARANTEE_PERCENT_LEGACY',
|
|
3530
|
+
BigcommerceCrossDockingBuffer: 'BIGCOMMERCE_CROSS_DOCKING_BUFFER',
|
|
3531
|
+
BigcommerceGuaranteeOrder: 'BIGCOMMERCE_GUARANTEE_ORDER',
|
|
3532
|
+
BigcommerceGuaranteePercent: 'BIGCOMMERCE_GUARANTEE_PERCENT',
|
|
3533
|
+
BrexitFee: 'BREXIT_FEE',
|
|
3534
|
+
BrokerageFee: 'BROKERAGE_FEE',
|
|
3535
|
+
CheckoutGuaranteeOrder: 'CHECKOUT_GUARANTEE_ORDER',
|
|
3536
|
+
CheckoutGuaranteeOrderLegacy: 'CHECKOUT_GUARANTEE_ORDER_LEGACY',
|
|
3537
|
+
CheckoutGuaranteePercent: 'CHECKOUT_GUARANTEE_PERCENT',
|
|
3538
|
+
Cod: 'COD',
|
|
3539
|
+
Country: 'COUNTRY',
|
|
3540
|
+
CrossDockBuffer: 'CROSS_DOCK_BUFFER',
|
|
3541
|
+
CurrencyConversionFee: 'CURRENCY_CONVERSION_FEE',
|
|
3542
|
+
Custom: 'CUSTOM',
|
|
3543
|
+
DdpServiceFee: 'DDP_SERVICE_FEE',
|
|
3544
|
+
DutyBuffer: 'DUTY_BUFFER',
|
|
3545
|
+
DutyTaxBuffer: 'DUTY_TAX_BUFFER',
|
|
3546
|
+
MagentoCrossDockingBuffer: 'MAGENTO_CROSS_DOCKING_BUFFER',
|
|
3547
|
+
MagentoGuaranteeOrder: 'MAGENTO_GUARANTEE_ORDER',
|
|
3548
|
+
MagentoGuaranteePercent: 'MAGENTO_GUARANTEE_PERCENT',
|
|
3549
|
+
ShippingFee: 'SHIPPING_FEE',
|
|
3550
|
+
ShopifyCrossDockingBuffer: 'SHOPIFY_CROSS_DOCKING_BUFFER',
|
|
3551
|
+
ShopifyDutyTaxBuffer: 'SHOPIFY_DUTY_TAX_BUFFER',
|
|
3552
|
+
ShopifyDutyTaxFeeBuffer: 'SHOPIFY_DUTY_TAX_FEE_BUFFER',
|
|
3553
|
+
ShopifyGuaranteeOrder: 'SHOPIFY_GUARANTEE_ORDER',
|
|
3554
|
+
ShopifyGuaranteeOrderLegacy: 'SHOPIFY_GUARANTEE_ORDER_LEGACY',
|
|
3555
|
+
ShopifyGuaranteePercent: 'SHOPIFY_GUARANTEE_PERCENT',
|
|
3556
|
+
ShopifyGuaranteePercentGuaranteeOrder:
|
|
3557
|
+
'SHOPIFY_GUARANTEE_PERCENT_GUARANTEE_ORDER',
|
|
3558
|
+
TaxBuffer: 'TAX_BUFFER',
|
|
3559
|
+
ZonosExportProcessing: 'ZONOS_EXPORT_PROCESSING',
|
|
3560
|
+
ZonosExportProcessingOffset: 'ZONOS_EXPORT_PROCESSING_OFFSET',
|
|
3561
|
+
} as const;
|
|
3562
|
+
|
|
3563
|
+
export type StoreFeeRuleDetailCategoryIdCreateType =
|
|
3564
|
+
(typeof storeFeeRuleDetailCategoryIdCreateType)[keyof typeof storeFeeRuleDetailCategoryIdCreateType];
|
|
3565
|
+
|
|
3460
3566
|
export const storeFeeRuleType = {
|
|
3461
3567
|
Custom: 'CUSTOM',
|
|
3462
3568
|
Negotiable: 'NEGOTIABLE',
|
|
@@ -3992,6 +4098,24 @@ export type CheckoutCustomerProfileAuthenticateMutation = {
|
|
|
3992
4098
|
};
|
|
3993
4099
|
};
|
|
3994
4100
|
|
|
4101
|
+
export type OrganizationByStoreIdQuery = {
|
|
4102
|
+
organizations: {
|
|
4103
|
+
edges: Array<{ node: { id: string; name: string } | null }>;
|
|
4104
|
+
} | null;
|
|
4105
|
+
};
|
|
4106
|
+
|
|
4107
|
+
export type OrganizationsQuery = {
|
|
4108
|
+
organizations: {
|
|
4109
|
+
edges: Array<{
|
|
4110
|
+
node: {
|
|
4111
|
+
id: string;
|
|
4112
|
+
name: string;
|
|
4113
|
+
references: { companyId: number | null; storeId: number | null } | null;
|
|
4114
|
+
} | null;
|
|
4115
|
+
}>;
|
|
4116
|
+
} | null;
|
|
4117
|
+
};
|
|
4118
|
+
|
|
3995
4119
|
export type CartCalculateLandedCostMutation = {
|
|
3996
4120
|
cartWorkflow: {
|
|
3997
4121
|
id: string;
|
|
@@ -4633,6 +4757,7 @@ export type CartCheckoutWorkflowQuery = {
|
|
|
4633
4757
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
4634
4758
|
updatedAt: string;
|
|
4635
4759
|
updatedBy: string;
|
|
4760
|
+
visibilityStatus: HelloVisibilityStatus;
|
|
4636
4761
|
};
|
|
4637
4762
|
onlineStoreSettings: { allowedDomains: Array<string>; url: string };
|
|
4638
4763
|
organizationId: string;
|
|
@@ -4913,6 +5038,7 @@ export type ZonosSettingsQuery = {
|
|
|
4913
5038
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
4914
5039
|
updatedAt: string;
|
|
4915
5040
|
updatedBy: string;
|
|
5041
|
+
visibilityStatus: HelloVisibilityStatus;
|
|
4916
5042
|
} | null;
|
|
4917
5043
|
onlineStoreSettings: { allowedDomains: Array<string>; url: string };
|
|
4918
5044
|
organization: {
|
|
@@ -4996,6 +5122,7 @@ export type HelloSettingFragment = {
|
|
|
4996
5122
|
restrictionBehavior: HelloRestrictionBehavior;
|
|
4997
5123
|
updatedAt: string;
|
|
4998
5124
|
updatedBy: string;
|
|
5125
|
+
visibilityStatus: HelloVisibilityStatus;
|
|
4999
5126
|
};
|
|
5000
5127
|
|
|
5001
5128
|
export type AppearanceSettingFragment = {
|
|
@@ -5730,6 +5857,34 @@ export function getSdk(
|
|
|
5730
5857
|
'query',
|
|
5731
5858
|
);
|
|
5732
5859
|
},
|
|
5860
|
+
organizationByStoreId(
|
|
5861
|
+
variables?: { [x: string]: never },
|
|
5862
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
5863
|
+
): Promise<OrganizationByStoreIdQuery> {
|
|
5864
|
+
return withWrapper(
|
|
5865
|
+
wrappedRequestHeaders =>
|
|
5866
|
+
client.request<OrganizationByStoreIdQuery>('', variables, {
|
|
5867
|
+
...requestHeaders,
|
|
5868
|
+
...wrappedRequestHeaders,
|
|
5869
|
+
}),
|
|
5870
|
+
'organizationByStoreId',
|
|
5871
|
+
'query',
|
|
5872
|
+
);
|
|
5873
|
+
},
|
|
5874
|
+
organizations(
|
|
5875
|
+
variables?: { [x: string]: never },
|
|
5876
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
5877
|
+
): Promise<OrganizationsQuery> {
|
|
5878
|
+
return withWrapper(
|
|
5879
|
+
wrappedRequestHeaders =>
|
|
5880
|
+
client.request<OrganizationsQuery>('', variables, {
|
|
5881
|
+
...requestHeaders,
|
|
5882
|
+
...wrappedRequestHeaders,
|
|
5883
|
+
}),
|
|
5884
|
+
'organizations',
|
|
5885
|
+
'query',
|
|
5886
|
+
);
|
|
5887
|
+
},
|
|
5733
5888
|
partyInfo(
|
|
5734
5889
|
variables?: { [x: string]: never },
|
|
5735
5890
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-relative-import-paths/no-relative-import-paths */
|
|
2
2
|
import type { StripeConstructor } from '@stripe/stripe-js';
|
|
3
|
+
import type {} from 'google.maps';
|
|
3
4
|
|
|
4
5
|
/** Need to use relative path so that this declaration file can be correctly bundled */
|
|
5
6
|
import type { CustomEventMap } from '../components/utils/createCustomEvent';
|
|
@@ -22,5 +22,5 @@ export * from './TestPublicCredential';
|
|
|
22
22
|
export * from './Translation';
|
|
23
23
|
export * from './utils/deep/IDeepKeyof';
|
|
24
24
|
export * from './utils/deep/IDeepKeyofAtIndex';
|
|
25
|
-
export
|
|
25
|
+
export type { ZonosSettings } from './utils/ZonosSettings';
|
|
26
26
|
export * from './Version';
|
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
import type { CountryFields } from "../CountryFields";
|
|
1
2
|
import type { CountryCode, ZonosSettingsQuery } from "../generated/graphql.internal.types";
|
|
2
3
|
export type GenericZonosSettings = {
|
|
3
4
|
/**
|
|
4
5
|
* Whether to enable company name input in the checkout.
|
|
5
6
|
*/
|
|
6
7
|
companyNameInputEnabled?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Country that should be enable the custom address fields in the checkout based on the country user is from.
|
|
10
|
+
*/
|
|
11
|
+
countryCustomAddressEnabled?: CountryCode[];
|
|
12
|
+
/**
|
|
13
|
+
* List of countries and
|
|
14
|
+
*/
|
|
15
|
+
countryFields?: Record<CountryCode, CountryFields>;
|
|
16
|
+
/**
|
|
17
|
+
* Use custom address fields in the checkout based on the country user is from.
|
|
18
|
+
*/
|
|
19
|
+
shouldEnabledCustomAddress?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Signed token for Google Places API iframe access.
|
|
22
|
+
*/
|
|
23
|
+
signedTokenGooglePlaces?: string;
|
|
7
24
|
/**
|
|
8
25
|
* List of countries that are allowed to use USD denominated cards for settlement.
|
|
9
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,a as n,l as t,h as o,b as r}from"./p-0fc02cde.js";import{_ as i,c as l}from"./p-fe253cc1.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-fe253cc1.js";export{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./p-5bd927f2.js";const a=["jsdelivr","cdnjs","unpkg","vercel"],u="jsdelivr",m=e=>{const n=a.indexOf(e);return a[n+1]||null},p=()=>{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.184.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.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 s=`https://${n}.preview.js.zonos.com`;return t(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' 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,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s},w="https://js.stripe.com/v3",f=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,h="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let y=null;const v=Promise.resolve().then((()=>{return e=null,null!==y||(y=new Promise(((n,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(h),window.Stripe)n(window.Stripe);else try{let o=(()=>{const e=document.querySelectorAll(`script[src^="${w}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&f.test(t.src))return t}return null})();o&&e?console.warn(h):o||(o=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${w}${n}`;const o=document.head||document.body;return o?(o.appendChild(t),t):(r("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==o||o.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):t(new Error("Stripe.js not available"))})),null==o||o.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else n(null)}))),y;var e}));let g=!1;v.catch((e=>{g||console.warn(e)}));const z=async({cartId:n,retries:s})=>{const r=e(),{errors:i,json:c,zonosMode:d}=await o("/api/zonos-elements/get-cart",{body:{isTestMode:r,tempCartUUID:n},headers:{"Content-Type":"application/json"},method:"POST"}),l=!c||i.length;return l&&s?(t("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:s}),await new Promise((e=>setTimeout(e,500))),z({cartId:n,retries:s-1})):l?null:Object.assign(Object.assign({},c),{zonosMode:d})};var S;const O=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),j="https://v1.3.184.js.zonos.com",b=O||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.184",k="https://fonts.googleapis.com",Z=/^https:\/\/fonts\.googleapis\.com/;class I{}S=I,I.doneInit=!1,I.cartSettings=null,I.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),I.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),I._paypalMockResponse=null,I.isBigCommerce=!1,I.releaseDate="1745332596232",I.isLegacyCheckout=!1,I.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",I.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),I.isNpm=!0,I.zonosQaUrl=null,I.zonosQaUrlApi=null,I.trackEventLogs=[],I.version="v1.3.184",I.modeAlerted=!1,I.cartData=null,I.paypal=null,I.zonosMode=null,I.getCurrentTimestamp=()=>(new Date).getTime(),I.zonosController=null,I.loadTimeApiInfoList=[],I.logIntervalId=null,I.init=async s=>{const{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w,storeId:f,zonosApiKey:h}=s;if(S.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),S.doneInit)return;if(t(`====== ZONOS DEBUG MODE: on (${S.version}) ======`),S.zonosApiKey=h,S.storeId=f,S.isNpm){t("====== ZONOS LOADING FROM NPM ======");const c=p();if(c&&!window.isZonosPreview){t(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${c} ======`,"info");const e=document.createElement("script");return e.src=`${c}/dist/scripts/zonos.js`,document.head.appendChild(e),e.addEventListener("load",(()=>{window.Zonos.isNpm=S.isNpm,window.Zonos.isBigCommerce=S.isBigCommerce,window.Zonos.isLegacyCheckout=S.isLegacyCheckout,window.Zonos.init(s)})),e.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${c}`)})),void(window.isZonosPreview=!0)}if(!h&&!S.cartId)return void r("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!S.cartData&&S.cartId){t("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=i(e);if(!o&&!n)return r("[ZONOS - loadZonos] invalid cart id"),null;const s=await z({cartId:e,retries:5});return t("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,window.Zonos.zonosMode=s.zonosMode,{cartData:s.cartData,settings:s.settings,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(r("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(S.cartId);if(!e)return void r("Failed to get cart data");S.cartData=e.cartData,S.zonosApiKey=e.zonosApiKey,S.cartSettings=e.settings}const d=await(async()=>{const s=e(),i=n();if(!s&&!i||!window.Zonos.zonosApiKey)return null;if(t("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return t("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:c,json:d}=await o("/api/get-test-public-credential");if(c.length||!d)return r("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",c),null;const l=d.publicCredential;return l?(t(`[ZONOS - loadZonos] Retrieve new test public token ${l}`,"info"),l):(r("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();d&&(S.zonosApiKey=d)}const y=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(S.cartId&&S.cartData||y){t("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=`${l}`,document.body.appendChild(e)}t("init zonos"),S.restoreNativeBrowserFunctions(),S.injectCustomScriptForHostedCheckout(),S.injectZonosCdn(),S.injectZonosCss(),S.injectFonts(),S.injectController({config:{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w}}),S.doneInit=!0},I.injectCustomScriptForHostedCheckout=()=>{const e=S.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),s=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||s)){if(o){t("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(s){t("Injecting custom footer script");const e=document.createElement("script");e.textContent=s.value,document.body.appendChild(e)}}else t("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},I.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},I.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},I.showNotification=e=>{var n;null===(n=S.zonosController)||void 0===n||n.showNotification(e)},I.updateOrganizationName=e=>{var n;null===(n=S.zonosController)||void 0===n||n.updateOrganizationName(e)},I.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},I.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let t=document.querySelector(`iframe#${n}`);t||(t=document.createElement("iframe"),t.id=n,t.style.display="none",t.style.opacity="0",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",t.style.width="1px",t.style.height="1px",t.style.border="none",t.style.overflow="hidden",t.style.visibility="hidden",document.body.appendChild(t));const o=(null===(e=t.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=o,document.body.removeChild(t)},I.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;S.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{S.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;S.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{S.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=e,s.zonosApiKey=S.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;t("loading Stripe");const o=await(async(...e)=>{g=!0;const n=Date.now();return v.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(n.publishableKey);o?(window.Zonos.stripe=o,s.initCheckoutElement(o)):r("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),S.zonosController=s,t("Zonos controller injected!")},I.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const s=`${S.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${s}"]`))return void t(`Zonos script "${s}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");n?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{r(`Failed to load ${c.src}`);const t=m(e);t&&S.injectScript({cdnType:t,isModule:n,theRestUrl:o})},i.appendChild(c)},I.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return b;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.184";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.184";case"vercel":return j}};return S.isNpm&&p()||n()},I.injectZonosCdn=()=>{S.injectScript({cdnType:u,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),S.injectScript({cdnType:u,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),t("Zonos cdn script injected!")},I.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const t=S.getZonosUrl(e),o=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${j}/`,o.appendChild(s);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${n}`,i.onerror=()=>{r(`Failed to load ${i.href}`);const t=m(e);t&&S.injectStylesheet({cdnType:t,theRestUrl:n})},o.appendChild(i)},I.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?t("Zonos style links already injected","warn"):(S.injectStylesheet({cdnType:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),t("Zonos style css injected!"))},I.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void t("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${k}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!Z.test(t.href))return t}return null})())return void t("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=k,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${k}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),t("Zonos font injected!")},I.setupGoogleFont=e=>{var n;null===(n=S.zonosController)||void 0===n||n.setupGoogleFont(e)},I.injectSupportGoogleFont=e=>{var n;t(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${k}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=k,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=e,s.appendChild(r),t(`[FONT] ${o} font injected!`)};export{I as Zonos}
|
|
1
|
+
import{g as e,I as n}from"./p-e7b0c156.js";import{g as o,a as t,l as r,h as i,b as l}from"./p-0fc02cde.js";import{_ as a,c as u}from"./p-fe253cc1.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-fe253cc1.js";export{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./p-5bd927f2.js";const m=["jsdelivr","cdnjs","unpkg","vercel"],p="jsdelivr",w=e=>{const n=m.indexOf(e);return m[n+1]||null},f=()=>{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.186.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.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},h="https://js.stripe.com/v3",y=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,v="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let g=null;const S=Promise.resolve().then((()=>{return e=null,null!==g||(g=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(v),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${h}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&y.test(o.src))return o}return null})();t&&e?console.warn(v):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${h}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(l("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)}))),g;var e}));let z=!1;S.catch((e=>{z||console.warn(e)}));const j=async({cartId:n,retries:t})=>{const s=o(),c=e(),d=new URLSearchParams;c.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",c.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:u}=await i(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:s,tempCartUUID:n},headers:{"Content-Type":"application/json"},method:"POST"}),m=!a||l.length;return m&&t?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:t}),await new Promise((e=>setTimeout(e,500))),j({cartId:n,retries:t-1})):m?null:Object.assign(Object.assign({},a),{zonosMode:u})};var O;const b=(()=>{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})(),k="https://v1.3.186.js.zonos.com",I=b||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.186",Z="https://fonts.googleapis.com",$=/^https:\/\/fonts\.googleapis\.com/;class L{}O=L,L.doneInit=!1,L.cartSettings=null,L.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),L.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),L._paypalMockResponse=null,L.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,L.isBigCommerce=!1,L.releaseDate="1745532544426",L.isLegacyCheckout=!1,L.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",L.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),L.overrideUseCustomAddressForm=!1,L.isNpm=!0,L.zonosQaUrl=null,L.zonosQaUrlApi=null,L.trackEventLogs=[],L.version="v1.3.186",L.modeAlerted=!1,L.cartData=null,L.paypal=null,L.zonosMode=null,L.IframeService=n,L.getCurrentTimestamp=()=>(new Date).getTime(),L.zonosController=null,L.loadTimeApiInfoList=[],L.logIntervalId=null,L.init=async e=>{const{appearance:n,checkoutSettings:s,currencyConverter:c,helloSettings:d,onCountryChange:m,overrideCurrencyFormat:p,storeId:w,zonosApiKey:h}=e;if(O.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),O.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${O.version}) ======`),O.zonosApiKey=h,O.storeId=w,O.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=f();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=O.isNpm,window.Zonos.isBigCommerce=O.isBigCommerce,window.Zonos.isLegacyCheckout=O.isLegacyCheckout,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!h&&!O.cartId)return void l("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!O.cartData&&O.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=a(e);if(!o&&!n)return l("[ZONOS - loadZonos] invalid cart id"),null;const t=await j({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}):(l("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(O.cartId);if(!e)return void l("Failed to get cart data");O.cartData=e.cartData,O.zonosApiKey=e.zonosApiKey,O.cartSettings=e.settings}const s=await(async()=>{const e=o(),n=t();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:s,json:c}=await i("/api/get-test-public-credential");if(s.length||!c)return l("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",s),null;const d=c.publicCredential;return d?(r(`[ZONOS - loadZonos] Retrieve new test public token ${d}`,"info"),d):(l("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();s&&(O.zonosApiKey=s)}const y=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(O.cartId&&O.cartData||y){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=`${u}`,document.body.appendChild(e)}r("init zonos"),O.restoreNativeBrowserFunctions(),O.injectCustomScriptForHostedCheckout(),O.injectZonosCdn(),O.injectZonosCss(),O.injectFonts(),O.injectController({config:{appearance:n,checkoutSettings:s,currencyConverter:c,helloSettings:d,onCountryChange:m,overrideCurrencyFormat:p}}),O.doneInit=!0},L.injectCustomScriptForHostedCheckout=()=>{const e=O.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})},L.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},L.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},L.showNotification=e=>{var n;null===(n=O.zonosController)||void 0===n||n.showNotification(e)},L.updateOrganizationName=e=>{var n;null===(n=O.zonosController)||void 0===n||n.updateOrganizationName(e)},L.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)}},L.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)},L.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;O.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{O.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;O.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{O.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=O.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{z=!0;const n=Date.now();return S.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,t.initCheckoutElement(o)):l("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),O.zonosController=t,r("Zonos controller injected!")},L.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${O.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=()=>{l(`Failed to load ${i.src}`);const t=w(e);t&&O.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},L.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return I;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.186";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.186";case"vercel":return k}};return O.isNpm&&f()||n()},L.injectZonosCdn=()=>{O.injectScript({cdnType:p,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),O.injectScript({cdnType:p,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},L.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=O.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${k}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{l(`Failed to load ${r.href}`);const o=w(e);o&&O.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},L.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(O.injectStylesheet({cdnType:p,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},L.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${Z}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!$.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=Z,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${Z}/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!")},L.setupGoogleFont=e=>{var n;null===(n=O.zonosController)||void 0===n||n.setupGoogleFont(e)},L.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^="${Z}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=Z,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!`)};export{L as Zonos}
|