@zonos/elements 1.3.248 → 1.3.250
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-28310848.js → cart-fcd1359c.js} +321 -22
- package/dist/cjs/{cleanHtmlMarkdown-577d0a77.js → cleanHtmlMarkdown-31da84b7.js} +9 -7
- package/dist/cjs/{debounce-815d1517.js → debounce-0c75ba33.js} +1 -1
- package/dist/cjs/{getBorderRadius-2ef1170d.js → getBorderRadius-27a74844.js} +1 -1
- package/dist/cjs/{getContrastColor-30848800.js → getContrastColor-cc087c53.js} +2 -2
- package/dist/cjs/{hasInclusivePrice-134b0250.js → hasInclusivePrice-745a8f29.js} +1 -1
- package/dist/cjs/index-b1f95d96.js +4065 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-2e8e5879.js → invoice-f040e147.js} +3 -3
- package/dist/cjs/{isCollectMobileTablet-bd0f4556.js → isCollectMobileTablet-cf92852e.js} +3 -3
- package/dist/cjs/{isContrastColor-09f5924a.js → isContrastColor-d1936a5c.js} +1 -1
- package/dist/cjs/{isDarkColor-878e600e.js → isDarkColor-a68abf7a.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{localization-00e73920.js → localization-523b793a.js} +661 -1
- package/dist/cjs/{paypal-3019ae94.js → paypal-8c98c0a1.js} +79 -21
- package/dist/cjs/{placeTestOrder-b0369cfd.js → placeTestOrder-9b1e09f0.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-9e919b9f.js → renderCheckoutCurrency-94b6e51d.js} +2 -2
- package/dist/cjs/{renderFallback-78b54537.js → renderFallback-bc20ee20.js} +1 -1
- package/dist/cjs/{submitGtag-a50ab32e.js → submitGtag-cb4fb332.js} +1 -1
- package/dist/cjs/{throttle-7dd64984.js → throttle-ff483793.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-3a1db9de.js → updateCheckoutSessionAttributes-8be63b63.js} +1 -1
- package/dist/cjs/{zonos-address-display_9.cjs.entry.js → zonos-address-display_8.cjs.entry.js} +1294 -1664
- package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-card_5.cjs.entry.js +9 -9
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +84 -30
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +113 -0
- package/dist/cjs/zonos-checkout.cjs.entry.js +60 -11
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +13 -13
- package/dist/cjs/zonos-collect.cjs.entry.js +11 -11
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +30 -3
- 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 +4 -4
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +9 -9
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +13 -13
- package/dist/cjs/zonos-invoice.cjs.entry.js +10 -10
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +6 -6
- package/dist/cjs/zonos-store-credit.cjs.entry.js +113 -0
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-37a4b4f4.js → zonosStore-f5a61112.js} +110 -25
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +49 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +18 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/assets/StoreCreditIcon.svg +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.css +139 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +137 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +52 -1
- package/dist/collection/components/common/zonos-button/zonos-button.css +3 -1
- package/dist/collection/components/common/zonos-input/zonos-input.css +3 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +3 -1
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +1 -1
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.css +3 -1
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +62 -4
- package/dist/collection/components/store/checkout/paypal.js +28 -0
- package/dist/collection/components/store/checkout/storeCredit.js +237 -0
- package/dist/collection/components/store/checkout/stripe.js +2 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +33 -0
- package/dist/collection/components/store/translationStore/strings.base.js +33 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +33 -0
- package/dist/collection/components/store/translationStore/strings.french.js +33 -0
- package/dist/collection/components/store/translationStore/strings.german.js +33 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +33 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +33 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +33 -0
- package/dist/collection/types/generated/graphql.internal.types.js +589 -0
- package/dist/esm/{cart-ba8f3890.js → cart-6e465f7b.js} +311 -23
- package/dist/esm/{cleanHtmlMarkdown-b5b18743.js → cleanHtmlMarkdown-5f7856f2.js} +9 -7
- package/dist/esm/{debounce-c4785346.js → debounce-efc0e473.js} +1 -1
- package/dist/esm/{getBorderRadius-877f6389.js → getBorderRadius-c21a42e5.js} +1 -1
- package/dist/esm/{getContrastColor-28c18704.js → getContrastColor-98f0d1d5.js} +2 -2
- package/dist/esm/{hasInclusivePrice-6fcc712f.js → hasInclusivePrice-c49d384d.js} +1 -1
- package/dist/esm/index-cfd394c8.js +4028 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-055bb6e5.js → invoice-d416ba65.js} +3 -3
- package/dist/esm/{isCollectMobileTablet-797cea8b.js → isCollectMobileTablet-48040572.js} +3 -3
- package/dist/esm/{isContrastColor-69778cea.js → isContrastColor-c17e83c9.js} +1 -1
- package/dist/esm/{isDarkColor-9ddd90cc.js → isDarkColor-3537021b.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{localization-853b48a9.js → localization-f4a7fb5a.js} +661 -1
- package/dist/esm/{paypal-8d8518c0.js → paypal-6af6b978.js} +79 -21
- package/dist/esm/{placeTestOrder-0a74923e.js → placeTestOrder-d19ac166.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-bd059ecf.js → renderCheckoutCurrency-c8aa8e7e.js} +2 -2
- package/dist/esm/{renderFallback-3f010b48.js → renderFallback-b250f4e9.js} +1 -1
- package/dist/esm/{submitGtag-89d6e9cb.js → submitGtag-13de9f1f.js} +1 -1
- package/dist/esm/{throttle-ce2432ab.js → throttle-0504ba2c.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-047a6cd4.js → updateCheckoutSessionAttributes-b9f7e982.js} +1 -1
- package/dist/esm/{zonos-address-display_9.entry.js → zonos-address-display_8.entry.js} +1295 -1664
- package/dist/esm/zonos-address_4.entry.js +8 -8
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +5 -5
- package/dist/esm/zonos-card_5.entry.js +9 -9
- package/dist/esm/zonos-cart-items_12.entry.js +84 -30
- package/dist/esm/zonos-checkbox_2.entry.js +108 -0
- package/dist/esm/zonos-checkout.entry.js +60 -11
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
- package/dist/esm/zonos-collect-finish_6.entry.js +13 -13
- package/dist/esm/zonos-collect.entry.js +11 -11
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +3 -3
- package/dist/esm/zonos-country-select_4.entry.js +4 -4
- package/dist/esm/zonos-elements.js +31 -4
- 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 +4 -4
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +9 -9
- package/dist/esm/zonos-invoice-finish_5.entry.js +13 -13
- package/dist/esm/zonos-invoice.entry.js +10 -10
- package/dist/esm/zonos-language-select_2.entry.js +3 -3
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +6 -6
- package/dist/esm/zonos-store-credit.entry.js +109 -0
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-b434e436.js → zonosStore-5242a58d.js} +110 -25
- package/dist/esm-es5/cart-6e465f7b.js +1 -0
- package/dist/esm-es5/cleanHtmlMarkdown-5f7856f2.js +1 -0
- package/dist/esm-es5/{debounce-c4785346.js → debounce-efc0e473.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-877f6389.js → getBorderRadius-c21a42e5.js} +1 -1
- package/dist/esm-es5/{getContrastColor-28c18704.js → getContrastColor-98f0d1d5.js} +1 -1
- package/dist/esm-es5/hasInclusivePrice-c49d384d.js +1 -0
- package/dist/esm-es5/index-cfd394c8.js +13 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-055bb6e5.js → invoice-d416ba65.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-797cea8b.js → isCollectMobileTablet-48040572.js} +1 -1
- package/dist/esm-es5/{isContrastColor-69778cea.js → isContrastColor-c17e83c9.js} +1 -1
- package/dist/esm-es5/{isDarkColor-9ddd90cc.js → isDarkColor-3537021b.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-f4a7fb5a.js +1 -0
- package/dist/esm-es5/paypal-6af6b978.js +17 -0
- package/dist/esm-es5/{placeTestOrder-0a74923e.js → placeTestOrder-d19ac166.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-bd059ecf.js → renderCheckoutCurrency-c8aa8e7e.js} +1 -1
- package/dist/esm-es5/{renderFallback-3f010b48.js → renderFallback-b250f4e9.js} +1 -1
- package/dist/esm-es5/{submitGtag-89d6e9cb.js → submitGtag-13de9f1f.js} +1 -1
- package/dist/esm-es5/{throttle-ce2432ab.js → throttle-0504ba2c.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-047a6cd4.js → updateCheckoutSessionAttributes-b9f7e982.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -0
- package/dist/esm-es5/zonos-address_4.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 +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -0
- 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-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-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 +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-store-credit.entry.js +1 -0
- 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-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/zonosStore-5242a58d.js +1 -0
- package/dist/scripts/index.d.ts +60 -3
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.d.ts +17 -0
- package/dist/types/components/store/checkout/cart.d.ts +8 -1
- package/dist/types/components/store/checkout/storeCredit.d.ts +111 -0
- package/dist/types/components/store/checkout/stripe.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +33 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/types/environment.d.ts +2 -2
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +9 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +713 -4
- package/dist/types/types/generated/graphql.internal.types.ts +956 -4
- package/dist/types/types/global.d.ts +2 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-058f6124.js +1 -0
- package/dist/zonos-elements/{p-7aa50ef2.entry.js → p-0d18d94b.entry.js} +1 -1
- package/dist/zonos-elements/{p-c01f86b4.entry.js → p-12459b59.entry.js} +1 -1
- package/dist/zonos-elements/{p-de8899bc.js → p-13ed3789.js} +1 -1
- package/dist/zonos-elements/{p-8205ae87.system.entry.js → p-17fbfda0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-18d411c3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-69b9b711.entry.js → p-1b56814d.entry.js} +1 -1
- package/dist/zonos-elements/p-1b8771bb.js +1 -0
- package/dist/zonos-elements/{p-eea7ac64.js → p-1e6509d7.js} +1 -1
- package/dist/zonos-elements/{p-c7311ce5.system.entry.js → p-1f63615f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5062dcf3.system.entry.js → p-234f0339.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2435f196.entry.js +1 -0
- package/dist/zonos-elements/p-26848428.entry.js +1 -0
- package/dist/zonos-elements/p-28d62fc8.system.entry.js +1 -0
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -0
- package/dist/zonos-elements/{p-1c4d12f0.entry.js → p-2aa44601.entry.js} +1 -1
- package/dist/zonos-elements/p-2b7ef406.system.js +18 -0
- package/dist/zonos-elements/p-34d10122.js +1 -0
- package/dist/zonos-elements/{p-e17bbcee.entry.js → p-3827041d.entry.js} +1 -1
- package/dist/zonos-elements/{p-14c920b2.system.entry.js → p-38881641.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c6e3d747.system.js → p-3fbd9cc0.system.js} +1 -1
- package/dist/zonos-elements/p-45bd8072.system.js +1 -0
- package/dist/zonos-elements/{p-bc4bfa06.js → p-48228d76.js} +1 -1
- package/dist/zonos-elements/{p-9c49daa4.entry.js → p-4aefd668.entry.js} +1 -1
- package/dist/zonos-elements/p-4d5932ac.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a359e0a2.system.entry.js → p-4e4fa1fb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c36696f9.js → p-4f7d64f6.js} +1 -1
- package/dist/zonos-elements/p-53db5f85.system.js +1 -0
- package/dist/zonos-elements/{p-403b9fca.entry.js → p-59fe8416.entry.js} +1 -1
- package/dist/zonos-elements/{p-7b400b5f.system.entry.js → p-5ca50862.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5dd86dd9.system.js +1 -0
- package/dist/zonos-elements/p-5f628e57.entry.js +1 -0
- package/dist/zonos-elements/{p-b54a95ea.system.entry.js → p-5fceccc3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-64ad0854.entry.js +1 -0
- package/dist/zonos-elements/{p-942358eb.system.js → p-65892fa7.system.js} +1 -1
- package/dist/zonos-elements/{p-aa028d91.entry.js → p-66d72216.entry.js} +1 -1
- package/dist/zonos-elements/{p-58248f03.entry.js → p-66e1dc55.entry.js} +1 -1
- package/dist/zonos-elements/{p-57fa64d7.js → p-67897a0d.js} +1 -1
- package/dist/zonos-elements/{p-917f714c.system.entry.js → p-6f19845a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-291f7ccb.system.entry.js → p-7042c6da.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-232b0fb5.system.entry.js → p-70c8a47d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7261e245.system.js +13 -0
- package/dist/zonos-elements/p-741e07e1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3e67ca05.entry.js → p-7427dd1e.entry.js} +1 -1
- package/dist/zonos-elements/{p-23d497e3.system.js → p-7501c637.system.js} +1 -1
- package/dist/zonos-elements/p-77113201.system.js +1 -0
- package/dist/zonos-elements/{p-a12cb7ce.entry.js → p-77c0a02b.entry.js} +1 -1
- package/dist/zonos-elements/p-7d7ffb42.js +1 -0
- package/dist/zonos-elements/{p-1acf0a71.system.entry.js → p-85529818.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cfb9b847.system.entry.js → p-87d89870.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-443e1f30.system.js → p-8c6624b6.system.js} +1 -1
- package/dist/zonos-elements/{p-57cee1b5.system.entry.js → p-8d5f928c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8f1ab25c.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5762e217.js → p-908f13ae.js} +1 -1
- package/dist/zonos-elements/{p-63a3d3b9.system.js → p-90b8c428.system.js} +1 -1
- package/dist/zonos-elements/{p-8f0f6449.entry.js → p-939ba2a5.entry.js} +1 -1
- package/dist/zonos-elements/p-9581bffb.js +1 -0
- package/dist/zonos-elements/p-959918fe.system.js +1 -0
- package/dist/zonos-elements/p-997b7eef.js +1 -0
- package/dist/zonos-elements/{p-0792688d.system.entry.js → p-9bc5e944.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9c6917ab.system.js +1 -0
- package/dist/zonos-elements/{p-f8d56ba9.system.js → p-9d44fef6.system.js} +1 -1
- package/dist/zonos-elements/p-9d64783a.entry.js +1 -0
- package/dist/zonos-elements/{p-71a8d971.system.entry.js → p-9f49e35a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2f55895c.system.entry.js → p-a026b5ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-85e59f3a.system.entry.js → p-a1a3657e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c2f34b10.system.entry.js → p-a1b0e9a5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fb9fb873.system.entry.js → p-a1c476d6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a6a401e5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5edef7c3.system.js → p-ab25379f.system.js} +1 -1
- package/dist/zonos-elements/p-ac30b7a8.system.js +1 -0
- package/dist/zonos-elements/{p-37bb5f2d.entry.js → p-b004146f.entry.js} +1 -1
- package/dist/zonos-elements/{p-3908f78d.system.entry.js → p-b07da3e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-71f10bf0.entry.js → p-b08bf843.entry.js} +1 -1
- package/dist/zonos-elements/p-b334c76c.entry.js +1 -0
- package/dist/zonos-elements/{p-69212d0f.entry.js → p-b9581a92.entry.js} +1 -1
- package/dist/zonos-elements/{p-84cf1a90.system.entry.js → p-bdaf94a4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-231baaf8.entry.js → p-c1ab70d2.entry.js} +1 -1
- package/dist/zonos-elements/p-c30a155e.js +1 -0
- package/dist/zonos-elements/{p-aedd3911.entry.js → p-c9d4eb42.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e85b9f5.system.entry.js → p-cad67b10.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cc78c9d4.js +17 -0
- package/dist/zonos-elements/p-ce75b047.js +2 -0
- package/dist/zonos-elements/{p-909e2bc3.system.js → p-d18a2b2c.system.js} +1 -1
- package/dist/zonos-elements/{p-83377e23.entry.js → p-d2301d8a.entry.js} +1 -1
- package/dist/zonos-elements/p-d46484aa.entry.js +1 -0
- package/dist/zonos-elements/{p-3972663a.system.entry.js → p-d634f954.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-14735e9a.system.entry.js → p-dbb3db89.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4592ae49.entry.js → p-ddcbea81.entry.js} +1 -1
- package/dist/zonos-elements/p-def2d465.js +1 -0
- package/dist/zonos-elements/p-df316670.system.js +1 -0
- package/dist/zonos-elements/p-e219d011.js +1 -0
- package/dist/zonos-elements/p-e331a235.js +1 -0
- package/dist/zonos-elements/p-e4d58bd7.js +1 -0
- package/dist/zonos-elements/{p-48475755.entry.js → p-e9ca4447.entry.js} +1 -1
- package/dist/zonos-elements/{p-6adfb3af.system.entry.js → p-ed61dedd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ee217693.entry.js +1 -0
- package/dist/zonos-elements/{p-ae16dda9.system.js → p-f0855df3.system.js} +1 -1
- package/dist/zonos-elements/p-f0938b51.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d5b7d3c3.entry.js → p-f25e7f5a.entry.js} +1 -1
- package/dist/zonos-elements/{p-0ff93ca6.entry.js → p-f4cc124f.entry.js} +1 -1
- package/dist/zonos-elements/p-f830f800.js +1 -0
- package/dist/zonos-elements/p-fa0139c3.system.js +1 -0
- package/dist/zonos-elements/p-fa5767c3.system.js +1 -0
- package/dist/zonos-elements/{p-39fa55c7.entry.js → p-fbfaa4f9.entry.js} +1 -1
- package/dist/zonos-elements/p-fe6cc354.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +70 -52
- package/dist/cjs/index-69fa8852.js +0 -1961
- package/dist/cjs/zonos-toggle.cjs.entry.js +0 -35
- package/dist/esm/index-0bbe9693.js +0 -1928
- package/dist/esm/zonos-toggle.entry.js +0 -31
- package/dist/esm-es5/cart-ba8f3890.js +0 -1
- package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +0 -1
- package/dist/esm-es5/hasInclusivePrice-6fcc712f.js +0 -1
- package/dist/esm-es5/index-0bbe9693.js +0 -2
- package/dist/esm-es5/localization-853b48a9.js +0 -1
- package/dist/esm-es5/paypal-8d8518c0.js +0 -17
- package/dist/esm-es5/zonos-address-display_9.entry.js +0 -1
- package/dist/esm-es5/zonos-toggle.entry.js +0 -1
- package/dist/esm-es5/zonosStore-b434e436.js +0 -1
- package/dist/zonos-elements/p-002e45f9.system.js +0 -17
- package/dist/zonos-elements/p-01dada4e.js +0 -1
- package/dist/zonos-elements/p-09aabce0.js +0 -1
- package/dist/zonos-elements/p-0b7beb16.system.entry.js +0 -1
- package/dist/zonos-elements/p-0ef2a242.js +0 -1
- package/dist/zonos-elements/p-0f787f5d.entry.js +0 -1
- package/dist/zonos-elements/p-1dbeeab2.entry.js +0 -1
- package/dist/zonos-elements/p-1f894984.js +0 -1
- package/dist/zonos-elements/p-27f6930b.js +0 -1
- package/dist/zonos-elements/p-2c2a1339.system.entry.js +0 -1
- package/dist/zonos-elements/p-3bec13dd.system.js +0 -1
- package/dist/zonos-elements/p-41299ffb.js +0 -1
- package/dist/zonos-elements/p-43a22d85.entry.js +0 -1
- package/dist/zonos-elements/p-4ffbb0d6.system.js +0 -1
- package/dist/zonos-elements/p-64661dd1.js +0 -1
- package/dist/zonos-elements/p-719403e0.system.js +0 -1
- package/dist/zonos-elements/p-71d855b8.system.entry.js +0 -1
- package/dist/zonos-elements/p-72ff005c.entry.js +0 -1
- package/dist/zonos-elements/p-786d1c24.js +0 -1
- package/dist/zonos-elements/p-7dba5f23.system.js +0 -1
- package/dist/zonos-elements/p-866afec1.js +0 -1
- package/dist/zonos-elements/p-94c5fbfc.system.entry.js +0 -1
- package/dist/zonos-elements/p-989d3af9.system.js +0 -2
- package/dist/zonos-elements/p-9fa90292.system.entry.js +0 -1
- package/dist/zonos-elements/p-ab41bab5.js +0 -2
- package/dist/zonos-elements/p-abf38ed6.js +0 -1
- package/dist/zonos-elements/p-ae26aec5.system.js +0 -1
- package/dist/zonos-elements/p-af85846e.system.js +0 -1
- package/dist/zonos-elements/p-b2a0ab4a.js +0 -1
- package/dist/zonos-elements/p-b2ae8eb7.system.js +0 -1
- package/dist/zonos-elements/p-bf5e47e2.entry.js +0 -1
- package/dist/zonos-elements/p-c027a832.system.js +0 -1
- package/dist/zonos-elements/p-c1fb3a2d.entry.js +0 -1
- package/dist/zonos-elements/p-c2442878.system.js +0 -1
- package/dist/zonos-elements/p-d45285aa.system.js +0 -1
- package/dist/zonos-elements/p-dcf999d8.entry.js +0 -1
- package/dist/zonos-elements/p-e9e6bea7.system.entry.js +0 -1
- package/dist/zonos-elements/p-f6c2c743.entry.js +0 -1
- package/dist/zonos-elements/p-fc776473.js +0 -1
- package/dist/zonos-elements/p-fe06c9ea.js +0 -17
- package/dist/zonos-elements/p-fe96e239.system.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as _root,b as _baseGetTag,i as isObjectLike_1,d as isObject_1}from"./zonosStore-
|
|
1
|
+
import{_ as _root,b as _baseGetTag,i as isObjectLike_1,d as isObject_1}from"./zonosStore-5242a58d.js";var root=_root;var now$1=function(){return root.Date.now()};var now_1=now$1;var reWhitespace=/\s/;function trimmedEndIndex$1(e){var r=e.length;while(r--&&reWhitespace.test(e.charAt(r))){}return r}var _trimmedEndIndex=trimmedEndIndex$1;var trimmedEndIndex=_trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim$1(e){return e?e.slice(0,trimmedEndIndex(e)+1).replace(reTrimStart,""):e}var _baseTrim=baseTrim$1;var baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1;var symbolTag="[object Symbol]";function isSymbol$1(e){return typeof e=="symbol"||isObjectLike(e)&&baseGetTag(e)==symbolTag}var isSymbol_1=isSymbol$1;var baseTrim=_baseTrim,isObject$1=isObject_1,isSymbol=isSymbol_1;var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber$1(e){if(typeof e=="number"){return e}if(isSymbol(e)){return NAN}if(isObject$1(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=isObject$1(r)?r+"":r}if(typeof e!="string"){return e===0?e:+e}e=baseTrim(e);var n=reIsBinary.test(e);return n||reIsOctal.test(e)?freeParseInt(e.slice(2),n?2:8):reIsBadHex.test(e)?NAN:+e}var toNumber_1=toNumber$1;var isObject=isObject_1,now=now_1,toNumber=toNumber_1;var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max,nativeMin=Math.min;function debounce(e,r,n){var t,i,a,o,u,s,f=0,b=false,m=false,d=true;if(typeof e!="function"){throw new TypeError(FUNC_ERROR_TEXT)}r=toNumber(r)||0;if(isObject(n)){b=!!n.leading;m="maxWait"in n;a=m?nativeMax(toNumber(n.maxWait)||0,r):a;d="trailing"in n?!!n.trailing:d}function c(r){var n=t,a=i;t=i=undefined;f=r;o=e.apply(a,n);return o}function v(e){f=e;u=setTimeout(l,r);return b?c(e):o}function _(e){var n=e-s,t=e-f,i=r-n;return m?nativeMin(i,a-t):i}function T(e){var n=e-s,t=e-f;return s===undefined||n>=r||n<0||m&&t>=a}function l(){var e=now();if(T(e)){return y(e)}u=setTimeout(l,_(e))}function y(e){u=undefined;if(d&&t){return c(e)}t=i=undefined;return o}function O(){if(u!==undefined){clearTimeout(u)}f=0;t=s=i=u=undefined}function $(){return u===undefined?o:y(now())}function I(){var e=now(),n=T(e);t=arguments;i=this;s=e;if(n){if(u===undefined){return v(s)}if(m){clearTimeout(u);u=setTimeout(l,r);return c(s)}}if(u===undefined){u=setTimeout(l,r)}return o}I.cancel=O;I.flush=$;return I}var debounce_1=debounce;export{debounce_1 as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as zonosStore}from"./zonosStore-
|
|
1
|
+
import{z as zonosStore}from"./zonosStore-5242a58d.js";var getBorderRadius=function(o){var r=(o===null||o===void 0?void 0:o.customRoundRadius)||"10px";var e=o===null||o===void 0?void 0:o.overrideBorderStyle;if(e){return e==="SHARP"?"0px":r}return zonosStore.appearance.style==="SHARP"?"0px":r};export{getBorderRadius as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as isDarkColor,t as tinycolor}from"./isDarkColor-
|
|
1
|
+
import{i as isDarkColor,t as tinycolor}from"./isDarkColor-3537021b.js";import{i as isContrastColor}from"./isContrastColor-c17e83c9.js";var getContrastColor=function(r){var o=r.backgroundColor,t=r.color;if(o===t){if(isDarkColor(t)){var a=tinycolor(t).lighten(40).toHexString();return a}var i=tinycolor(t).darken(40).toHexString();return i}var n=isContrastColor({backgroundColor1:o,backgroundColor2:t});if(n){return t}if(isDarkColor(t)){return"#ffffff"}var s=tinycolor(t).darken(25).toHexString();var C=tinycolor(t).lighten(25).toHexString();var l=isContrastColor({backgroundColor1:o,backgroundColor2:s});return l?s:C};export{getContrastColor as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as localizationStore}from"./localization-f4a7fb5a.js";var DUTY_KEY="gkjqw123";var TAXES_KEY="Kq93wqw3";var hasInclusivePrice=function(){var a;return(a=localizationStore.inclusivePricingConfigurations)===null||a===void 0?void 0:a.some((function(a){var i,o;return((i=a.configurations[DUTY_KEY])===null||i===void 0?void 0:i.status)==="ENABLED"||((o=a.configurations[TAXES_KEY])===null||o===void 0?void 0:o.status)==="ENABLED"}))};export{DUTY_KEY as D,TAXES_KEY as T,hasInclusivePrice as h};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):o(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};var NAMESPACE="zonos-elements";var BUILD={allRenderFn:true,appendChildSlotFix:false,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:false,constructableCSS:true,cssAnnotations:true,devTools:false,element:false,event:true,experimentalScopedSlotChanges:false,experimentalSlotFixes:false,formAssociated:false,hasRenderFn:true,hostListener:true,hostListenerTarget:true,hostListenerTargetBody:true,hostListenerTargetDocument:true,hostListenerTargetParent:false,hostListenerTargetWindow:true,hotModuleReplacement:false,hydrateClientSide:false,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,hydratedSelectorName:"hydrated",initializeNextTick:false,invisiblePrehydration:true,isDebug:false,isDev:false,isTesting:false,lazyLoad:true,lifecycle:true,lifecycleDOMEvents:false,member:true,method:true,mode:false,modernPropertyDecls:false,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:true,propNumber:true,propString:true,reflect:false,scoped:true,scopedSlotTextContentFix:false,scriptDataOpts:false,shadowDelegatesFocus:true,shadowDom:true,slot:true,slotChildNodesFix:false,slotRelocation:true,state:true,style:true,svg:true,taskQueue:true,transformTagName:false,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:true,vdomListener:true,vdomPropOrAttr:true,vdomRef:true,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:true,watchCallback:true};var Env={};var __defProp=Object.defineProperty;var __export=function(e,t){for(var r in t)__defProp(e,r,{get:t[r],enumerable:true})};var Build={isDev:BUILD.isDev?true:false,isBrowser:true,isServer:false,isTesting:BUILD.isTesting?true:false};var SVG_NS="http://www.w3.org/2000/svg";var HTML_NS="http://www.w3.org/1999/xhtml";var reWireGetterSetter=function(e,t){var r;var n=t.t;var o=Object.entries((r=n.o)!=null?r:{});o.map((function(r){var n=r[0],o=r[1][0];if((BUILD.state||BUILD.prop)&&(o&31||o&32)){var i=e[n];var a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),n);Object.defineProperty(e,n,{get:function(){return a.get.call(this)},set:function(e){a.set.call(this,e)},configurable:true,enumerable:true});e[n]=t.i.has(n)?t.i.get(n):i}}))};var getHostRef=function(e){if(e.__stencil__getHostRef){return e.__stencil__getHostRef()}return void 0};var registerInstance=function(e,t){e.__stencil__getHostRef=function(){return t};t.l=e;if(BUILD.modernPropertyDecls&&(BUILD.state||BUILD.prop)){reWireGetterSetter(e,t)}};var registerHost=function(e,t){var r={u:0,$hostElement$:e,t:t,i:new Map};if(BUILD.isDev){r.v=0}if(BUILD.method&&BUILD.lazyLoad){r.p=new Promise((function(e){return r.D=e}))}if(BUILD.asyncLoading){r.m=new Promise((function(e){return r.L=e}));e["s-p"]=[];e["s-rc"]=[]}var n=r;e.__stencil__getHostRef=function(){return n};if(!BUILD.lazyLoad&&BUILD.modernPropertyDecls&&(BUILD.state||BUILD.prop)){reWireGetterSetter(e,r)}return n};var isMemberInElement=function(e,t){return t in e};var customError;var consoleError=function(e,t){return(customError||console.error)(e,t)};var STENCIL_DEV_MODE=BUILD.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"];var consoleDevError=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return console.error.apply(console,__spreadArray(__spreadArray([],STENCIL_DEV_MODE,false),e,false))};var consoleDevWarn=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return console.warn.apply(console,__spreadArray(__spreadArray([],STENCIL_DEV_MODE,false),e,false))};var consoleDevInfo=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return console.info.apply(console,__spreadArray(__spreadArray([],STENCIL_DEV_MODE,false),e,false))};var setErrorHandler=function(e){return customError=e};var cmpModules=new Map;var loadModule=function(e,t,r){var n=e.I.replace(/-/g,"_");var o=e.S;if(BUILD.isDev&&typeof o!=="string"){consoleDevError("Trying to lazily load component <".concat(e.I,'> with style mode "').concat(t.B,'", but it does not exist.'));return void 0}else if(!o){return void 0}var i=!BUILD.hotModuleReplacement?cmpModules.get(o):false;if(i){return i[n]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(o,".entry.js").concat(BUILD.hotModuleReplacement&&r?"?s-hmr="+r:"")).then((function(e){if(!BUILD.hotModuleReplacement){cmpModules.set(o,e)}return e[n]}),(function(e){consoleError(e,t.$hostElement$)}))};var styles=new Map;var modeResolutionChain=[];var CONTENT_REF_ID="r";var ORG_LOCATION_ID="o";var SLOT_NODE_ID="s";var TEXT_NODE_ID="t";var COMMENT_NODE_ID="c";var HYDRATE_ID="s-id";var HYDRATED_STYLE_ID="sty-id";var HYDRATE_CHILD_ID="c-id";var HYDRATED_CSS="{visibility:hidden}.hydrated{visibility:inherit}";var STENCIL_DOC_DATA="_stencilDocData";var DEFAULT_DOC_DATA={hostIds:0,rootLevelIds:0,staticComponents:new Set};var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";var XLINK_NS="http://www.w3.org/1999/xlink";var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"];var win=typeof window!=="undefined"?window:{};var H=win.HTMLElement||function(){function e(){}return e}();var plt={u:0,U:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,r,n){return e.addEventListener(t,r,n)},rel:function(e,t,r,n){return e.removeEventListener(t,r,n)},ce:function(e,t){return new CustomEvent(e,t)}};var setPlatformHelpers=function(e){Object.assign(plt,e)};var supportsShadow=BUILD.shadowDom;var supportsListenerOptions=function(){var e;var t=false;try{(e=win.document)==null?void 0:e.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){t=true}}))}catch(e){}return t}();var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=BUILD.constructableCSS?function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}():false;var queueCongestion=0;var queuePending=false;var queueDomReads=[];var queueDomWrites=[];var queueDomWritesLow=[];var queueTask=function(e,t){return function(r){e.push(r);if(!queuePending){queuePending=true;if(t&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){consoleError(e)}}e.length=0};var consumeTimeout=function(e,t){var r=0;var n=0;while(r<e.length&&(n=performance.now())<t){try{e[r++](n)}catch(e){consoleError(e)}}if(r===e.length){e.length=0}else if(r!==0){e.splice(0,r)}};var flush=function(){if(BUILD.asyncQueue){queueCongestion++}consume(queueDomReads);if(BUILD.asyncQueue){var e=(plt.u&6)===2?performance.now()+14*Math.ceil(queueCongestion*(1/10)):Infinity;consumeTimeout(queueDomWrites,e);consumeTimeout(queueDomWritesLow,e);if(queueDomWrites.length>0){queueDomWritesLow.push.apply(queueDomWritesLow,queueDomWrites);queueDomWrites.length=0}if(queuePending=queueDomReads.length+queueDomWrites.length+queueDomWritesLow.length>0){plt.raf(flush)}else{queueCongestion=0}}else{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var readTask=queueTask(queueDomReads,false);var writeTask=queueTask(queueDomWrites,true);var getAssetPath=function(e){var t=new URL(e,plt.U);return t.origin!==win.location.origin?t.href:t.pathname};var setAssetPath=function(e){return plt.U=e};var isDef=function(e){return e!=null&&e!==void 0};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var t,r,n;return(n=(r=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:r.getAttribute("content"))!=null?n:void 0}var escapeRegExpSpecialCharacters=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")};var result_exports={};__export(result_exports,{err:function(){return err},map:function(){return map},ok:function(){return ok},unwrap:function(){return unwrap},unwrapErr:function(){return unwrapErr}});var ok=function(e){return{isOk:true,isErr:false,value:e}};var err=function(e){return{isOk:false,isErr:true,value:e}};function map(e,t){if(e.isOk){var r=t(e.value);if(r instanceof Promise){return r.then((function(e){return ok(e)}))}else{return ok(r)}}if(e.isErr){var n=e.value;return err(n)}throw"should never get here"}var unwrap=function(e){if(e.isOk){return e.value}else{throw e.value}};var unwrapErr=function(e){if(e.isErr){return e.value}else{throw e.value}};var updateFallbackSlotVisibility=function(e){var t=internalCall(e,"childNodes");if(e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"){getHostSlotNodes(t,e.tagName).forEach((function(e){if(e.nodeType===1&&e.tagName==="SLOT-FB"){if(getSlotChildSiblings(e,getSlotName(e),false).length){e.hidden=true}else{e.hidden=false}}}))}var r=0;for(r=0;r<t.length;r++){var n=t[r];if(n.nodeType===1&&internalCall(n,"childNodes").length){updateFallbackSlotVisibility(n)}}};var getSlottedChildNodes=function(e){var t=[];for(var r=0;r<e.length;r++){var n=e[r]["s-nr"]||void 0;if(n&&n.isConnected){t.push(n)}}return t};function getHostSlotNodes(e,t,r){var n=0;var o=[];var i;for(;n<e.length;n++){i=e[n];if(i["s-sr"]&&(!t||i["s-hn"]===t)&&(r===void 0||getSlotName(i)===r)){o.push(i);if(typeof r!=="undefined")return o}o=__spreadArray(__spreadArray([],o,true),getHostSlotNodes(i.childNodes,t,r),true)}return o}var getSlotChildSiblings=function(e,t,r){if(r===void 0){r=true}var n=[];if(r&&e["s-sr"]||!e["s-sr"])n.push(e);var o=e;while(o=o.nextSibling){if(getSlotName(o)===t&&(r||!o["s-sr"]))n.push(o)}return n};var isNodeLocatedInSlot=function(e,t){if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};var addSlotRelocateNode=function(e,t,r,n){if(e["s-ol"]&&e["s-ol"].isConnected){return}var o=document.createTextNode("");o["s-nr"]=e;if(!t["s-cr"]||!t["s-cr"].parentNode)return;var i=t["s-cr"].parentNode;var a=r?internalCall(i,"prepend"):internalCall(i,"appendChild");if(BUILD.hydrateClientSide&&typeof n!=="undefined"){o["s-oo"]=n;var s=internalCall(i,"childNodes");var l=[o];s.forEach((function(e){if(e["s-nr"])l.push(e)}));l.sort((function(e,t){if(!e["s-oo"]||e["s-oo"]<(t["s-oo"]||0))return-1;else if(!t["s-oo"]||t["s-oo"]<e["s-oo"])return 1;return 0}));l.forEach((function(e){return a.call(i,e)}))}else{a.call(i,o)}e["s-ol"]=o;e["s-sh"]=t["s-hn"]};var getSlotName=function(e){return typeof e["s-sn"]==="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0};function patchSlotNode(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;var t=function(t){return function(e){var r=[];var n=this["s-sn"];if(e==null?void 0:e.flatten){console.error("\n Flattening is not supported for Stencil non-shadow slots. \n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ")}var o=this["s-cr"].parentElement;var i=o.__childNodes?o.childNodes:getSlottedChildNodes(o.childNodes);i.forEach((function(e){if(n===getSlotName(e)){r.push(e)}}));if(t){return r.filter((function(e){return e.nodeType===1}))}return r}.bind(e)};e.assignedElements=t(true);e.assignedNodes=t(false)}function dispatchSlotChangeEvent(e){e.dispatchEvent(new CustomEvent("slotchange",{bubbles:false,cancelable:false,composed:false}))}function findSlotFromSlottedNode(e,t){var r;t=t||((r=e["s-ol"])==null?void 0:r.parentElement);if(!t)return{slotNode:null,slotName:""};var n=e["s-sn"]=getSlotName(e)||"";var o=internalCall(t,"childNodes");var i=getHostSlotNodes(o,t.tagName,n)[0];return{slotNode:i,slotName:n}}var patchPseudoShadowDom=function(e){patchCloneNode(e);patchSlotAppendChild(e);patchSlotAppend(e);patchSlotPrepend(e);patchSlotInsertAdjacentElement(e);patchSlotInsertAdjacentHTML(e);patchSlotInsertAdjacentText(e);patchInsertBefore(e);patchTextContent(e);patchChildSlotNodes(e);patchSlotRemoveChild(e)};var patchCloneNode=function(e){var t=e.cloneNode;e.cloneNode=function(e){var r=this;var n=BUILD.shadowDom?r.shadowRoot&&supportsShadow:false;var o=t.call(r,n?e:false);if(BUILD.slot&&!n&&e){var i=0;var a=void 0,s=void 0;var l=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"];var f=this.__childNodes||this.childNodes;for(;i<f.length;i++){a=f[i]["s-nr"];s=l.every((function(e){return!f[i][e]}));if(a){if(BUILD.appendChildSlotFix&&o.__appendChild){o.__appendChild(a.cloneNode(true))}else{o.appendChild(a.cloneNode(true))}}if(s){o.appendChild(f[i].cloneNode(true))}}}return o}};var patchSlotAppendChild=function(e){e.__appendChild=e.appendChild;e.appendChild=function(e){var t=findSlotFromSlottedNode(e,this),r=t.slotName,n=t.slotNode;if(n){addSlotRelocateNode(e,n);var o=getSlotChildSiblings(n,r);var i=o[o.length-1];var a=internalCall(i,"parentNode");var s=internalCall(a,"insertBefore")(e,i.nextSibling);dispatchSlotChangeEvent(n);updateFallbackSlotVisibility(this);return s}return this.__appendChild(e)}};var patchSlotRemoveChild=function(e){e.__removeChild=e.removeChild;e.removeChild=function(e){if(e&&typeof e["s-sn"]!=="undefined"){var t=this.__childNodes||this.childNodes;var r=getHostSlotNodes(t,this.tagName,e["s-sn"]);if(r&&e.isConnected){e.remove();updateFallbackSlotVisibility(this);return}}return this.__removeChild(e)}};var patchSlotPrepend=function(e){e.__prepend=e.prepend;e.prepend=function(){var t=this;var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}r.forEach((function(r){if(typeof r==="string"){r=t.ownerDocument.createTextNode(r)}var n=(r["s-sn"]=getSlotName(r))||"";var o=internalCall(t,"childNodes");var i=getHostSlotNodes(o,t.tagName,n)[0];if(i){addSlotRelocateNode(r,i,true);var a=getSlotChildSiblings(i,n);var s=a[0];var l=internalCall(s,"parentNode");var f=internalCall(l,"insertBefore")(r,internalCall(s,"nextSibling"));dispatchSlotChangeEvent(i);return f}if(r.nodeType===1&&!!r.getAttribute("slot")){r.hidden=true}return e.__prepend(r)}))}};var patchSlotAppend=function(e){e.__append=e.append;e.append=function(){var e=this;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}t.forEach((function(t){if(typeof t==="string"){t=e.ownerDocument.createTextNode(t)}e.appendChild(t)}))}};var patchSlotInsertAdjacentHTML=function(e){var t=e.insertAdjacentHTML;e.insertAdjacentHTML=function(e,r){if(e!=="afterbegin"&&e!=="beforeend"){return t.call(this,e,r)}var n=this.ownerDocument.createElement("_");var o;n.innerHTML=r;if(e==="afterbegin"){while(o=n.firstChild){this.prepend(o)}}else if(e==="beforeend"){while(o=n.firstChild){this.append(o)}}}};var patchSlotInsertAdjacentText=function(e){e.insertAdjacentText=function(e,t){this.insertAdjacentHTML(e,t)}};var patchInsertBefore=function(e){var t=e;if(t.__insertBefore)return;t.__insertBefore=e.insertBefore;e.insertBefore=function(e,t){var r=this;var n=findSlotFromSlottedNode(e,this),o=n.slotName,i=n.slotNode;var a=this.__childNodes?this.childNodes:getSlottedChildNodes(this.childNodes);if(i){var s=false;a.forEach((function(n){if(n===t||t===null){s=true;if(t===null||o!==t["s-sn"]){r.appendChild(e);return}if(o===t["s-sn"]){addSlotRelocateNode(e,i);var a=internalCall(t,"parentNode");internalCall(a,"insertBefore")(e,t);dispatchSlotChangeEvent(i)}return}}));if(s)return e}var l=t==null?void 0:t.__parentNode;if(l&&!this.isSameNode(l)){return this.appendChild(e)}return this.__insertBefore(e,t)}};var patchSlotInsertAdjacentElement=function(e){var t=e.insertAdjacentElement;e.insertAdjacentElement=function(e,r){if(e!=="afterbegin"&&e!=="beforeend"){return t.call(this,e,r)}if(e==="afterbegin"){this.prepend(r);return r}else if(e==="beforeend"){this.append(r);return r}return r}};var patchTextContent=function(e){patchHostOriginalAccessor("textContent",e);Object.defineProperty(e,"textContent",{get:function(){var e="";var t=this.__childNodes?this.childNodes:getSlottedChildNodes(this.childNodes);t.forEach((function(t){return e+=t.textContent||""}));return e},set:function(e){var t=this.__childNodes?this.childNodes:getSlottedChildNodes(this.childNodes);t.forEach((function(e){if(e["s-ol"])e["s-ol"].remove();e.remove()}));this.insertAdjacentHTML("beforeend",e)}})};var patchChildSlotNodes=function(e){var t=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.item=function(e){return this[e]};return t}(Array);patchHostOriginalAccessor("children",e);Object.defineProperty(e,"children",{get:function(){return this.childNodes.filter((function(e){return e.nodeType===1}))}});Object.defineProperty(e,"childElementCount",{get:function(){return this.children.length}});patchHostOriginalAccessor("firstChild",e);Object.defineProperty(e,"firstChild",{get:function(){return this.childNodes[0]}});patchHostOriginalAccessor("lastChild",e);Object.defineProperty(e,"lastChild",{get:function(){return this.childNodes[this.childNodes.length-1]}});patchHostOriginalAccessor("childNodes",e);Object.defineProperty(e,"childNodes",{get:function(){var e=new t;e.push.apply(e,getSlottedChildNodes(this.__childNodes));return e}})};var patchSlottedNode=function(e){if(!e||e.__nextSibling!==void 0||!globalThis.Node)return;patchNextSibling(e);patchPreviousSibling(e);patchParentNode(e);if(e.nodeType===Node.ELEMENT_NODE){patchNextElementSibling(e);patchPreviousElementSibling(e)}};var patchNextSibling=function(e){if(!e||e.__nextSibling)return;patchHostOriginalAccessor("nextSibling",e);Object.defineProperty(e,"nextSibling",{get:function(){var e;var t=(e=this["s-ol"])==null?void 0:e.parentNode.childNodes;var r=t==null?void 0:t.indexOf(this);if(t&&r>-1){return t[r+1]}return this.__nextSibling}})};var patchNextElementSibling=function(e){if(!e||e.__nextElementSibling)return;patchHostOriginalAccessor("nextElementSibling",e);Object.defineProperty(e,"nextElementSibling",{get:function(){var e;var t=(e=this["s-ol"])==null?void 0:e.parentNode.children;var r=t==null?void 0:t.indexOf(this);if(t&&r>-1){return t[r+1]}return this.__nextElementSibling}})};var patchPreviousSibling=function(e){if(!e||e.__previousSibling)return;patchHostOriginalAccessor("previousSibling",e);Object.defineProperty(e,"previousSibling",{get:function(){var e;var t=(e=this["s-ol"])==null?void 0:e.parentNode.childNodes;var r=t==null?void 0:t.indexOf(this);if(t&&r>-1){return t[r-1]}return this.__previousSibling}})};var patchPreviousElementSibling=function(e){if(!e||e.__previousElementSibling)return;patchHostOriginalAccessor("previousElementSibling",e);Object.defineProperty(e,"previousElementSibling",{get:function(){var e;var t=(e=this["s-ol"])==null?void 0:e.parentNode.children;var r=t==null?void 0:t.indexOf(this);if(t&&r>-1){return t[r-1]}return this.__previousElementSibling}})};var patchParentNode=function(e){if(!e||e.__parentNode)return;patchHostOriginalAccessor("parentNode",e);Object.defineProperty(e,"parentNode",{get:function(){var e;return((e=this["s-ol"])==null?void 0:e.parentNode)||this.__parentNode},set:function(e){this.__parentNode=e}})};var validElementPatches=["children","nextElementSibling","previousElementSibling"];var validNodesPatches=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function patchHostOriginalAccessor(e,t){var r;if(validElementPatches.includes(e)){r=Object.getOwnPropertyDescriptor(Element.prototype,e)}else if(validNodesPatches.includes(e)){r=Object.getOwnPropertyDescriptor(Node.prototype,e)}if(!r){r=Object.getOwnPropertyDescriptor(t,e)}if(r)Object.defineProperty(t,"__"+e,r)}function internalCall(e,t){if("__"+t in e){var r=e["__"+t];if(typeof r!=="function")return r;return r.bind(e)}else{if(typeof e[t]!=="function")return e[t];return e[t].bind(e)}}var i=0;var createTime=function(e,t){if(t===void 0){t=""}if(BUILD.profile&&performance.mark){var r="st:".concat(e,":").concat(t,":").concat(i++);performance.mark(r);return function(){return performance.measure("[Stencil] ".concat(e,"() <").concat(t,">"),r)}}else{return function(){return}}};var uniqueTime=function(e,t){if(BUILD.profile&&performance.mark){if(performance.getEntriesByName(e,"mark").length===0){performance.mark(e)}return function(){if(performance.getEntriesByName(t,"measure").length===0){performance.measure(t,e)}}}else{return function(){return}}};var inspect=function(e){var t;var r=getHostRef(e);if(!r){return void 0}var n=r.u;var o=r.$hostElement$;return t={renderCount:r.v,flags:{hasRendered:!!(n&2),hasConnected:!!(n&1),isWaitingForChildren:!!(n&4),isConstructingInstance:!!(n&8),isQueuedForUpdate:!!(n&16),hasInitializedComponent:!!(n&32),hasLoadedComponent:!!(n&64),isWatchReady:!!(n&128),isListenReady:!!(n&256),needsRerender:!!(n&512)},instanceValues:r.i,ancestorComponent:r.C,hostElement:o,lazyInstance:r.l,vnode:r._,modeName:r.B,onReadyPromise:r.m,onReadyResolve:r.L,onInstancePromise:r.p,onInstanceResolve:r.D,onRenderResolve:r.N,queuedListeners:r.R,rmListeners:r.T},t["s-id"]=o["s-id"],t["s-cr"]=o["s-cr"],t["s-lr"]=o["s-lr"],t["s-p"]=o["s-p"],t["s-rc"]=o["s-rc"],t["s-sc"]=o["s-sc"],t};var installDevTools=function(){if(BUILD.devTools){var e=win.stencil=win.stencil||{};var t=e.inspect;e.inspect=function(e){var r=inspect(e);if(!r&&typeof t==="function"){r=t(e)}return r}}};var h=function(e,t){var r=[];for(var n=2;n<arguments.length;n++){r[n-2]=arguments[n]}var o=null;var i=null;var a=null;var s=false;var l=false;var f=[];var u=function(t){for(var r=0;r<t.length;r++){o=t[r];if(Array.isArray(o)){u(o)}else if(o!=null&&typeof o!=="boolean"){if(s=typeof e!=="function"&&!isComplexType(o)){o=String(o)}else if(BUILD.isDev&&typeof e!=="function"&&o.u===void 0){consoleDevError("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects.")}if(s&&l){f[f.length-1].A+=o}else{f.push(s?newVNode(null,o):o)}l=s}}};u(r);if(t){if(BUILD.isDev&&e==="input"){validateInputProperties(t)}if(BUILD.vdomKey&&t.key){i=t.key}if(BUILD.slotRelocation&&t.name){a=t.name}if(BUILD.vdomClass){var c=t.className||t.class;if(c){t.class=typeof c!=="object"?c:Object.keys(c).filter((function(e){return c[e]})).join(" ")}}}if(BUILD.isDev&&f.some(isHost)){consoleDevError("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function.")}if(BUILD.vdomFunctional&&typeof e==="function"){return e(t===null?{}:t,f,vdomFnUtils)}var v=newVNode(e,null);v.O=t;if(f.length>0){v.k=f}if(BUILD.vdomKey){v.$=i}if(BUILD.slotRelocation){v.M=a}return v};var newVNode=function(e,t){var r={u:0,P:e,A:t,V:null,k:null};if(BUILD.vdomAttribute){r.O=null}if(BUILD.vdomKey){r.$=null}if(BUILD.slotRelocation){r.M=null}return r};var Host={};var isHost=function(e){return e&&e.P===Host};var vdomFnUtils={forEach:function(e,t){return e.map(convertToPublic).forEach(t)},map:function(e,t){return e.map(convertToPublic).map(t).map(convertToPrivate)}};var convertToPublic=function(e){return{vattrs:e.O,vchildren:e.k,vkey:e.$,vname:e.M,vtag:e.P,vtext:e.A}};var convertToPrivate=function(e){if(typeof e.vtag==="function"){var t=__assign({},e.vattrs);if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return h.apply(void 0,__spreadArray([e.vtag,t],e.vchildren||[],false))}var r=newVNode(e.vtag,e.vtext);r.O=e.vattrs;r.k=e.vchildren;r.$=e.vkey;r.M=e.vname;return r};var validateInputProperties=function(e){var t=Object.keys(e);var r=t.indexOf("value");if(r===-1){return}var n=t.indexOf("type");var o=t.indexOf("min");var i=t.indexOf("max");var a=t.indexOf("step");if(r<n||r<o||r<i||r<a){consoleDevWarn('The "value" prop of <input> should be set after "min", "max", "type" and "step"')}};var initializeClientHydrate=function(e,t,r,n){var o=createTime("hydrateClient",t);var i=e.shadowRoot;var a=[];var s=[];var l=[];var f=BUILD.shadowDom&&i?[]:null;var u=newVNode(t,null);u.V=e;var c;if(BUILD.scoped){var v=n.t;if(v&&v.u&10&&e["s-sc"]){c=e["s-sc"];e.classList.add(c+"-h")}else if(e["s-sc"]){delete e["s-sc"]}}if(win.document&&(!plt.j||!plt.j.size)){initializeDocumentHydrate(win.document.body,plt.j=new Map)}e[HYDRATE_ID]=r;e.removeAttribute(HYDRATE_ID);n._=clientHydrate(u,a,s,f,e,e,r,l);var d=0;var p=a.length;var h;for(d;d<p;d++){h=a[d];var D=h.F+"."+h.W;var m=plt.j.get(D);var L=h.V;if(!i){L["s-hn"]=t.toUpperCase();if(h.P==="slot"){L["s-cr"]=e["s-cr"]}}if(h.P==="slot"){h.M=h.V["s-sn"]||h.V["name"]||null;if(h.k){h.u|=2;if(!h.V.childNodes.length){h.k.forEach((function(e){h.V.appendChild(e.V)}))}}else{h.u|=1}}if(m&&m.isConnected){if(i&&m["s-en"]===""){m.parentNode.insertBefore(L,m.nextSibling)}m.parentNode.removeChild(m);if(!i){L["s-oo"]=parseInt(h.W)}}plt.j.delete(D)}var I=[];var S=l.length;var g=0;var B;var U;var C;var _;for(g;g<S;g++){B=l[g];if(!B||!B.length)continue;C=B.length;U=0;for(U;U<C;U++){_=B[U];if(!I[_.hostId]){I[_.hostId]=plt.j.get(_.hostId)}if(!I[_.hostId])continue;var y=I[_.hostId];if(!y.shadowRoot||!i){_.slot["s-cr"]=y["s-cr"];if(!_.slot["s-cr"]&&y.shadowRoot){_.slot["s-cr"]=y}else{_.slot["s-cr"]=(y.__childNodes||y.childNodes)[0]}addSlotRelocateNode(_.node,_.slot,false,_.node["s-oo"]);if(BUILD.experimentalSlotFixes){patchSlottedNode(_.node)}}if(y.shadowRoot&&_.node.parentElement!==y){y.appendChild(_.node)}}}if(BUILD.scoped&&c&&s.length){s.forEach((function(e){e.V.parentElement.classList.add(c+"-s")}))}if(BUILD.shadowDom&&i&&!i.childNodes.length){var E=0;var b=f.length;if(b){for(E;E<b;E++){i.appendChild(f[E])}Array.from(e.childNodes).forEach((function(e){if(typeof e["s-sn"]!=="string"){if(e.nodeType===1&&e.slot&&e.hidden){e.removeAttribute("hidden")}else if(e.nodeType===8||e.nodeType===3&&!e.wholeText.trim()){e.parentNode.removeChild(e)}}}))}}plt.j.delete(e["s-id"]);n.$hostElement$=e;o()};var clientHydrate=function(e,t,r,n,o,i,a,s){if(s===void 0){s=[]}var l;var f;var u;var c;var v=o["s-sc"];if(i.nodeType===1){l=i.getAttribute(HYDRATE_CHILD_ID);if(l){f=l.split(".");if(f[0]===a||f[0]==="0"){u=createSimpleVNode({u:0,F:f[0],W:f[1],q:f[2],Y:f[3],P:i.tagName.toLowerCase(),V:i,O:{class:i.className||""}});t.push(u);i.removeAttribute(HYDRATE_CHILD_ID);if(!e.k){e.k=[]}if(BUILD.scoped&&v){i["s-si"]=v;u.O.class+=" "+v}var d=u.V.getAttribute("s-sn");if(typeof d==="string"){if(u.P==="slot-fb"){addSlot(d,f[2],u,i,e,t,r,n,s);if(BUILD.scoped&&v){i.classList.add(v)}}u.V["s-sn"]=d;u.V.removeAttribute("s-sn")}if(u.Y!==void 0){e.k[u.Y]=u}e=u;if(n&&u.q==="0"){n[u.Y]=u.V}}}if(i.shadowRoot){for(c=i.shadowRoot.childNodes.length-1;c>=0;c--){clientHydrate(e,t,r,n,o,i.shadowRoot.childNodes[c],a,s)}}var p=i.__childNodes||i.childNodes;for(c=p.length-1;c>=0;c--){clientHydrate(e,t,r,n,o,p[c],a,s)}}else if(i.nodeType===8){f=i.nodeValue.split(".");if(f[1]===a||f[1]==="0"){l=f[0];u=createSimpleVNode({F:f[1],W:f[2],q:f[3],Y:f[4]||"0",V:i,O:null,k:null,$:null,M:null,P:null,A:null});if(l===TEXT_NODE_ID){u.V=findCorrespondingNode(i,3);if(u.V&&u.V.nodeType===3){u.A=u.V.textContent;t.push(u);i.remove();if(a===u.F){if(!e.k){e.k=[]}e.k[u.Y]=u}if(n&&u.q==="0"){n[u.Y]=u.V}}}else if(l===COMMENT_NODE_ID){u.V=findCorrespondingNode(i,8);if(u.V&&u.V.nodeType===8){t.push(u);i.remove()}}else if(u.F===a){if(l===SLOT_NODE_ID){var d=i["s-sn"]=f[5]||"";addSlot(d,f[2],u,i,e,t,r,n,s)}else if(l===CONTENT_REF_ID){if(BUILD.shadowDom&&n){i.remove()}else if(BUILD.slotRelocation){o["s-cr"]=i;i["s-cn"]=true}}}}}else if(e&&e.P==="style"){var h=newVNode(null,i.textContent);h.V=i;h.Y="0";e.k=[h]}else{if(i.nodeType===3&&!i.wholeText.trim()){i.remove()}}return e};var initializeDocumentHydrate=function(e,t){if(e.nodeType===1){var r=e[HYDRATE_ID]||e.getAttribute(HYDRATE_ID);if(r){t.set(r,e)}var n=0;if(e.shadowRoot){for(;n<e.shadowRoot.childNodes.length;n++){initializeDocumentHydrate(e.shadowRoot.childNodes[n],t)}}var o=e.__childNodes||e.childNodes;for(n=0;n<o.length;n++){initializeDocumentHydrate(o[n],t)}}else if(e.nodeType===8){var i=e.nodeValue.split(".");if(i[0]===ORG_LOCATION_ID){t.set(i[1]+"."+i[2],e);e.nodeValue="";e["s-en"]=i[3]}}};var createSimpleVNode=function(e){var t={u:0,F:null,W:null,q:null,Y:"0",V:null,O:null,k:null,$:null,M:null,P:null,A:null};return __assign(__assign({},t),e)};function addSlot(e,t,r,n,o,i,a,s,l){n["s-sr"]=true;r.M=e||null;r.P="slot";var f=(o==null?void 0:o.V)?o.V["s-id"]||o.V.getAttribute("s-id"):"";if(BUILD.shadowDom&&s&&win.document){var u=r.V=win.document.createElement(r.P);if(r.M){r.V.setAttribute("name",e)}if(f&&f!==r.F){o.V.insertBefore(u,o.V.children[0])}else{n.parentNode.insertBefore(r.V,n)}addSlottedNodes(l,t,e,n,r.F);n.remove();if(r.q==="0"){s[r.Y]=r.V}}else{var u=r.V;var c=f&&f!==r.F&&o.V.shadowRoot;addSlottedNodes(l,t,e,n,c?f:r.F);patchSlotNode(n);if(c){o.V.insertBefore(u,o.V.children[0])}i.push(r)}a.push(r);if(!o.k){o.k=[]}o.k[r.Y]=r}var addSlottedNodes=function(e,t,r,n,o){var i=n.nextSibling;e[t]=e[t]||[];while(i&&((i["getAttribute"]&&i.getAttribute("slot")||i["s-sn"])===r||r===""&&!i["s-sn"]&&(i.nodeType===8&&i.nodeValue.indexOf(".")!==1||i.nodeType===3))){i["s-sn"]=r;e[t].push({slot:n,node:i,hostId:o});i=i.nextSibling}};var findCorrespondingNode=function(e,t){var r=e;do{r=r.nextSibling}while(r&&(r.nodeType!==t||!r.nodeValue));return r};
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
6
|
+
*
|
|
7
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8
|
+
* found in the LICENSE file at https://angular.io/license
|
|
9
|
+
*
|
|
10
|
+
* This file is a port of shadowCSS from `webcomponents.js` to TypeScript.
|
|
11
|
+
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
|
12
|
+
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
|
13
|
+
*/var safeSelector=function(e){var t=[];var r=0;e=e.replace(/(\[[^\]]*\])/g,(function(e,n){var o="__ph-".concat(r,"__");t.push(n);r++;return o}));var n=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(function(e,n,o){var i="__ph-".concat(r,"__");t.push(o);r++;return n+i}));var o={content:n,placeholders:t};return o};var restoreSafeSelector=function(e,t){return t.replace(/__ph-(\d+)__/g,(function(t,r){return e[+r]}))};var _polyfillHost="-shadowcsshost";var _polyfillSlotted="-shadowcssslotted";var _polyfillHostContext="-shadowcsscontext";var _parenSuffix=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";var _cssColonHostRe=new RegExp("("+_polyfillHost+_parenSuffix,"gim");var _cssColonHostContextRe=new RegExp("("+_polyfillHostContext+_parenSuffix,"gim");var _cssColonSlottedRe=new RegExp("("+_polyfillSlotted+_parenSuffix,"gim");var _polyfillHostNoCombinator=_polyfillHost+"-no-combinator";var _polyfillHostNoCombinatorRe=/-shadowcsshost-no-combinator([^\s]*)/;var _shadowDOMSelectorsRe=[/::shadow/g,/::content/g];var _selectorReSuffix="([>\\s~+[.,{:][\\s\\S]*)?$";var _polyfillHostRe=/-shadowcsshost/gim;var createSupportsRuleRe=function(e){return new RegExp("((?<!(^@supports(.*)))|(?<={.*))(".concat(e,"\\b)"),"gim")};var _colonSlottedRe=createSupportsRuleRe("::slotted");var _colonHostRe=createSupportsRuleRe(":host");var _colonHostContextRe=createSupportsRuleRe(":host-context");var _commentRe=/\/\*\s*[\s\S]*?\*\//g;var stripComments=function(e){return e.replace(_commentRe,"")};var _commentWithHashRe=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;var extractCommentsWithHash=function(e){return e.match(_commentWithHashRe)||[]};var _ruleRe=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;var _curlyRe=/([{}])/g;var _selectorPartsRe=/(^.*?[^\\])??((:+)(.*)|$)/;var OPEN_CURLY="{";var CLOSE_CURLY="}";var BLOCK_PLACEHOLDER="%BLOCK%";var processRules=function(e,t){var r=escapeBlocks(e);var n=0;return r.escapedString.replace(_ruleRe,(function(){var e=[];for(var o=0;o<arguments.length;o++){e[o]=arguments[o]}var i=e[2];var a="";var s=e[4];var l="";if(s&&s.startsWith("{"+BLOCK_PLACEHOLDER)){a=r.blocks[n++];s=s.substring(BLOCK_PLACEHOLDER.length+1);l="{"}var f={selector:i,content:a};var u=t(f);return"".concat(e[1]).concat(u.selector).concat(e[3]).concat(l).concat(u.content).concat(s)}))};var escapeBlocks=function(e){var t=e.split(_curlyRe);var r=[];var n=[];var o=0;var i=[];for(var a=0;a<t.length;a++){var s=t[a];if(s===CLOSE_CURLY){o--}if(o>0){i.push(s)}else{if(i.length>0){n.push(i.join(""));r.push(BLOCK_PLACEHOLDER);i=[]}r.push(s)}if(s===OPEN_CURLY){o++}}if(i.length>0){n.push(i.join(""));r.push(BLOCK_PLACEHOLDER)}var l={escapedString:r.join(""),blocks:n};return l};var insertPolyfillHostInCssText=function(e){e=e.replace(_colonHostContextRe,"$1".concat(_polyfillHostContext)).replace(_colonHostRe,"$1".concat(_polyfillHost)).replace(_colonSlottedRe,"$1".concat(_polyfillSlotted));return e};var convertColonRule=function(e,t,r){return e.replace(t,(function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e[2]){var n=e[2].split(",");var o=[];for(var i=0;i<n.length;i++){var a=n[i].trim();if(!a)break;o.push(r(_polyfillHostNoCombinator,a,e[3]))}return o.join(",")}else{return _polyfillHostNoCombinator+e[3]}}))};var colonHostPartReplacer=function(e,t,r){return e+t.replace(_polyfillHost,"")+r};var convertColonHost=function(e){return convertColonRule(e,_cssColonHostRe,colonHostPartReplacer)};var colonHostContextPartReplacer=function(e,t,r){if(t.indexOf(_polyfillHost)>-1){return colonHostPartReplacer(e,t,r)}else{return e+t+r+", "+t+" "+e+r}};var convertColonSlotted=function(e,t){var r="."+t+" > ";var n=[];e=e.replace(_cssColonSlottedRe,(function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e[2]){var o=e[2].trim();var i=e[3];var a=r+o+i;var s="";for(var l=e[4]-1;l>=0;l--){var f=e[5][l];if(f==="}"||f===","){break}s=f+s}var u=(s+a).trim();var c="".concat(s.trimEnd()).concat(a.trim()).trim();if(u!==c){var v="".concat(c,", ").concat(u);n.push({orgSelector:u,updatedSelector:v})}return a}else{return _polyfillHostNoCombinator+e[3]}}));return{selectors:n,cssText:e}};var convertColonHostContext=function(e){return convertColonRule(e,_cssColonHostContextRe,colonHostContextPartReplacer)};var convertShadowDOMSelectors=function(e){return _shadowDOMSelectorsRe.reduce((function(e,t){return e.replace(t," ")}),e)};var makeScopeMatcher=function(e){var t=/\[/g;var r=/\]/g;e=e.replace(t,"\\[").replace(r,"\\]");return new RegExp("^("+e+")"+_selectorReSuffix,"m")};var selectorNeedsScoping=function(e,t){var r=makeScopeMatcher(t);return!r.test(e)};var injectScopingSelector=function(e,t){return e.replace(_selectorPartsRe,(function(e,r,n,o,i){if(r===void 0){r=""}if(o===void 0){o=""}if(i===void 0){i=""}return r+t+o+i}))};var applySimpleSelectorScope=function(e,t,r){_polyfillHostRe.lastIndex=0;if(_polyfillHostRe.test(e)){var n=".".concat(r);return e.replace(_polyfillHostNoCombinatorRe,(function(e,t){return injectScopingSelector(t,n)})).replace(_polyfillHostRe,n+" ")}return t+" "+e};var applyStrictSelectorScope=function(e,t,r){var n=/\[is=([^\]]*)\]/g;t=t.replace(n,(function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}return t[0]}));var o="."+t;var i=function(e){var n=e.trim();if(!n){return""}if(e.indexOf(_polyfillHostNoCombinator)>-1){n=applySimpleSelectorScope(e,t,r)}else{var i=e.replace(_polyfillHostRe,"");if(i.length>0){n=injectScopingSelector(i,o)}}return n};var a=safeSelector(e);e=a.content;var s="";var l=0;var f;var u=/( |>|\+|~(?!=))\s*/g;var c=e.indexOf(_polyfillHostNoCombinator)>-1;var v=!c;while((f=u.exec(e))!==null){var d=f[1];var p=e.slice(l,f.index).trim();v=v||p.indexOf(_polyfillHostNoCombinator)>-1;var h=v?i(p):p;s+="".concat(h," ").concat(d," ");l=u.lastIndex}var D=e.substring(l);v=v||D.indexOf(_polyfillHostNoCombinator)>-1;s+=v?i(D):D;return restoreSafeSelector(a.placeholders,s)};var scopeSelector=function(e,t,r,n){return e.split(",").map((function(e){if(n&&e.indexOf("."+n)>-1){return e.trim()}if(selectorNeedsScoping(e,t)){return applyStrictSelectorScope(e,t,r).trim()}else{return e.trim()}})).join(", ")};var scopeSelectors=function(e,t,r,n,o){return processRules(e,(function(e){var o=e.selector;var i=e.content;if(e.selector[0]!=="@"){o=scopeSelector(e.selector,t,r,n)}else if(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document")){i=scopeSelectors(e.content,t,r,n)}var a={selector:o.replace(/\s{2,}/g," ").trim(),content:i};return a}))};var scopeCssText=function(e,t,r,n,o){e=insertPolyfillHostInCssText(e);e=convertColonHost(e);e=convertColonHostContext(e);var i=convertColonSlotted(e,n);e=i.cssText;e=convertShadowDOMSelectors(e);if(t){e=scopeSelectors(e,t,r,n)}e=replaceShadowCssHost(e,r);e=e.replace(/>\s*\*\s+([^{, ]+)/gm," $1 ");return{cssText:e.trim(),slottedSelectors:i.selectors.map((function(e){return{orgSelector:replaceShadowCssHost(e.orgSelector,r),updatedSelector:replaceShadowCssHost(e.updatedSelector,r)}}))}};var replaceShadowCssHost=function(e,t){return e.replace(/-shadowcsshost-no-combinator/g,".".concat(t))};var scopeCss=function(e,t,r){var n=t+"-h";var o=t+"-s";var i=extractCommentsWithHash(e);e=stripComments(e);var a=[];if(r){var s=function(e){var t="/*!@___".concat(a.length,"___*/");var r="/*!@".concat(e.selector,"*/");a.push({placeholder:t,comment:r});e.selector=t+e.selector;return e};e=processRules(e,(function(e){if(e.selector[0]!=="@"){return s(e)}else if(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document")){e.content=processRules(e.content,s);return e}return e}))}var l=scopeCssText(e,t,n,o);e=__spreadArray([l.cssText],i,true).join("\n");if(r){a.forEach((function(t){var r=t.placeholder,n=t.comment;e=e.replace(r,n)}))}l.slottedSelectors.forEach((function(t){var r=new RegExp(escapeRegExpSpecialCharacters(t.orgSelector),"g");e=e.replace(r,t.updatedSelector)}));return e};var computeMode=function(e){return modeResolutionChain.map((function(t){return t(e)})).find((function(e){return!!e}))};var setMode=function(e){return modeResolutionChain.push(e)};var getMode=function(e){return getHostRef(e).B};var parsePropertyValue=function(e,t){if(e!=null&&!isComplexType(e)){if(BUILD.propBoolean&&t&4){return e==="false"?false:e===""||!!e}if(BUILD.propNumber&&t&2){return parseFloat(e)}if(BUILD.propString&&t&1){return String(e)}return e}return e};var getElement=function(e){return BUILD.lazyLoad?getHostRef(e).$hostElement$:e};var createEvent=function(e,t,r){var n=getElement(e);return{emit:function(e){if(BUILD.isDev&&!n.isConnected){consoleDevWarn('The "'.concat(t,'" event was emitted, but the dispatcher node is no longer connected to the dom.'))}return emitEvent(n,t,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,t,r){var n=plt.ce(t,r);e.dispatchEvent(n);return n};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,t,r){var n=styles.get(e);if(supportsConstructableStylesheets&&r){n=n||new CSSStyleSheet;if(typeof n==="string"){n=t}else{n.replaceSync(t)}}else{n=t}styles.set(e,n)};var addStyle=function(e,t,r){var n;var o=getScopeId(t,r);var i=styles.get(o);if(!BUILD.attachStyles||!win.document){return o}e=e.nodeType===11?e:win.document;if(i){if(typeof i==="string"){e=e.head||e;var a=rootAppliedStyles.get(e);var s=void 0;if(!a){rootAppliedStyles.set(e,a=new Set)}if(!a.has(o)){if(BUILD.hydrateClientSide&&e.host&&(s=e.querySelector("[".concat(HYDRATED_STYLE_ID,'="').concat(o,'"]')))){s.innerHTML=i}else{s=document.querySelector("[".concat(HYDRATED_STYLE_ID,'="').concat(o,'"]'))||win.document.createElement("style");s.innerHTML=i;var l=(n=plt.X)!=null?n:queryNonceMetaTagContent(win.document);if(l!=null){s.setAttribute("nonce",l)}if((BUILD.hydrateServerSide||BUILD.hotModuleReplacement)&&(t.u&2||t.u&128)){s.setAttribute(HYDRATED_STYLE_ID,o)}if(!(t.u&1)){if(e.nodeName==="HEAD"){var f=e.querySelectorAll("link[rel=preconnect]");var u=f.length>0?f[f.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(u==null?void 0:u.parentNode)===e?u:null)}else if("host"in e){if(supportsConstructableStylesheets){var c=new CSSStyleSheet;c.replaceSync(i);e.adoptedStyleSheets=__spreadArray([c],e.adoptedStyleSheets,true)}else{var v=e.querySelector("style");if(v){v.innerHTML=i+v.innerHTML}else{e.prepend(s)}}}else{e.append(s)}}if(t.u&1){e.insertBefore(s,null)}}if(t.u&4){s.innerHTML+=SLOT_FB_CSS}if(a){a.add(o)}}}else if(BUILD.constructableCSS&&!e.adoptedStyleSheets.includes(i)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[i],false)}}return o};var attachStyles=function(e){var t=e.t;var r=e.$hostElement$;var n=t.u;var o=createTime("attachStyles",t.I);var i=addStyle(BUILD.shadowDom&&supportsShadow&&r.shadowRoot?r.shadowRoot:r.getRootNode(),t,e.B);if((BUILD.shadowDom||BUILD.scoped)&&BUILD.cssAnnotations&&(n&10&&n&2||n&128)){r["s-sc"]=i;r.classList.add(i+"-h")}o()};var getScopeId=function(e,t){return"sc-"+(BUILD.mode&&t&&e.u&32?e.I+"-"+t:e.I)};var convertScopedToShadow=function(e){return e.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{")};var hydrateScopedToShadow=function(){if(!win.document){return}var e=win.document.querySelectorAll("[".concat(HYDRATED_STYLE_ID,"]"));var t=0;for(;t<e.length;t++){registerStyle(e[t].getAttribute(HYDRATED_STYLE_ID),convertScopedToShadow(e[t].innerHTML),true)}};var setAccessor=function(e,t,r,n,o,i,a){if(r===n){return}var s=isMemberInElement(e,t);var l=t.toLowerCase();if(BUILD.vdomClass&&t==="class"){var f=e.classList;var u=parseClassList(r);var c=parseClassList(n);if(BUILD.hydrateClientSide&&e["s-si"]&&a){c.push(e["s-si"]);u.forEach((function(t){if(t.startsWith(e["s-si"]))c.push(t)}));c=__spreadArray([],new Set(c),true);f.add.apply(f,c)}else{f.remove.apply(f,u.filter((function(e){return e&&!c.includes(e)})));f.add.apply(f,c.filter((function(e){return e&&!u.includes(e)})))}}else if(BUILD.vdomStyle&&t==="style"){if(BUILD.updatable){for(var v in r){if(!n||n[v]==null){if(!BUILD.hydrateServerSide&&v.includes("-")){e.style.removeProperty(v)}else{e.style[v]=""}}}}for(var v in n){if(!r||n[v]!==r[v]){if(!BUILD.hydrateServerSide&&v.includes("-")){e.style.setProperty(v,n[v])}else{e.style[v]=n[v]}}}}else if(BUILD.vdomKey&&t==="key");else if(BUILD.vdomRef&&t==="ref"){if(n){n(e)}}else if(BUILD.vdomListener&&(BUILD.lazyLoad?!s:!e.__lookupSetter__(t))&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(isMemberInElement(win,l)){t=l.slice(2)}else{t=l[2]+t.slice(3)}if(r||n){var d=t.endsWith(CAPTURE_EVENT_SUFFIX);t=t.replace(CAPTURE_EVENT_REGEX,"");if(r){plt.rel(e,t,r,d)}if(n){plt.ael(e,t,n,d)}}}else if(BUILD.vdomPropOrAttr){var p=isComplexType(n);if((s||p&&n!==null)&&!o){try{if(!e.tagName.includes("-")){var h=n==null?"":n;if(t==="list"){s=false}else if(r==null||e[t]!=h){if(typeof e.__lookupSetter__(t)==="function"){e[t]=h}else{e.setAttribute(t,h)}}}else if(e[t]!==n){e[t]=n}}catch(e){}}var D=false;if(BUILD.vdomXlink){if(l!==(l=l.replace(/^xlink\:?/,""))){t=l;D=true}}if(n==null||n===false){if(n!==false||e.getAttribute(t)===""){if(BUILD.vdomXlink&&D){e.removeAttributeNS(XLINK_NS,t)}else{e.removeAttribute(t)}}}else if((!s||i&4||o)&&!p&&e.nodeType===1){n=n===true?"":n;if(BUILD.vdomXlink&&D){e.setAttributeNS(XLINK_NS,t,n)}else{e.setAttribute(t,n)}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(parseClassListRegex)};var CAPTURE_EVENT_SUFFIX="Capture";var CAPTURE_EVENT_REGEX=new RegExp(CAPTURE_EVENT_SUFFIX+"$");var updateElement=function(e,t,r,n){var o=t.V.nodeType===11&&t.V.host?t.V.host:t.V;var i=e&&e.O||{};var a=t.O||{};if(BUILD.updatable){for(var s=0,l=sortedAttrNames(Object.keys(i));s<l.length;s++){var f=l[s];if(!(f in a)){setAccessor(o,f,i[f],void 0,r,t.u,n)}}}for(var u=0,c=sortedAttrNames(Object.keys(a));u<c.length;u++){var f=c[u];setAccessor(o,f,i[f],a[f],r,t.u,n)}};function sortedAttrNames(e){return e.includes("ref")?__spreadArray(__spreadArray([],e.filter((function(e){return e!=="ref"})),true),["ref"],false):e}var scopeId;var contentRef;var hostTagName;var useNativeShadowDom=false;var checkSlotFallbackVisibility=false;var checkSlotRelocate=false;var isSvgMode=false;var createElm=function(e,t,r){var n;var o=t.k[r];var i=0;var a;var s;var l;if(BUILD.slotRelocation&&!useNativeShadowDom){checkSlotRelocate=true;if(o.P==="slot"){o.u|=o.k?2:1}}if(BUILD.isDev&&o.V){consoleDevError("The JSX ".concat(o.A!==null?'"'.concat(o.A,'" text'):'"'.concat(o.P,'" element')," node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes"))}if(BUILD.vdomText&&o.A!==null){a=o.V=win.document.createTextNode(o.A)}else if(BUILD.slotRelocation&&o.u&1){a=o.V=BUILD.isDebug||BUILD.hydrateServerSide?slotReferenceDebugNode(o):win.document.createTextNode("");if(BUILD.vdomAttribute){updateElement(null,o,isSvgMode)}}else{if(BUILD.svg&&!isSvgMode){isSvgMode=o.P==="svg"}if(!win.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.")}a=o.V=BUILD.svg?win.document.createElementNS(isSvgMode?SVG_NS:HTML_NS,!useNativeShadowDom&&BUILD.slotRelocation&&o.u&2?"slot-fb":o.P):win.document.createElement(!useNativeShadowDom&&BUILD.slotRelocation&&o.u&2?"slot-fb":o.P);if(BUILD.svg&&isSvgMode&&o.P==="foreignObject"){isSvgMode=false}if(BUILD.vdomAttribute){updateElement(null,o,isSvgMode)}if(BUILD.scoped&&isDef(scopeId)&&a["s-si"]!==scopeId){a.classList.add(a["s-si"]=scopeId)}if(o.k){for(i=0;i<o.k.length;++i){s=createElm(e,o,i);if(s){a.appendChild(s)}}}if(BUILD.svg){if(o.P==="svg"){isSvgMode=false}else if(a.tagName==="foreignObject"){isSvgMode=true}}}a["s-hn"]=hostTagName;if(BUILD.slotRelocation){if(o.u&(2|1)){a["s-sr"]=true;a["s-cr"]=contentRef;a["s-sn"]=o.M||"";a["s-rf"]=(n=o.O)==null?void 0:n.ref;patchSlotNode(a);l=e&&e.k&&e.k[r];if(l&&l.P===o.P&&e.V){if(BUILD.experimentalSlotFixes){relocateToHostRoot(e.V)}else{putBackInOriginalLocation(e.V,false)}}if(BUILD.scoped){addRemoveSlotScopedClass(contentRef,a,t.V,e==null?void 0:e.V)}}}return a};var relocateToHostRoot=function(e){plt.u|=1;var t=e.closest(hostTagName.toLowerCase());if(t!=null){var r=Array.from(t.__childNodes||t.childNodes).find((function(e){return e["s-cr"]}));var n=Array.from(e.__childNodes||e.childNodes);for(var o=0,i=r?n.reverse():n;o<i.length;o++){var a=i[o];if(a["s-sh"]!=null){insertBefore(t,a,r!=null?r:null);a["s-sh"]=void 0;checkSlotRelocate=true}}}plt.u&=~1};var putBackInOriginalLocation=function(e,t){plt.u|=1;var r=Array.from(e.__childNodes||e.childNodes);if(e["s-sr"]&&BUILD.experimentalSlotFixes){var n=e;while(n=n.nextSibling){if(n&&n["s-sn"]===e["s-sn"]&&n["s-sh"]===hostTagName){r.push(n)}}}for(var o=r.length-1;o>=0;o--){var i=r[o];if(i["s-hn"]!==hostTagName&&i["s-ol"]){insertBefore(referenceNode(i).parentNode,i,referenceNode(i));i["s-ol"].remove();i["s-ol"]=void 0;i["s-sh"]=void 0;checkSlotRelocate=true}if(t){putBackInOriginalLocation(i,t)}}plt.u&=~1};var addVnodes=function(e,t,r,n,o,i){var a=BUILD.slotRelocation&&e["s-cr"]&&e["s-cr"].parentNode||e;var s;if(BUILD.shadowDom&&a.shadowRoot&&a.tagName===hostTagName){a=a.shadowRoot}for(;o<=i;++o){if(n[o]){s=createElm(null,r,o);if(s){n[o].V=s;insertBefore(a,s,BUILD.slotRelocation?referenceNode(t):t)}}}};var removeVnodes=function(e,t,r){for(var n=t;n<=r;++n){var o=e[n];if(o){var i=o.V;nullifyVNodeRefs(o);if(i){if(BUILD.slotRelocation){checkSlotFallbackVisibility=true;if(i["s-ol"]){i["s-ol"].remove()}else{putBackInOriginalLocation(i,true)}}i.remove()}}}};var updateChildren=function(e,t,r,n,o){if(o===void 0){o=false}var i=0;var a=0;var s=0;var l=0;var f=t.length-1;var u=t[0];var c=t[f];var v=n.length-1;var d=n[0];var p=n[v];var h;var D;while(i<=f&&a<=v){if(u==null){u=t[++i]}else if(c==null){c=t[--f]}else if(d==null){d=n[++a]}else if(p==null){p=n[--v]}else if(isSameVnode(u,d,o)){patch(u,d,o);u=t[++i];d=n[++a]}else if(isSameVnode(c,p,o)){patch(c,p,o);c=t[--f];p=n[--v]}else if(isSameVnode(u,p,o)){if(BUILD.slotRelocation&&(u.P==="slot"||p.P==="slot")){putBackInOriginalLocation(u.V.parentNode,false)}patch(u,p,o);insertBefore(e,u.V,c.V.nextSibling);u=t[++i];p=n[--v]}else if(isSameVnode(c,d,o)){if(BUILD.slotRelocation&&(u.P==="slot"||p.P==="slot")){putBackInOriginalLocation(c.V.parentNode,false)}patch(c,d,o);insertBefore(e,c.V,u.V);c=t[--f];d=n[++a]}else{s=-1;if(BUILD.vdomKey){for(l=i;l<=f;++l){if(t[l]&&t[l].$!==null&&t[l].$===d.$){s=l;break}}}if(BUILD.vdomKey&&s>=0){D=t[s];if(D.P!==d.P){h=createElm(t&&t[a],r,s)}else{patch(D,d,o);t[s]=void 0;h=D.V}d=n[++a]}else{h=createElm(t&&t[a],r,a);d=n[++a]}if(h){if(BUILD.slotRelocation){insertBefore(referenceNode(u.V).parentNode,h,referenceNode(u.V))}else{insertBefore(u.V.parentNode,h,u.V)}}}}if(i>f){addVnodes(e,n[v+1]==null?null:n[v+1].V,r,n,a,v)}else if(BUILD.updatable&&a>v){removeVnodes(t,i,f)}};var isSameVnode=function(e,t,r){if(r===void 0){r=false}if(e.P===t.P){if(BUILD.slotRelocation&&e.P==="slot"){return e.M===t.M}if(BUILD.vdomKey&&!r){return e.$===t.$}if(r&&!e.$&&t.$){e.$=t.$}return true}return false};var referenceNode=function(e){return e&&e["s-ol"]||e};var patch=function(e,t,r){if(r===void 0){r=false}var n=t.V=e.V;var o=e.k;var i=t.k;var a=t.P;var s=t.A;var l;if(!BUILD.vdomText||s===null){if(BUILD.svg){isSvgMode=a==="svg"?true:a==="foreignObject"?false:isSvgMode}if(BUILD.vdomAttribute||BUILD.reflect){if(BUILD.slot&&a==="slot"&&!useNativeShadowDom){if(BUILD.experimentalSlotFixes&&e.M!==t.M){t.V["s-sn"]=t.M||"";relocateToHostRoot(t.V.parentElement)}}updateElement(e,t,isSvgMode,r)}if(BUILD.updatable&&o!==null&&i!==null){updateChildren(n,o,t,i,r)}else if(i!==null){if(BUILD.updatable&&BUILD.vdomText&&e.A!==null){n.textContent=""}addVnodes(n,null,t,i,0,i.length-1)}else if(!r&&BUILD.updatable&&o!==null){removeVnodes(o,0,o.length-1)}if(BUILD.svg&&isSvgMode&&a==="svg"){isSvgMode=false}}else if(BUILD.vdomText&&BUILD.slotRelocation&&(l=n["s-cr"])){l.parentNode.textContent=s}else if(BUILD.vdomText&&e.A!==s){n.data=s}};var relocateNodes=[];var markSlotContentForRelocation=function(e){var t;var r;var n;var o=e.__childNodes||e.childNodes;for(var i=0,a=o;i<a.length;i++){var s=a[i];if(s["s-sr"]&&(t=s["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;var l=s["s-sn"];var f=function(){t=r[n];if(!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==s["s-hn"]&&(!BUILD.experimentalSlotFixes||!t["s-sh"]||t["s-sh"]!==s["s-hn"])){if(isNodeLocatedInSlot(t,l)){var e=relocateNodes.find((function(e){return e.K===t}));checkSlotFallbackVisibility=true;t["s-sn"]=t["s-sn"]||l;if(e){e.K["s-sh"]=s["s-hn"];e.G=s}else{t["s-sh"]=s["s-hn"];relocateNodes.push({G:s,K:t})}if(t["s-sr"]){relocateNodes.map((function(r){if(isNodeLocatedInSlot(r.K,t["s-sn"])){e=relocateNodes.find((function(e){return e.K===t}));if(e&&!r.G){r.G=e.G}}}))}}else if(!relocateNodes.some((function(e){return e.K===t}))){relocateNodes.push({K:t})}}};for(n=r.length-1;n>=0;n--){f()}}if(s.nodeType===1){markSlotContentForRelocation(s)}}};var nullifyVNodeRefs=function(e){if(BUILD.vdomRef){e.O&&e.O.ref&&e.O.ref(null);e.k&&e.k.map(nullifyVNodeRefs)}};var insertBefore=function(e,t,r){if(BUILD.scoped&&typeof t["s-sn"]==="string"&&!!t["s-sr"]&&!!t["s-cr"]){addRemoveSlotScopedClass(t["s-cr"],t,e,t.parentElement)}else if(BUILD.experimentalSlotFixes&&typeof t["s-sn"]==="string"){if(e.getRootNode().nodeType!==11){patchParentNode(t)}e.insertBefore(t,r);var n=findSlotFromSlottedNode(t).slotNode;if(n)dispatchSlotChangeEvent(n);return t}if(BUILD.experimentalSlotFixes&&e.__insertBefore){return e.__insertBefore(t,r)}else{return e==null?void 0:e.insertBefore(t,r)}};function addRemoveSlotScopedClass(e,t,r,n){var o,i;var a;if(e&&typeof t["s-sn"]==="string"&&!!t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(a=t["s-si"]||e.parentNode["s-sc"])){var s=t["s-sn"];var l=t["s-hn"];(o=r.classList)==null?void 0:o.add(a+"-s");if(n&&((i=n.classList)==null?void 0:i.contains(a+"-s"))){var f=(n.__childNodes||n.childNodes)[0];var u=false;while(f){if(f["s-sn"]!==s&&f["s-hn"]===l&&!!f["s-sr"]){u=true;break}f=f.nextSibling}if(!u)n.classList.remove(a+"-s")}}}var renderVdom=function(e,t,r){if(r===void 0){r=false}var n,o,i,a,s;var l=e.$hostElement$;var f=e.t;var u=e._||newVNode(null,null);var c=isHost(t)?t:h(null,null,t);hostTagName=l.tagName;if(BUILD.isDev&&Array.isArray(t)&&t.some(isHost)){throw new Error('The <Host> must be the single root component.\nLooks like the render() function of "'.concat(hostTagName.toLowerCase(),'" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n '))}if(BUILD.reflect&&f.J){c.O=c.O||{};f.J.map((function(e){var t=e[0],r=e[1];return c.O[r]=l[t]}))}if(r&&c.O){for(var v=0,d=Object.keys(c.O);v<d.length;v++){var p=d[v];if(l.hasAttribute(p)&&!["key","ref","style","class"].includes(p)){c.O[p]=l[p]}}}c.P=null;c.u|=4;e._=c;c.V=u.V=BUILD.shadowDom?l.shadowRoot||l:l;if(BUILD.scoped||BUILD.shadowDom){scopeId=l["s-sc"]}useNativeShadowDom=supportsShadow&&!!(f.u&1)&&!(f.u&128);if(BUILD.slotRelocation){contentRef=l["s-cr"];checkSlotFallbackVisibility=false}patch(u,c,r);if(BUILD.slotRelocation){plt.u|=1;if(checkSlotRelocate){markSlotContentForRelocation(c.V);for(var D=0,m=relocateNodes;D<m.length;D++){var L=m[D];var I=L.K;if(!I["s-ol"]&&win.document){var S=BUILD.isDebug||BUILD.hydrateServerSide?originalLocationDebugNode(I):win.document.createTextNode("");S["s-nr"]=I;insertBefore(I.parentNode,I["s-ol"]=S,I)}}for(var g=0,B=relocateNodes;g<B.length;g++){var L=B[g];var I=L.K;var U=L.G;if(U){var C=U.parentNode;var _=U.nextSibling;if(!BUILD.hydrateServerSide&&(!BUILD.experimentalSlotFixes||_&&_.nodeType===1)){var S=(n=I["s-ol"])==null?void 0:n.previousSibling;while(S){var y=(o=S["s-nr"])!=null?o:null;if(y&&y["s-sn"]===I["s-sn"]&&C===(y.__parentNode||y.parentNode)){y=y.nextSibling;while(y===I||(y==null?void 0:y["s-sr"])){y=y==null?void 0:y.nextSibling}if(!y||!y["s-nr"]){_=y;break}}S=S.previousSibling}}var E=I.__parentNode||I.parentNode;var b=I.__nextSibling||I.nextSibling;if(!_&&C!==E||b!==_){if(I!==_){if(!BUILD.experimentalSlotFixes&&!I["s-hn"]&&I["s-ol"]){I["s-hn"]=I["s-ol"].parentNode.nodeName}insertBefore(C,I,_);if(I.nodeType===1&&I.tagName!=="SLOT-FB"){I.hidden=(i=I["s-ih"])!=null?i:false}}}I&&typeof U["s-rf"]==="function"&&U["s-rf"](U)}else{if(I.nodeType===1){if(r){I["s-ih"]=(a=I.hidden)!=null?a:false}I.hidden=true}}}}if(checkSlotFallbackVisibility){updateFallbackSlotVisibility(c.V)}plt.u&=~1;relocateNodes.length=0}if(BUILD.experimentalScopedSlotChanges&&f.u&2){var N=c.V.__childNodes||c.V.childNodes;for(var w=0,R=N;w<R.length;w++){var T=R[w];if(T["s-hn"]!==hostTagName&&!T["s-sh"]){if(r&&T["s-ih"]==null){T["s-ih"]=(s=T.hidden)!=null?s:false}T.hidden=true}}}contentRef=void 0};var slotReferenceDebugNode=function(e){var t;return(t=win.document)==null?void 0:t.createComment("<slot".concat(e.M?' name="'+e.M+'"':"","> (host=").concat(hostTagName.toLowerCase(),")"))};var originalLocationDebugNode=function(e){var t;return(t=win.document)==null?void 0:t.createComment("org-location for "+(e.localName?"<".concat(e.localName,"> (host=").concat(e["s-hn"],")"):"[".concat(e.textContent,"]")))};var attachToAncestor=function(e,t){if(BUILD.asyncLoading&&t&&!e.N&&t["s-p"]){var r=t["s-p"].push(new Promise((function(n){return e.N=function(){t["s-p"].splice(r-1,1);n()}})))}};var scheduleUpdate=function(e,t){if(BUILD.taskQueue&&BUILD.updatable){e.u|=16}if(BUILD.asyncLoading&&e.u&4){e.u|=512;return}attachToAncestor(e,e.C);var r=function(){return dispatchHooks(e,t)};return BUILD.taskQueue?writeTask(r):r()};var dispatchHooks=function(e,t){var r=e.$hostElement$;var n=createTime("scheduleUpdate",e.t.I);var o=BUILD.lazyLoad?e.l:r;if(!o){throw new Error("Can't render component <".concat(r.tagName.toLowerCase()," /> with invalid Stencil runtime! Make sure this imported component is compiled with a `externalRuntime: true` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime"))}var i;if(t){if(BUILD.lazyLoad&&BUILD.hostListener){e.u|=256;if(e.R){e.R.map((function(e){var t=e[0],n=e[1];return safeCall(o,t,n,r)}));e.R=void 0}}emitLifecycleEvent(r,"componentWillLoad");i=safeCall(o,"componentWillLoad",void 0,r)}else{emitLifecycleEvent(r,"componentWillUpdate");i=safeCall(o,"componentWillUpdate",void 0,r)}emitLifecycleEvent(r,"componentWillRender");i=enqueue(i,(function(){return safeCall(o,"componentWillRender",void 0,r)}));n();return enqueue(i,(function(){return updateComponent(e,o,t)}))};var enqueue=function(e,t){return isPromisey(e)?e.then(t).catch((function(e){console.error(e);t()})):t()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,t,r){return __awaiter(void 0,void 0,void 0,(function(){var n,o,i,a,s,l,f;return __generator(this,(function(u){switch(u.label){case 0:o=e.$hostElement$;i=createTime("update",e.t.I);a=o["s-rc"];if(BUILD.style&&r){attachStyles(e)}s=createTime("render",e.t.I);if(BUILD.isDev){e.u|=1024}if(!BUILD.hydrateServerSide)return[3,2];return[4,callRender(e,t,o,r)];case 1:u.sent();return[3,3];case 2:callRender(e,t,o,r);u.label=3;case 3:if(BUILD.isDev){e.v=e.v===void 0?1:e.v+1;e.u&=~1024}if(BUILD.hydrateServerSide){try{serverSideConnected(o);if(r){if(e.t.u&1){o["s-en"]=""}else if(e.t.u&2){o["s-en"]="c"}}}catch(e){consoleError(e,o)}}if(BUILD.asyncLoading&&a){a.map((function(e){return e()}));o["s-rc"]=void 0}s();i();if(BUILD.asyncLoading){l=(n=o["s-p"])!=null?n:[];f=function(){return postUpdateComponent(e)};if(l.length===0){f()}else{Promise.all(l).then(f);e.u|=4;l.length=0}}else{postUpdateComponent(e)}return[2]}}))}))};var renderingRef=null;var callRender=function(e,t,r,n){var o=BUILD.allRenderFn?true:false;var i=BUILD.lazyLoad?true:false;var a=BUILD.taskQueue?true:false;var s=BUILD.updatable?true:false;try{renderingRef=t;t=o?t.render():t.render&&t.render();if(s&&a){e.u&=~16}if(s||i){e.u|=2}if(BUILD.hasRenderFn||BUILD.reflect){if(BUILD.vdomRender||BUILD.reflect){if(BUILD.hydrateServerSide){return Promise.resolve(t).then((function(t){return renderVdom(e,t,n)}))}else{renderVdom(e,t,n)}}else{var l=r.shadowRoot;if(e.t.u&1){l.textContent=t}else{r.textContent=t}}}}catch(t){consoleError(t,e.$hostElement$)}renderingRef=null;return null};var getRenderingRef=function(){return renderingRef};var postUpdateComponent=function(e){var t=e.t.I;var r=e.$hostElement$;var n=createTime("postUpdate",t);var o=BUILD.lazyLoad?e.l:r;var i=e.C;if(BUILD.isDev){e.u|=1024}safeCall(o,"componentDidRender",void 0,r);if(BUILD.isDev){e.u&=~1024}emitLifecycleEvent(r,"componentDidRender");if(!(e.u&64)){e.u|=64;if(BUILD.asyncLoading&&BUILD.cssAnnotations){addHydratedFlag(r)}if(BUILD.isDev){e.u|=2048}safeCall(o,"componentDidLoad",void 0,r);if(BUILD.isDev){e.u&=~2048}emitLifecycleEvent(r,"componentDidLoad");n();if(BUILD.asyncLoading){e.L(r);if(!i){appDidLoad(t)}}}else{if(BUILD.isDev){e.u|=1024}safeCall(o,"componentDidUpdate",void 0,r);if(BUILD.isDev){e.u&=~1024}emitLifecycleEvent(r,"componentDidUpdate");n()}if(BUILD.method&&BUILD.lazyLoad){e.D(r)}if(BUILD.asyncLoading){if(e.N){e.N();e.N=void 0}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var forceUpdate=function(e){if(BUILD.updatable&&(Build.isBrowser||Build.isTesting)){var t=getHostRef(e);var r=t.$hostElement$.isConnected;if(r&&(t.u&(2|16))===2){scheduleUpdate(t,false)}return r}return false};var appDidLoad=function(e){if(BUILD.asyncQueue){plt.u|=2}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}));if(BUILD.profile&&performance.measure){performance.measure("[Stencil] ".concat(NAMESPACE," initial load (by ").concat(e,")"),"st:app:start")}};var safeCall=function(e,t,r,n){if(e&&e[t]){try{return e[t](r)}catch(e){consoleError(e,n)}}return void 0};var emitLifecycleEvent=function(e,t){if(BUILD.lifecycleDOMEvents){emitEvent(e,"stencil_"+t,{bubbles:true,composed:true,detail:{namespace:NAMESPACE}})}};var addHydratedFlag=function(e){var t,r;return BUILD.hydratedClass?e.classList.add((t=BUILD.hydratedSelectorName)!=null?t:"hydrated"):BUILD.hydratedAttribute?e.setAttribute((r=BUILD.hydratedSelectorName)!=null?r:"hydrated",""):void 0};var serverSideConnected=function(e){var t=e.children;if(t!=null){for(var r=0,n=t.length;r<n;r++){var o=t[r];if(typeof o.connectedCallback==="function"){o.connectedCallback()}serverSideConnected(o)}}};var getValue=function(e,t){return getHostRef(e).i.get(t)};var setValue=function(e,t,r,n){var o=getHostRef(e);if(BUILD.lazyLoad&&!o){throw new Error("Couldn't find host element for \"".concat(n.I,'" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).'))}var i=BUILD.lazyLoad?o.$hostElement$:e;var a=o.i.get(t);var s=o.u;var l=BUILD.lazyLoad?o.l:i;r=parsePropertyValue(r,n.o[t][0]);var f=Number.isNaN(a)&&Number.isNaN(r);var u=r!==a&&!f;if((!BUILD.lazyLoad||!(s&8)||a===void 0)&&u){o.i.set(t,r);if(BUILD.isDev){if(o.u&1024){consoleDevWarn('The state/prop "'.concat(t,'" changed during rendering. This can potentially lead to infinite-loops and other bugs.'),"\nElement",i,"\nNew value",r,"\nOld value",a)}else if(o.u&2048){consoleDevWarn('The state/prop "'.concat(t,'" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"'),"\nElement",i,"\nNew value",r,"\nOld value",a)}}if(!BUILD.lazyLoad||l){if(BUILD.watchCallback&&n.Z&&s&128){var c=n.Z[t];if(c){c.map((function(e){try{l[e](r,a,t)}catch(e){consoleError(e,i)}}))}}if(BUILD.updatable&&(s&(2|16))===2){if(l.componentShouldUpdate){if(l.componentShouldUpdate(r,a,t)===false){return}}scheduleUpdate(o,false)}}}};var proxyComponent=function(e,t,r){var n,o;var i=e.prototype;if(BUILD.isTesting){if(i.__stencilAugmented){return}i.__stencilAugmented=true}if(BUILD.formAssociated&&t.u&64&&r&1){FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((function(e){var t=i[e];Object.defineProperty(i,e,{value:function(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var o=getHostRef(this);var i=BUILD.lazyLoad?o.l:this;if(!i){o.m.then((function(t){var n=t[e];typeof n==="function"&&n.call.apply(n,__spreadArray([t],r,false))}))}else{var a=BUILD.lazyLoad?i[e]:t;typeof a==="function"&&a.call.apply(a,__spreadArray([i],r,false))}}})}))}if(BUILD.member&&t.o||BUILD.watchCallback&&(t.Z||e.watchers)){if(BUILD.watchCallback&&e.watchers&&!t.Z){t.Z=e.watchers}var a=Object.entries((n=t.o)!=null?n:{});a.map((function(e){var n=e[0],o=e[1][0];if((BUILD.prop||BUILD.state)&&(o&31||(!BUILD.lazyLoad||r&2)&&o&32)){var a=Object.getOwnPropertyDescriptor(i,n)||{},s=a.get,l=a.set;if(s)t.o[n][0]|=2048;if(l)t.o[n][0]|=4096;if(r&1||!s){Object.defineProperty(i,n,{get:function(){if(BUILD.lazyLoad){if((t.o[n][0]&2048)===0){return getValue(this,n)}var e=getHostRef(this);var r=e?e.l:i;if(!r)return;return r[n]}if(!BUILD.lazyLoad){return s?s.apply(this):getValue(this,n)}},configurable:true,enumerable:true})}Object.defineProperty(i,n,{set:function(e){var i=this;var a=getHostRef(this);if(BUILD.isDev){if((r&1)===0&&(t.o[n][0]&4096)===0&&(a&&a.u&8)===0&&(o&31)!==0&&(o&1024)===0){consoleDevWarn('@Prop() "'.concat(n,'" on <').concat(t.I,"> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability"))}}if(l){var s=o&32?this[n]:a.$hostElement$[n];if(typeof s==="undefined"&&a.i.get(n)){e=a.i.get(n)}else if(!a.i.get(n)&&s){a.i.set(n,s)}l.apply(this,[parsePropertyValue(e,o)]);e=o&32?this[n]:a.$hostElement$[n];setValue(this,n,e,t);return}if(!BUILD.lazyLoad){setValue(this,n,e,t);return}if(BUILD.lazyLoad){if((r&1)===0||(t.o[n][0]&4096)===0){setValue(this,n,e,t);if(r&1&&!a.l){a.m.then((function(){if(t.o[n][0]&4096&&a.l[n]!==a.i.get(n)){a.l[n]=e}}))}return}var f=function(){var r=a.l[n];if(!a.i.get(n)&&r){a.i.set(n,r)}a.l[n]=parsePropertyValue(e,o);setValue(i,n,a.l[n],t)};if(a.l){f()}else{a.m.then((function(){return f()}))}}}})}else if(BUILD.lazyLoad&&BUILD.method&&r&1&&o&64){Object.defineProperty(i,n,{value:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r;var o=getHostRef(this);return(r=o==null?void 0:o.p)==null?void 0:r.then((function(){var t;return(t=o.l)==null?void 0:t[n].apply(t,e)}))}})}}));if(BUILD.observeAttribute&&(!BUILD.lazyLoad||r&1)){var s=new Map;i.attributeChangedCallback=function(e,r,n){var o=this;plt.jmp((function(){var a;var l=s.get(e);if(o.hasOwnProperty(l)&&BUILD.lazyLoad){n=o[l];delete o[l]}else if(i.hasOwnProperty(l)&&typeof o[l]==="number"&&o[l]==n){return}else if(l==null){var f=getHostRef(o);var u=f==null?void 0:f.u;if(u&&!(u&8)&&u&128&&n!==r){var c=BUILD.lazyLoad?f.$hostElement$:o;var v=BUILD.lazyLoad?f.l:c;var d=(a=t.Z)==null?void 0:a[e];d==null?void 0:d.forEach((function(t){if(v[t]!=null){v[t].call(v,n,r,e)}}))}return}var p=Object.getOwnPropertyDescriptor(i,l);n=n===null&&typeof o[l]==="boolean"?false:n;if(n!==o[l]&&(!p.get||!!p.set)){o[l]=n}}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((o=t.Z)!=null?o:{}),true),a.filter((function(e){var t=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],n=e[1];var o;var i=n[1]||r;s.set(i,r);if(BUILD.reflect&&n[0]&512){(o=t.J)==null?void 0:o.push([r,i])}return i})),true)))}}return e};var initializeComponent=function(e,t,r,n){return __awaiter(void 0,void 0,void 0,(function(){var o,i,a,s,l,f,u,c,v,d,p;return __generator(this,(function(h){switch(h.label){case 0:if(!((t.u&32)===0))return[3,6];t.u|=32;i=r.S;if(!(BUILD.lazyLoad&&i))return[3,4];a=loadModule(r,t,n);if(!(a&&"then"in a))return[3,2];s=uniqueTime("st:load:".concat(r.I,":").concat(t.B),"[Stencil] Load module for <".concat(r.I,">"));return[4,a];case 1:o=h.sent();s();return[3,3];case 2:o=a;h.label=3;case 3:if(!o){throw new Error('Constructor for "'.concat(r.I,"#").concat(t.B,'" was not found'))}if(BUILD.member&&!o.isProxied){if(BUILD.watchCallback){r.Z=o.watchers}proxyComponent(o,r,2);o.isProxied=true}l=createTime("createInstance",r.I);if(BUILD.member){t.u|=8}try{new o(t)}catch(t){consoleError(t,e)}if(BUILD.member){t.u&=~8}if(BUILD.watchCallback){t.u|=128}l();fireConnectedCallback(t.l,e);return[3,5];case 4:o=e.constructor;f=e.localName;customElements.whenDefined(f).then((function(){return t.u|=128}));h.label=5;case 5:if(BUILD.style&&o&&o.style){u=void 0;if(typeof o.style==="string"){u=o.style}else if(BUILD.mode&&typeof o.style!=="string"){t.B=computeMode(e);if(t.B){u=o.style[t.B]}if(BUILD.hydrateServerSide&&t.B){e.setAttribute("s-mode",t.B)}}c=getScopeId(r,t.B);if(!styles.has(c)){v=createTime("registerStyles",r.I);if(BUILD.hydrateServerSide&&BUILD.shadowDom&&r.u&128){u=scopeCss(u,c,true)}registerStyle(c,u,!!(r.u&1));v()}}h.label=6;case 6:d=t.C;p=function(){return scheduleUpdate(t,true)};if(BUILD.asyncLoading&&d&&d["s-rc"]){d["s-rc"].push(p)}else{p()}return[2]}}))}))};var fireConnectedCallback=function(e,t){if(BUILD.lazyLoad){safeCall(e,"connectedCallback",void 0,t)}};var connectedCallback=function(e){if((plt.u&1)===0){var t=getHostRef(e);var r=t.t;var n=createTime("connectedCallback",r.I);if(BUILD.hostListenerTargetParent){addHostEventListeners(e,t,r.ee,true)}if(!(t.u&1)){t.u|=1;var o=void 0;if(BUILD.hydrateClientSide){o=e.getAttribute(HYDRATE_ID);if(o){if(BUILD.shadowDom&&supportsShadow&&r.u&1){var i=BUILD.mode?addStyle(e.shadowRoot,r,e.getAttribute("s-mode")):addStyle(e.shadowRoot,r);e.classList.remove(i+"-h",i+"-s")}else if(BUILD.scoped&&r.u&2){var i=getScopeId(r,BUILD.mode?e.getAttribute("s-mode"):void 0);e["s-sc"]=i}initializeClientHydrate(e,r.I,o,t)}}if(BUILD.slotRelocation&&!o){if(BUILD.hydrateServerSide||(BUILD.slot||BUILD.shadowDom)&&r.u&(4|8)){setContentReference(e)}}if(BUILD.asyncLoading){var a=e;while(a=a.parentNode||a.host){if(BUILD.hydrateClientSide&&a.nodeType===1&&a.hasAttribute("s-id")&&a["s-p"]||a["s-p"]){attachToAncestor(t,t.C=a);break}}}if(BUILD.prop&&!BUILD.hydrateServerSide&&r.o){Object.entries(r.o).map((function(t){var r=t[0],n=t[1][0];if(n&31&&e.hasOwnProperty(r)){var o=e[r];delete e[r];e[r]=o}}))}if(BUILD.initializeNextTick){nextTick((function(){return initializeComponent(e,t,r)}))}else{initializeComponent(e,t,r)}}else{addHostEventListeners(e,t,r.ee,false);if(t==null?void 0:t.l){fireConnectedCallback(t.l,e)}else if(t==null?void 0:t.m){t.m.then((function(){return fireConnectedCallback(t.l,e)}))}}n()}};var setContentReference=function(e){if(!win.document){return}var t=e["s-cr"]=win.document.createComment(BUILD.isDebug?"content-ref (host=".concat(e.localName,")"):"");t["s-cn"]=true;insertBefore(e,t,e.firstChild)};var disconnectInstance=function(e,t){if(BUILD.lazyLoad){safeCall(e,"disconnectedCallback",void 0,t||e)}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t;return __generator(this,(function(r){if((plt.u&1)===0){t=getHostRef(e);if(BUILD.hostListener){if(t.T){t.T.map((function(e){return e()}));t.T=void 0}}if(!BUILD.lazyLoad){disconnectInstance(e)}else if(t==null?void 0:t.l){disconnectInstance(t.l,e)}else if(t==null?void 0:t.m){t.m.then((function(){return disconnectInstance(t.l,e)}))}}if(rootAppliedStyles.has(e)){rootAppliedStyles.delete(e)}if(e.shadowRoot&&rootAppliedStyles.has(e.shadowRoot)){rootAppliedStyles.delete(e.shadowRoot)}return[2]}))}))};var defineCustomElement=function(e,t){customElements.define(t[1],proxyCustomElement(e,t))};var proxyCustomElement=function(e,t){var r={u:t[0],I:t[1]};if(BUILD.member){r.o=t[2]}if(BUILD.hostListener){r.ee=t[3]}if(BUILD.watchCallback){r.Z=e.Z}if(BUILD.reflect){r.J=[]}if(BUILD.shadowDom&&!supportsShadow&&r.u&1){r.u|=8}if(BUILD.experimentalSlotFixes){if(BUILD.scoped&&r.u&2){patchPseudoShadowDom(e.prototype)}}else{if(BUILD.slotChildNodesFix){patchChildSlotNodes(e.prototype)}if(BUILD.cloneNodeFix){patchCloneNode(e.prototype)}if(BUILD.appendChildSlotFix){patchSlotAppendChild(e.prototype)}if(BUILD.scopedSlotTextContentFix&&r.u&2){patchTextContent(e.prototype)}}if(BUILD.hydrateClientSide&&BUILD.shadowDom){hydrateScopedToShadow()}var n=e.prototype.connectedCallback;var o=e.prototype.disconnectedCallback;Object.assign(e.prototype,{__hasHostListenerAttached:false,__registerHost:function(){registerHost(this,r)},connectedCallback:function(){if(!this.__hasHostListenerAttached){var e=getHostRef(this);addHostEventListeners(this,e,r.ee,false);this.__hasHostListenerAttached=true}connectedCallback(this);if(n){n.call(this)}},disconnectedCallback:function(){disconnectedCallback(this);if(o){o.call(this)}},__attachShadow:function(){if(supportsShadow){if(!this.shadowRoot){if(BUILD.shadowDelegatesFocus){this.attachShadow({mode:"open",delegatesFocus:!!(r.u&16)})}else{this.attachShadow({mode:"open"})}}else{if(this.shadowRoot.mode!=="open"){throw new Error("Unable to re-use existing shadow root for ".concat(r.I,"! Mode is set to ").concat(this.shadowRoot.mode," but Stencil only supports open shadow roots."))}}}else{this.shadowRoot=this}}});e.is=r.I;return proxyComponent(e,r,1|2)};var forceModeUpdate=function(e){if(BUILD.style&&BUILD.mode&&!BUILD.lazyLoad){var t=computeMode(e);var r=getHostRef(e);if(r.B!==t){var n=r.t;var o=e["s-sc"];var i=getScopeId(n,t);var a=e.constructor.style[t];var s=n.u;if(a){if(!styles.has(i)){registerStyle(i,a,!!(s&1))}r.B=t;e.classList.remove(o+"-h",o+"-s");attachStyles(r);forceUpdate(e)}}}};var hmrStart=function(e,t,r){var n=getHostRef(e);n.u=1;initializeComponent(e,n,t,r)};var bootstrapLazy=function(e,t){if(t===void 0){t={}}var r;if(BUILD.profile&&performance.mark){performance.mark("st:app:start")}installDevTools();if(!win.document){console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");return}var n=createTime("bootstrapLazy");var o=[];var i=t.exclude||[];var a=win.customElements;var s=win.document.head;var l=s.querySelector("meta[charset]");var f=win.document.createElement("style");var u=[];var c;var v=true;Object.assign(plt,t);plt.U=new URL(t.resourcesUrl||"./",win.document.baseURI).href;if(BUILD.asyncQueue){if(t.syncQueue){plt.u|=4}}if(BUILD.hydrateClientSide){plt.u|=2}if(BUILD.hydrateClientSide&&BUILD.shadowDom){hydrateScopedToShadow()}var d=false;e.map((function(e){e[1].map((function(r){var n;var s={u:r[0],I:r[1],o:r[2],ee:r[3]};if(s.u&4){d=true}if(BUILD.member){s.o=r[2]}if(BUILD.hostListener){s.ee=r[3]}if(BUILD.reflect){s.J=[]}if(BUILD.watchCallback){s.Z=(n=r[4])!=null?n:{}}if(BUILD.shadowDom&&!supportsShadow&&s.u&1){s.u|=8}var l=BUILD.transformTagName&&t.transformTagName?t.transformTagName(s.I):s.I;var f=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;r.hasRegisteredEventListeners=false;t=r;registerHost(t,s);if(BUILD.shadowDom&&s.u&1){if(supportsShadow){if(!t.shadowRoot){if(BUILD.shadowDelegatesFocus){t.attachShadow({mode:"open",delegatesFocus:!!(s.u&16)})}else{t.attachShadow({mode:"open"})}}else{if(t.shadowRoot.mode!=="open"){throw new Error("Unable to re-use existing shadow root for ".concat(s.I,"! Mode is set to ").concat(t.shadowRoot.mode," but Stencil only supports open shadow roots."))}}}else if(!BUILD.hydrateServerSide&&!("shadowRoot"in t)){t.shadowRoot=t}}return r}t.prototype.connectedCallback=function(){var e=this;var t=getHostRef(this);if(!this.hasRegisteredEventListeners){this.hasRegisteredEventListeners=true;addHostEventListeners(this,t,s.ee,false)}if(c){clearTimeout(c);c=null}if(v){u.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}));plt.raf((function(){var t;var r=getHostRef(e);var n=u.findIndex((function(t){return t===e}));if(n>-1){u.splice(n,1)}if(((t=r==null?void 0:r._)==null?void 0:t.V)instanceof Node&&!r._.V.isConnected){delete r._.V}}))};t.prototype.componentOnReady=function(){return getHostRef(this).m};return t}(HTMLElement);if(BUILD.experimentalSlotFixes){if(BUILD.scoped&&s.u&2){patchPseudoShadowDom(f.prototype)}}else{if(BUILD.slotChildNodesFix){patchChildSlotNodes(f.prototype)}if(BUILD.cloneNodeFix){patchCloneNode(f.prototype)}if(BUILD.appendChildSlotFix){patchSlotAppendChild(f.prototype)}if(BUILD.scopedSlotTextContentFix&&s.u&2){patchTextContent(f.prototype)}}if(BUILD.formAssociated&&s.u&64){f.formAssociated=true}if(BUILD.hotModuleReplacement){f.prototype["s-hmr"]=function(e){hmrStart(this,s,e)}}s.S=e[0];if(!i.includes(l)&&!a.get(l)){o.push(l);a.define(l,proxyComponent(f,s,1))}}))}));if(o.length>0){if(d){f.textContent+=SLOT_FB_CSS}if(BUILD.invisiblePrehydration&&(BUILD.hydratedClass||BUILD.hydratedAttribute)){f.textContent+=o.sort()+HYDRATED_CSS}if(f.innerHTML.length){f.setAttribute("data-styles","");var p=(r=plt.X)!=null?r:queryNonceMetaTagContent(win.document);if(p!=null){f.setAttribute("nonce",p)}s.insertBefore(f,l?l.nextSibling:s.firstChild)}}v=false;if(u.length){u.map((function(e){return e.connectedCallback()}))}else{if(BUILD.profile){plt.jmp((function(){return c=setTimeout(appDidLoad,30,"timeout")}))}else{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}n()};var Fragment=function(e,t){return t};var addHostEventListeners=function(e,t,r,n){if(BUILD.hostListener&&r&&win.document){if(BUILD.hostListenerTargetParent){if(n){r=r.filter((function(e){var t=e[0];return t&32}))}else{r=r.filter((function(e){var t=e[0];return!(t&32)}))}}r.map((function(r){var n=r[0],o=r[1],i=r[2];var a=BUILD.hostListenerTarget?getHostListenerTarget(win.document,e,n):e;var s=hostListenerProxy(t,i);var l=hostListenerOpts(n);plt.ael(a,o,s,l);(t.T=t.T||[]).push((function(){return plt.rel(a,o,s,l)}))}))}};var hostListenerProxy=function(e,t){return function(r){var n;try{if(BUILD.lazyLoad){if(e.u&256){(n=e.l)==null?void 0:n[t](r)}else{(e.R=e.R||[]).push([t,r])}}else{e.$hostElement$[t](r)}}catch(t){consoleError(t,e.$hostElement$)}}};var getHostListenerTarget=function(e,t,r){if(BUILD.hostListenerTargetDocument&&r&4){return e}if(BUILD.hostListenerTargetWindow&&r&8){return win}if(BUILD.hostListenerTargetBody&&r&16){return e.body}if(BUILD.hostListenerTargetParent&&r&32&&t.parentElement){return t.parentElement}return t};var hostListenerOpts=function(e){return supportsListenerOptions?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0};var setNonce=function(e){return plt.X=e};var setPlatformOptions=function(e){return Object.assign(plt,e)};var insertVdomAnnotations=function(e,t){if(e!=null){var r=STENCIL_DOC_DATA in e?e[STENCIL_DOC_DATA]:__assign({},DEFAULT_DOC_DATA);r.staticComponents=new Set(t);var n=[];parseVNodeAnnotations(e,e.body,r,n);n.forEach((function(t){var n;if(t!=null&&t["s-nr"]){var o=t["s-nr"];var i=o["s-host-id"];var a=o["s-node-id"];var s="".concat(i,".").concat(a);if(i==null){i=0;r.rootLevelIds++;a=r.rootLevelIds;s="".concat(i,".").concat(a);if(o.nodeType===1){o.setAttribute(HYDRATE_CHILD_ID,s);if(typeof o["s-sn"]==="string"&&!o.getAttribute("slot")){o.setAttribute("s-sn",o["s-sn"])}}else if(o.nodeType===3){if(i===0){var l=(n=o.nodeValue)==null?void 0:n.trim();if(l===""){t.remove();return}}var f=e.createComment(s);f.nodeValue="".concat(TEXT_NODE_ID,".").concat(s);insertBefore(o.parentNode,f,o)}else if(o.nodeType===8){var f=e.createComment(s);f.nodeValue="".concat(COMMENT_NODE_ID,".").concat(s);o.parentNode.insertBefore(f,o)}}var u="".concat(ORG_LOCATION_ID,".").concat(s);var c=t.parentElement;if(c){if(c["s-en"]===""){u+="."}else if(c["s-en"]==="c"){u+=".c"}}t.nodeValue=u}}))}};var parseVNodeAnnotations=function(e,t,r,n){var o;if(t==null){return}if(t["s-nr"]!=null){n.push(t)}if(t.nodeType===1){var i=__spreadArray(__spreadArray([],Array.from(t.childNodes),true),Array.from(((o=t.shadowRoot)==null?void 0:o.childNodes)||[]),true);i.forEach((function(t){var o=getHostRef(t);if(o!=null&&!r.staticComponents.has(t.nodeName.toLowerCase())){var i={nodeIds:0};insertVNodeAnnotations(e,t,o._,r,i)}parseVNodeAnnotations(e,t,r,n)}))}};var insertVNodeAnnotations=function(e,t,r,n,o){if(r!=null){var i=++n.hostIds;t.setAttribute(HYDRATE_ID,i);if(t["s-cr"]!=null){t["s-cr"].nodeValue="".concat(CONTENT_REF_ID,".").concat(i)}if(r.k!=null){var a=0;r.k.forEach((function(t,r){insertChildVNodeAnnotations(e,t,o,i,a,r)}))}if(t&&r&&r.V&&!t.hasAttribute(HYDRATE_CHILD_ID)){var s=t.parentElement;if(s&&s.childNodes){var l=Array.from(s.childNodes);var f=l.find((function(e){return e.nodeType===8&&e["s-sr"]}));if(f){var u=l.indexOf(t)-1;r.V.setAttribute(HYDRATE_CHILD_ID,"".concat(f["s-host-id"],".").concat(f["s-node-id"],".0.").concat(u))}}}}};var insertChildVNodeAnnotations=function(e,t,r,n,o,i){var a=t.V;if(a==null){return}var s=r.nodeIds++;var l="".concat(n,".").concat(s,".").concat(o,".").concat(i);a["s-host-id"]=n;a["s-node-id"]=s;if(a.nodeType===1){a.setAttribute(HYDRATE_CHILD_ID,l);if(typeof a["s-sn"]==="string"&&!a.getAttribute("slot")){a.setAttribute("s-sn",a["s-sn"])}}else if(a.nodeType===3){var f=a.parentNode;var u=f==null?void 0:f.nodeName;if(u!=="STYLE"&&u!=="SCRIPT"){var c="".concat(TEXT_NODE_ID,".").concat(l);var v=e.createComment(c);insertBefore(f,v,a)}}else if(a.nodeType===8){if(a["s-sr"]){var d=a["s-sn"]||"";var p="".concat(SLOT_NODE_ID,".").concat(l,".").concat(d);a.nodeValue=p}}if(t.k!=null){var h=o+1;t.k.forEach((function(t,o){insertChildVNodeAnnotations(e,t,r,n,h,o)}))}};var StencilCore=Object.freeze({__proto__:null,BUILD:BUILD,Build:Build,Env:Env,Fragment:Fragment,H:H,HTMLElement:H,Host:Host,NAMESPACE:NAMESPACE,STENCIL_DEV_MODE:STENCIL_DEV_MODE,addHostEventListeners:addHostEventListeners,bootstrapLazy:bootstrapLazy,cmpModules:cmpModules,connectedCallback:connectedCallback,consoleDevError:consoleDevError,consoleDevInfo:consoleDevInfo,consoleDevWarn:consoleDevWarn,consoleError:consoleError,createEvent:createEvent,defineCustomElement:defineCustomElement,disconnectedCallback:disconnectedCallback,forceModeUpdate:forceModeUpdate,forceUpdate:forceUpdate,getAssetPath:getAssetPath,getElement:getElement,getHostRef:getHostRef,getMode:getMode,getRenderingRef:getRenderingRef,getValue:getValue,h:h,insertVdomAnnotations:insertVdomAnnotations,isMemberInElement:isMemberInElement,loadModule:loadModule,modeResolutionChain:modeResolutionChain,nextTick:nextTick,parsePropertyValue:parsePropertyValue,plt:plt,postUpdateComponent:postUpdateComponent,promiseResolve:promiseResolve,proxyComponent:proxyComponent,proxyCustomElement:proxyCustomElement,readTask:readTask,registerHost:registerHost,registerInstance:registerInstance,renderVdom:renderVdom,setAssetPath:setAssetPath,setErrorHandler:setErrorHandler,setMode:setMode,setNonce:setNonce,setPlatformHelpers:setPlatformHelpers,setPlatformOptions:setPlatformOptions,setValue:setValue,styles:styles,supportsConstructableStylesheets:supportsConstructableStylesheets,supportsListenerOptions:supportsListenerOptions,supportsShadow:supportsShadow,win:win,writeTask:writeTask});export{BUILD as B,Fragment as F,H,NAMESPACE as N,StencilCore as S,Host as a,bootstrapLazy as b,consoleDevInfo as c,createEvent as d,getAssetPath as e,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s,win as w};
|
package/dist/esm-es5/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,o,t){function r(e){return e instanceof o?e:new o((function(n){n(e)}))}return new(o||(o=Promise))((function(o,i){function a(e){try{c(t.next(e))}catch(e){i(e)}}function s(e){try{c(t["throw"](e))}catch(e){i(e)}}function c(e){e.done?o(e.value):r(e.value).then(a,s)}c((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,r,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(n){return c([e,n])}}function c(s){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(t=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;r=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1];i=s;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(s);break}if(i[2])o.ops.pop();o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e];r=0}finally{t=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,o){if(o||arguments.length===2)for(var t=0,r=n.length,i;t<r;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return e.concat(i||Array.prototype.slice.call(n))};import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getGenericSettingsOverride,I as IframeService}from"./getGenericSettingsOverride-0bc3e118.js";import{l as log}from"./VarianceTest-572cecf5.js";export{a as availableTestKeys}from"./VarianceTest-572cecf5.js";import{g as getIsTestMode,a as getIsStagingMode,h as handleFetch,l as logError}from"./handleFetch-a844cac1.js";import{g as getAbandonedCartRenewTokenValue,_ as _getIsValidCartId,c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector}from"./CheckoutConfig-724d7bae.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./CheckoutConfig-724d7bae.js";export{c as countryRequireShortAddressCode}from"./ShortAddressCode-7620e622.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./TaxId-50d72254.js";var checkIfLoadVersionDomain=function(e){var n=e.loadScriptSrc;if(!n){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var t=["qa.js.zonos.com"];var r=new URL(n).origin;var i=o.some((function(e){return r.includes(e)}));var a=t.some((function(e){return r.includes(e)}));return{currentLoadScriptUrl:r,isForceLoadVersionDomain:a,isWhiteListed:i}};var fallbackList=["jsdelivr","cdnjs","unpkg","vercel"];var MAIN_LOAD_CDN_TYPE="jsdelivr";var getNextFallbackUrl=function(e){var n=fallbackList.indexOf(e);var o=fallbackList[n+1];return o||null};var getWithTestPublicCredential=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,n,o,t,r,i;return __generator(this,(function(a){switch(a.label){case 0:e=getIsTestMode();n=getIsStagingMode();if(!e&&!n||!window.Zonos.zonosApiKey){return[2,null]}log("[ZONOS - loadZonos] Attempt test public credential","info");if(!!window.Zonos.zonosApiKey.includes("credential_test")){log("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info");return[2,null]}return[4,handleFetch("/api/get-test-public-credential")];case 1:o=a.sent(),t=o.errors,r=o.json;if(t.length||!r){logError("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",t);return[2,null]}i=r.publicCredential;if(!i){logError("[ZONOS - loadZonos] No test public key credential. Keep using production key");return[2,null]}log("[ZONOS - loadZonos] Retrieve new test public token ".concat(i),"info");return[2,i]}}))}))};var extractZonosQaUrl=function(e){if(!e){return null}var n=new URL(e).searchParams;var o=n.get("zonosQaUrl");if(!o){return null}var t=/[^a-zA-Z0-9-_]+/.test(o);if(!!t){return null}return o};var getZonosQaUrl=function(){var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=extractZonosQaUrl(window.location.href);var o="https://v1.3.248.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-"))){return o}if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname)){return"https://dev.elements.zonos.com"}if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var t="preview.js.zonos.com";var r="https://".concat(n,".").concat(t);log("[ZONOS-WARNING] using '".concat(r,"' for loading elements script"),"warn");void fetch(r).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(r,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");var n=window.location.pathname;var o="".concat(n,"?").concat(e.toString());window.history.replaceState(window.history.state,"",o);window.location.reload();return null}));return r};var V3_URL="https://js.stripe.com/v3";var V3_URL_REGEX=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var EXISTING_SCRIPT_MESSAGE="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var zonosStripeFindScript=function(){var e=document.querySelectorAll('script[src^="'.concat(V3_URL,'"]'));for(var n=0;n<e.length;n++){var o=e[n];if(!o){continue}if(!V3_URL_REGEX.test(o.src)){continue}return o}return null};var stripePromise$1=null;var injectScript=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"";var o=document.createElement("script");o.src="".concat(V3_URL).concat(n);var t=document.head||document.body;if(!t){logError("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}t.appendChild(o);return o};var zonosStripeLoadScript=function(e){if(stripePromise$1!==null){return stripePromise$1}stripePromise$1=new Promise((function(n,o){if(typeof window==="undefined"||typeof document==="undefined"){n(null);return}if(window.Stripe&&e){console.warn(EXISTING_SCRIPT_MESSAGE)}if(window.Stripe){n(window.Stripe);return}try{var t=zonosStripeFindScript();if(t&&e){console.warn(EXISTING_SCRIPT_MESSAGE)}else if(!t){t=injectScript(e)}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){n(window.Stripe)}else{o(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){o(new Error("Failed to load Stripe.js"))}))}catch(e){o(e);return}}));return stripePromise$1};var registerWrapper=function(e,n){if(!e||!e._registerWrapper){return}e._registerWrapper({name:"stripe-js",startTime:n})};var initStripe=function(e,n,o){if(e===null){return null}var t=e.apply(undefined,n);registerWrapper(t,o);return t};var stripePromise=Promise.resolve().then((function(){return zonosStripeLoadScript(null)}));var loadCalled=false;stripePromise.catch((function(e){if(!loadCalled){console.warn(e)}}));var zonosLoadStripe=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(o){loadCalled=true;n=Date.now();return[2,stripePromise.then((function(o){return initStripe(o,e,n)}))]}))}))};var TEMP_CART_ID_QUERY_PARAM="tempCartUUID";var getCartIdFromQueryParam=function(){var e=new URLSearchParams(window.location.search);var n=e.get(TEMP_CART_ID_QUERY_PARAM);return n};var getCartInfoById=function(e){return __awaiter(void 0,[e],void 0,(function(e){var n,o,t,r,i,a,s,c,u;var d=e.cartId,l=e.retries;return __generator(this,(function(e){switch(e.label){case 0:n=getIsTestMode();o=getGenericSettingsOverride();t=getAbandonedCartRenewTokenValue()||undefined;r=new URLSearchParams;if(o.overrideShouldEnabledCustomAddress){r.set("overrideShouldEnabledCustomAddress",o.overrideShouldEnabledCustomAddress)}return[4,handleFetch("/api/zonos-elements/get-cart?".concat(r.toString()),{body:{isTestMode:n,renewCartExpirationToken:t,tempCartUUID:d},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:i=e.sent(),a=i.errors,s=i.json,c=i.zonosMode;u=!s||a.length;if(!(u&&l))return[3,3];log("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:l});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,getCartInfoById({cartId:d,retries:l-1})];case 3:if(u){return[2,null]}return[2,Object.assign(Object.assign({},s),{zonosMode:c})]}}))}))};var setupCartDataWithSettings=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r;return __generator(this,(function(i){switch(i.label){case 0:n=_getIsValidCartId(e),o=n.isDgsCartId,t=n.isLegacyCartId;if(!t&&!o){logError("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,getCartInfoById({cartId:e,retries:5})];case 1:r=i.sent();log("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;window.Zonos.zonosMode=r.zonosMode;return[2,{cartData:r.cartData,settings:r.settings,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var _a;var zonosLoadUrl=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=checkIfLoadVersionDomain({loadScriptSrc:e===null||e===void 0?void 0:e.src}),o=n.currentLoadScriptUrl,t=n.isWhiteListed;if(t){return o}return null}();var startLoadTime=Date.now();var ZONOS_URL="https://v1.3.248.js.zonos.com";var JS_DELIVR_ZONOS_URL=zonosLoadUrl||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.248";var UNPKG_ZONOS_URL="https://unpkg.com/@zonos/elements@1.3.248";var CDNJS_ZONOS_URL="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.248";var GOOGLE_FONT_URL="https://fonts.googleapis.com";var GOOGLE_FONT_REGEX=/^https:\/\/fonts\.googleapis\.com/;var Zonos=function(){function e(){}return e}();_a=Zonos;Zonos.doneInit=false;Zonos.cartSettings=null;Zonos.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);Zonos.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);Zonos._paypalMockResponse=null;Zonos.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;Zonos.isBigCommerce=false;Zonos.releaseDate="1772221080993";Zonos.isLegacyCheckout=false;Zonos.googleAnalyticId=null;Zonos.googleAnalyticReady=false;Zonos.startLoadTime=startLoadTime;Zonos.domain=typeof window!=="undefined"?window.location!=window.parent.location&&document.referrer||document.location.hostname:"";Zonos.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");Zonos.overrideUseCustomAddressForm=false;Zonos.isCollect=false;Zonos.isInvoice=false;Zonos.isNpm=true;Zonos.zonosQaUrl=null;Zonos.zonosQaUrlApi=null;Zonos.trackEventLogs=[];Zonos.version="v".concat("1.3.248");Zonos.modeAlerted=false;Zonos.cartData=null;Zonos.paypal=null;Zonos.zonosMode=null;Zonos.IframeService=IframeService;Zonos.getCurrentTimestamp=function(){return(new Date).getTime()};Zonos.zonosController=null;Zonos.loadTimeApiInfoList=[];Zonos.logIntervalId=null;Zonos.init=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r,i,a,s,c,u,d,l,f,v,m,_;return __generator(this,(function(p){switch(p.label){case 0:n=e.appearance,o=e.checkoutSettings,t=e.currencyConverter,r=e.helloSettings,i=e.onCountryChange,a=e.overrideCurrencyFormat,s=e.storeId,c=e.zonosApiKey;_a.cartId=getCartIdFromQueryParam();if(_a.doneInit){return[2]}log("====== ZONOS DEBUG MODE: on (".concat(_a.version,") ======"));_a.zonosApiKey=c;_a.storeId=s;if(typeof window!=="undefined"&&window.parent===window){_a.googleAnalyticReady=true}if(!_a.isNpm)return[3,4];log("====== ZONOS LOADING FROM NPM ======");u=getZonosQaUrl();if(u&&!window.isZonosPreview){log('====== RE-INJECT "zonos.js" FROM PRVIEW: '.concat(u," ======"),"info");d=document.createElement("script");d.src="".concat(u,"/dist/scripts/zonos.js");document.head.appendChild(d);d.addEventListener("load",(function(){window.Zonos.isNpm=_a.isNpm;window.Zonos.isBigCommerce=_a.isBigCommerce;window.Zonos.isLegacyCheckout=_a.isLegacyCheckout;window.Zonos.zonosMode=_a.zonosMode;void window.Zonos.init(e)}));d.addEventListener("error",(function(){alert('[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: '.concat(u))}));window.isZonosPreview=true;return[2]}if(!c&&!_a.cartId){logError("Zonos API key is required unless `tempCartUUID` is provided in url query params.");return[2]}if(!(!_a.cartData&&_a.cartId))return[3,2];log("Initialize cart data");return[4,setupCartDataWithSettings(_a.cartId)];case 1:l=p.sent();if(!l){logError("Failed to get cart data");return[2]}_a.cartData=l.cartData;_a.zonosApiKey=l.zonosApiKey;_a.cartSettings=l.settings;p.label=2;case 2:return[4,getWithTestPublicCredential()];case 3:f=p.sent();if(f){_a.zonosApiKey=f}p.label=4;case 4:v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");m=_a.cartId&&_a.cartData||!!v;if(m){log("Cart data or stripe client secret is available, inject hidden button and trigger checkout");_=document.createElement("button");_.style.display="none";_.id="".concat(checkoutHiddenBtnSelector);document.body.appendChild(_)}log("init zonos");_a.restoreNativeBrowserFunctions();_a.injectCustomScriptForHostedCheckout();_a.injectZonosCdn();_a.injectZonosCss();_a.injectFonts();_a.injectCheckoutInternationalButton();_a.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:r,onCountryChange:i,overrideCurrencyFormat:a}});_a.doneInit=true;return[2]}}))}))};Zonos.injectCheckoutInternationalButton=function(){if(!document.querySelector("#".concat(checkoutHiddenInternationalBtnSelector))){var e=document.createElement("button");e.id=checkoutHiddenInternationalBtnSelector;e.style.display="none";document.body.appendChild(e)}};Zonos.injectCustomScriptForHostedCheckout=function(){var e=_a.cartData;var n=(e===null||e===void 0?void 0:e.metadata)||[];var o=n.find((function(e){return e.key==="customHeaderScript"}));var t=n.find((function(e){return e.key==="customFooterScript"}));if(!window.Zonos.isLegacyCheckout||!o&&!t){log("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout});return}if(o){log("Injecting custom header script");var r=document.createElement("script");r.textContent=o.value;document.head.appendChild(r)}if(t){log("Injecting custom footer script");var r=document.createElement("script");r.textContent=t.value;document.body.appendChild(r)}};Zonos.displayCurrency=function(){var e=document.querySelector("zonos-hello");if(e){void e.displayCurrency()}};Zonos.triggerCheckoutInternational=function(){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=document.querySelector("#".concat(checkoutHiddenInternationalBtnSelector));setTimeout((function(){if(e){e.dispatchEvent(createCustomEvent("click"))}}),10);return[2]}))}))};Zonos.openHelloDialog=function(e){var n=document.querySelector("zonos-hello");if(n){void n.openHelloDialog(e!==null&&e!==void 0?e:true)}};Zonos.showNotification=function(e){var n;void((n=_a.zonosController)===null||n===void 0?void 0:n.showNotification(e))};Zonos.updateOrganizationName=function(e){var n;void((n=_a.zonosController)===null||n===void 0?void 0:n.updateOrganizationName(e))};Zonos.disablePlaceOrderButtons=function(e){var n=e.autoEnable,o=n===void 0?true:n,t=e.config,r=e.disable,i=e.placeOrderButtonSelector;var a;if((a=t.checkoutSettings)===null||a===void 0?void 0:a.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var c=function(e){var n=e.target;if(n.getAttribute("disabled")){e.preventDefault();e.stopPropagation()}};s.forEach((function(e){var n=e.getAttribute("data-zonos-checkout-attached");if(n){return}if(r){e.setAttribute("disabled","true");e.addEventListener("click",c)}else{e.removeAttribute("disabled");e.removeEventListener("click",c)}}));if(o&&r){setTimeout((function(){s.forEach((function(e){e.removeAttribute("disabled");e.removeEventListener("click",c)}))}),5e3)}}};Zonos.restoreNativeBrowserFunctions=function(){var e;var n=new URL(window.location.href).searchParams.get("useMerchantPolyfill")==="1";if(n){return}var o="zonos---native-browser";var t=document.querySelector("iframe#".concat(o));if(!t){t=document.createElement("iframe");t.id=o;t.style.display="none";t.style.opacity="0";t.style.position="absolute";t.style.top="-9999px";t.style.left="-9999px";t.style.width="1px";t.style.height="1px";t.style.border="none";t.style.overflow="hidden";t.style.visibility="hidden";document.body.appendChild(t)}var r=((e=t.contentWindow)===null||e===void 0?void 0:e.window.Array.from)||Array.from;Array.from=r;document.body.removeChild(t)};Zonos.injectController=function(e){var n=e.config;var o,t;if(document.querySelector("zonos-controller")){return}if((o=n.checkoutSettings)===null||o===void 0?void 0:o.placeOrderButtonSelector){var r=n.checkoutSettings.placeOrderButtonSelector;_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:r});var i=new MutationObserver((function(){_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:r})}));i.observe(document.body,{childList:true,subtree:true})}if((t=n.checkoutSettings)===null||t===void 0?void 0:t.alwaysTriggerInternationalCheckoutSelector){var a=n.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a});var i=new MutationObserver((function(){_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a})}));i.observe(document.body,{childList:true,subtree:true})}var s=document.createElement("zonos-controller");s.config=n;s.zonosApiKey=_a.zonosApiKey||"";s.addEventListener("stripeInitEvent",(function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o;return __generator(this,(function(t){switch(t.label){case 0:n=e.detail;log("loading Stripe");return[4,zonosLoadStripe(n.publishableKey)];case 1:o=t.sent();if(!o){logError("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;if(window.Zonos.isCollect){void s.initCollectElement(o)}else if(window.Zonos.isInvoice){void s.initInvoiceElement(o)}else{void s.initCheckoutElement(o)}return[2]}}))}))}));document.body.appendChild(s);_a.zonosController=s;log("Zonos controller injected!")};Zonos.injectScript=function(e){var n=e.cdnType,o=e.isModule,t=e.theRestUrl;var r=_a.getZonosUrl(n);var i="".concat(r,"/").concat(t);var a=function(){var e=document.querySelector('script[src="'.concat(i,'"]'));return!!e};if(a()){log('Zonos script "'.concat(i,'" already exists in the document'),"warn");return}var s=document.head||document.body;var c=document.createElement("script");if(!!o){c.type="module"}else{c.noModule=true}c.src=i;c.crossOrigin="anonymous";c.onerror=function(){logError("Failed to load ".concat(c.src));var e=getNextFallbackUrl(n);if(!e){return}_a.injectScript({cdnType:e,isModule:o,theRestUrl:t})};s.appendChild(c)};Zonos.getZonosUrl=function(e){var n=function(){switch(e){case"jsdelivr":return JS_DELIVR_ZONOS_URL;case"unpkg":return UNPKG_ZONOS_URL;case"cdnjs":return CDNJS_ZONOS_URL;case"vercel":return ZONOS_URL}};if(_a.isNpm){var o=getZonosQaUrl();return o||n()}return n()};Zonos.injectZonosCdn=function(){_a.injectScript({cdnType:MAIN_LOAD_CDN_TYPE,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});_a.injectScript({cdnType:MAIN_LOAD_CDN_TYPE,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});log("Zonos cdn script injected!")};Zonos.injectStylesheet=function(e){var n=e.cdnType,o=e.theRestUrl;var t=_a.getZonosUrl(n);var r=document.head||document.body;var i=document.createElement("link");i.rel="preconnect";i.href="".concat(ZONOS_URL,"/");r.appendChild(i);var a=document.createElement("link");a.rel="stylesheet";a.href="".concat(t,"/").concat(o);a.onerror=function(){logError("Failed to load ".concat(a.href));var e=getNextFallbackUrl(n);if(!e){return}_a.injectStylesheet({cdnType:e,theRestUrl:o})};r.appendChild(a)};Zonos.injectZonosCss=function(){var e=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(e()){log("Zonos style links already injected","warn");return}_a.injectStylesheet({cdnType:MAIN_LOAD_CDN_TYPE,theRestUrl:"dist/zonos-elements/zonos-elements.css"});log("Zonos style css injected!")};Zonos.injectFonts=function(){var e=function(){var e=document.fonts.check("1em Inter");if(e){log("Inter font already loaded","warn");return}var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(GOOGLE_FONT_URL,'"]'));for(var o=0;o<n.length;o++){var t=n[o];if(!t){continue}if(GOOGLE_FONT_REGEX.test(t.href)){continue}return t}return null};if(e()){log("Inter font already injected","warn");return}var n=document.head||document.body;var o=document.createElement("link");o.rel="preconnect";o.href=GOOGLE_FONT_URL;n.appendChild(o);var t=document.createElement("link");t.rel="stylesheet";t.href="".concat(GOOGLE_FONT_URL,"/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");n.appendChild(t);log("Zonos font injected!")};Zonos.setupGoogleFont=function(e){var n;void((n=_a.zonosController)===null||n===void 0?void 0:n.setupGoogleFont(e))};Zonos.injectSupportGoogleFont=function(e){var n;log("[FONT] injecting ".concat(e));var o=(n=e.match(/family=(.*?):/))===null||n===void 0?void 0:n[1];var t=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(GOOGLE_FONT_URL,'"]'))){var r=document.createElement("link");r.rel="preconnect";r.href=GOOGLE_FONT_URL;t.appendChild(r)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(e,'"]'))){log("[FONT] ".concat(o," font already injected"),"warn");return}var i=document.createElement("link");i.rel="stylesheet";i.href=e;t.appendChild(i);log("[FONT] ".concat(o," font injected!"))};var checkoutSessionMutableAttributeKeys=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"];var checkoutSessionImmutableAttributeKeys=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"];var checkoutSessionAttributeKeys=__spreadArray(__spreadArray([],checkoutSessionMutableAttributeKeys,true),checkoutSessionImmutableAttributeKeys,true);export{Zonos,checkoutSessionAttributeKeys,checkoutSessionImmutableAttributeKeys,checkoutSessionMutableAttributeKeys};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,o,t){function r(e){return e instanceof o?e:new o((function(n){n(e)}))}return new(o||(o=Promise))((function(o,i){function a(e){try{c(t.next(e))}catch(e){i(e)}}function s(e){try{c(t["throw"](e))}catch(e){i(e)}}function c(e){e.done?o(e.value):r(e.value).then(a,s)}c((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,r,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(n){return c([e,n])}}function c(s){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(t=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;r=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1];i=s;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(s);break}if(i[2])o.ops.pop();o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e];r=0}finally{t=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,o){if(o||arguments.length===2)for(var t=0,r=n.length,i;t<r;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return e.concat(i||Array.prototype.slice.call(n))};import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getGenericSettingsOverride,I as IframeService}from"./getGenericSettingsOverride-0bc3e118.js";import{l as log}from"./VarianceTest-572cecf5.js";export{a as availableTestKeys}from"./VarianceTest-572cecf5.js";import{g as getIsTestMode,a as getIsStagingMode,h as handleFetch,l as logError}from"./handleFetch-a844cac1.js";import{g as getAbandonedCartRenewTokenValue,_ as _getIsValidCartId,c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector}from"./CheckoutConfig-724d7bae.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./CheckoutConfig-724d7bae.js";export{c as countryRequireShortAddressCode}from"./ShortAddressCode-7620e622.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./TaxId-50d72254.js";var checkIfLoadVersionDomain=function(e){var n=e.loadScriptSrc;if(!n){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var t=["qa.js.zonos.com"];var r=new URL(n).origin;var i=o.some((function(e){return r.includes(e)}));var a=t.some((function(e){return r.includes(e)}));return{currentLoadScriptUrl:r,isForceLoadVersionDomain:a,isWhiteListed:i}};var fallbackList=["jsdelivr","cdnjs","unpkg","vercel"];var MAIN_LOAD_CDN_TYPE="jsdelivr";var getNextFallbackUrl=function(e){var n=fallbackList.indexOf(e);var o=fallbackList[n+1];return o||null};var getWithTestPublicCredential=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,n,o,t,r,i;return __generator(this,(function(a){switch(a.label){case 0:e=getIsTestMode();n=getIsStagingMode();if(!e&&!n||!window.Zonos.zonosApiKey){return[2,null]}log("[ZONOS - loadZonos] Attempt test public credential","info");if(!!window.Zonos.zonosApiKey.includes("credential_test")){log("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info");return[2,null]}return[4,handleFetch("/api/get-test-public-credential")];case 1:o=a.sent(),t=o.errors,r=o.json;if(t.length||!r){logError("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",t);return[2,null]}i=r.publicCredential;if(!i){logError("[ZONOS - loadZonos] No test public key credential. Keep using production key");return[2,null]}log("[ZONOS - loadZonos] Retrieve new test public token ".concat(i),"info");return[2,i]}}))}))};var extractZonosQaUrl=function(e){if(!e){return null}var n=new URL(e).searchParams;var o=n.get("zonosQaUrl");if(!o){return null}var t=/[^a-zA-Z0-9-_]+/.test(o);if(!!t){return null}return o};var getZonosQaUrl=function(){var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=extractZonosQaUrl(window.location.href);var o="https://v1.3.250.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-"))){return o}if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname)){return"https://dev.elements.zonos.com"}if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var t="preview.js.zonos.com";var r="https://".concat(n,".").concat(t);log("[ZONOS-WARNING] using '".concat(r,"' for loading elements script"),"warn");void fetch(r).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(r,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");var n=window.location.pathname;var o="".concat(n,"?").concat(e.toString());window.history.replaceState(window.history.state,"",o);window.location.reload();return null}));return r};var V3_URL="https://js.stripe.com/v3";var V3_URL_REGEX=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var EXISTING_SCRIPT_MESSAGE="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var zonosStripeFindScript=function(){var e=document.querySelectorAll('script[src^="'.concat(V3_URL,'"]'));for(var n=0;n<e.length;n++){var o=e[n];if(!o){continue}if(!V3_URL_REGEX.test(o.src)){continue}return o}return null};var stripePromise$1=null;var injectScript=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"";var o=document.createElement("script");o.src="".concat(V3_URL).concat(n);var t=document.head||document.body;if(!t){logError("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}t.appendChild(o);return o};var zonosStripeLoadScript=function(e){if(stripePromise$1!==null){return stripePromise$1}stripePromise$1=new Promise((function(n,o){if(typeof window==="undefined"||typeof document==="undefined"){n(null);return}if(window.Stripe&&e){console.warn(EXISTING_SCRIPT_MESSAGE)}if(window.Stripe){n(window.Stripe);return}try{var t=zonosStripeFindScript();if(t&&e){console.warn(EXISTING_SCRIPT_MESSAGE)}else if(!t){t=injectScript(e)}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){n(window.Stripe)}else{o(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){o(new Error("Failed to load Stripe.js"))}))}catch(e){o(e);return}}));return stripePromise$1};var registerWrapper=function(e,n){if(!e||!e._registerWrapper){return}e._registerWrapper({name:"stripe-js",startTime:n})};var initStripe=function(e,n,o){if(e===null){return null}var t=e.apply(undefined,n);registerWrapper(t,o);return t};var stripePromise=Promise.resolve().then((function(){return zonosStripeLoadScript(null)}));var loadCalled=false;stripePromise.catch((function(e){if(!loadCalled){console.warn(e)}}));var zonosLoadStripe=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(o){loadCalled=true;n=Date.now();return[2,stripePromise.then((function(o){return initStripe(o,e,n)}))]}))}))};var TEMP_CART_ID_QUERY_PARAM="tempCartUUID";var getCartIdFromQueryParam=function(){var e=new URLSearchParams(window.location.search);var n=e.get(TEMP_CART_ID_QUERY_PARAM);return n};var getCartInfoById=function(e){return __awaiter(void 0,[e],void 0,(function(e){var n,o,t,r,i,a,s,c,u;var d=e.cartId,l=e.retries;return __generator(this,(function(e){switch(e.label){case 0:n=getIsTestMode();o=getGenericSettingsOverride();t=getAbandonedCartRenewTokenValue()||undefined;r=new URLSearchParams;if(o.overrideShouldEnabledCustomAddress){r.set("overrideShouldEnabledCustomAddress",o.overrideShouldEnabledCustomAddress)}return[4,handleFetch("/api/zonos-elements/get-cart?".concat(r.toString()),{body:{isTestMode:n,renewCartExpirationToken:t,tempCartUUID:d},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:i=e.sent(),a=i.errors,s=i.json,c=i.zonosMode;u=!s||a.length;if(!(u&&l))return[3,3];log("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:l});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,getCartInfoById({cartId:d,retries:l-1})];case 3:if(u){return[2,null]}return[2,Object.assign(Object.assign({},s),{zonosMode:c})]}}))}))};var setupCartDataWithSettings=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r;return __generator(this,(function(i){switch(i.label){case 0:n=_getIsValidCartId(e),o=n.isDgsCartId,t=n.isLegacyCartId;if(!t&&!o){logError("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,getCartInfoById({cartId:e,retries:5})];case 1:r=i.sent();log("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;window.Zonos.zonosMode=r.zonosMode;return[2,{cartData:r.cartData,settings:r.settings,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var _a;var zonosLoadUrl=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=checkIfLoadVersionDomain({loadScriptSrc:e===null||e===void 0?void 0:e.src}),o=n.currentLoadScriptUrl,t=n.isWhiteListed;if(t){return o}return null}();var startLoadTime=Date.now();var ZONOS_URL="https://v1.3.250.js.zonos.com";var JS_DELIVR_ZONOS_URL=zonosLoadUrl||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.250";var UNPKG_ZONOS_URL="https://unpkg.com/@zonos/elements@1.3.250";var CDNJS_ZONOS_URL="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.250";var GOOGLE_FONT_URL="https://fonts.googleapis.com";var GOOGLE_FONT_REGEX=/^https:\/\/fonts\.googleapis\.com/;var Zonos=function(){function e(){}return e}();_a=Zonos;Zonos.doneInit=false;Zonos.cartSettings=null;Zonos.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);Zonos.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);Zonos._paypalMockResponse=null;Zonos.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;Zonos.isBigCommerce=false;Zonos.releaseDate="1775061206883";Zonos.isLegacyCheckout=false;Zonos.googleAnalyticId=null;Zonos.googleAnalyticReady=false;Zonos.startLoadTime=startLoadTime;Zonos.domain=typeof window!=="undefined"?window.location!=window.parent.location&&document.referrer||document.location.hostname:"";Zonos.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");Zonos.overrideUseCustomAddressForm=false;Zonos.isCollect=false;Zonos.isInvoice=false;Zonos.isNpm=true;Zonos.zonosQaUrl=null;Zonos.zonosQaUrlApi=null;Zonos.trackEventLogs=[];Zonos.version="v".concat("1.3.250");Zonos.modeAlerted=false;Zonos.cartData=null;Zonos.paypal=null;Zonos.zonosMode=null;Zonos.IframeService=IframeService;Zonos.getCurrentTimestamp=function(){return(new Date).getTime()};Zonos.zonosController=null;Zonos.loadTimeApiInfoList=[];Zonos.logIntervalId=null;Zonos.init=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r,i,a,s,c,u,d,l,f,v,m,_;return __generator(this,(function(p){switch(p.label){case 0:n=e.appearance,o=e.checkoutSettings,t=e.currencyConverter,r=e.helloSettings,i=e.onCountryChange,a=e.overrideCurrencyFormat,s=e.storeId,c=e.zonosApiKey;_a.cartId=getCartIdFromQueryParam();if(_a.doneInit){return[2]}log("====== ZONOS DEBUG MODE: on (".concat(_a.version,") ======"));_a.zonosApiKey=c;_a.storeId=s;if(typeof window!=="undefined"&&window.parent===window){_a.googleAnalyticReady=true}if(!_a.isNpm)return[3,4];log("====== ZONOS LOADING FROM NPM ======");u=getZonosQaUrl();if(u&&!window.isZonosPreview){log('====== RE-INJECT "zonos.js" FROM PRVIEW: '.concat(u," ======"),"info");d=document.createElement("script");d.src="".concat(u,"/dist/scripts/zonos.js");document.head.appendChild(d);d.addEventListener("load",(function(){window.Zonos.isNpm=_a.isNpm;window.Zonos.isBigCommerce=_a.isBigCommerce;window.Zonos.isLegacyCheckout=_a.isLegacyCheckout;window.Zonos.zonosMode=_a.zonosMode;void window.Zonos.init(e)}));d.addEventListener("error",(function(){alert('[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: '.concat(u))}));window.isZonosPreview=true;return[2]}if(!c&&!_a.cartId){logError("Zonos API key is required unless `tempCartUUID` is provided in url query params.");return[2]}if(!(!_a.cartData&&_a.cartId))return[3,2];log("Initialize cart data");return[4,setupCartDataWithSettings(_a.cartId)];case 1:l=p.sent();if(!l){logError("Failed to get cart data");return[2]}_a.cartData=l.cartData;_a.zonosApiKey=l.zonosApiKey;_a.cartSettings=l.settings;p.label=2;case 2:return[4,getWithTestPublicCredential()];case 3:f=p.sent();if(f){_a.zonosApiKey=f}p.label=4;case 4:v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");m=_a.cartId&&_a.cartData||!!v;if(m){log("Cart data or stripe client secret is available, inject hidden button and trigger checkout");_=document.createElement("button");_.style.display="none";_.id="".concat(checkoutHiddenBtnSelector);document.body.appendChild(_)}log("init zonos");_a.restoreNativeBrowserFunctions();_a.injectCustomScriptForHostedCheckout();_a.injectZonosCdn();_a.injectZonosCss();_a.injectFonts();_a.injectCheckoutInternationalButton();_a.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:r,onCountryChange:i,overrideCurrencyFormat:a}});_a.doneInit=true;return[2]}}))}))};Zonos.injectCheckoutInternationalButton=function(){if(!document.querySelector("#".concat(checkoutHiddenInternationalBtnSelector))){var e=document.createElement("button");e.id=checkoutHiddenInternationalBtnSelector;e.style.display="none";document.body.appendChild(e)}};Zonos.injectCustomScriptForHostedCheckout=function(){var e=_a.cartData;var n=(e===null||e===void 0?void 0:e.metadata)||[];var o=n.find((function(e){return e.key==="customHeaderScript"}));var t=n.find((function(e){return e.key==="customFooterScript"}));if(!window.Zonos.isLegacyCheckout||!o&&!t){log("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout});return}if(o){log("Injecting custom header script");var r=document.createElement("script");r.textContent=o.value;document.head.appendChild(r)}if(t){log("Injecting custom footer script");var r=document.createElement("script");r.textContent=t.value;document.body.appendChild(r)}};Zonos.displayCurrency=function(){var e=document.querySelector("zonos-hello");if(e){void e.displayCurrency()}};Zonos.triggerCheckoutInternational=function(){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=document.querySelector("#".concat(checkoutHiddenInternationalBtnSelector));setTimeout((function(){if(e){e.dispatchEvent(createCustomEvent("click"))}}),10);return[2]}))}))};Zonos.openHelloDialog=function(e){var n=document.querySelector("zonos-hello");if(n){void n.openHelloDialog(e!==null&&e!==void 0?e:true)}};Zonos.showNotification=function(e){var n;void((n=_a.zonosController)===null||n===void 0?void 0:n.showNotification(e))};Zonos.updateOrganizationName=function(e){var n;void((n=_a.zonosController)===null||n===void 0?void 0:n.updateOrganizationName(e))};Zonos.disablePlaceOrderButtons=function(e){var n=e.autoEnable,o=n===void 0?true:n,t=e.config,r=e.disable,i=e.placeOrderButtonSelector;var a;if((a=t.checkoutSettings)===null||a===void 0?void 0:a.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var c=function(e){var n=e.target;if(n.getAttribute("disabled")){e.preventDefault();e.stopPropagation()}};s.forEach((function(e){var n=e.getAttribute("data-zonos-checkout-attached");if(n){return}if(r){e.setAttribute("disabled","true");e.addEventListener("click",c)}else{e.removeAttribute("disabled");e.removeEventListener("click",c)}}));if(o&&r){setTimeout((function(){s.forEach((function(e){e.removeAttribute("disabled");e.removeEventListener("click",c)}))}),5e3)}}};Zonos.restoreNativeBrowserFunctions=function(){var e;var n=new URL(window.location.href).searchParams.get("useMerchantPolyfill")==="1";if(n){return}var o="zonos---native-browser";var t=document.querySelector("iframe#".concat(o));if(!t){t=document.createElement("iframe");t.id=o;t.style.display="none";t.style.opacity="0";t.style.position="absolute";t.style.top="-9999px";t.style.left="-9999px";t.style.width="1px";t.style.height="1px";t.style.border="none";t.style.overflow="hidden";t.style.visibility="hidden";document.body.appendChild(t)}var r=((e=t.contentWindow)===null||e===void 0?void 0:e.window.Array.from)||Array.from;Array.from=r;document.body.removeChild(t)};Zonos.injectController=function(e){var n=e.config;var o,t;if(document.querySelector("zonos-controller")){return}if((o=n.checkoutSettings)===null||o===void 0?void 0:o.placeOrderButtonSelector){var r=n.checkoutSettings.placeOrderButtonSelector;_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:r});var i=new MutationObserver((function(){_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:r})}));i.observe(document.body,{childList:true,subtree:true})}if((t=n.checkoutSettings)===null||t===void 0?void 0:t.alwaysTriggerInternationalCheckoutSelector){var a=n.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a});var i=new MutationObserver((function(){_a.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a})}));i.observe(document.body,{childList:true,subtree:true})}var s=document.createElement("zonos-controller");s.config=n;s.zonosApiKey=_a.zonosApiKey||"";s.addEventListener("stripeInitEvent",(function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o;return __generator(this,(function(t){switch(t.label){case 0:n=e.detail;log("loading Stripe");return[4,zonosLoadStripe(n.publishableKey)];case 1:o=t.sent();if(!o){logError("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;if(window.Zonos.isCollect){void s.initCollectElement(o)}else if(window.Zonos.isInvoice){void s.initInvoiceElement(o)}else{void s.initCheckoutElement(o)}return[2]}}))}))}));document.body.appendChild(s);_a.zonosController=s;log("Zonos controller injected!")};Zonos.injectScript=function(e){var n=e.cdnType,o=e.isModule,t=e.theRestUrl;var r=_a.getZonosUrl(n);var i="".concat(r,"/").concat(t);var a=function(){var e=document.querySelector('script[src="'.concat(i,'"]'));return!!e};if(a()){log('Zonos script "'.concat(i,'" already exists in the document'),"warn");return}var s=document.head||document.body;var c=document.createElement("script");if(!!o){c.type="module"}else{c.noModule=true}c.src=i;c.crossOrigin="anonymous";c.onerror=function(){logError("Failed to load ".concat(c.src));var e=getNextFallbackUrl(n);if(!e){return}_a.injectScript({cdnType:e,isModule:o,theRestUrl:t})};s.appendChild(c)};Zonos.getZonosUrl=function(e){var n=function(){switch(e){case"jsdelivr":return JS_DELIVR_ZONOS_URL;case"unpkg":return UNPKG_ZONOS_URL;case"cdnjs":return CDNJS_ZONOS_URL;case"vercel":return ZONOS_URL}};if(_a.isNpm){var o=getZonosQaUrl();return o||n()}return n()};Zonos.injectZonosCdn=function(){_a.injectScript({cdnType:MAIN_LOAD_CDN_TYPE,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});_a.injectScript({cdnType:MAIN_LOAD_CDN_TYPE,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});log("Zonos cdn script injected!")};Zonos.injectStylesheet=function(e){var n=e.cdnType,o=e.theRestUrl;var t=_a.getZonosUrl(n);var r=document.head||document.body;var i=document.createElement("link");i.rel="preconnect";i.href="".concat(ZONOS_URL,"/");r.appendChild(i);var a=document.createElement("link");a.rel="stylesheet";a.href="".concat(t,"/").concat(o);a.onerror=function(){logError("Failed to load ".concat(a.href));var e=getNextFallbackUrl(n);if(!e){return}_a.injectStylesheet({cdnType:e,theRestUrl:o})};r.appendChild(a)};Zonos.injectZonosCss=function(){var e=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(e()){log("Zonos style links already injected","warn");return}_a.injectStylesheet({cdnType:MAIN_LOAD_CDN_TYPE,theRestUrl:"dist/zonos-elements/zonos-elements.css"});log("Zonos style css injected!")};Zonos.injectFonts=function(){var e=function(){var e=document.fonts.check("1em Inter");if(e){log("Inter font already loaded","warn");return}var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(GOOGLE_FONT_URL,'"]'));for(var o=0;o<n.length;o++){var t=n[o];if(!t){continue}if(GOOGLE_FONT_REGEX.test(t.href)){continue}return t}return null};if(e()){log("Inter font already injected","warn");return}var n=document.head||document.body;var o=document.createElement("link");o.rel="preconnect";o.href=GOOGLE_FONT_URL;n.appendChild(o);var t=document.createElement("link");t.rel="stylesheet";t.href="".concat(GOOGLE_FONT_URL,"/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");n.appendChild(t);log("Zonos font injected!")};Zonos.setupGoogleFont=function(e){var n;void((n=_a.zonosController)===null||n===void 0?void 0:n.setupGoogleFont(e))};Zonos.injectSupportGoogleFont=function(e){var n;log("[FONT] injecting ".concat(e));var o=(n=e.match(/family=(.*?):/))===null||n===void 0?void 0:n[1];var t=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(GOOGLE_FONT_URL,'"]'))){var r=document.createElement("link");r.rel="preconnect";r.href=GOOGLE_FONT_URL;t.appendChild(r)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(e,'"]'))){log("[FONT] ".concat(o," font already injected"),"warn");return}var i=document.createElement("link");i.rel="stylesheet";i.href=e;t.appendChild(i);log("[FONT] ".concat(o," font injected!"))};var checkoutSessionMutableAttributeKeys=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"];var checkoutSessionImmutableAttributeKeys=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"];var checkoutSessionAttributeKeys=__spreadArray(__spreadArray([],checkoutSessionMutableAttributeKeys,true),checkoutSessionImmutableAttributeKeys,true);export{Zonos,checkoutSessionAttributeKeys,checkoutSessionImmutableAttributeKeys,checkoutSessionMutableAttributeKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,r,t,o){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?t(e.value):n(e.value).then(a,s)}d((o=o.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return d([e,r])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;n=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,r,t,o){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?t(e.value):n(e.value).then(a,s)}d((o=o.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return d([e,r])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;n=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-5242a58d.js";import{b as stripeStore,G as stripeStoreBuildAddressForPartyCreate,d as cartStore,H as cartStoreUpdateSelectedShippingOption}from"./cart-6e465f7b.js";import{s as storageStore}from"./localization-f4a7fb5a.js";import{h as handleFetch,s as sendErrorLog,l as logError}from"./handleFetch-a844cac1.js";import{b as allLogs}from"./VarianceTest-572cecf5.js";var _e=createStore((function(){return{amountTotalDue:null,isFetchingPayorInfo:true,landedCostShortId:null,partyBillingId:null,payorAddress:null}})),invoiceStoreReset=_e.reset,invoiceStore=_e.state;var invoiceStoreInitShippingInfo=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,o,n,i;var a=e.landedCostId,s=e.retries,d=s===void 0?5:s;return __generator(this,(function(e){switch(e.label){case 0:invoiceStore.isFetchingPayorInfo=true;return[4,handleFetch("/api/zonos-elements/invoice/get-payor-info-by-lc-id",{body:{landedCostId:a},method:"POST"})];case 1:n=e.sent();if(!n.errors.length)return[3,4];if(!(d>0))return[3,3];return[4,new Promise((function(e){return setTimeout(e,1e3)}))];case 2:e.sent();return[2,invoiceStoreInitShippingInfo({landedCostId:a,retries:d-1})];case 3:return[2,null];case 4:invoiceStore.landedCostShortId=((r=n.json)===null||r===void 0?void 0:r.landedCostShortId)||null;invoiceStore.isFetchingPayorInfo=false;invoiceStore.payorAddress=((t=n.json)===null||t===void 0?void 0:t.payor)||null;i=(o=cartStore.checkoutSession)===null||o===void 0?void 0:o.subtotals;invoiceStore.amountTotalDue=(i===null||i===void 0?void 0:i.items)||0;if(invoiceStore.amountTotalDue===0){void sendErrorLog({endpoint:"INVOICE_NO_TOTAL_DUE",errors:[],metadata:{landedCostId:a,organizationId:zonosStore.organizationId}})}return[2]}}))}))};var invoiceStoreAsyncAddressUpdate=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r,t,o,n,i,a,s,d,c;return __generator(this,(function(l){switch(l.label){case 0:if(!((e=stripeStore.stripeBillingAddressEventData)===null||e===void 0?void 0:e.complete)){return[2,{partiesCreated:false}]}n=(t=(r=cartStore.checkoutSession)===null||r===void 0?void 0:r.landedCost)===null||t===void 0?void 0:t.rootId;if(!n){void sendErrorLog({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId}});return[2,{partiesCreated:false}]}if(!storageStore.checkoutSessionId){void sendErrorLog({endpoint:"INVOICE_NO_CHECKOUT_SESSION_ID",errors:["No checkout session id"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,landedCostRootId:n}});return[2,{partiesCreated:false}]}i=stripeStoreBuildAddressForPartyCreate({address:stripeStore.stripeBillingAddressEventData.value.address,firstName:stripeStore.stripeBillingAddressEventData.value.firstName,lastName:stripeStore.stripeBillingAddressEventData.value.lastName,name:stripeStore.stripeBillingAddressEventData.value.name,phone:stripeStore.stripeBillingAddressEventData.value.phone});a=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";return[4,handleFetch("/api/zonos-elements/create-billing-party",{body:{billingAddress:i,checkoutSessionId:storageStore.checkoutSessionId,companyName:stripeStore.companyName,email:((o=stripeStore.stripeLinkEventData)===null||o===void 0?void 0:o.value.email)||"",isTest:a,rootId:n},method:"POST"})];case 1:s=l.sent(),d=s.errors,c=s.json;if(d.length||!c){logError("Error occurs when creating billing party",JSON.stringify(d,null,2));void sendErrorLog({endpoint:"INVOICE_BILLING_PARTY_CREATE_FAILED",errors:["[INVOICE] Failed to create billing party"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId,errors:d,json:c}});return[2,{partiesCreated:false}]}invoiceStore.partyBillingId=c.billToPartyId;return[2,{partiesCreated:true}]}}))}))};var invoiceStoreUpdateSelectedShippingOption=function(e){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=e.landedCost;if(!r){return[2,false]}cartStore.landedCostData=[Object.assign(Object.assign({},e),{landedCost:Object.assign({},r),landedCostId:r.id})];return[2,cartStoreUpdateSelectedShippingOption({applySubtotalsOnly:true,landedCostId:r.id,selectedShippingOption:r.shipmentRating})]}))}))};export{invoiceStoreInitShippingInfo as a,invoiceStoreAsyncAddressUpdate as b,invoiceStore as c,invoiceStoreUpdateSelectedShippingOption as i};
|
package/dist/esm-es5/{isCollectMobileTablet-797cea8b.js → isCollectMobileTablet-48040572.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function l(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?o(e.value):n(e.value).then(l,a)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(t){return s([e,t])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(l&&(l=0,a[0]&&(o=0)),o)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function l(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?o(e.value):n(e.value).then(l,a)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(t){return s([e,t])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(l&&(l=0,a[0]&&(o=0)),o)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-5242a58d.js";import{b as stripeStore,G as stripeStoreBuildAddressForPartyCreate,d as cartStore,H as cartStoreUpdateSelectedShippingOption}from"./cart-6e465f7b.js";import{s as storageStore}from"./localization-f4a7fb5a.js";import{h as handleFetch,s as sendErrorLog,l as logError}from"./handleFetch-a844cac1.js";import{b as allLogs}from"./VarianceTest-572cecf5.js";var _k=createStore((function(){return{amountDutyTaxFeeTotal:null,amountTotalPaid:null,isFetchingShippingInfo:true,landedCostShortId:null,originCompanyName:null,partyBillingId:null,shippingAddress:null}})),collectStoreReset=_k.reset,collectStore=_k.state;var collectStoreInitShippingInfo=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,o,r,n,i,l,a,s,c,d,u,p,S;var f=e.landedCostId,v=e.retries,h=v===void 0?5:v;return __generator(this,(function(e){switch(e.label){case 0:collectStore.isFetchingShippingInfo=true;return[4,handleFetch("/api/zonos-elements/collect/get-shipping-info-by-lc-id",{body:{landedCostId:f},method:"POST"})];case 1:d=e.sent();if(!d.errors.length)return[3,4];if(!(h>0))return[3,3];return[4,new Promise((function(e){return setTimeout(e,1e3)}))];case 2:e.sent();return[2,collectStoreInitShippingInfo({landedCostId:f,retries:h-1})];case 3:return[2,null];case 4:collectStore.landedCostShortId=((t=d.json)===null||t===void 0?void 0:t.landedCostShortId)||null;collectStore.isFetchingShippingInfo=false;collectStore.shippingAddress=((o=d.json)===null||o===void 0?void 0:o.shipping)||null;u=(r=cartStore.checkoutSession)===null||r===void 0?void 0:r.landedCost;p=(n=cartStore.checkoutSession)===null||n===void 0?void 0:n.subtotals;S=(((i=u===null||u===void 0?void 0:u.amountSubtotals)===null||i===void 0?void 0:i.shipping)||0)+(((l=u===null||u===void 0?void 0:u.amountSubtotals)===null||l===void 0?void 0:l.items)||0);collectStore.amountTotalPaid=S*(((a=p===null||p===void 0?void 0:p.exchangeRate)===null||a===void 0?void 0:a.rate)||1);collectStore.amountDutyTaxFeeTotal=((p===null||p===void 0?void 0:p.duties)||0)+((p===null||p===void 0?void 0:p.taxes)||0)+((p===null||p===void 0?void 0:p.fees)||0);collectStore.originCompanyName=((c=(s=d.json)===null||s===void 0?void 0:s.origin)===null||c===void 0?void 0:c.companyName)||null;if(collectStore.amountTotalPaid===0){void sendErrorLog({endpoint:"COLLECT_NO_TOTAL_PAID",errors:[],metadata:{landedCostId:f,organizationId:zonosStore.organizationId}})}return[2]}}))}))};var collectStoreAsyncAddressUpdate=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,o,r,n,i,l,a,s,c;return __generator(this,(function(d){switch(d.label){case 0:if(!((e=stripeStore.stripeBillingAddressEventData)===null||e===void 0?void 0:e.complete)){return[2,{partiesCreated:false}]}n=(o=(t=cartStore.checkoutSession)===null||t===void 0?void 0:t.landedCost)===null||o===void 0?void 0:o.rootId;if(!n){void sendErrorLog({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId}});return[2,{partiesCreated:false}]}if(!storageStore.checkoutSessionId){void sendErrorLog({endpoint:"COLLECT_NO_CHECKOUT_SESSION_ID",errors:["No checkout session id"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,landedCostRootId:n}});return[2,{partiesCreated:false}]}i=stripeStoreBuildAddressForPartyCreate({address:stripeStore.stripeBillingAddressEventData.value.address,firstName:stripeStore.stripeBillingAddressEventData.value.firstName,lastName:stripeStore.stripeBillingAddressEventData.value.lastName,name:stripeStore.stripeBillingAddressEventData.value.name,phone:stripeStore.stripeBillingAddressEventData.value.phone});l=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";return[4,handleFetch("/api/zonos-elements/create-billing-party",{body:{billingAddress:i,checkoutSessionId:storageStore.checkoutSessionId,companyName:stripeStore.companyName,email:((r=stripeStore.stripeLinkEventData)===null||r===void 0?void 0:r.value.email)||"",isTest:l,rootId:n},method:"POST"})];case 1:a=d.sent(),s=a.errors,c=a.json;if(s.length||!c){logError("Error occurs when creating billing party",JSON.stringify(s,null,2));void sendErrorLog({endpoint:"COLLECT_BILLING_PARTY_CREATE_FAILED",errors:["[COLLECT] Failed to create billing party"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId,errors:s,json:c}});return[2,{partiesCreated:false}]}collectStore.partyBillingId=c.billToPartyId;return[2,{partiesCreated:true}]}}))}))};var collectStoreUpdateSelectedShippingOption=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t;return __generator(this,(function(o){t=e.landedCost;if(!t){return[2,false]}cartStore.landedCostData=[Object.assign(Object.assign({},e),{landedCost:Object.assign({},t),landedCostId:t.id})];return[2,cartStoreUpdateSelectedShippingOption({applySubtotalsOnly:true,landedCostId:t.id,selectedShippingOption:t.shipmentRating})]}))}))};var collectTabletBreakpoint=1024;var collectMobileBreakpoint=768;var isCollectTablet=function(e){return e||window.innerWidth<collectTabletBreakpoint&&window.innerWidth>=collectMobileBreakpoint};var isCollectMobile=function(e){return e||window.innerWidth<collectMobileBreakpoint};export{isCollectTablet as a,collectStoreInitShippingInfo as b,collectStoreUpdateSelectedShippingOption as c,collectStoreAsyncAddressUpdate as d,collectStore as e,isCollectMobile as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as tinycolor}from"./isDarkColor-
|
|
1
|
+
import{t as tinycolor}from"./isDarkColor-3537021b.js";var isContrastColor=function(o){var r=o.backgroundColor1,t=o.backgroundColor2;var a=tinycolor.readability(r,t);return a>2.5};export{isContrastColor as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as commonjsGlobal}from"./zonosStore-b434e436.js";var tinycolor$1={exports:{}};(function(t,r){(function(r,e){t.exports=e()})(commonjsGlobal,(function(){function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/;var e=/\s+$/;function a(t,r){t=t?t:"";r=r||{};if(t instanceof a){return t}if(!(this instanceof a)){return new a(t,r)}var e=n(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||e.format;this._gradientType=r.gradientType;if(this._r<1)this._r=Math.round(this._r);if(this._g<1)this._g=Math.round(this._g);if(this._b<1)this._b=Math.round(this._b);this._ok=e.ok}a.prototype={isDark:function t(){return this.getBrightness()<128},isLight:function t(){return!this.isDark()},isValid:function t(){return this._ok},getOriginalInput:function t(){return this._originalInput},getFormat:function t(){return this._format},getAlpha:function t(){return this._a},getBrightness:function t(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function t(){var r=this.toRgb();var e,a,n,i,f,s;e=r.r/255;a=r.g/255;n=r.b/255;if(e<=.03928)i=e/12.92;else i=Math.pow((e+.055)/1.055,2.4);if(a<=.03928)f=a/12.92;else f=Math.pow((a+.055)/1.055,2.4);if(n<=.03928)s=n/12.92;else s=Math.pow((n+.055)/1.055,2.4);return.2126*i+.7152*f+.0722*s},setAlpha:function t(r){this._a=q(r);this._roundA=Math.round(100*this._a)/100;return this},toHsv:function t(){var r=h(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function t(){var r=h(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.v*100);return this._a==1?"hsv("+e+", "+a+"%, "+n+"%)":"hsva("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHsl:function t(){var r=f(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function t(){var r=f(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.l*100);return this._a==1?"hsl("+e+", "+a+"%, "+n+"%)":"hsla("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHex:function t(r){return o(this._r,this._g,this._b,r)},toHexString:function t(r){return"#"+this.toHex(r)},toHex8:function t(r){return l(this._r,this._g,this._b,this._a,r)},toHex8String:function t(r){return"#"+this.toHex8(r)},toRgb:function t(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function t(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function t(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function t(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function t(){if(this._a===0){return"transparent"}if(this._a<1){return false}return S[o(this._r,this._g,this._b,true)]||false},toFilter:function t(r){var e="#"+c(this._r,this._g,this._b,this._a);var n=e;var i=this._gradientType?"GradientType = 1, ":"";if(r){var f=a(r);n="#"+c(f._r,f._g,f._b,f._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function t(r){var e=!!r;r=r||this._format;var a=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");if(i){if(r==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(r==="rgb"){a=this.toRgbString()}if(r==="prgb"){a=this.toPercentageRgbString()}if(r==="hex"||r==="hex6"){a=this.toHexString()}if(r==="hex3"){a=this.toHexString(true)}if(r==="hex4"){a=this.toHex8String(true)}if(r==="hex8"){a=this.toHex8String()}if(r==="name"){a=this.toName()}if(r==="hsl"){a=this.toHslString()}if(r==="hsv"){a=this.toHsvString()}return a||this.toHexString()},clone:function t(){return a(this.toString())},_applyModification:function t(r,e){var a=r.apply(null,[this].concat([].slice.call(e)));this._r=a._r;this._g=a._g;this._b=a._b;this.setAlpha(a._a);return this},lighten:function t(){return this._applyModification(v,arguments)},brighten:function t(){return this._applyModification(m,arguments)},darken:function t(){return this._applyModification(M,arguments)},desaturate:function t(){return this._applyModification(d,arguments)},saturate:function t(){return this._applyModification(b,arguments)},greyscale:function t(){return this._applyModification(g,arguments)},spin:function t(){return this._applyModification(p,arguments)},_applyCombination:function t(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function t(){return this._applyCombination(w,arguments)},complement:function t(){return this._applyCombination(y,arguments)},monochromatic:function t(){return this._applyCombination(x,arguments)},splitcomplement:function t(){return this._applyCombination(A,arguments)},triad:function t(){return this._applyCombination(k,[3])},tetrad:function t(){return this._applyCombination(k,[4])}};a.fromRatio=function(r,e){if(t(r)=="object"){var n={};for(var i in r){if(r.hasOwnProperty(i)){if(i==="a"){n[i]=r[i]}else{n[i]=z(r[i])}}}r=n}return a(r,e)};function n(r){var e={r:0,g:0,b:0};var a=1;var n=null;var f=null;var h=null;var o=false;var l=false;if(typeof r=="string"){r=_(r)}if(t(r)=="object"){if(T(r.r)&&T(r.g)&&T(r.b)){e=i(r.r,r.g,r.b);o=true;l=String(r.r).substr(-1)==="%"?"prgb":"rgb"}else if(T(r.h)&&T(r.s)&&T(r.v)){n=z(r.s);f=z(r.v);e=u(r.h,n,f);o=true;l="hsv"}else if(T(r.h)&&T(r.s)&&T(r.l)){n=z(r.s);h=z(r.l);e=s(r.h,n,h);o=true;l="hsl"}if(r.hasOwnProperty("a")){a=r.a}}a=q(a);return{ok:o,format:r.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:a}}function i(t,r,e){return{r:E(t,255)*255,g:E(r,255)*255,b:E(e,255)*255}}function f(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=(a+n)/2;if(a==n){i=f=0}else{var h=a-n;f=s>.5?h/(2-a-n):h/(a+n);switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,l:s}}function s(t,r,e){var a,n,i;t=E(t,360);r=E(r,100);e=E(e,100);function f(t,r,e){if(e<0)e+=1;if(e>1)e-=1;if(e<1/6)return t+(r-t)*6*e;if(e<1/2)return r;if(e<2/3)return t+(r-t)*(2/3-e)*6;return t}if(r===0){a=n=i=e}else{var s=e<.5?e*(1+r):e+r-e*r;var h=2*e-s;a=f(h,s,t+1/3);n=f(h,s,t);i=f(h,s,t-1/3)}return{r:a*255,g:n*255,b:i*255}}function h(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=a;var h=a-n;f=a===0?0:h/a;if(a==n){i=0}else{switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,v:s}}function u(t,r,e){t=E(t,360)*6;r=E(r,100);e=E(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),f=e*(1-n*r),s=e*(1-(1-n)*r),h=a%6,u=[e,f,i,i,s,e][h],o=[s,e,e,f,i,i][h],l=[i,i,s,e,e,f][h];return{r:u*255,g:o*255,b:l*255}}function o(t,r,e,a){var n=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];if(a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)){return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)}return n.join("")}function l(t,r,e,a,n){var i=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16)),N(I(a))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0)}return i.join("")}function c(t,r,e,a){var n=[N(I(a)),N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];return n.join("")}a.equals=function(t,r){if(!t||!r)return false;return a(t).toRgbString()==a(r).toRgbString()};a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function d(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s-=r/100;e.s=H(e.s);return a(e)}function b(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s+=r/100;e.s=H(e.s);return a(e)}function g(t){return a(t).desaturate(100)}function v(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l+=r/100;e.l=H(e.l);return a(e)}function m(t,r){r=r===0?0:r||10;var e=a(t).toRgb();e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(r/100))));e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(r/100))));e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(r/100))));return a(e)}function M(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l-=r/100;e.l=H(e.l);return a(e)}function p(t,r){var e=a(t).toHsl();var n=(e.h+r)%360;e.h=n<0?360+n:n;return a(e)}function y(t){var r=a(t).toHsl();r.h=(r.h+180)%360;return a(r)}function k(t,r){if(isNaN(r)||r<=0){throw new Error("Argument to polyad must be a positive number")}var e=a(t).toHsl();var n=[a(t)];var i=360/r;for(var f=1;f<r;f++){n.push(a({h:(e.h+f*i)%360,s:e.s,l:e.l}))}return n}function A(t){var r=a(t).toHsl();var e=r.h;return[a(t),a({h:(e+72)%360,s:r.s,l:r.l}),a({h:(e+216)%360,s:r.s,l:r.l})]}function w(t,r,e){r=r||6;e=e||30;var n=a(t).toHsl();var i=360/e;var f=[a(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;){n.h=(n.h+i)%360;f.push(a(n))}return f}function x(t,r){r=r||6;var e=a(t).toHsv();var n=e.h,i=e.s,f=e.v;var s=[];var h=1/r;while(r--){s.push(a({h:n,s:i,v:f}));f=(f+h)%1}return s}a.mix=function(t,r,e){e=e===0?0:e||50;var n=a(t).toRgb();var i=a(r).toRgb();var f=e/100;var s={r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a};return a(s)};a.readability=function(t,r){var e=a(t);var n=a(r);return(Math.max(e.getLuminance(),n.getLuminance())+.05)/(Math.min(e.getLuminance(),n.getLuminance())+.05)};a.isReadable=function(t,r,e){var n=a.readability(t,r);var i,f;f=false;i=L(e);switch(i.level+i.size){case"AAsmall":case"AAAlarge":f=n>=4.5;break;case"AAlarge":f=n>=3;break;case"AAAsmall":f=n>=7;break}return f};a.mostReadable=function(t,r,e){var n=null;var i=0;var f;var s,h,u;e=e||{};s=e.includeFallbackColors;h=e.level;u=e.size;for(var o=0;o<r.length;o++){f=a.readability(t,r[o]);if(f>i){i=f;n=a(r[o])}}if(a.isReadable(t,n,{level:h,size:u})||!s){return n}else{e.includeFallbackColors=false;return a.mostReadable(t,["#fff","#000"],e)}};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var S=a.hexNames=R(F);function R(t){var r={};for(var e in t){if(t.hasOwnProperty(e)){r[t[e]]=e}}return r}function q(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function E(t,r){if(j(t))t="100%";var e=C(t);t=Math.min(r,Math.max(0,parseFloat(t)));if(e){t=parseInt(t*r,10)/100}if(Math.abs(t-r)<1e-6){return 1}return t%r/parseFloat(r)}function H(t){return Math.min(1,Math.max(0,t))}function $(t){return parseInt(t,16)}function j(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function C(t){return typeof t==="string"&&t.indexOf("%")!=-1}function N(t){return t.length==1?"0"+t:""+t}function z(t){if(t<=1){t=t*100+"%"}return t}function I(t){return Math.round(parseFloat(t)*255).toString(16)}function D(t){return $(t)/255}var G=function(){var t="[-\\+]?\\d+%?";var r="[-\\+]?\\d*\\.\\d+%?";var e="(?:"+r+")|(?:"+t+")";var a="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";var n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function T(t){return!!G.CSS_UNIT.exec(t)}function _(t){t=t.replace(r,"").replace(e,"").toLowerCase();var a=false;if(F[t]){t=F[t];a=true}else if(t=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var n;if(n=G.rgb.exec(t)){return{r:n[1],g:n[2],b:n[3]}}if(n=G.rgba.exec(t)){return{r:n[1],g:n[2],b:n[3],a:n[4]}}if(n=G.hsl.exec(t)){return{h:n[1],s:n[2],l:n[3]}}if(n=G.hsla.exec(t)){return{h:n[1],s:n[2],l:n[3],a:n[4]}}if(n=G.hsv.exec(t)){return{h:n[1],s:n[2],v:n[3]}}if(n=G.hsva.exec(t)){return{h:n[1],s:n[2],v:n[3],a:n[4]}}if(n=G.hex8.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),a:D(n[4]),format:a?"name":"hex8"}}if(n=G.hex6.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),format:a?"name":"hex"}}if(n=G.hex4.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),a:D(n[4]+""+n[4]),format:a?"name":"hex8"}}if(n=G.hex3.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),format:a?"name":"hex"}}return false}function L(t){var r,e;t=t||{level:"AA",size:"small"};r=(t.level||"AA").toUpperCase();e=(t.size||"small").toLowerCase();if(r!=="AA"&&r!=="AAA"){r="AA"}if(e!=="small"&&e!=="large"){e="small"}return{level:r,size:e}}return a}))})(tinycolor$1);var tinycolor=tinycolor$1.exports;var isDarkColor=function(t){return tinycolor(t).isDark()};export{isDarkColor as i,tinycolor as t};
|
|
1
|
+
import{a as commonjsGlobal}from"./zonosStore-5242a58d.js";var tinycolor$1={exports:{}};(function(t,r){(function(r,e){t.exports=e()})(commonjsGlobal,(function(){function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/;var e=/\s+$/;function a(t,r){t=t?t:"";r=r||{};if(t instanceof a){return t}if(!(this instanceof a)){return new a(t,r)}var e=n(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||e.format;this._gradientType=r.gradientType;if(this._r<1)this._r=Math.round(this._r);if(this._g<1)this._g=Math.round(this._g);if(this._b<1)this._b=Math.round(this._b);this._ok=e.ok}a.prototype={isDark:function t(){return this.getBrightness()<128},isLight:function t(){return!this.isDark()},isValid:function t(){return this._ok},getOriginalInput:function t(){return this._originalInput},getFormat:function t(){return this._format},getAlpha:function t(){return this._a},getBrightness:function t(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function t(){var r=this.toRgb();var e,a,n,i,f,s;e=r.r/255;a=r.g/255;n=r.b/255;if(e<=.03928)i=e/12.92;else i=Math.pow((e+.055)/1.055,2.4);if(a<=.03928)f=a/12.92;else f=Math.pow((a+.055)/1.055,2.4);if(n<=.03928)s=n/12.92;else s=Math.pow((n+.055)/1.055,2.4);return.2126*i+.7152*f+.0722*s},setAlpha:function t(r){this._a=q(r);this._roundA=Math.round(100*this._a)/100;return this},toHsv:function t(){var r=h(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function t(){var r=h(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.v*100);return this._a==1?"hsv("+e+", "+a+"%, "+n+"%)":"hsva("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHsl:function t(){var r=f(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function t(){var r=f(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.l*100);return this._a==1?"hsl("+e+", "+a+"%, "+n+"%)":"hsla("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHex:function t(r){return o(this._r,this._g,this._b,r)},toHexString:function t(r){return"#"+this.toHex(r)},toHex8:function t(r){return l(this._r,this._g,this._b,this._a,r)},toHex8String:function t(r){return"#"+this.toHex8(r)},toRgb:function t(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function t(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function t(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function t(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function t(){if(this._a===0){return"transparent"}if(this._a<1){return false}return S[o(this._r,this._g,this._b,true)]||false},toFilter:function t(r){var e="#"+c(this._r,this._g,this._b,this._a);var n=e;var i=this._gradientType?"GradientType = 1, ":"";if(r){var f=a(r);n="#"+c(f._r,f._g,f._b,f._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function t(r){var e=!!r;r=r||this._format;var a=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");if(i){if(r==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(r==="rgb"){a=this.toRgbString()}if(r==="prgb"){a=this.toPercentageRgbString()}if(r==="hex"||r==="hex6"){a=this.toHexString()}if(r==="hex3"){a=this.toHexString(true)}if(r==="hex4"){a=this.toHex8String(true)}if(r==="hex8"){a=this.toHex8String()}if(r==="name"){a=this.toName()}if(r==="hsl"){a=this.toHslString()}if(r==="hsv"){a=this.toHsvString()}return a||this.toHexString()},clone:function t(){return a(this.toString())},_applyModification:function t(r,e){var a=r.apply(null,[this].concat([].slice.call(e)));this._r=a._r;this._g=a._g;this._b=a._b;this.setAlpha(a._a);return this},lighten:function t(){return this._applyModification(v,arguments)},brighten:function t(){return this._applyModification(m,arguments)},darken:function t(){return this._applyModification(M,arguments)},desaturate:function t(){return this._applyModification(d,arguments)},saturate:function t(){return this._applyModification(b,arguments)},greyscale:function t(){return this._applyModification(g,arguments)},spin:function t(){return this._applyModification(p,arguments)},_applyCombination:function t(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function t(){return this._applyCombination(w,arguments)},complement:function t(){return this._applyCombination(y,arguments)},monochromatic:function t(){return this._applyCombination(x,arguments)},splitcomplement:function t(){return this._applyCombination(A,arguments)},triad:function t(){return this._applyCombination(k,[3])},tetrad:function t(){return this._applyCombination(k,[4])}};a.fromRatio=function(r,e){if(t(r)=="object"){var n={};for(var i in r){if(r.hasOwnProperty(i)){if(i==="a"){n[i]=r[i]}else{n[i]=z(r[i])}}}r=n}return a(r,e)};function n(r){var e={r:0,g:0,b:0};var a=1;var n=null;var f=null;var h=null;var o=false;var l=false;if(typeof r=="string"){r=_(r)}if(t(r)=="object"){if(T(r.r)&&T(r.g)&&T(r.b)){e=i(r.r,r.g,r.b);o=true;l=String(r.r).substr(-1)==="%"?"prgb":"rgb"}else if(T(r.h)&&T(r.s)&&T(r.v)){n=z(r.s);f=z(r.v);e=u(r.h,n,f);o=true;l="hsv"}else if(T(r.h)&&T(r.s)&&T(r.l)){n=z(r.s);h=z(r.l);e=s(r.h,n,h);o=true;l="hsl"}if(r.hasOwnProperty("a")){a=r.a}}a=q(a);return{ok:o,format:r.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:a}}function i(t,r,e){return{r:E(t,255)*255,g:E(r,255)*255,b:E(e,255)*255}}function f(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=(a+n)/2;if(a==n){i=f=0}else{var h=a-n;f=s>.5?h/(2-a-n):h/(a+n);switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,l:s}}function s(t,r,e){var a,n,i;t=E(t,360);r=E(r,100);e=E(e,100);function f(t,r,e){if(e<0)e+=1;if(e>1)e-=1;if(e<1/6)return t+(r-t)*6*e;if(e<1/2)return r;if(e<2/3)return t+(r-t)*(2/3-e)*6;return t}if(r===0){a=n=i=e}else{var s=e<.5?e*(1+r):e+r-e*r;var h=2*e-s;a=f(h,s,t+1/3);n=f(h,s,t);i=f(h,s,t-1/3)}return{r:a*255,g:n*255,b:i*255}}function h(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=a;var h=a-n;f=a===0?0:h/a;if(a==n){i=0}else{switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,v:s}}function u(t,r,e){t=E(t,360)*6;r=E(r,100);e=E(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),f=e*(1-n*r),s=e*(1-(1-n)*r),h=a%6,u=[e,f,i,i,s,e][h],o=[s,e,e,f,i,i][h],l=[i,i,s,e,e,f][h];return{r:u*255,g:o*255,b:l*255}}function o(t,r,e,a){var n=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];if(a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)){return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)}return n.join("")}function l(t,r,e,a,n){var i=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16)),N(I(a))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0)}return i.join("")}function c(t,r,e,a){var n=[N(I(a)),N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];return n.join("")}a.equals=function(t,r){if(!t||!r)return false;return a(t).toRgbString()==a(r).toRgbString()};a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function d(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s-=r/100;e.s=H(e.s);return a(e)}function b(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s+=r/100;e.s=H(e.s);return a(e)}function g(t){return a(t).desaturate(100)}function v(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l+=r/100;e.l=H(e.l);return a(e)}function m(t,r){r=r===0?0:r||10;var e=a(t).toRgb();e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(r/100))));e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(r/100))));e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(r/100))));return a(e)}function M(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l-=r/100;e.l=H(e.l);return a(e)}function p(t,r){var e=a(t).toHsl();var n=(e.h+r)%360;e.h=n<0?360+n:n;return a(e)}function y(t){var r=a(t).toHsl();r.h=(r.h+180)%360;return a(r)}function k(t,r){if(isNaN(r)||r<=0){throw new Error("Argument to polyad must be a positive number")}var e=a(t).toHsl();var n=[a(t)];var i=360/r;for(var f=1;f<r;f++){n.push(a({h:(e.h+f*i)%360,s:e.s,l:e.l}))}return n}function A(t){var r=a(t).toHsl();var e=r.h;return[a(t),a({h:(e+72)%360,s:r.s,l:r.l}),a({h:(e+216)%360,s:r.s,l:r.l})]}function w(t,r,e){r=r||6;e=e||30;var n=a(t).toHsl();var i=360/e;var f=[a(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;){n.h=(n.h+i)%360;f.push(a(n))}return f}function x(t,r){r=r||6;var e=a(t).toHsv();var n=e.h,i=e.s,f=e.v;var s=[];var h=1/r;while(r--){s.push(a({h:n,s:i,v:f}));f=(f+h)%1}return s}a.mix=function(t,r,e){e=e===0?0:e||50;var n=a(t).toRgb();var i=a(r).toRgb();var f=e/100;var s={r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a};return a(s)};a.readability=function(t,r){var e=a(t);var n=a(r);return(Math.max(e.getLuminance(),n.getLuminance())+.05)/(Math.min(e.getLuminance(),n.getLuminance())+.05)};a.isReadable=function(t,r,e){var n=a.readability(t,r);var i,f;f=false;i=L(e);switch(i.level+i.size){case"AAsmall":case"AAAlarge":f=n>=4.5;break;case"AAlarge":f=n>=3;break;case"AAAsmall":f=n>=7;break}return f};a.mostReadable=function(t,r,e){var n=null;var i=0;var f;var s,h,u;e=e||{};s=e.includeFallbackColors;h=e.level;u=e.size;for(var o=0;o<r.length;o++){f=a.readability(t,r[o]);if(f>i){i=f;n=a(r[o])}}if(a.isReadable(t,n,{level:h,size:u})||!s){return n}else{e.includeFallbackColors=false;return a.mostReadable(t,["#fff","#000"],e)}};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var S=a.hexNames=R(F);function R(t){var r={};for(var e in t){if(t.hasOwnProperty(e)){r[t[e]]=e}}return r}function q(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function E(t,r){if(j(t))t="100%";var e=C(t);t=Math.min(r,Math.max(0,parseFloat(t)));if(e){t=parseInt(t*r,10)/100}if(Math.abs(t-r)<1e-6){return 1}return t%r/parseFloat(r)}function H(t){return Math.min(1,Math.max(0,t))}function $(t){return parseInt(t,16)}function j(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function C(t){return typeof t==="string"&&t.indexOf("%")!=-1}function N(t){return t.length==1?"0"+t:""+t}function z(t){if(t<=1){t=t*100+"%"}return t}function I(t){return Math.round(parseFloat(t)*255).toString(16)}function D(t){return $(t)/255}var G=function(){var t="[-\\+]?\\d+%?";var r="[-\\+]?\\d*\\.\\d+%?";var e="(?:"+r+")|(?:"+t+")";var a="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";var n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function T(t){return!!G.CSS_UNIT.exec(t)}function _(t){t=t.replace(r,"").replace(e,"").toLowerCase();var a=false;if(F[t]){t=F[t];a=true}else if(t=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var n;if(n=G.rgb.exec(t)){return{r:n[1],g:n[2],b:n[3]}}if(n=G.rgba.exec(t)){return{r:n[1],g:n[2],b:n[3],a:n[4]}}if(n=G.hsl.exec(t)){return{h:n[1],s:n[2],l:n[3]}}if(n=G.hsla.exec(t)){return{h:n[1],s:n[2],l:n[3],a:n[4]}}if(n=G.hsv.exec(t)){return{h:n[1],s:n[2],v:n[3]}}if(n=G.hsva.exec(t)){return{h:n[1],s:n[2],v:n[3],a:n[4]}}if(n=G.hex8.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),a:D(n[4]),format:a?"name":"hex8"}}if(n=G.hex6.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),format:a?"name":"hex"}}if(n=G.hex4.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),a:D(n[4]+""+n[4]),format:a?"name":"hex8"}}if(n=G.hex3.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),format:a?"name":"hex"}}return false}function L(t){var r,e;t=t||{level:"AA",size:"small"};r=(t.level||"AA").toUpperCase();e=(t.size||"small").toLowerCase();if(r!=="AA"&&r!=="AAA"){r="AA"}if(e!=="small"&&e!=="large"){e="small"}return{level:r,size:e}}return a}))})(tinycolor$1);var tinycolor=tinycolor$1.exports;var isDarkColor=function(t){return tinycolor(t).isDark()};export{isDarkColor as i,tinycolor as t};
|