@zonos/elements 1.3.246 → 1.3.247
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/ShortAddressCode-bec338b0.js +7 -0
- package/dist/cjs/{cart-52cf3366.js → cart-97a2d20a.js} +35 -6
- package/dist/cjs/getContrastColor-30848800.js +37 -0
- package/dist/cjs/{hasInclusivePrice-dbb82df8.js → hasInclusivePrice-134b0250.js} +1 -1
- package/dist/cjs/index.cjs.js +9 -7
- package/dist/cjs/{invoice-972f1ab3.js → invoice-05a10ee1.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-edd4804c.js} +2 -2
- package/dist/cjs/isContrastColor-09f5924a.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-b1075a8c.js → localization-00e73920.js} +180 -0
- package/dist/cjs/{paypal-e339cc8c.js → paypal-0b4b352b.js} +4 -12
- package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-07b46688.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-dd3b0609.js} +2 -2
- package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
- package/dist/cjs/zonos-address-display_9.cjs.entry.js +35 -5
- package/dist/cjs/zonos-address_4.cjs.entry.js +37 -7
- package/dist/cjs/zonos-card_5.cjs.entry.js +4 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +65 -44
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -5
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +5 -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-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- 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 +7 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +5 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +18 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +22 -3
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
- package/dist/collection/components/store/checkout/stripe.js +32 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
- package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
- package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
- package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +135 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/ShortAddressCode-7620e622.js +5 -0
- package/dist/esm/{cart-7f4704dc.js → cart-99ec4a3d.js} +35 -6
- package/dist/esm/getContrastColor-28c18704.js +35 -0
- package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm/index.js +8 -7
- package/dist/esm/{invoice-d3d256fb.js → invoice-44e97c22.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +2 -2
- package/dist/esm/isContrastColor-69778cea.js +10 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
- package/dist/esm/{paypal-61270b79.js → paypal-56534e48.js} +4 -11
- package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +2 -2
- package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
- package/dist/esm/zonos-address-display_9.entry.js +35 -5
- package/dist/esm/zonos-address_4.entry.js +37 -7
- package/dist/esm/zonos-card_5.entry.js +4 -3
- package/dist/esm/zonos-cart-items_12.entry.js +65 -44
- package/dist/esm/zonos-checkout.entry.js +6 -5
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
- package/dist/esm/zonos-collect.entry.js +5 -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-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- 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 +7 -6
- package/dist/esm/zonos-invoice.entry.js +5 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
- package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
- package/dist/esm-es5/cart-99ec4a3d.js +1 -0
- package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-d3d256fb.js → invoice-44e97c22.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +1 -1
- package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-853b48a9.js +1 -0
- package/dist/esm-es5/paypal-56534e48.js +17 -0
- package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +1 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
- package/dist/esm-es5/zonos-address-display_9.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-elements.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-shipping-rich-radio.entry.js +1 -1
- package/dist/scripts/index.d.ts +50 -4
- 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-customer-info/zonos-customer-info.d.ts +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +8 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
- package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
- package/dist/types/components.d.ts +32 -0
- package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +1 -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 +157 -30
- package/dist/types/types/generated/graphql.internal.types.ts +194 -37
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-08365fdb.system.js +1 -0
- package/dist/zonos-elements/p-09aabce0.js +1 -0
- package/dist/zonos-elements/p-0c201c39.system.entry.js +1 -0
- package/dist/zonos-elements/p-0cb5f151.system.entry.js +1 -0
- package/dist/zonos-elements/{p-367c13db.system.entry.js → p-10355cf6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-288aab46.js → p-1b86711b.js} +1 -1
- package/dist/zonos-elements/p-1d42cd20.js +1 -0
- package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
- package/dist/zonos-elements/p-2c10b067.system.entry.js +1 -0
- package/dist/zonos-elements/p-2e8f842c.entry.js +1 -0
- package/dist/zonos-elements/{p-67820c21.system.entry.js → p-2f55895c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
- package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-382601a9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3e2f175c.entry.js +1 -0
- package/dist/zonos-elements/{p-cee69784.entry.js → p-403b9fca.entry.js} +1 -1
- package/dist/zonos-elements/p-41299ffb.js +1 -0
- package/dist/zonos-elements/p-443e1f30.system.js +1 -0
- package/dist/zonos-elements/{p-a79f3685.js → p-46ece7ae.js} +1 -1
- package/dist/zonos-elements/p-48d55793.system.js +1 -0
- package/dist/zonos-elements/p-5295d36e.entry.js +1 -0
- package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-53a9da45.entry.js} +1 -1
- package/dist/zonos-elements/p-63a383f4.js +1 -0
- package/dist/zonos-elements/{p-a3411f20.entry.js → p-64870563.entry.js} +1 -1
- package/dist/zonos-elements/p-655ec440.system.js +1 -0
- package/dist/zonos-elements/{p-415c2a90.system.js → p-678331f0.system.js} +1 -1
- package/dist/zonos-elements/p-695e0803.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
- package/dist/zonos-elements/p-6e3cf6eb.entry.js +1 -0
- package/dist/zonos-elements/p-6f430d6f.system.entry.js +1 -0
- package/dist/zonos-elements/p-71185d24.system.js +1 -0
- package/dist/zonos-elements/p-786d1c24.js +1 -0
- package/dist/zonos-elements/p-794d29dc.entry.js +1 -0
- package/dist/zonos-elements/{p-87206522.system.entry.js → p-7b400b5f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a88a130.entry.js → p-83377e23.entry.js} +1 -1
- package/dist/zonos-elements/p-8defdf0d.system.js +17 -0
- package/dist/zonos-elements/p-8e98a7c8.js +1 -0
- package/dist/zonos-elements/{p-2889a485.system.entry.js → p-95348ebf.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9a066833.system.entry.js +1 -0
- package/dist/zonos-elements/p-aa6c2348.system.entry.js +1 -0
- package/dist/zonos-elements/p-ada8841a.js +1 -0
- package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
- package/dist/zonos-elements/p-af85846e.system.js +1 -0
- package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/p-c75b7c47.entry.js +1 -0
- package/dist/zonos-elements/p-caff391d.system.entry.js +1 -0
- package/dist/zonos-elements/p-ce98e472.js +1 -0
- package/dist/zonos-elements/{p-3f46d83e.entry.js → p-d0411b2d.entry.js} +1 -1
- package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
- package/dist/zonos-elements/p-dca14319.system.js +1 -0
- package/dist/zonos-elements/p-dd19d9d8.js +17 -0
- package/dist/zonos-elements/{p-e0809901.system.js → p-df6e62f8.system.js} +1 -1
- package/dist/zonos-elements/p-df90bccf.entry.js +1 -0
- package/dist/zonos-elements/p-e07aaf09.system.js +1 -0
- package/dist/zonos-elements/p-e458f737.entry.js +1 -0
- package/dist/zonos-elements/p-eea7ac64.js +1 -0
- package/dist/zonos-elements/p-f6f1d779.system.entry.js +1 -0
- package/dist/zonos-elements/p-f8eb618b.entry.js +1 -0
- package/dist/zonos-elements/p-fe96e239.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-7f4704dc.js +0 -1
- package/dist/esm-es5/localization-401ec6d4.js +0 -1
- package/dist/esm-es5/paypal-61270b79.js +0 -17
- package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
- package/dist/zonos-elements/p-01b0a2e2.js +0 -1
- package/dist/zonos-elements/p-095f43ec.entry.js +0 -1
- package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
- package/dist/zonos-elements/p-21fb6b39.js +0 -1
- package/dist/zonos-elements/p-2601538e.entry.js +0 -1
- package/dist/zonos-elements/p-276faa43.js +0 -1
- package/dist/zonos-elements/p-27874c22.entry.js +0 -1
- package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
- package/dist/zonos-elements/p-2d2c627a.system.js +0 -1
- package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
- package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
- package/dist/zonos-elements/p-518b501c.system.entry.js +0 -1
- package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
- package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
- package/dist/zonos-elements/p-6c29de12.entry.js +0 -1
- package/dist/zonos-elements/p-74e258ff.system.js +0 -1
- package/dist/zonos-elements/p-775c1122.system.js +0 -1
- package/dist/zonos-elements/p-7a6ab319.system.entry.js +0 -1
- package/dist/zonos-elements/p-85430ec1.js +0 -1
- package/dist/zonos-elements/p-872f9c22.system.entry.js +0 -1
- package/dist/zonos-elements/p-95524f54.js +0 -1
- package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-a0a62b7e.js +0 -17
- package/dist/zonos-elements/p-a556ec07.system.js +0 -17
- package/dist/zonos-elements/p-a6489088.js +0 -1
- package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
- package/dist/zonos-elements/p-bd10e82a.system.entry.js +0 -1
- package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
- package/dist/zonos-elements/p-c6aa780e.entry.js +0 -1
- package/dist/zonos-elements/p-d1effb76.system.js +0 -1
- package/dist/zonos-elements/p-e7543082.system.js +0 -1
- package/dist/zonos-elements/p-e7df8394.entry.js +0 -1
- package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
- package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
- package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
- package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(r,e,t,o){function n(r){return r instanceof t?r:new t((function(e){e(r)}))}return new(t||(t=Promise))((function(t,a){function i(r){try{c(o.next(r))}catch(r){a(r)}}function u(r){try{c(o["throw"](r))}catch(r){a(r)}}function c(r){r.done?t(r.value):n(r.value).then(i,u)}c((o=o.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(r){return function(e){return c([r,e])}}function c(u){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(o=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;n=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=e.call(r,t)}catch(r){u=[6,r];n=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-b434e436.js";import{t as trackConversionEvent,A as validateCheckoutSession,b as stripeStore,d as cartStore,v as stripeStoreHandleInventoryCheck,r as cartStoreNextStep,h as cartStoreClearCheckoutInterval}from"./cart-7f4704dc.js";import{t as translate,s as storageStore}from"./localization-401ec6d4.js";import{h as handleFetch,l as logError,j as jsonParse}from"./handleFetch-a844cac1.js";import{t as tinycolor}from"./isDarkColor-9ddd90cc.js";import{l as log}from"./VarianceTest-572cecf5.js";
|
|
2
|
-
/*!
|
|
3
|
-
* paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
|
|
4
|
-
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/function findScript(r,e){var t=document.querySelector('script[src="'.concat(r,'"]'));if(t===null)return null;var o=createScriptElement(r,e);var n=t.cloneNode();delete n.dataset.uidAuto;if(Object.keys(n.dataset).length!==Object.keys(o.dataset).length){return null}var a=true;Object.keys(n.dataset).forEach((function(r){if(n.dataset[r]!==o.dataset[r]){a=false}}));return a?t:null}function insertScriptElement(r){var e=r.url,t=r.attributes,o=r.onSuccess,n=r.onError;var a=createScriptElement(e,t);a.onerror=n;a.onload=o;document.head.insertBefore(a,document.head.firstElementChild)}function processOptions(r){var e=r.environment;var t=e==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete r.environment;if(r.sdkBaseUrl){t=r.sdkBaseUrl;delete r.sdkBaseUrl}var o=r;var n=Object.keys(o).filter((function(r){return typeof o[r]!=="undefined"&&o[r]!==null&&o[r]!==""})).reduce((function(r,e){var t=o[e].toString();e=camelCaseToKebabCase(e);if(e.substring(0,4)==="data"||e==="crossorigin"){r.attributes[e]=t}else{r.queryParams[e]=t}return r}),{queryParams:{},attributes:{}}),a=n.queryParams,i=n.attributes;if(a["merchant-id"]&&a["merchant-id"].indexOf(",")!==-1){i["data-merchant-id"]=a["merchant-id"];a["merchant-id"]="*"}return{url:"".concat(t,"?").concat(objectToQueryString(a)),attributes:i}}function camelCaseToKebabCase(r){var e=function(r,e){return(e?"-":"")+r.toLowerCase()};return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,e)}function objectToQueryString(r){var e="";Object.keys(r).forEach((function(t){if(e.length!==0)e+="&";e+=t+"="+r[t]}));return e}function createScriptElement(r,e){if(e===void 0){e={}}var t=document.createElement("script");t.src=r;Object.keys(e).forEach((function(r){t.setAttribute(r,e[r]);if(r==="data-csp-nonce"){t.setAttribute("nonce",e["data-csp-nonce"])}}));return t}function loadScript(r,e){if(e===void 0){e=Promise}validateArguments(r,e);if(typeof document==="undefined")return e.resolve(null);var t=processOptions(r),o=t.url,n=t.attributes;var a=n["data-namespace"]||"paypal";var i=getPayPalWindowNamespace(a);if(!n["data-js-sdk-library"]){n["data-js-sdk-library"]="paypal-js"}if(findScript(o,n)&&i){return e.resolve(i)}return loadCustomScript({url:o,attributes:n},e).then((function(){var r=getPayPalWindowNamespace(a);if(r){return r}throw new Error("The window.".concat(a," global variable is not available."))}))}function loadCustomScript(r,e){if(e===void 0){e=Promise}validateArguments(r,e);var t=r.url,o=r.attributes;if(typeof t!=="string"||t.length===0){throw new Error("Invalid url.")}if(typeof o!=="undefined"&&typeof o!=="object"){throw new Error("Expected attributes to be an object.")}return new e((function(r,e){if(typeof document==="undefined")return r();insertScriptElement({url:t,attributes:o,onSuccess:function(){return r()},onError:function(){var r=new Error('The script "'.concat(t,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return e(r)}})}))}function getPayPalWindowNamespace(r){return window[r]}function validateArguments(r,e){if(typeof r!=="object"||r===null){throw new Error("Expected an options object.")}var t=r.environment;if(t&&t!=="production"&&t!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof e!=="undefined"&&typeof e!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var paypalCaptureOrder=function(r){return __awaiter(void 0,[r],void 0,(function(r){var e,t,o;var n=r.checkoutSessionId,a=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:return[4,handleFetch("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:n,paypalMockResponse:a},method:"POST"})];case 1:e=r.sent(),t=e.errors,o=e.json;return[2,{errors:t,json:o}]}}))}))};var paypalCreateOrder=function(r){return __awaiter(void 0,[r],void 0,(function(r){var e,t,o;var n=r.checkoutSessionId,a=r.intent;return __generator(this,(function(r){switch(r.label){case 0:return[4,handleFetch("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:n,intent:a},method:"POST"})];case 1:e=r.sent(),t=e.errors,o=e.json;return[2,{errors:t,json:o}]}}))}))};var isContrastColor=function(r){var e=r.backgroundColor1,t=r.backgroundColor2;var o=tinycolor.readability(e,t);return o>2.5};var submitGtag=function(r){var e=zonosStore.checkoutSettings.analyticsProviders.find((function(r){return r.type==="GOOGLE_ANALYTICS"}));if(!e||(e===null||e===void 0?void 0:e.status)==="DISABLED"){return}if(typeof window.gtag==="function"){log("Zonos submits gtag event","log",r);window.gtag("event",r,{})}};var _c=createStore((function(){return{intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),paypalStoreOnChange=_c.onChange,paypalStoreReset=_c.reset,paypalStore=_c.state;var paypalStoreCreaterOrder=function(r){return __awaiter(void 0,[r],void 0,(function(r){var e,t,o,n,a,i,u;var c=r.checkoutSessionId;return __generator(this,(function(r){switch(r.label){case 0:o=paypalStore.intent.toUpperCase();return[4,paypalCreateOrder({checkoutSessionId:c,intent:o})];case 1:n=r.sent(),a=n.errors,i=n.json;u=(e=i===null||i===void 0?void 0:i.paypalOrderCreate)===null||e===void 0?void 0:e.paypalOrderId;if(a.length||!u){throw new Error(((t=a.find(Boolean))===null||t===void 0?void 0:t.message)||"An unexpected error occurred when creating paypal order.")}return[2,u]}}))}))};var paypalStoreCaptureOrder=function(r){return __awaiter(void 0,[r],void 0,(function(r){var e,t,o,n,a,i;var u=r.checkoutSessionId,c=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:return[4,paypalCaptureOrder({checkoutSessionId:u,paypalMockResponse:c})];case 1:o=r.sent(),n=o.errors,a=o.json;i=(e=a===null||a===void 0?void 0:a.paypalOrderCapture.order)===null||e===void 0?void 0:e.id;if(n.length||!i){throw new Error(((t=n.find(Boolean))===null||t===void 0?void 0:t.message)||translate("An unexpected error occurred when processing PayPal order."))}return[2,i]}}))}))};var paypalErrorHandler=function(r){var e=r.error;var t;var o=jsonParse(e.message);var n=(t=o===null||o===void 0?void 0:o.errors.find(Boolean))===null||t===void 0?void 0:t.message;var a=(n===null||n===void 0?void 0:n.match(/\[(.*?)\] (.*)/i))||[];if(!a){paypalStore.paypalErrorMessage=translate("An unexpected error occurred when processing PayPal order.")}var i=a[2]||translate("An unexpected error occurred when processing PayPal order.");paypalStore.paypalErrorMessage=i};var paypalButtonOptions=function(r){var e=r.checkoutSessionId,t=r.onPaypalFail,o=r.onPaypalSessionDone,n=r.overrideBorderRaidus,a=r.overridePrimaryColor;var i=a||zonosStore.appearance.colorPrimary;var u="#ffc33a";var c=isContrastColor({backgroundColor1:u,backgroundColor2:i||""});return{createOrder:function(){return __awaiter(void 0,void 0,void 0,(function(){var r,o,n,a,i;return __generator(this,(function(u){switch(u.label){case 0:void trackConversionEvent({checkoutSessionId:e,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}});return[4,validateCheckoutSession()];case 1:r=u.sent();if(!r.valid){paypalStore.paypalErrorMessage=r.errorMessage;stripeStore.hasPaymentError=false;stripeStore.customErrorMessage=null;t===null||t===void 0?void 0:t();return[2,""]}u.label=2;case 2:u.trys.push([2,8,,9]);paypalStore.paypalErrorMessage=null;cartStore.inventoryCheckErrorMessage=null;u.label=3;case 3:u.trys.push([3,5,,6]);o=cartStore;return[4,stripeStoreHandleInventoryCheck()];case 4:o.inventoryCheckErrorMessage=u.sent();return[3,6];case 5:n=u.sent();cartStore.inventoryCheckErrorMessage=translate("Unable to check inventory. Please try again.");return[3,6];case 6:if(cartStore.inventoryCheckErrorMessage){return[2,""]}return[4,paypalStoreCreaterOrder({checkoutSessionId:e})];case 7:a=u.sent();return[2,a];case 8:i=u.sent();logError("Failed to create paypal order",i);paypalStore.paypalErrorMessage=translate("Failed to create PayPal order. Please try again, or consider using an alternative method.");stripeStore.hasPaymentError=false;stripeStore.customErrorMessage=null;t===null||t===void 0?void 0:t();return[2,""];case 9:return[2]}}))}))},onApprove:function(r,n){return __awaiter(void 0,void 0,void 0,(function(){var r,n;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);paypalStore.paypalErrorMessage=null;submitGtag("zonos-checkout-payment-info");return[4,paypalStoreCaptureOrder({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:r=a.sent();paypalStore.orderIdCreated=r;o===null||o===void 0?void 0:o({orderId:r});cartStoreNextStep();cartStoreClearCheckoutInterval();return[3,3];case 2:n=a.sent();logError("==== Failed to capture paypal order",n);if(n instanceof Error){return[2,paypalErrorHandler({error:n})]}t===null||t===void 0?void 0:t();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:n==="SHARP"?0:10,color:c?"gold":"blue",shape:"rect"}}};var paypalStoreResetButtons=function(){if(!paypalStore.paypalButtons.length){return}paypalStore.paypalButtons.forEach((function(r){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,r.close()];case 1:e.sent();return[2]}}))}))}));paypalStore.paypalButtons=[]};var paypalInitScript=function(r){return __awaiter(void 0,[r],void 0,(function(r){var e,t,o,n,a,i;var u=r.currency;return __generator(this,(function(r){switch(r.label){case 0:t=!!((e=zonosStore.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(r){return r.type==="PAYPAL"&&r.status==="ENABLED"})));if(!t){log("=== Paypal is disabled for this store","warn");return[2]}o=zonosStore.checkoutSettings.externalServiceTokens.find((function(r){return r.type==="PAYPAL_CLIENT_ID"}));if(!o){log("Failed to load paypal -- missing paypal publishable key","warn");return[2]}n=(!zonosStore.zonosMode||zonosStore.zonosMode==="production")&&zonosStore.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=zonosStore.checkoutSettings.captureDelay&&zonosStore.checkoutSettings.captureDelay>0;paypalStore.intent=a?"authorize":"capture";log("==== Paypal order intent","info",paypalStore.intent);i=window.Zonos;return[4,loadScript({clientId:o.token,currency:u,environment:n,intent:paypalStore.intent})];case 1:i.paypal=r.sent();paypalStore.paypal=window.Zonos.paypal;log("==== Paypal script loaded");return[2]}}))}))};var paypalStoreInitButtons=function(r){var e;var t=window.Zonos.paypal;if(!t){log("Paypal is not available");return null}var o=storageStore.checkoutSessionId;if(!o){log("Paypal is not available due to checkoutSessionId is not available");return null}log("==== Loading Paypal buttons");paypalStoreResetButtons();var n=[(e=t.FUNDING)===null||e===void 0?void 0:e.PAYPAL].filter(Boolean);paypalStore.paypalButtons=n.map((function(e){var n;var a=null;try{a=((n=t.Buttons)===null||n===void 0?void 0:n.call(t,Object.assign(Object.assign({},paypalButtonOptions(Object.assign({checkoutSessionId:o,fundingSource:e},r))),{fundingSource:e})))||null}catch(r){log("===== Failed to load paypal's \"".concat(e,'" button'),"warn",r)}if(a===null||a===void 0?void 0:a.isEligible()){log("==== Paypal button ".concat(e," loaded"));return a}return null})).filter(Boolean);return paypalStore.paypalButtons};var paypalStoreHasPaypalEnabled=function(){var r,e;var t=((e=(r=zonosStore.checkoutSettings.externalPaymentMethods)===null||r===void 0?void 0:r.find((function(r){return r.type==="PAYPAL"})))===null||e===void 0?void 0:e.status)==="ENABLED";return t||!!paypalStore.paypalButtons.length};export{paypalStore as a,paypalInitScript as b,paypalStoreReset as c,paypalStoreInitButtons as d,paypalStoreOnChange as e,isContrastColor as i,paypalStoreHasPaypalEnabled as p,submitGtag as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as euCountryCodes,c as countryRequireTaxId}from"./TaxId-50d72254.js";var isInTaxIdCountry=function(r){return countryRequireTaxId.includes(r)};var shouldRenderTaxIdInput=function(r){var u=r.companyName,e=r.countryCode;if(euCountryCodes.includes(e)){return u.trim().length>0}var n=isInTaxIdCountry(e);if(n){return true}return false};export{shouldRenderTaxIdInput as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as o,c as r}from"./p-6b361d2b.js";const s=({companyName:s,countryCode:t})=>{if(o.includes(t))return s.trim().length>0;const e=(o=>r.includes(o))(t);return!!e};export{s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as e,h as s,F as t,H as n,a as i}from"./p-ab41bab5.js";import{b as a,c as r,t as l,H as c,y as d,I as h,d as p,r as m,z as f}from"./p-a6489088.js";import{s as b,c as u,a as g,b as y}from"./p-a0a62b7e.js";import{t as v,s as z,l as x}from"./p-21fb6b39.js";import{z as w}from"./p-b2a0ab4a.js";import{h as k,s as C,g as L,i as I,a as S}from"./p-41dd1cb8.js";import{c as j}from"./p-595f5dd2.js";import{g as M}from"./p-1f894984.js";import{l as H,b as P}from"./p-0a377722.js";import{i as Z,a as _}from"./p-1f3549c6.js";import{c as U}from"./p-b4b7f705.js";import{l as V}from"./p-97aceb11.js";import{c as D}from"./p-a79f3685.js";import{r as B}from"./p-95524f54.js";import{p as $}from"./p-276faa43.js";import{r as F}from"./p-27f6930b.js";import"./p-57fa64d7.js";const R=class{constructor(s){o(this,s),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=v("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const s=z.checkoutSessionId,t=new URLSearchParams;t.set("checkoutSessionId",s||"");const{baseUrl:n,errors:i,json:a}=await k(`/api/zonos-elements/get-order?${t.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=w.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,s;0===o&&H("=== Start to poll for order info","info");const{baseUrl:t,order:n}=await this.pullOrder(),i=!!(null===(s=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===s?void 0:s.value),a=z.checkoutSessionId,r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;H(`=== Polling order (${o} attemps)`,"info"),n?(H("=== InvoiceOrder info found","info"),o>10&&C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Invoice order found after ${o} attempts`],metadata:{allLogs:P,checkoutSessionId:z.checkoutSessionId||"",orderId:n.id,storeId:w.storeId}}),this.order=n):n&&i||!(o<r)?C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Invoice order not found after ${r} attempts`],metadata:{allLogs:P,checkoutSessionId:z.checkoutSessionId||"",storeId:w.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:s,status:t}=await r({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===t||e;this.notificationType=n?"error":"success",this.notificationMessages=s||[],this.notificationTitle=v(n?"Payment failed":"You're all set!"),H("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:s,status:t});const i=new URL(window.location.href);if(i.searchParams.delete("payment_intent_client_secret"),i.searchParams.delete("payment_intent"),i.searchParams.delete("redirect_status"),i.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",i.toString()),e&&(null==s?void 0:s.length))b("zonos-checkout-payment-fail"),C({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${t} - checkout session: ${z.checkoutSessionId}`],metadata:{allLogs:P,credentialToken:window.Zonos.zonosApiKey}});else{b("zonos-checkout-success"),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=j("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,c(),d(),z.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=v("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),c(),d(),u(),z.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(g.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=v("Payment failed"),this.notificationMessages=[g.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,g.orderIdCreated&&(b("zonos-checkout-success"),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=v("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),c(),d(),u(),z.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),L()&&e.searchParams.set("zonosTestMode","1");const s=new URLSearchParams(window.location.search).get("zonosQaUrl");return s&&e.searchParams.set("zonosQaUrl",s),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():g.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return s(n,{key:"2d8d736241298daa30fdf8935cef67bfa748e2df",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&s("div",{key:"30e1eae6e9ac7289af88f8fe2048d40796dfdf0e",class:"zonos--finish-details"},s("div",{key:"0324e34b72e58d0862ed319576018bd45bd18b18",class:"zonos--group"},s("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"red-800",size:50}),s("zonos-text",{key:"227f3cdda8e9cb0ed15ea91acb88c88d15d3d21c",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&s("zonos-badge",{key:"1458ad439dc56e9ca7641a9ca95f3dfb2fd6b28f",badgeColor:"gray"},this.confirmationId),s("zonos-text",{key:"8b0ab258c7beab09b0bc12999198f38813a144b3",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>s(t,null,o,s("br",null))))),this.order&&o&&s("div",{key:"ea6b4f8c1f8cce779fadf358966fece018d9869b",class:"zonos--button-container"},s("zonos-button",{key:"e5140fa1fab1e3150a2b15915c29d988f54468b2",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},v("View receipt"))))))}static get assetsDirs(){return["assets"]}};R.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const T=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=Z(this.mobile)}handleTabletChange(){this.isTablet=_(this.tablet)}componentWillLoad(){this.isMobile=Z(this.mobile),this.isTablet=_(this.tablet)}render(){var o;const e=null===(o=V.find((o=>o.code===x.selectedLocale)))||void 0===o?void 0:o.label,t="gray-1000";return s(n,{key:"c84163fd8ab0bc0f2c791028b6896379a4ae6a27",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"099a3be332fa52c5e7551bdd2a618041c4a6eb22",class:"zonos--invoice-footer"},s("div",{key:"ab727f45f3a67bcdd51eb29b392462f15eb5fedd",class:"zonos--invoice-locale-wrapper"},s("zonos-button",{key:"3d8431c78d54e0fe630677d0dd4ae2c975a208fa",buttonColor:t,class:"zonos--invoice-footer-language-button",icon:s("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:t}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},e),s("div",{key:"2920b4105b6209c4177fc91651dc5d9397d6abf2",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},s("zonos-language-select",{key:"705e1a4243dc7ebc73c522a82f93c3d833240a95",handleOnClose:()=>this.toggleLanguageDialog()}))),s("div",{key:"49c2d0ae1f587079b48f12d62d10eb422991255e",class:"zonos--invoice-footer-icon-wrapper"},s("div",{key:"58a4da788527ddf4abd759b5e305e747aa96d540",class:"zonos--invoice-footer-logo"},s("zonos-text",{key:"45bf1af64ec0f0a2e11e8d23361b71f4b4189881",textColor:t},v("Powered by")),s("a",{key:"1dd7224f3e126bcabe60a42c9529ab65c64f0063",href:"https://zonos.com",target:"_blank",title:"Zonos website"},s("zonos-icon",{key:"7dc21ce09b72bf37efd30e2c17b6d8b9328e8c3d",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),s("div",{key:"a0d053e6745733cd61868c109628a1835f4fe3ed",class:"dot"}),s("a",{key:"fd467e88aa2ed10b707f88ed0d1a5af80af35539",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},s("zonos-text",{key:"35db684368ff8abc05c2c7fab22500270b0b7e21",textColor:t},v("Privacy policy"))))))}get el(){return i(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};T.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}";const W=class{constructor(s){o(this,s),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=I(this.mobile)}componentWillLoad(){this.handleWindowResize()}render(){return s(n,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},s("div",{class:"zonos--wrapper"},s("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},s("div",{class:"zonos--order-details-header-text"},s("zonos-text",{type:"boldSubheader"},v("Pay [organizationName]",{organizationName:w.organizationName})),(()=>s("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}))()),s("zonos-text",{type:"boldSubheader"},B({amount:D.amountTotalDue||0,isForeign:!0}))),s("div",{class:"zonos--order-details-wrapper"},s("zonos-collapse",{collapsed:this.collapseState},s("div",{class:"zonos--invoice-order-details-content"},s("zonos-invoice-cart-items",{isMobile:this.isMobile}),s("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};W.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(s){o(this,s),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,s;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(s=a.stripeElements)||void 0===s||s.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,b("zonos-checkout-payment-info"),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const s=document.createElement("textarea");s.style.position="fixed",s.style.left="-1000px",s.style.top="-1000px",s.style.width="1px",s.style.height="1px",s.value=o,s.id="zonos-copy-card-number",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}window.Zonos.showNotification({message:v("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await $();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{y({currency:p.currency})}))],y({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=L(),i=p.isStagingMode||S(),r="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return s(n,{class:"zonos--checkout-payment zonos--elements"},s("div",{class:"zonos--group"},s("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},v("Payment method")),(()=>{if(i){const o=w.appearance.theme;return s(t,null,this.stagingOrderCreateErrorMessage&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),s("zonos-empty-state-payment",{emptyStateText:v("No payment method needed for staging"),theme:o}),s("div",{class:"zonos--group-btn"},s("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},v("Place test order"))))}return a.isFetchingSession||D.isFetchingPayorInfo?null:s(t,null,this.showErrorBanner&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},v("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||v("We couldn't complete your payment. Please verify the payment details and try again.")),g.paypalErrorMessage&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},g.paypalErrorMessage),s("zonos-payment",null),s("div",{class:"zonos--group-btn"},!r&&s(t,null,s("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):H("Checkout session is not found")},size:"lg",variant:this.submitBtnType},v("Pay [orderTotal]",{orderTotal:B({amount:D.amountTotalDue||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&s("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},v("Click to pay in USD"))),s("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:r?"block":"none"}})),e&&s("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},s("zonos-v-stack",{spacing:16},s("div",null,s("zonos-text",{type:"semiBoldLabel"},v("Test cards")),s("zonos-text",{textColor:"gray-700"},v("Click to copy the card number. Use any future expiration date and three number CVC."))),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},v("Success")," (****4242)"),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},v("Failure")," (****0002)")),s("zonos-notification",null)))})()))}get ele(){return i(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}";const O=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=Z(this.mobile),this.isTablet=_(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return s(n,{key:"60da23c47f39a94478f1eb83e003b788aab3b98c",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"70bbb1973ec1c7197da666ba30be6dc6a20bd386",class:"zonos--title"},s("zonos-text",{key:"35ffffa411ccde7c702b5d5ac3f11d7a8d62916f",textColor:o,type:"semiBoldLabel"},v("Pay [organizationName]",{organizationName:w.organizationName}))),s("div",{key:"c965e47314d1c3178b1dd2e54e835c0b91966a81",class:"zonos--total-pay"},F({content:s("zonos-text",{type:"secondaryPageHeader"},B({amount:D.amountTotalDue||0,isForeign:!0})),isLoading:D.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};O.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';export{R as zonos_invoice_finish,T as zonos_invoice_footer,W as zonos_invoice_order_details,N as zonos_invoice_payment,O as zonos_invoice_review}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as s,H as t,a as i}from"./p-ab41bab5.js";import{l as a}from"./p-21fb6b39.js";import{f as n}from"./p-b2a0ab4a.js";import{c as e}from"./p-b4b7f705.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";const h=class{constructor(s){o(this,s),this.countryCode=a.selectedCountryCode}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const o=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=n();return s(t,{class:"zonos--elements",style:this.size?{"--zonos--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--zonos--font-family":i}},s("div",{class:e(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${o})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
|