@zonos/elements 1.5.0 → 1.5.1
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/{TaxId-Q6aDqqWv.js → TaxId-ChhNwG04.js} +36 -0
- package/dist/cjs/{cart-B6Aty-21.js → cart-CiXlehwQ.js} +88 -52
- package/dist/cjs/{collect-DnrvaXUI.js → collect-Drr8fY-q.js} +3 -3
- package/dist/cjs/{debounce-Cd2emZPn.js → debounce-BhgA8_3W.js} +2 -2
- package/dist/cjs/{debounce-vY0QYT6o.js → debounce-DRPMxNew.js} +1 -1
- package/dist/cjs/{getBorderRadius-CyYZw4qq.js → getBorderRadius-CJ_95w3o.js} +1 -1
- package/dist/cjs/{getMissingRequiredShippingFields-D03ICqss.js → getMissingRequiredShippingFields-DI6qF1z3.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-CPCoVeU3.js → hasInclusivePrice-84KS94yH.js} +1 -1
- package/dist/cjs/index.cjs.js +19 -8
- package/dist/cjs/{invoice-Cj8W7NW0.js → invoice-5hVfSXpb.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-BzNeXeDe.js → localization-B2mjW0Xa.js} +701 -41
- package/dist/cjs/{paypal-CuKshRmZ.js → paypal-pd8Nz_R_.js} +4 -4
- package/dist/cjs/{placeTestOrder-7czjwkjm.js → placeTestOrder-DrI8rD9o.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-BH8t2b2x.js → renderCheckoutCurrency-u5q8YdUb.js} +2 -2
- package/dist/cjs/shouldRenderShortAddressCodeInput-gpu_bMfp.js +21 -0
- package/dist/cjs/{shouldShowLanguageSelect-yAbtCmd8.js → shouldShowLanguageSelect-gBg4KeTQ.js} +1 -1
- package/dist/cjs/{submitGtag-D79e8u6s.js → submitGtag-Rc-S3PnH.js} +1 -1
- package/dist/cjs/{throttle-zSVRQLC0.js → taxIdFields-BrIaPTcd.js} +57 -2
- package/dist/cjs/taxIdRules-BBj8kQxJ.js +58 -0
- package/dist/cjs/{updateCheckoutSessionAttributes-jMtfOL2m.js → updateCheckoutSessionAttributes-d0IKpwW8.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +25 -30
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-address_4.cjs.entry.js +27 -30
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +7 -6
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +8 -7
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +83 -78
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +11 -10
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -5
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +12 -11
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -8
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -6
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -7
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +12 -11
- package/dist/cjs/zonos-invoice.cjs.entry.js +9 -8
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +7 -6
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-Bx9jK82G.js → zonosStore-CDV83QyK.js} +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
- package/dist/collection/components/store/checkout/stripe.js +10 -12
- package/dist/collection/components/store/translationStore/strings.arabic.js +35 -2
- package/dist/collection/components/store/translationStore/strings.base.js +35 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +35 -2
- package/dist/collection/components/store/translationStore/strings.french.js +35 -2
- package/dist/collection/components/store/translationStore/strings.german.js +35 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +35 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +35 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +35 -2
- package/dist/collection/components/store/zonosStore.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +5 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +37 -22
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +5 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +34 -21
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +24 -35
- package/dist/collection/components/utils/checkout/getCheckoutTaxIdPayload.js +16 -0
- package/dist/collection/components/utils/checkout/getTaxIdFieldState.js +26 -0
- package/dist/collection/components/utils/checkout/resolveTaxIdSelection.js +23 -0
- package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +7 -11
- package/dist/collection/components/utils/checkout/taxIdFields.js +29 -0
- package/dist/collection/components/utils/taxId/taxIdRules.js +44 -0
- package/dist/collection/components/utils/taxIdValidationResult.js +57 -58
- package/dist/collection/index.js +1 -0
- package/dist/collection/types/checkout/TaxId.js +31 -0
- package/dist/esm/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +32 -1
- package/dist/esm/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +88 -53
- package/dist/esm/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +3 -3
- package/dist/esm/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +1 -1
- package/dist/esm/{debounce-CrmpwbEE.js → debounce-DWqMT4lo.js} +2 -2
- package/dist/esm/{getBorderRadius-DYfkeXdx.js → getBorderRadius-BiGd45jw.js} +1 -1
- package/dist/esm/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +1 -1
- package/dist/esm/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
- package/dist/esm/index.js +9 -8
- package/dist/esm/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-BIh-4pc_.js → localization-DHM91diu.js} +701 -41
- package/dist/esm/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +4 -4
- package/dist/esm/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
- package/dist/esm/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +19 -0
- package/dist/esm/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
- package/dist/esm/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
- package/dist/esm/taxIdFields-ByEYfsO5.js +139 -0
- package/dist/esm/taxIdRules-xYlx7ZXW.js +47 -0
- package/dist/esm/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +23 -28
- package/dist/esm/zonos-address-display_2.entry.js +3 -3
- package/dist/esm/zonos-address_4.entry.js +25 -28
- package/dist/esm/zonos-airwallex-payment.entry.js +7 -6
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +8 -7
- package/dist/esm/zonos-cart-items_12.entry.js +82 -77
- package/dist/esm/zonos-checkbox_2.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +11 -10
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -5
- package/dist/esm/zonos-collect-finish_6.entry.js +12 -11
- package/dist/esm/zonos-collect.entry.js +9 -8
- package/dist/esm/zonos-controller.entry.js +7 -6
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +3 -3
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -7
- package/dist/esm/zonos-invoice-finish_5.entry.js +12 -11
- package/dist/esm/zonos-invoice.entry.js +9 -8
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +7 -6
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +2 -1
- package/dist/esm-es5/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +2 -1
- package/dist/esm-es5/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +64 -53
- package/dist/esm-es5/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +1 -1
- package/dist/esm-es5/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +7 -7
- package/dist/esm-es5/debounce-DWqMT4lo.js +1 -0
- package/dist/esm-es5/getBorderRadius-BiGd45jw.js +8 -0
- package/dist/esm-es5/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
- package/dist/esm-es5/index.js +11 -11
- package/dist/esm-es5/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-DHM91diu.js +348 -0
- package/dist/esm-es5/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
- package/dist/esm-es5/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +8 -0
- package/dist/esm-es5/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
- package/dist/esm-es5/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
- package/dist/esm-es5/taxIdFields-ByEYfsO5.js +46 -0
- package/dist/esm-es5/taxIdRules-xYlx7ZXW.js +6 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +253 -254
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +8 -9
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +19 -18
- package/dist/esm-es5/zonos-checkbox_2.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-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 +2 -2
- 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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
- 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-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.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-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +1 -1
- package/dist/scripts/index.d.ts +97 -1
- 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/store/checkout/stripe.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +34 -1
- package/dist/types/components/store/zonosStore.d.ts +2 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -1
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +4 -1
- package/dist/types/components/utils/checkout/getCheckoutTaxIdPayload.d.ts +6 -0
- package/dist/types/components/utils/checkout/getTaxIdFieldState.d.ts +18 -0
- package/dist/types/components/utils/checkout/resolveTaxIdSelection.d.ts +12 -0
- package/dist/types/components/utils/checkout/shouldRenderTaxIdInput.d.ts +2 -1
- package/dist/types/components/utils/checkout/taxIdFields.d.ts +11 -0
- package/dist/types/components/utils/taxId/taxIdRules.d.ts +37 -0
- package/dist/types/components/utils/taxIdValidationResult.d.ts +8 -2
- package/dist/types/components.d.ts +22 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/checkout/TaxId.d.ts +45 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +11 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +2 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-7bd99479.system.entry.js → p-064d8829.system.entry.js} +26 -26
- package/dist/zonos-elements/p-107f287b.entry.js +1 -0
- package/dist/zonos-elements/{p-51400242.system.entry.js → p-1199baef.system.entry.js} +3 -3
- package/dist/zonos-elements/p-12b24ebb.entry.js +1 -0
- package/dist/zonos-elements/{p-9c33f7ed.system.entry.js → p-189cc594.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3d0656a.entry.js → p-1a5acbcd.entry.js} +1 -1
- package/dist/zonos-elements/{p-11defdca.system.entry.js → p-1cc42a98.system.entry.js} +18 -18
- package/dist/zonos-elements/p-1e6db427.entry.js +1 -0
- package/dist/zonos-elements/{p-d82fd8a9.system.entry.js → p-1fda4aec.system.entry.js} +116 -115
- package/dist/zonos-elements/{p-756d303f.system.entry.js → p-20eb00de.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5967a1c1.system.entry.js → p-216a908d.system.entry.js} +5 -5
- package/dist/zonos-elements/p-25eb99d4.entry.js +1 -0
- package/dist/zonos-elements/{p-23352709.system.entry.js → p-2b63865a.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-6db7c0b1.system.entry.js → p-2ca826b9.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-6c41b00c.entry.js → p-2d513aa3.entry.js} +1 -1
- package/dist/zonos-elements/{p-c961caaf.entry.js → p-3e705c9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-acd50b0b.entry.js → p-4612facd.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b80aff2.system.entry.js → p-46a839d2.system.entry.js} +24 -24
- package/dist/zonos-elements/p-46b9f0cf.entry.js +1 -0
- package/dist/zonos-elements/{p-244e0302.system.entry.js → p-4715045c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d168023b.entry.js → p-4917b74d.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b81f8b9.system.entry.js → p-53eac12f.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-17c7ea4a.system.entry.js → p-55813e9f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-06030d3b.system.entry.js → p-5585db86.system.entry.js} +45 -45
- package/dist/zonos-elements/p-59fc32af.entry.js +1 -0
- package/dist/zonos-elements/{p-193d9722.entry.js → p-61312d5b.entry.js} +1 -1
- package/dist/zonos-elements/p-636b71d4.entry.js +1 -0
- package/dist/zonos-elements/{p-155ed3d3.system.entry.js → p-6410fa11.system.entry.js} +24 -24
- package/dist/zonos-elements/{p-0fca452b.entry.js → p-65817880.entry.js} +1 -1
- package/dist/zonos-elements/p-678b9214.entry.js +1 -0
- package/dist/zonos-elements/p-6e691736.entry.js +1 -0
- package/dist/zonos-elements/p-6vSUiBfr.system.js +348 -0
- package/dist/zonos-elements/p-74659d88.entry.js +1 -0
- package/dist/zonos-elements/p-7dc7f328.entry.js +1 -0
- package/dist/zonos-elements/{p-55916c90.entry.js → p-7f1bea9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c150f26.entry.js → p-821e413a.entry.js} +1 -1
- package/dist/zonos-elements/{p-c403f004.system.entry.js → p-82e45d0c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84e76348.entry.js +1 -0
- package/dist/zonos-elements/{p-1409de3b.system.entry.js → p-88e20e99.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-195f6e38.system.entry.js → p-89a3c4db.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4679f0ec.entry.js → p-8f9d8795.entry.js} +1 -1
- package/dist/zonos-elements/p-8fa6cfff.entry.js +1 -0
- package/dist/zonos-elements/{p-92fe9a1f.system.entry.js → p-902cca23.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a4a7742.system.entry.js → p-93860183.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-69c3e367.system.entry.js → p-941a95a1.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-b5882fbb.system.entry.js → p-9449b4f4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6abec43f.system.entry.js → p-960070d0.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-1bac5ac1.system.entry.js → p-990fcf81.system.entry.js} +1 -1
- package/dist/zonos-elements/p-BD-9rD53.js +1 -0
- package/dist/zonos-elements/p-BMPYH-LT.js +1 -0
- package/dist/zonos-elements/{p-DI2vXnXc.system.js → p-BrQ8n8NS.system.js} +3 -3
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +2 -2
- package/dist/zonos-elements/{p-CUaf1cEg.js → p-C70h5mKA.js} +1 -1
- package/dist/zonos-elements/{p-B4Ufchqh.system.js → p-C9XLkmmb.system.js} +3 -3
- package/dist/zonos-elements/{p-CZD8WvyY.system.js → p-CBUz18kA.system.js} +1 -1
- package/dist/zonos-elements/{p-kaOxUR9u.system.js → p-CGNVm52g.system.js} +6 -6
- package/dist/zonos-elements/p-CHKKvuiz.js +1 -0
- package/dist/zonos-elements/{p-0mGRBGcf.js → p-CMo3ZweU.js} +1 -1
- package/dist/zonos-elements/p-CTiqplrr.js +1 -0
- package/dist/zonos-elements/p-CYxMfUL7.system.js +1 -0
- package/dist/zonos-elements/{p-D4MevhAL.system.js → p-CbhN65lj.system.js} +3 -3
- package/dist/zonos-elements/p-Ch1w0Lr7.js +1 -0
- package/dist/zonos-elements/{p-W82paT5F.js → p-CqB9AfBf.js} +1 -1
- package/dist/zonos-elements/p-CzKlS3E-.system.js +6 -0
- package/dist/zonos-elements/p-D1SmY_fZ.js +1 -0
- package/dist/zonos-elements/{p-sz4L-ZnB.js → p-D1e9zNDA.js} +1 -1
- package/dist/zonos-elements/{p-c9QtIdJX.js → p-D6xXnsM_.js} +1 -1
- package/dist/zonos-elements/{p-8PPEbm_0.system.js → p-DIab60nK.system.js} +12 -12
- package/dist/zonos-elements/{p-Cye-evFK.js → p-DMIgN_sT.js} +1 -1
- package/dist/zonos-elements/{p-CXxvn4GX.system.js → p-DQrMfUzi.system.js} +41 -41
- package/dist/zonos-elements/{p-BuU_p5DP.system.js → p-DTgUqgwV.system.js} +2 -2
- package/dist/zonos-elements/p-DW7I0zOF.js +1 -0
- package/dist/zonos-elements/p-DZdkJHK9.system.js +7 -0
- package/dist/zonos-elements/{p-XqkqjeNV.system.js → p-DgUrB-1a.system.js} +1 -1
- package/dist/zonos-elements/p-DiMEP3mh.js +1 -0
- package/dist/zonos-elements/p-DprOoI2W.system.js +528 -0
- package/dist/zonos-elements/{p-7abqRc9V.js → p-DpwmHU8R.js} +2 -2
- package/dist/zonos-elements/p-DqVePqqx.system.js +8 -0
- package/dist/zonos-elements/{p-Cby4EkFu.system.js → p-DsBuZ6ob.system.js} +2 -1
- package/dist/zonos-elements/{p-XDxdMlQl.system.js → p-Dtu_Japy.system.js} +39 -39
- package/dist/zonos-elements/p-Dwg61Ft_.js +1 -0
- package/dist/zonos-elements/p-U33isUJG.js +1 -0
- package/dist/zonos-elements/{p-Be3Hpms1.system.js → p-XoQH3S7Z.system.js} +1 -1
- package/dist/zonos-elements/{p-474e8a92.system.entry.js → p-a1022808.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-83aa1c8c.entry.js → p-ad04bba2.entry.js} +1 -1
- package/dist/zonos-elements/{p-a938c174.entry.js → p-b51010b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-dfc87b10.system.entry.js → p-c33b8f6a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a40fd99b.system.entry.js → p-cccaad60.system.entry.js} +39 -40
- package/dist/zonos-elements/p-d3345b2c.entry.js +1 -0
- package/dist/zonos-elements/{p-249c1ee1.system.entry.js → p-d8f375da.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-2603dce0.entry.js → p-e216cc8c.entry.js} +1 -1
- package/dist/zonos-elements/{p-b79036fc.entry.js → p-e7fdb2c9.entry.js} +1 -1
- package/dist/zonos-elements/p-ebe157b5.entry.js +1 -0
- package/dist/zonos-elements/p-ef5344ea.entry.js +1 -0
- package/dist/zonos-elements/{p-7f031592.system.entry.js → p-f3d9a380.system.entry.js} +73 -73
- package/dist/zonos-elements/{p-31043c2e.system.entry.js → p-f5f95990.system.entry.js} +296 -297
- package/dist/zonos-elements/p-fda89981.system.entry.js +13 -0
- package/dist/zonos-elements/{p-d4d2b39e.entry.js → p-fddf3556.entry.js} +1 -1
- package/dist/zonos-elements/p-iAIzUA4k.js +1 -0
- package/dist/zonos-elements/{p-BpDCLBwW.js → p-n5PZKz1k.js} +1 -1
- package/dist/zonos-elements/{p-DoEHepOc.system.js → p-ojtNq-r5.system.js} +1 -1
- package/dist/zonos-elements/{p-C_z9WL8a.js → p-r-YGHhLa.js} +1 -1
- package/dist/zonos-elements/{p-CBx5nYet.system.js → p-vTIygnHq.system.js} +1 -1
- package/dist/zonos-elements/{p-DQZncB2d.system.js → p-zsTASoh2.system.js} +3 -3
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/shouldRenderTaxIdInput-TxekHCp7.js +0 -43
- package/dist/esm/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -40
- package/dist/esm/throttle-Cvlvb-dm.js +0 -85
- package/dist/esm-es5/debounce-CrmpwbEE.js +0 -1
- package/dist/esm-es5/getBorderRadius-DYfkeXdx.js +0 -8
- package/dist/esm-es5/localization-BIh-4pc_.js +0 -348
- package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -17
- package/dist/esm-es5/throttle-Cvlvb-dm.js +0 -46
- package/dist/zonos-elements/p-06fe2939.entry.js +0 -1
- package/dist/zonos-elements/p-24f3c547.entry.js +0 -1
- package/dist/zonos-elements/p-30b3c9d3.entry.js +0 -1
- package/dist/zonos-elements/p-39ee1558.entry.js +0 -1
- package/dist/zonos-elements/p-3a2da031.entry.js +0 -1
- package/dist/zonos-elements/p-4806b264.system.entry.js +0 -13
- package/dist/zonos-elements/p-5873ab8e.entry.js +0 -1
- package/dist/zonos-elements/p-725e29bb.entry.js +0 -1
- package/dist/zonos-elements/p-BGktDPwA.system.js +0 -1
- package/dist/zonos-elements/p-Bi-s0fp_.system.js +0 -17
- package/dist/zonos-elements/p-CEK_Wk6v.system.js +0 -7
- package/dist/zonos-elements/p-CFbfEmjN.js +0 -1
- package/dist/zonos-elements/p-CcJF6xhQ.js +0 -1
- package/dist/zonos-elements/p-Cxuiqv1I.js +0 -1
- package/dist/zonos-elements/p-D-bZg-Pc.js +0 -1
- package/dist/zonos-elements/p-DOD2I44l.system.js +0 -348
- package/dist/zonos-elements/p-DS-qw_qc.system.js +0 -517
- package/dist/zonos-elements/p-DZ2mevDK.js +0 -1
- package/dist/zonos-elements/p-DnjGkbEy.js +0 -1
- package/dist/zonos-elements/p-FRWZayxL.js +0 -1
- package/dist/zonos-elements/p-Mrz_lnC1.js +0 -1
- package/dist/zonos-elements/p-ad9ff14c.entry.js +0 -1
- package/dist/zonos-elements/p-bb3546c0.entry.js +0 -1
- package/dist/zonos-elements/p-c1cbfdba.entry.js +0 -1
- package/dist/zonos-elements/p-c47ce656.entry.js +0 -1
- package/dist/zonos-elements/p-c9d5d8f1.entry.js +0 -1
- package/dist/zonos-elements/p-clDfq9AL.js +0 -1
- package/dist/zonos-elements/p-d74bc3e8.entry.js +0 -1
- package/dist/zonos-elements/p-d8b312e5.entry.js +0 -1
- package/dist/zonos-elements/p-db87b0dd.entry.js +0 -1
- package/dist/zonos-elements/p-defc2d18.entry.js +0 -1
- package/dist/zonos-elements/p-rVp8hgWw.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as t,e as s,a as e}from"./p-_lt63o7c.js";import{a as r}from"./p-CqB9AfBf.js";import{c as a}from"./p-BJHSB96f.js";import"./p-BJmZPrZl.js";const i=class{constructor(t){o(this,t),this.theme="LIGHT",this.width="auto"}render(){const o="DARK"===this.theme?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return t(e,{key:"89d856c28d227afbe76656ce217544faad91715e",class:a(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":r(),"--zonos--width":this.width}},t("img",{key:"025c97e65f2666028391f6ca2d548bf905528133",alt:"Zonos Logo",src:s("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};i.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 img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";export{i as zonos_logo}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as s,a as e,F as t}from"./p-_lt63o7c.js";import{c,a as l,b as n,d as i,e as a,f as r,g as z,h as d,i as h}from"./p-CMo3ZweU.js";import{b as m,i as p,d as u,c as f,r as g,e as b,k as w,l as x,z as v,E as y,J as k,H as C,f as j}from"./p-BMPYH-LT.js";import{p as I,a as S}from"./p-DpwmHU8R.js";import{s as L,t as A,h as E,j as T,k as D,l as O}from"./p-CTiqplrr.js";import{z as U}from"./p-CqB9AfBf.js";import{b as P}from"./p-BycjkdlE.js";import{h as _,s as N,l as B,g as R}from"./p-DE4a-QD5.js";import{i as H,a as F}from"./p-DGlnuxEX.js";import{c as W}from"./p-BJHSB96f.js";import{l as M}from"./p-BJmZPrZl.js";import{r as X}from"./p-BXjdMMUy.js";import"./p-Dwg61Ft_.js";import"./p-DMIgN_sT.js";import"./p-YdrG78th.js";import"./p-r-YGHhLa.js";import"./p-CICjAi70.js";import"./p-D1e9zNDA.js";const $=class{constructor(s){o(this,s),this.storeUnsubscribeList=[],this.onChangeLocaleListener=()=>{},this.mobile=!1,this.tablet=!1,this.stripe=window.Zonos.stripe,this.showLanguageDialogMobile=!1,this.submitLoading=!1,this.collapseReview=!0,this.isMobile=!1,this.isTablet=!1,this.isOverlayLoading=!0,this.isCartCollected=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.confirmationId=null,this.clientSecret=m.clientSecret,this.stripeCustomerSessionClientSecret=m.stripeCustomerSessionClientSecret,this.getBaseCurrencySettlementInfo=()=>{const o=u.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:s}}=o;return s?{settlementAmount:(s.discounts||0)+s.items+s.landedCostTotal+s.shipping}:null},this.applyStripeTheme=async()=>{const o=U.appearance.theme;await p({overrideTheme:this.isMobile?o:void 0,paypalEnabled:I()})},this.fetchCheckoutSession=async o=>{const{json:s}=await _("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"});return s},this.initPaymentProcessor=async()=>{var o;const s=L.checkoutSessionId;if(s){const e=await this.fetchCheckoutSession(s);if(c.paymentProcessor=(null==e?void 0:e.checkoutSession.paymentProcessor)||null,"AIRWALLEX"===c.paymentProcessor){if(!e||!l(e.checkoutSession))throw new Error("Airwallex checkout session is missing a client secret");const{checkoutSession:s}=e;n.currency=u.currency,this.confirmationId=(null===(o=s.landedCost)||void 0===o?void 0:o.shortId)||null;let t=!!s.completedAt||!!s.order;if(!t&&s.clientSecret&&s.paymentIntentId){const{status:o}=await i(s.paymentIntentId);t=a(o)}return t?void this.setToFinishStep():void r()}}this.applyStripeTheme()},this.checkStripePaymentIntentStatus=async()=>{var o;const s=!!window.Zonos.cartData,e=new URL(window.location.href).searchParams,t=e.get("payment_intent_client_secret"),c=e.get("zonosCheckoutSessionId");if(M("Payment intent exist, checking stripe payment intent status"),!t)return M("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:s};const{error:l,status:n}=await f({clientSecret:t});if(new URLSearchParams(window.location.search).get("redirect_status")&&c){M(l?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen");const s=await this.fetchCheckoutSession(c);return this.confirmationId=(null===(o=null==s?void 0:s.checkoutSession.landedCost)||void 0===o?void 0:o.shortId)||null,L.checkoutSessionId=c,m.clientSecret=t,this.setToFinishStep(n),{shouldAllowOrder:!1}}return s?(M("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(M("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.recoverCompletedCollectSession=async o=>{var s;const e=await this.fetchCheckoutSession(o);if(!e)return!1;const{checkoutSession:t}=e;this.confirmationId=(null===(s=t.landedCost)||void 0===s?void 0:s.shortId)||null,c.paymentProcessor=t.paymentProcessor||null;const r="AIRWALLEX"===t.paymentProcessor;if(r&&t.clientSecret&&(l(t),n.currency=u.currency),t.completedAt||t.order)return this.setToFinishStep("succeeded"),!0;if(r){if(t.clientSecret&&t.paymentIntentId){const{status:o}=await i(t.paymentIntentId);if(a(o))return this.setToFinishStep(),!0}}else if(t.clientSecret){const{status:o}=await f({clientSecret:t.clientSecret});if("processing"===o||"succeeded"===o)return m.clientSecret=t.clientSecret,this.setToFinishStep(o),!0}return!1}}resizeListener(){this.isMobile=H(this.mobile),this.isTablet=F(this.tablet)}async setToFinishStep(o){m.stripe=window.Zonos.stripe,u.step="finish",this.storybookPaymentStatusOverride=o,this.isOverlayLoading=!1}async initCollectCart(){var o,s,e,t,l,i,a,r,h,m,p;if(!window.Zonos.cartData)return;const f=null===(s=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.items[0])||void 0===s?void 0:s.currencyCode;f&&(u.currency=f);const v=null===(t=null===(e=window.Zonos.cartData)||void 0===e?void 0:e.references)||void 0===t?void 0:t.checkoutSessionId,y=null===(i=null===(l=window.Zonos.cartData)||void 0===l?void 0:l.references)||void 0===i?void 0:i.landedCostId;if(!y)return void g({messages:[A("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:U.organizationName})],title:A("Invalid session")});v?(M("Setting checkout session id from cart reference","info",v),L.checkoutSessionId=v):(M("Clear checkout session id from storage so we start from a fresh session for the collect cart"),L.checkoutSessionId=null);const{shouldAllowOrder:k}=await this.checkStripePaymentIntentStatus();if(k){try{const{adjustments:o,cartItems:s}=P(window.Zonos.cartData);if(await b({adjustments:o,cartItems:s,landedCostId:y,shouldInitSessionOnFailure:!1}),!L.checkoutSessionId&&!v){const o=await w();if(M(`stripeStoreInitCheckoutSession: ${o}`),!o)throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}if((!u.checkoutSession||(null===(a=u.checkoutSession)||void 0===a?void 0:a.completedAt))&&v){if(await this.recoverCompletedCollectSession(v))return;throw N({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:v,cartId:null===(r=window.Zonos.cartData)||void 0===r?void 0:r.id,cartLandedCostId:y}}),new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it")}if(!u.checkoutSession)throw N({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:v||"N/A",cartId:null===(h=window.Zonos.cartData)||void 0===h?void 0:h.id,cartLandedCostId:y||"N/A"}}),new Error("Could not update/create checkout session for this collect cart");c.paymentProcessor=u.checkoutSession.paymentProcessor,"AIRWALLEX"===c.paymentProcessor?(await x(),(null===(m=u.checkoutSession)||void 0===m?void 0:m.clientSecret)&&(n.clientSecret=u.checkoutSession.clientSecret,n.currency=u.currency)):x();const e=null===(p=u.checkoutSession)||void 0===p?void 0:p.landedCost;if(!e)throw new Error("Landed cost could not be found in checkout session after creating/updating them");await z(Object.assign(Object.assign({},u.checkoutSession),{id:L.checkoutSessionId||""})),d({landedCostId:e.id}),await this.initPaymentProcessor()}catch(o){B(o),g({messages:[A("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:U.organizationName})],title:A("Invalid session")})}this.isOverlayLoading=!1}}toggleLanguageDialog(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile}async handleStripePaymentContinue(){var o,s,e,t;if(null===(o=m.stripeBillingAddressElement)||void 0===o||o.getValue(),null===(s=m.stripeLinkEventData)||void 0===s?void 0:s.complete)if(null===(e=m.stripeBillingAddressEventData)||void 0===e?void 0:e.complete)if("USD"!==m.checkoutSettlementCurrency||!m.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,S.paypalErrorMessage=null,m.hasPaymentError=!1,this.submitLoading=!0,u.inventoryCheckErrorMessage=null,!await v())return m.hasPaymentError=!0,m.customErrorMessage=A("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:m.checkoutSettlementCurrency}),void(this.submitLoading=!1);await h();try{return await y({noLandedCostCheck:!0}),u.step="finish",void(this.confirmationId=c.landedCostShortId||(null===(t=u.selectedLandedCost)||void 0===t?void 0:t.landedCostId)||null)}catch(o){B(o),m.hasPaymentError=!0}this.submitLoading=!1}else this.payInUsdConfirmDialogOpen=!0;else{const o=document.querySelector(".zonos--billing-address");null==o||o.scrollIntoView({behavior:"smooth"})}else{const o=document.querySelector("zonos-link-authentication");null==o||o.scrollIntoView({behavior:"smooth"})}}componentWillLoad(){m.stripe=window.Zonos.stripe,u.step="payment",this.initCollectCart(),this.resizeListener(),this.storeUnsubscribeList=[k("clientSecret",(()=>{this.applyStripeTheme()})),E("selectedLocale",(()=>{this.applyStripeTheme()}))],M(`mobile: ${this.isMobile}`)}disconnectedCallback(){C(),j(),this.onChangeLocaleListener(),this.storeUnsubscribeList.forEach((o=>o()))}render(){this.clientSecret=m.clientSecret,m.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=m.stripeCustomerSessionClientSecret);const o=this.getBaseCurrencySettlementInfo(),{logoUrl:l,theme:n}=U.appearance,i=c.originCompanyName,a=()=>{var o;const e=c.collectLogoUrl?c.collectLogoUrl:(null===(o=U.genericSettings)||void 0===o?void 0:o.shouldFallbackToOrganizationLogoForCollect)&&l?`${l}?timestamp=${Date.now()}`:"";return e?s("div",{class:"zonos--logo"},s("img",{alt:`${i||U.organizationName} logo`,src:e})):null},r=R(),z=()=>{var o;const e=new URLSearchParams(window.location.search),l=e.get("zonosQaUrl"),n=e.get("zonosDebug"),z=null===(o=D.find((o=>o.code===O.selectedLocale)))||void 0===o?void 0:o.label;return s(t,null,s("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},s("div",{class:"zonos--logo-wrapper"},a(),r&&s("zonos-badge",{badgeColor:"orange",size:"small"},A("Test mode")),"1"===n&&s("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),l&&s("zonos-badge",{badgeColor:"purple",size:"small"},l)),s("div",{class:"zonos--header-right"},s("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:()=>this.toggleLanguageDialog(),variant:"outline"},z,s("zonos-icon",{"aria-label":"Language select",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"})),s("div",{class:W(["zonos--collect-language-dialog",this.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},s("zonos-language-select",{handleOnClose:()=>this.toggleLanguageDialog()})))),X({content:s("zonos-text",{class:"zonos--header-title",type:"header"},i?A("Customs charges for your recent purchase from [companyName] are available for payment",{companyName:i}):A("Customs charges from your recent purchase are available for payment")),isLoading:c.isFetchingShippingInfo,skeletonHeight:"34px",skeletonWidth:"600px"}))};return s(e,{class:W(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":n},(()=>this.isOverlayLoading||m.isFetchingSession?null:s("div",{class:"zonos--content"},"finish"!==u.step&&"error"!==u.step&&s(t,null,(this.isMobile||this.isTablet)&&z(),s("div",{class:"zonos--left","data-theme":n},!this.isMobile&&!this.isTablet&&z(),"AIRWALLEX"!==c.paymentProcessor&&s(t,null,s("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},A("Billing info")),s("zonos-v-stack",{spacing:16},s("zonos-link-authentication",{titleText:""}),s("zonos-address",{titleText:"",type:"billing"}))),s("zonos-collect-payment",{class:W(["zonos--collect-container"]),continueLoading:this.submitLoading,onAirwallexPaymentDone:()=>{var o;u.step="finish",this.confirmationId=c.landedCostShortId||(null===(o=u.selectedLandedCost)||void 0===o?void 0:o.landedCostId)||null},onContinueClicked:async()=>{await this.handleStripePaymentContinue()}})),s("div",{class:"zonos--right","data-theme":n},s("zonos-collect-review",{mobile:this.isMobile,tablet:this.isTablet}),s("div",{class:"zonos--order-details-container"},s("zonos-collect-order-details",{collapsed:this.collapseReview,mobile:this.isMobile,onCollapseClicked:()=>{this.collapseReview=!this.collapseReview}})),s("div",{class:"flex--wrapper"},s("zonos-v-stack",{spacing:16},s("zonos-collect-subtotal",null)),!this.isMobile&&!this.isTablet&&s("zonos-collect-footer",{"data-theme":n,mobile:this.isMobile,tablet:this.isTablet})))),("finish"===u.step||"error"===u.step)&&s("div",{class:"zonos--done","data-theme":n},s("div",{class:"zonos--header"},a()),s("zonos-collect-finish",{confirmationId:this.confirmationId,overrideNotification:"error"===u.step&&u.error?Object.assign(Object.assign({},u.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),(this.isMobile||this.isTablet||"finish"===u.step||"error"===u.step)&&s("zonos-collect-footer",{"data-theme":n,mobile:this.isMobile,tablet:this.isTablet})))(),o&&s("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:A("Cancel"),dialogConfirmBtnText:A("Pay [orderTotal]",{orderTotal:T({amount:o.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:A("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:A("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),s("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}};$.style=".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{display:-ms-flexbox;display:flex;width:100%;max-width:1400px;height:calc(100% - 100px);overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-collect-finish.sc-zonos-collect{-ms-flex:1;flex:1;min-height:0}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;max-width:100%;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;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);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);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}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{$ as zonos_collect}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as s,a as t}from"./p-_lt63o7c.js";import{a}from"./p-
|
|
1
|
+
import{r as o,h as s,a as t}from"./p-_lt63o7c.js";import{a}from"./p-CqB9AfBf.js";import{c as r}from"./p-BJHSB96f.js";import"./p-BJmZPrZl.js";const f=class{constructor(s){o(this,s),this.spacing=24}render(){return s(t,{key:"b6f24a7be77dc8fa71e68c8690e6cf1fc58489ce",style:{"--zonos--font-family":a()}},s("div",{key:"955284df5a7d236d49a08b9ec6980e0a2fb80fdd",class:r(["vstack"]),style:{"grid-row-gap":`${this.spacing}px`}},s("slot",{key:"5943abd1029f14d7eb218f4295ef797a3750b59f"})))}};f.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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";export{f as zonos_v_stack}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e,a as s}from"./p-_lt63o7c.js";import{a as n}from"./p-
|
|
1
|
+
import{r as o,h as e,a as s}from"./p-_lt63o7c.js";import{a as n}from"./p-CqB9AfBf.js";import{c as r}from"./p-BJHSB96f.js";import"./p-BJmZPrZl.js";const t=class{constructor(e){o(this,e),this.bold=!1,this.badgeColor="gray",this.iconRight=!1,this.size="default",this.rounded=!1,this.loading=!1}render(){return e(s,{key:"95c8a620e803b4ea84d7789ff746d1edc1252389",class:r(["zonos--elements zonos--badge"]),style:{"--zonos--font-family":n()}},e("div",{key:"000fb2efaa9cffa4635e89e700013bcc1f9fd63c",class:r(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,e("zonos-text",{key:"8c84abeb697dd20f6c1acbd2f512a5bac2c45883",textColor:`${this.badgeColor}-800`},e("slot",{key:"b5bc9ed235747f2986fd7a1c94cbede4b8ffc715"})),this.dismissHandler&&e("zonos-icon",{key:"629b306370ba2fab2e43b625fce19e44be2a91a7","aria-label":"Remove action",class:"zonos--badge-dismiss",content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>\n</svg>\n',onClick:()=>{var o;return null===(o=this.dismissHandler)||void 0===o?void 0:o.call(this)}})))}};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{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}:host .zonos--badge-dismiss{cursor:pointer}";export{t as zonos_badge}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-DTgUqgwV.system.js","./p-C2j7R11h.system.js","./p-zsTASoh2.system.js","./p-BbgqQIHv.system.js"],(function(o){"use strict";var t,e,s,n,a,l,i,r;return{setters:[function(o){t=o.r;e=o.d;s=o.h;n=o.a;a=o.g},function(o){l=o.a},function(o){i=o.c},function(o){r=o.g},null],execute:function(){var d=function(){return':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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}'};var h=o("zonos_input",/** @class */function(){function o(o){t(this,o);this.inputChange=e(this,"inputChange",7);
|
|
2
2
|
/**
|
|
3
3
|
* Value of the input
|
|
4
4
|
*/this.inputValue="";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,d as e,h as s,F as t,a as n,g as i}from"./p-_lt63o7c.js";import{b as a,c as r,t as l,P as c,H as d,Q as h,d as p,x as m,I as f}from"./p-BMPYH-LT.js";import{s as g,c as u,a as v,b as y}from"./p-DpwmHU8R.js";import{t as b,s as z,k as x,l as w}from"./p-CTiqplrr.js";import{z as k}from"./p-CqB9AfBf.js";import{h as C,s as L,g as I,i as j,a as S}from"./p-DE4a-QD5.js";import{c as M}from"./p-XQfWgQLB.js";import{g as H}from"./p-r-YGHhLa.js";import{l as _,b as P}from"./p-BJmZPrZl.js";import{i as Z,a as D}from"./p-Clej0Ffe.js";import{c as U}from"./p-BJHSB96f.js";import{s as B}from"./p-U33isUJG.js";import{c as V}from"./p-D6xXnsM_.js";import{r as T}from"./p-D1SmY_fZ.js";import{p as F}from"./p-DiMEP3mh.js";import{r as R}from"./p-BXjdMMUy.js";import"./p-Dwg61Ft_.js";import"./p-DMIgN_sT.js";import"./p-YdrG78th.js";import"./p-CICjAi70.js";import"./p-D1e9zNDA.js";const W=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=b("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 C(`/api/zonos-elements/get-order?${t.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=k.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&&_("=== 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;_(`=== Polling order (${o} attemps)`,"info"),n?(_("=== InvoiceOrder info found","info"),o>10&&L({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:k.storeId}}),this.order=n):n&&i||!(o<r)?L({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Invoice order not found after ${r} attempts`],metadata:{allLogs:P,checkoutSessionId:z.checkoutSessionId||"",storeId:k.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=b(n?"Payment failed":"You're all set!"),_("=== 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))g({event:"zonos-checkout-payment-fail"}),L({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{g({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=M("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=b("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),c(),d(),u(),z.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(v.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=b("Payment failed"),this.notificationMessages=[v.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,v.orderIdCreated&&(g({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=b("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),I()&&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():v.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return s(n,{key:"755581819b6a2e9d97e0faf671320e9390a3000a",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":H({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&s("div",{key:"a5112a4c35f95d80d567d1d9ca690c297f75bba8",class:"zonos--finish-details"},s("div",{key:"f17f25e741a7a846e4d0d653f2e67c6b36ebd77a",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:"1169bd299d16f1b063de9638c6c6fce00cf9d0a6",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&s("zonos-badge",{key:"db6aebf906ad52207c8bc898c856b7a2a7f061e1",badgeColor:"gray"},this.confirmationId),s("zonos-text",{key:"fd5516196ec5f645718b7fbf0c9de66ab322505b",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>s(t,null,o,s("br",null))))),this.order&&o&&s("div",{key:"f50f1e9ed26e609346cdf3bdc1f93689d3c99d06",class:"zonos--button-container"},s("zonos-button",{key:"3dadbbfe5113e02412bb6b890b4d2923101e3c31",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},b("View receipt"))))))}static get assetsDirs(){return["assets"]}};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{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 $=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=D(this.tablet)}componentWillLoad(){this.isMobile=Z(this.mobile),this.isTablet=D(this.tablet)}render(){var o;const e=null===(o=x.find((o=>o.code===w.selectedLocale)))||void 0===o?void 0:o.label,i="gray-1000";return s(n,{key:"1cd5499e17c070498d65ebbca71d0cbe3c825456",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"2f31caade367c351d84571034eda59179c227084",class:"zonos--invoice-footer"},s("div",{key:"25f127514ad98939aee122c6b4772198e095b26d",class:"zonos--invoice-locale-wrapper"},B()&&s(t,{key:"03d37a0e0e94cf42d74a5c59905f7e7219533274"},s("zonos-button",{key:"76aab1e78afa3a51f579f865a24591acea0baadc",buttonColor:i,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:i}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},s("span",{key:"28642dac198b7c61bef48d211c8a820e0c8d1fcc",class:"zonos--invoice-locale-label"},e,s("zonos-icon",{key:"364b048befa8c5f45b6869f18b90b27da4b37056","aria-hidden":"true",class:"zonos--invoice-locale-chevron",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:i,size:18}))),s("div",{key:"ed4b425741e6aecc49882993be57da58de7d437b",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},s("zonos-language-select",{key:"e4c5e31e8cfdf0ca52a5b935743bda347f9fa7c1",handleOnClose:()=>this.toggleLanguageDialog()})))),s("div",{key:"1d0a2613e3a0d487b059fc66fb48f53858a4e6c7",class:"zonos--invoice-footer-icon-wrapper"},s("div",{key:"a27c7eebe0dca7fedbc1e6e22438393391ec9024",class:"zonos--invoice-footer-logo"},s("zonos-text",{key:"1013250d247fdb33ec365f8b3ffe9ca65d431d9d",textColor:i},b("Powered by")),s("a",{key:"ef93dda1f051f353da9e5f286942cc0a0e8015f7",href:"https://zonos.com",target:"_blank",title:"Zonos website"},s("zonos-icon",{key:"de7cc9e5027eb85e7c578afda15a3b3f4e260e91",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:"180e60cdd756303a14a4a80b72b81b4a4e1c124a",class:"dot"}),s("a",{key:"7f46908aa8cd49974d7525d7110dbb25402586ab",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},s("zonos-text",{key:"bba7017be84a8e320ca4d8fb2074822cd7e9f917",textColor:i},b("Privacy policy"))))))}get el(){return i(this)}static get watchers(){return{mobile:[{handleMobileChange:0}],tablet:[{handleTabletChange:0}]}}};$.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-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;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 N=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=j(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"},b("Pay [organizationName]",{organizationName:k.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"},T({amount:V.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:0}],collapseState:[{handleCollapseChange:0}]}}};N.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 E=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,g({event:"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:b("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await F();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=I(),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"},b("Payment method")),(()=>{if(i){const o=k.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:b("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},b("Place test order"))))}return a.isFetchingSession||V.isFetchingPayorInfo?null:s(t,null,this.showErrorBanner&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},b("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||b("We couldn't complete your payment. Please verify the payment details and try again.")),v.paypalErrorMessage&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},v.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}):_("Checkout session is not found")},size:"lg",variant:this.submitBtnType},b("Pay [orderTotal]",{orderTotal:T({amount:V.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"},b("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"},b("Test cards")),s("zonos-text",{textColor:"gray-700"},b("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")},b("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")},b("Failure")," (****0002)")),s("zonos-notification",null)))})()))}get ele(){return i(this)}static get watchers(){return{continueLoading:[{continueLoadingWatcher:0}],hasStripePaymentError:[{stripePaymentErrorWatcher:0}]}}};E.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=D(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return s(n,{key:"46c130c8e6aeacdd5f74feb613ec5829c0be396d",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"9649e31a3053c9772363620cf2acfe557ace8715",class:"zonos--title"},s("zonos-text",{key:"1b365c27c2280e61c4849c7382a945716ec2abf8",textColor:o,type:"semiBoldLabel"},b("Pay [organizationName]",{organizationName:k.organizationName}))),s("div",{key:"a1f24eb0f3080ec0ddad9ca323f49dd391117326",class:"zonos--total-pay"},R({content:s("zonos-text",{type:"secondaryPageHeader"},T({amount:V.amountTotalDue||0,isForeign:!0})),isLoading:V.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{W as zonos_invoice_finish,$ as zonos_invoice_footer,N as zonos_invoice_order_details,E as zonos_invoice_payment,O as zonos_invoice_review}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-DTgUqgwV.system.js","./p-d05Ku7gM.system.js","./p-C2j7R11h.system.js","./p-zsTASoh2.system.js","./p-vN6p_rO1.system.js","./p-DW-fW8yR.system.js","./p-BNtWsPPP.system.js","./p-BbgqQIHv.system.js"],(function(o){"use strict";var e,t,n,s,r,a,i,d,l,h,c,u,b;return{setters:[function(o){e=o.r;t=o.h;n=o.a;s=o.g},function(o){r=o.z;a=o.a},function(o){i=o.i;d=o.a},function(o){l=o.c},function(o){h=o.g},function(o){c=o.i},function(o){u=o.i},function(o){b=o.s},null],execute:function(){
|
|
2
2
|
/**
|
|
3
3
|
* Get theme for button text based on background color
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-DTgUqgwV.system.js","./p-d05Ku7gM.system.js","./p-C2j7R11h.system.js","./p-zsTASoh2.system.js","./p-DW-fW8yR.system.js","./p-BbgqQIHv.system.js"],(function(o){"use strict";var s,t,n,i,e,p,r,a,l,c,u,z;return{setters:[function(o){s=o.r;t=o.d;n=o.h;i=o.a;e=o.g},function(o){p=o.z;r=o.a},function(o){a=o.i;l=o.a},function(o){c=o.c},function(o){u=o.g},function(o){z=o.i},null],execute:function(){var d=function(){return'.sc-zonos-stripe-input-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-stripe-input-h *.sc-zonos-stripe-input{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-stripe-input-h img.sc-zonos-stripe-input{max-width:100%}.sc-zonos-stripe-input-h dl.sc-zonos-stripe-input,.sc-zonos-stripe-input-h dd.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h1.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h2.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h3.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h4.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h5.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h6.sc-zonos-stripe-input,.sc-zonos-stripe-input-h hr.sc-zonos-stripe-input,.sc-zonos-stripe-input-h figure.sc-zonos-stripe-input,.sc-zonos-stripe-input-h p.sc-zonos-stripe-input,.sc-zonos-stripe-input-h pre.sc-zonos-stripe-input{margin:0}.sc-zonos-stripe-input-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-stripe-input-h{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%), 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}.dark.sc-zonos-stripe-input-h{color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5), 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%), 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}.sc-zonos-stripe-input-h{margin:1px}.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px;height:calc(var(--zonos-elements-size-xl) - 2px)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color);height:auto}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected+label.sc-zonos-stripe-input+div.sc-zonos-stripe-input{background-color:#e8f0fe}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.sc-zonos-stripe-input{padding:24px 4px 2px 16px}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input{padding-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{margin-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus{outline:none;border:var(--zonos--border)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}.sc-zonos-stripe-input-h .zonos--floated-input.has-error.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-webkit-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-moz-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input:-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-webkit-autofill,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input{pointer-events:inherit}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input::after{cursor:not-allowed;z-index:1}.dark.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{background:#30313d}'};var h=0;var f=o("zonos_stripe_input",/** @class */function(){function o(o){s(this,o);this.inputChange=t(this,"inputChange",7);
|
|
2
2
|
/**
|
|
3
3
|
* Inherited attributes from the host element
|
|
4
4
|
*/this.inheritedAttributes={};this.inputId="zonos--input-".concat(++h);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t,a as s,g as i}from"./p-_lt63o7c.js";import{l as n}from"./p-
|
|
1
|
+
import{r as o,h as t,a as s,g as i}from"./p-_lt63o7c.js";import{l as n}from"./p-CTiqplrr.js";import{a}from"./p-CqB9AfBf.js";import{c as e}from"./p-BJHSB96f.js";import"./p-DE4a-QD5.js";import"./p-BJmZPrZl.js";const r=class{constructor(t){o(this,t),this.countryCode=n.selectedCountryCode}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const o=`https://assets.zonos.com/images/elements-flags/${this.countryCode}.svg`,i=a();return t(s,{class:"zonos--elements",style:this.size?{"--zonos--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--zonos--font-family":i}},t("div",{class:e(["flag-container"])},t("div",{class:"flag-icon",style:{backgroundImage:`url(${o})`}})))}get el(){return i(this)}};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-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{r as zonos_country_flag}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o,a as s,g as e,d as a}from"./p-_lt63o7c.js";import{a as n}from"./p-CqB9AfBf.js";import{c as i}from"./p-BJHSB96f.js";import{g as r}from"./p-r-YGHhLa.js";import{b as c,t as h}from"./p-BMPYH-LT.js";import{s as l}from"./p-CTiqplrr.js";import{l as p}from"./p-DE4a-QD5.js";import{d as m,e as d}from"./p-DpwmHU8R.js";import{l as y}from"./p-BJmZPrZl.js";import"./p-Dwg61Ft_.js";import"./p-DMIgN_sT.js";import"./p-YdrG78th.js";import"./p-CICjAi70.js";import"./p-D1e9zNDA.js";const f=class{constructor(o){t(this,o),this.borderRadius=6,this.spacing="24px"}render(){const t=this.backgroundColor?`var(--zonos-elements-${this.backgroundColor})`:"transparent",e=r({customRoundRadius:`${this.borderRadius}px`,overrideBorderStyle:"ROUNDED"});return o(s,{key:"afc0d2d9b79510aa9d85c89af3c01d5a5c767787",style:{"--zonos--font-family":n()}},o("div",{key:"b68bbbb581f56db81f9b7819f6047c1ec48a956f",class:i(["styled-card"]),style:{"--zonos--background-color":t,"--zonos--border-radius":e,padding:this.spacing}},this.label&&o("header",{key:"27db75fa9c5ac5dbdfefd92656aa6d8e5b654349",class:"card-header",style:{padding:this.spacing}},o("zonos-text",{key:"f54d58eb5f010346d2fcf919baf69d5c799bdbc4",type:"subheader"},this.label),o("h-stack",{key:"a3cbee0ae5fc73bb9507d5e30ab6779f2ce46f55",spacing:8},this.actions)),o("slot",{key:"6ce557ff8df6046d428b22b290c3d79ce6bf36ad"}),(this.footerActions||this.footerContent)&&o("footer",{key:"7cc44dfa05e46026444ac1db6755b30151937be0",class:"card-footer",style:{height:this.footerHeight?`${this.footerHeight}px`:"auto",padding:this.spacing}},o("div",{key:"6c401d4fbc34346f160b239a7190eb170763c382"},this.footerContent),o("h-stack",{key:"e6cc5de886d04757374b380149fe5b78b0874cf2",spacing:8},this.footerActions))))}};f.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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";const z=class{constructor(o){t(this,o),this.theme="LIGHT"}render(){return this.el.shadowRoot?(this.el.shadowRoot.innerHTML="DARK"===this.theme?'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n':'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n',o(s,{class:"zonos--elements",style:{"--zonos--font-family":n(),"--zonos--height":"100%","--zonos--width":"100%"}},o("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))):null}get el(){return e(this)}};z.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;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";const g=class{constructor(o){t(this,o),this.notificationArray=[]}async showNotification(t){const o=`id-${Math.random().toString(36).substring(2,9)}`,s=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=[...this.notificationArray,s],setTimeout((()=>{this.updateTransitionClass({id:o,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(o)}),s.timeout)}updateTransitionClass({id:t,transitionClass:o}){this.notificationArray=this.notificationArray.map((s=>s.id===t?Object.assign(Object.assign({},s),{transitionClass:o}):s))}removeNotification(t){this.updateTransitionClass({id:t,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((o=>o.id!==t))}),300)}render(){return o(s,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:i(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":r(),"--zonos--font-family":n()}},o("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((t=>o("div",{"aria-hidden":"true",class:i(["zonos--notification-item",t.type,t.transitionClass]),key:t.id,onClick:()=>{this.removeNotification(t.id)}},o("zonos-text",{textColor:"gray-0"},t.message))))))}};g.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-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";const b=class{constructor(o){t(this,o),this.stripe=c.stripe,this.stripeElements=c.stripeElements,this.isPaymentInfoFilled=!1,this.trackingSent=!1}watchIsPaymentInfoFilled(){var t;this.isPaymentInfoFilled&&!this.trackingSent&&(h({checkoutSessionId:l.checkoutSessionId,eventName:"checkout_paymentInfoFilled",metadata:{paymentMethod:null===(t=c.stripePaymentEventData)||void 0===t?void 0:t.value.type}}),this.trackingSent=!0)}async watchInitStripe(){var t;if(!this.stripeElements)return;await this.stripeElements.fetchUpdates();const o=c.stripePaymentElement||this.stripeElements.create("payment",{defaultValues:{billingDetails:{address:{country:null===(t=c.stripeAddressEventData)||void 0===t?void 0:t.value.address.country}}},layout:"tabs"}),s=this.el.querySelector(".zonos--payment-component");s?(o.mount(s),o.on("change",(t=>{t.complete&&(this.isPaymentInfoFilled=!0),c.stripePaymentEventData=t})),c.stripePaymentElement=o):p("Cannot find container element for paymentElement")}componentDidLoad(){this.watchInitStripe()}render(){return o(s,{key:"faf7791e4cbf6bf8c98fe0b2f368f408ef32b644",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"e6103d0e04f9905b90533bf94539aaae1d5aa604",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"b042060ff6fef2d7f20b20ec672b2696cb5f837c",class:"zonos--payment-component"}),o("div",{key:"b6a220513bb964a057c70141dcec89059dbbb0c8",class:"zonos--payment-paypal-container"}))}get el(){return e(this)}static get watchers(){return{isPaymentInfoFilled:[{watchIsPaymentInfoFilled:0}],stripeElements:[{watchInitStripe:0}],stripe:[{watchInitStripe:0}]}}};b.style=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";const x=class{constructor(o){t(this,o),this.paypalSessionDone=a(this,"paypalSessionDone",7),this.paypalSessionFail=a(this,"paypalSessionFail",7),this.storeUnsubscribeList=[]}async loadPaypal(){if(!window.Zonos.paypal)return void y("Paypal is not available");const t=m({onPaypalFail:()=>{y("onPaypalFail"),this.paypalSessionFail.emit()},onPaypalSessionDone:({orderId:t})=>{y("onPaypalSessionDone","info",{orderId:t}),this.paypalSessionDone.emit({orderId:t})}});if(!(null==t?void 0:t.length))return void y("There are no paypal buttons available");const o=this.el.querySelector(".zonos--payment-paypal-container");o?t.forEach((async t=>{await t.render(o)})):y("Cannot find container element for paypal buttons")}componentWillLoad(){this.storeUnsubscribeList=[d("paypal",this.loadPaypal.bind(this))]}componentDidLoad(){this.loadPaypal()}disconnectedCallback(){this.storeUnsubscribeList.forEach((t=>t()))}render(){return o(s,{key:"50cc936c450fb9afeaf488bfce6b15c2b1c29532",class:"zonos--paypal-payment zonos--elements"},o("div",{key:"5a5f49d4486acb938d4dcffbbc41c15720201f0e",class:"zonos--payment-paypal-container"}))}get el(){return e(this)}};x.style=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";export{f as zonos_card,z as zonos_empty_state_payment,g as zonos_notification,b as zonos_payment,x as zonos_paypal_payment}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-DTgUqgwV.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js"],(function(t){"use strict";var s,o,n,e,a;return{setters:[function(t){s=t.r;o=t.h;n=t.a},function(t){e=t.a},function(t){a=t.c},null],execute:function(){var i=function(){return":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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}"};var f=t("zonos_v_stack",/** @class */function(){function t(t){s(this,t);
|
|
2
2
|
/**
|
|
3
3
|
* The spacing between elements in the stack
|
|
4
4
|
* @default 24
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-DTgUqgwV.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js"],(function(t){"use strict";var o,s,e,n,i,r;return{setters:[function(t){o=t.r;s=t.h;e=t.e;n=t.a},function(t){i=t.a},function(t){r=t.c},null],execute:function(){var a=function(){return":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 img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}"};var h=t("zonos_logo",/** @class */function(){function t(t){o(this,t);
|
|
2
2
|
/**
|
|
3
3
|
* Theme to change the color of the logo
|
|
4
4
|
*/this.theme="LIGHT";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=l(0),s["throw"]=l(1),s["return"]=l(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=l(0),s["throw"]=l(1),s["return"]=l(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-CYxMfUL7.system.js","./p-6vSUiBfr.system.js","./p-DTgUqgwV.system.js","./p-C2j7R11h.system.js","./p-zVLAvre1.system.js","./p-Z99tSPFR.system.js","./p-BbgqQIHv.system.js","./p-DIab60nK.system.js"],(function(e){"use strict";var o,t,n,i,r,s,l,a,h,d,u,f,c,m,v,z,w,g,p,b,x,y,k;return{setters:[function(e){o=e.r;t=e.h;n=e.a;i=e.g},function(e){r=e.d},function(e){s=e.l;l=e.n;a=e.t;h=e.g;d=e.p;u=e.q;f=e.r;c=e.u;m=e.j;v=e.v},function(e){z=e.z;w=e.g;g=e.m},function(e){p=e.c},function(e){b=e.h;x=e.l},function(e){y=e.g},function(e){k=e.l},null],execute:function(){var _=this;var O=function(e){return __awaiter(_,[e],void 0,(function(e){var o,t,n,i,r;var s=e.items,l=e.shipFrom,a=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4/*yield*/,b("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=e.sent(),i=n.errors,r=n.json;if(i.length||!r){x("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2/*return*/,[]]}return[2/*return*/,r.filter(Boolean)]}}))}))};var L=function(e){return __awaiter(_,void 0,void 0,(function(){var o,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!e.length){return[2/*return*/,[]]}o=s.selectedCountryCode;if(!o){x("Hello could not check item restrictions - No country code selected");return[2/*return*/,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4/*yield*/,O({items:t,shipFrom:"AD",shipTo:o})];case 1:n=r.sent();i=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2/*return*/,i]}}))}))};var j=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var D=function(){var e=z.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,i=e.productListUrlPattern;
|
|
2
2
|
// The 'if' statements are sorted by most specific to least specific to help with regex matching
|
|
3
|
-
if(
|
|
3
|
+
if(j(o)){return"cart"}if(j(n)){return"productDetail"}if(j(i)){return"productList"}if(j(t)){return"home"}return""};
|
|
4
4
|
/**
|
|
5
5
|
* Default Hello widget diameter in pixels. Matches the legacy size that
|
|
6
6
|
* shipped before `widgetSize` became configurable, so existing merchants
|
|
@@ -11,11 +11,11 @@ if(D(o)){return"cart"}if(D(n)){return"productDetail"}if(D(i)){return"productList
|
|
|
11
11
|
* to the default when the merchant has not configured a size, and clamps
|
|
12
12
|
* out-of-range values so the widget always renders within the supported
|
|
13
13
|
* design bounds.
|
|
14
|
-
*/var M=function(e){if(e==null||!Number.isFinite(e)||e<=0){return B}return Math.min(I,Math.max(F,e))};var
|
|
14
|
+
*/var M=function(e){if(e==null||!Number.isFinite(e)||e<=0){return B}return Math.min(I,Math.max(F,e))};var S=function(){var e,o;var t=z.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){k("Hello could not check item restrictions - must provide title and description selectors.")}var a=r&&l(r)&&document.querySelectorAll(r)||[];var h=i&&l(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){
|
|
15
15
|
// If the title and description selectors don't match, kill item restrictions altogether
|
|
16
16
|
k("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&l(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){
|
|
17
17
|
// If the "add to cart" selectors don't match, log the error and continue
|
|
18
|
-
k('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var f=[];for(var c=0;c<a.length;c++){var m=a[c];var v=h[c];var w=u[c];if(m&&v){var g={cartButtonNode:w||null,description:((e=v.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=m.textContent)===null||o===void 0?void 0:o.trim())||""};f.push(g)}}return f};var
|
|
18
|
+
k('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var f=[];for(var c=0;c<a.length;c++){var m=a[c];var v=h[c];var w=u[c];if(m&&v){var g={cartButtonNode:w||null,description:((e=v.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=m.textContent)===null||o===void 0?void 0:o.trim())||""};f.push(g)}}return f};var C=function(e){if(e==null||typeof e!=="object"){return false}var o=e.anchor,t=e.horizontalOffset,n=e.verticalOffset;return typeof o==="string"&&o.length>0&&typeof t==="number"&&Number.isFinite(t)&&typeof n==="number"&&Number.isFinite(n)};var E=function(e){return Boolean(e===null||e===void 0?void 0:e.includes("LEFT"))};var T=function(e){return Boolean(e===null||e===void 0?void 0:e.includes("TOP"))};var X=function(e){var o=e.anchor,t=e.animateFromLeftOverride,n=e.horizontalOffset,i=e.isMobileWindow,r=e.isOnLeft,s=e.shouldFloat,l=e.verticalOffset;return{anchor:o,horizontalOffset:n,isMobileWindow:i,isOnLeft:r!==null&&r!==void 0?r:Boolean(t)||E(o),isOnTop:T(o),shouldFloat:s,verticalOffset:l}};
|
|
19
19
|
/**
|
|
20
20
|
* Resolve active Hello float placement per viewport.
|
|
21
21
|
* Precedence: component enum prop → settings HelloPlacement → settings location enum.
|
|
@@ -24,7 +24,7 @@ k('Hello could not disable "Add to cart" buttons - Title and add to cart selecto
|
|
|
24
24
|
* `shouldFloat` is always true — including when `anchorElementSelector` is set.
|
|
25
25
|
* That matches existing prop-forced float behavior and FR-006 / data-model rules
|
|
26
26
|
* (placement implies floating; enum fallback still respects the anchor selector).
|
|
27
|
-
*/var P=function(e){var o=e.anchorElementSelector,t=e.animateFromLeftOverride,n=e.componentDesktopLocation,i=e.componentMobileLocation,r=e.desktopLocation,s=e.isMobileWindow,l=e.mobileLocation,a=e.settingsDesktopPlacement,h=e.settingsMobilePlacement,d=e.shouldAnimateLeftDesktop;if(s){if(i){return X({anchor:i,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:true,shouldFloat:true,verticalOffset:null})}if(S(h)){return X({anchor:h.anchor,animateFromLeftOverride:t,horizontalOffset:h.horizontalOffset,isMobileWindow:true,shouldFloat:true,verticalOffset:h.verticalOffset})}return X({anchor:l,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:true,shouldFloat:Boolean(l),verticalOffset:null})}if(n){return X({anchor:n,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:false,shouldFloat:true,verticalOffset:null})}if(S(a)){return X({anchor:a.anchor,animateFromLeftOverride:t,horizontalOffset:a.horizontalOffset,isMobileWindow:false,shouldFloat:true,verticalOffset:a.verticalOffset})}var u=!o&&Boolean(r);var f=Boolean(t)||(u&&r?C(r):Boolean(d===null||d===void 0?void 0:d()));return X({anchor:r,horizontalOffset:null,isMobileWindow:false,isOnLeft:f,shouldFloat:u,verticalOffset:null})};var R=function(){return":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:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max( 6px, calc(var(--zonos-elements-hello-widget-size) * 0.22) );--zonos-elements-hello-bubble-size:calc( var(--zonos-elements-hello-widget-size) + var(--zonos-elements-hello-bubble-padding) * 2 + 2px )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{width:auto;height:auto;z-index:1001}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}"};var A=3e3;var N=e("zonos_hello",/** @class */function(){function e(e){var t=this;o(this,e);this.showPeekMessage=false;this.zonosStoreHelloSettings=z.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";
|
|
27
|
+
*/var R=function(e){var o=e.anchorElementSelector,t=e.animateFromLeftOverride,n=e.componentDesktopLocation,i=e.componentMobileLocation,r=e.desktopLocation,s=e.isMobileWindow,l=e.mobileLocation,a=e.settingsDesktopPlacement,h=e.settingsMobilePlacement,d=e.shouldAnimateLeftDesktop;if(s){if(i){return X({anchor:i,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:true,shouldFloat:true,verticalOffset:null})}if(C(h)){return X({anchor:h.anchor,animateFromLeftOverride:t,horizontalOffset:h.horizontalOffset,isMobileWindow:true,shouldFloat:true,verticalOffset:h.verticalOffset})}return X({anchor:l,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:true,shouldFloat:Boolean(l),verticalOffset:null})}if(n){return X({anchor:n,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:false,shouldFloat:true,verticalOffset:null})}if(C(a)){return X({anchor:a.anchor,animateFromLeftOverride:t,horizontalOffset:a.horizontalOffset,isMobileWindow:false,shouldFloat:true,verticalOffset:a.verticalOffset})}var u=!o&&Boolean(r);var f=Boolean(t)||(u&&r?E(r):Boolean(d===null||d===void 0?void 0:d()));return X({anchor:r,horizontalOffset:null,isMobileWindow:false,isOnLeft:f,shouldFloat:u,verticalOffset:null})};var A=function(){return":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:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max( 6px, calc(var(--zonos-elements-hello-widget-size) * 0.22) );--zonos-elements-hello-bubble-size:calc( var(--zonos-elements-hello-widget-size) + var(--zonos-elements-hello-bubble-padding) * 2 + 2px )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{width:auto;height:auto;z-index:1001}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}"};var N=3e3;var W=e("zonos_hello",/** @class */function(){function e(e){var t=this;o(this,e);this.showPeekMessage=false;this.zonosStoreHelloSettings=z.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";
|
|
28
28
|
/**
|
|
29
29
|
* This array will hold all restricted items handled by Hello thus far
|
|
30
30
|
*/this.allRestrictedItems=[];
|
|
@@ -45,11 +45,11 @@ if(!o||z.helloSettings.restrictionBehavior==="DISABLED"){return[2/*return*/,[]]}
|
|
|
45
45
|
// peek message delay is passed in seconds, but setTimeout expects milliseconds
|
|
46
46
|
var i=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){
|
|
47
47
|
// If restrictions, persist the message until they hover over the hello widget
|
|
48
|
-
setTimeout((function(){t.showPeekMessage=false}),
|
|
48
|
+
setTimeout((function(){t.showPeekMessage=false}),N)}}),i)}};this.disableAddToCartButtons=function(){
|
|
49
49
|
// Remove disabled attribute from all "add to cart" buttons
|
|
50
50
|
if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var i=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));
|
|
51
51
|
// if a product description matches a restrictedItems itemDescription, then disable the add to cart button. Otherwise, enable it.
|
|
52
|
-
if(i){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=
|
|
52
|
+
if(i){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=S();e=this.productsOnPage.filter((function(e){return!i.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4/*yield*/,this.getNewItemRestrictions(e)];case 1:o=r.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2/*return*/]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2/*return*/]}}))}))};this.handleProductCountChange=r((function(){var e=z.helloSettings.productTitleElementSelector;if(e){var o=S();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){
|
|
53
53
|
// if allFoundProducts length is 0 (first render or no products), kill item restriction process as initial restrictions are handled in updateHelloOnPageChange
|
|
54
54
|
if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e;var o=new MutationObserver(t.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true});(e=t.observerWatcher)===null||e===void 0?void 0:e.push(o)};this.watchPriceChange=function(){var e;var o=new MutationObserver((function(){return void t.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true});(e=t.observerWatcher)===null||e===void 0?void 0:e.push(o)};this.updateHelloOnPageChange=function(){
|
|
55
55
|
// If the product count changes on the same url (loading more products), update the peek message and item restrictions
|
|
@@ -57,7 +57,7 @@ t.watchProductCountChange();
|
|
|
57
57
|
// Check url change on interval. If changed, update the peek message and item restrictions
|
|
58
58
|
setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&h(e.searchParams);
|
|
59
59
|
// If the zCountry url param changes, reset current item restriction tracking
|
|
60
|
-
if(o!==s.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;z.currentHelloPage=
|
|
60
|
+
if(o!==s.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;z.currentHelloPage=D();var n=new URL(window.location.href);var i=h(n.searchParams);if(!i){d(s.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};
|
|
61
61
|
/**
|
|
62
62
|
* Determine if the peek message should animate from left or not
|
|
63
63
|
*/this.shouldAnimateLeftDesktop=function(){
|
|
@@ -108,11 +108,11 @@ if(this.isHelloWidgetRendered){return}
|
|
|
108
108
|
// Should only trigger once when hello is showing up on the page
|
|
109
109
|
if(s.selectedCountryCode&&typeof z.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=z.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.getHelloLocation=function(){var e=this;
|
|
110
110
|
// Enum @Prop `*LocationOverride` → component*; settings HelloPlacement object → settings*.
|
|
111
|
-
return
|
|
111
|
+
return R({anchorElementSelector:z.helloSettings.anchorElementSelector,animateFromLeftOverride:this.animateFromLeftOverride,componentDesktopLocation:this.desktopLocationOverride,componentMobileLocation:this.mobileLocationOverride,desktopLocation:z.helloSettings.desktopLocation,isMobileWindow:this.isMobile,mobileLocation:z.helloSettings.mobileLocation,settingsDesktopPlacement:z.helloSettings.desktopLocationOverride,settingsMobilePlacement:z.helloSettings.mobileLocationOverride,shouldAnimateLeftDesktop:function(){return Boolean(e.shouldAnimateLeftDesktop())}})};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){
|
|
112
112
|
// update theme to browser preference theme if appearance theme is system
|
|
113
113
|
this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme)}};e.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};e.prototype.render=function(){var e=this;var o,i;var r=(o=z.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return e&&new RegExp(e).test(window.location.href)}));if(r){k("Hello is excluded on this url","warn");return null}var l=s.selectedCountryCode,a=s.targetCurrency;var h=this.getHelloLocation(),d=h.horizontalOffset,u=h.isOnLeft,f=h.isOnTop,c=h.shouldFloat,m=h.verticalOffset;var w=g(z.appearance,this.appearanceSettingsOverride||null);var b=w.theme;var x=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));
|
|
114
114
|
// The organization name can be changed after init with the updateOrganizationName method.
|
|
115
115
|
// This will cause the element to rerender with the new org name when it changes. (used for preview on dashboard)
|
|
116
116
|
this.peekMessage=this.getHelloPeekMessage(z.organizationName);var y=v()&&!!l;
|
|
117
117
|
// If the condition for rendering Hello is met, set the toggle to true to trigger callback, should only trigger once
|
|
118
|
-
if(y&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:a})}var _=M(z.helloSettings.widgetSize);var O={"--zonos-elements-hello-widget-size":"".concat(_,"px")};if(d!=null&&m!=null){O["--zonos-elements-hello-float-inset-x"]="".concat(d,"px");O["--zonos-elements-hello-float-inset-y"]="".concat(m,"px")}return t(n,{class:"zonos--hello zonos--elements","data-theme":b,style:O},y&&t("div",{class:p(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},t("button",{class:p(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",f&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)},type:"button"},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),t("div",{class:p(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",f&&"zonos--hello-widget-top",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:u,appearanceSettings:w,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:x,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e.prototype,"helloElement",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{showDialog:[{showDialogHandler:0}],appearanceSettingsOverride:[{handleAppearanceSettingsOverrideChange:0}]}},enumerable:false,configurable:true});return e}());
|
|
118
|
+
if(y&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:a})}var _=M(z.helloSettings.widgetSize);var O={"--zonos-elements-hello-widget-size":"".concat(_,"px")};if(d!=null&&m!=null){O["--zonos-elements-hello-float-inset-x"]="".concat(d,"px");O["--zonos-elements-hello-float-inset-y"]="".concat(m,"px")}return t(n,{class:"zonos--hello zonos--elements","data-theme":b,style:O},y&&t("div",{class:p(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},t("button",{class:p(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",f&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)},type:"button"},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),t("div",{class:p(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",f&&"zonos--hello-widget-top",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:u,appearanceSettings:w,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:x,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e.prototype,"helloElement",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{showDialog:[{showDialogHandler:0}],appearanceSettingsOverride:[{handleAppearanceSettingsOverrideChange:0}]}},enumerable:false,configurable:true});return e}());W.style=A()}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-DTgUqgwV.system.js","./p-C2j7R11h.system.js","./p-zsTASoh2.system.js","./p-CKBbIU4b.system.js","./p-vN6p_rO1.system.js","./p-BbgqQIHv.system.js","./p-DW-fW8yR.system.js","./p-B3GRrRtL.system.js"],(function(o){"use strict";var s,e,t,i,n,r,l,a,d,h,p;return{setters:[function(o){s=o.r;e=o.d;t=o.h;i=o.a;n=o.g},function(o){r=o.z;l=o.a},function(o){a=o.c},function(o){d=o.g},function(o){h=o.g},function(o){p=o.i},null,null,null],execute:function(){var c=function(){return":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}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}"};var u=o("zonos_shipping_rich_radio",/** @class */function(){function o(o){var t=this;s(this,o);this.radioSelected=e(this,"radioSelected",7);
|
|
2
2
|
/**
|
|
3
3
|
* Selected item
|
|
4
4
|
* @default {null|firstItem}
|