@zonos/elements 1.2.3 → 1.2.4-alpha.10
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/README.md +15 -1
- package/dist/cjs/cart-90f7c8c0.js +644 -0
- package/dist/cjs/getBorderRadius-bf4a4276.js +18 -0
- package/dist/cjs/getHasMoreSpaceOnRight-4c94667f.js +10 -0
- package/dist/cjs/{index-9542d2e7.js → index-0dcccc22.js} +154 -42
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/isColorVariable-41cacd82.js +16 -0
- package/dist/cjs/{isDarkColor-f3446afd.js → isDarkColor-ff6ff183.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/localization-9caf3397.js +3667 -0
- package/dist/cjs/submitGtag-b141b45d.js +27 -0
- package/dist/cjs/zonos-address_2.cjs.entry.js +108 -108
- package/dist/cjs/zonos-badge.cjs.entry.js +25 -22
- package/dist/cjs/zonos-banner.cjs.entry.js +65 -53
- package/dist/cjs/zonos-button_2.cjs.entry.js +100 -99
- package/dist/cjs/zonos-card_2.cjs.entry.js +32 -27
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +464 -419
- package/dist/cjs/zonos-checkout.cjs.entry.js +358 -356
- package/dist/cjs/zonos-component.cjs.entry.js +15 -15
- package/dist/cjs/zonos-controller.cjs.entry.js +232 -194
- package/dist/cjs/zonos-country-flag_4.cjs.entry.js +85 -77
- package/dist/cjs/zonos-elements.cjs.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +101 -101
- package/dist/cjs/zonos-hello.cjs.entry.js +349 -349
- package/dist/cjs/zonos-icon.cjs.entry.js +22 -20
- package/dist/cjs/zonos-notification.cjs.entry.js +60 -57
- package/dist/cjs/zonos-payment.cjs.entry.js +45 -45
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +40 -40
- package/dist/cjs/zonos-text.cjs.entry.js +145 -143
- package/dist/cjs/{zonosStore-a430ec5b.js → zonosStore-b43ef5db.js} +102 -97
- package/dist/collection/__mocks__/vercel-app/loadZonos.js +492 -0
- package/dist/collection/__mocks__/vercel-app/localization.js +1 -0
- package/dist/collection/__mocks__/vercel-app/zonos-hello.entry.js +1 -0
- package/dist/collection/__mocks__/zonos-url/loadZonos.js +492 -0
- package/dist/{esm-es5/localization-f3828793.js → collection/__mocks__/zonos-url/localization.js} +1 -1
- package/dist/collection/__mocks__/zonos-url/zonos-hello.entry.js +1 -0
- package/dist/collection/__tests__/build-utils/urlCheckOne.js +59 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +37 -37
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +44 -44
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +209 -163
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +149 -149
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +562 -559
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +153 -153
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +107 -107
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +164 -164
- package/dist/collection/components/common/countries.js +261 -261
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +5 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +189 -186
- package/dist/collection/components/common/zonos-banner/zonos-banner.css +5 -1
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +140 -128
- package/dist/collection/components/common/zonos-button/zonos-button.css +6 -5
- package/dist/collection/components/common/zonos-button/zonos-button.js +407 -406
- package/dist/collection/components/common/zonos-card/zonos-card.css +5 -1
- package/dist/collection/components/common/zonos-card/zonos-card.js +165 -162
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.css +5 -1
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +85 -83
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.css +5 -1
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +101 -96
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +5 -1
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +73 -70
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.css +5 -1
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +62 -59
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +5 -1
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +373 -371
- package/dist/collection/components/common/zonos-icon/zonos-icon.css +5 -1
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +123 -121
- package/dist/collection/components/common/zonos-logo/zonos-logo.css +5 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +92 -90
- package/dist/collection/components/common/zonos-notification/zonos-notification.css +5 -1
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +129 -125
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css +5 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +168 -168
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.css +5 -1
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +71 -71
- package/dist/collection/components/common/zonos-text/zonos-text.css +5 -1
- package/dist/collection/components/common/zonos-text/zonos-text.js +193 -191
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.css +5 -1
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +70 -67
- package/dist/collection/components/component-template/zonos-component/zonos-component.css +5 -1
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +81 -81
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +5 -2
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +450 -446
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +5 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +70 -70
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +5 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +272 -272
- package/dist/collection/components/main/zonos-controller.css +5 -1
- package/dist/collection/components/main/zonos-controller.js +403 -320
- package/dist/collection/components/store/checkout/cart.js +162 -162
- package/dist/collection/components/store/checkout/stripe.js +265 -264
- package/dist/collection/components/store/hello/localization.js +112 -112
- package/dist/collection/components/store/translationStore/strings.arabic.js +147 -147
- package/dist/collection/components/store/translationStore/strings.base.js +147 -147
- package/dist/collection/components/store/translationStore/strings.chinese.js +147 -147
- package/dist/collection/components/store/translationStore/strings.danish.js +147 -147
- package/dist/collection/components/store/translationStore/strings.dutch.js +147 -147
- package/dist/collection/components/store/translationStore/strings.french.js +147 -147
- package/dist/collection/components/store/translationStore/strings.german.js +147 -147
- package/dist/collection/components/store/translationStore/strings.hebrew.js +147 -147
- package/dist/collection/components/store/translationStore/strings.indonesian.js +147 -147
- package/dist/collection/components/store/translationStore/strings.italian.js +147 -147
- package/dist/collection/components/store/translationStore/strings.japanese.js +147 -147
- package/dist/collection/components/store/translationStore/strings.korean.js +147 -147
- package/dist/collection/components/store/translationStore/strings.norwegian.js +147 -147
- package/dist/collection/components/store/translationStore/strings.polish.js +147 -147
- package/dist/collection/components/store/translationStore/strings.portuguese.js +147 -147
- package/dist/collection/components/store/translationStore/strings.russian.js +147 -147
- package/dist/collection/components/store/translationStore/strings.spanish.js +147 -147
- package/dist/collection/components/store/translationStore/strings.swedish.js +147 -147
- package/dist/collection/components/store/translationStore/strings.turkish.js +147 -147
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +147 -147
- package/dist/collection/components/store/translationStore.js +65 -65
- package/dist/collection/components/store/zonosStore.js +98 -94
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +5 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +142 -142
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.css +5 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +76 -76
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.css +5 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +81 -81
- package/dist/collection/components/utils/addDays.js +5 -5
- package/dist/collection/components/utils/api/calculateLandedCost.js +19 -11
- package/dist/collection/components/utils/api/checkItemRestrictions.js +13 -13
- package/dist/collection/components/utils/api/getCountries.js +11 -11
- package/dist/collection/components/utils/api/getCountryLandedCost.js +11 -11
- package/dist/collection/components/utils/api/getExchangeRate.js +17 -17
- package/dist/collection/components/utils/api/getLocaleMessages.js +9 -9
- package/dist/collection/components/utils/api/getLocalization.js +24 -19
- package/dist/collection/components/utils/api/getShippingZones.js +9 -9
- package/dist/collection/components/utils/api/getZonosSettings.js +11 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +26 -26
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +22 -0
- package/dist/collection/components/utils/checkout/initCheckout.js +16 -16
- package/dist/collection/components/utils/checkout/isCheckoutMobile.js +1 -1
- package/dist/collection/components/utils/darkenColor.js +4 -4
- package/dist/collection/components/utils/formatCurrency.js +8 -8
- package/dist/collection/components/utils/formatDate.js +2 -2
- package/dist/collection/components/utils/getBorderRadius.js +5 -5
- package/dist/collection/components/utils/getButtonTheme.js +8 -8
- package/dist/collection/components/utils/getDaysDifference.js +4 -4
- package/dist/collection/components/utils/handleFetch.js +107 -77
- package/dist/collection/components/utils/hello/currencyConversion/currencyConvert.js +9 -9
- package/dist/collection/components/utils/hello/currencyConversion/currencyConvertAndFormat.js +3 -3
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +10 -10
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +29 -29
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +35 -35
- package/dist/collection/components/utils/hello/currencyConversion/getCurrencyCode.js +6 -6
- package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +13 -13
- package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +12 -12
- package/dist/collection/components/utils/hello/currencyConversion/getLanguageCode.js +6 -6
- package/dist/collection/components/utils/hello/detectItemRestrictions.js +23 -23
- package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js +17 -17
- package/dist/collection/components/utils/hello/getHasMoreSpaceAbove.js +5 -5
- package/dist/collection/components/utils/hello/getHasMoreSpaceOnRight.js +5 -5
- package/dist/collection/components/utils/hello/getProductsOnPage.js +42 -42
- package/dist/collection/components/utils/hello/getZCountryUrlParam.js +5 -0
- package/dist/collection/components/utils/hello/initHello.js +15 -15
- package/dist/collection/components/utils/hello/setZCountryUrlParam.js +9 -0
- package/dist/collection/components/utils/isColorVariable.js +10 -10
- package/dist/collection/components/utils/isDarkColor.js +1 -1
- package/dist/collection/components/utils/isValidSelector.js +8 -8
- package/dist/collection/components/utils/jsonParse.js +10 -10
- package/dist/collection/components/utils/lightenColor.js +4 -4
- package/dist/collection/components/utils/logging/log.js +42 -22
- package/dist/collection/components/utils/logging/logError.js +2 -2
- package/dist/collection/components/utils/mergeConfig.js +3 -3
- package/dist/collection/components/utils/submitGtag.js +9 -9
- package/dist/collection/environment.js +139 -116
- package/dist/collection/scripts/extractZonosQaUrl.js +26 -0
- package/dist/collection/scripts/loadStripe.js +7 -7
- package/dist/collection/scripts/stripe.js +80 -80
- package/dist/collection/scripts/zonos.js +331 -253
- package/dist/collection/styles/stripe/addressRuleStyle.js +14 -14
- package/dist/collection/styles/stripe/defaultVariable.js +14 -14
- package/dist/collection/types/generated/graphql.customer.types.js +1513 -1424
- package/dist/collection/types/generated/graphql.frontend.types.js +452 -378
- package/dist/collection/types/stripe/Apperance.js +56 -56
- package/dist/collection/types/styles/Color.js +18 -18
- package/dist/collection/types/styles/Text.js +97 -97
- package/dist/collection/utils/format.js +1 -1
- package/dist/collection/utils/generateVercelDeployUrl.js +17 -17
- package/dist/components/cart.js +529 -501
- package/dist/components/formatCurrency.js +8 -8
- package/dist/components/getBorderRadius.js +5 -5
- package/dist/components/isColorVariable.js +10 -10
- package/dist/components/isDarkColor.js +1 -1
- package/dist/components/localization.js +3486 -3426
- package/dist/components/submitGtag.js +9 -9
- package/dist/components/zonos-address.d.ts +2 -2
- package/dist/components/zonos-address2.js +90 -90
- package/dist/components/zonos-badge.d.ts +2 -2
- package/dist/components/zonos-badge2.js +52 -43
- package/dist/components/zonos-banner.d.ts +2 -2
- package/dist/components/zonos-banner2.js +88 -76
- package/dist/components/zonos-button.d.ts +2 -2
- package/dist/components/zonos-button2.js +120 -119
- package/dist/components/zonos-card.d.ts +2 -2
- package/dist/components/zonos-card2.js +48 -39
- package/dist/components/zonos-cart-items.d.ts +2 -2
- package/dist/components/zonos-cart-items2.js +43 -43
- package/dist/components/zonos-cart-subtotal.d.ts +2 -2
- package/dist/components/zonos-cart-subtotal2.js +65 -65
- package/dist/components/zonos-checkout-finish.d.ts +2 -2
- package/dist/components/zonos-checkout-finish2.js +146 -103
- package/dist/components/zonos-checkout-payment.d.ts +2 -2
- package/dist/components/zonos-checkout-payment2.js +82 -82
- package/dist/components/zonos-checkout.d.ts +2 -2
- package/dist/components/zonos-checkout.js +500 -498
- package/dist/components/zonos-collapse.d.ts +2 -2
- package/dist/components/zonos-collapse2.js +48 -46
- package/dist/components/zonos-component.d.ts +2 -2
- package/dist/components/zonos-component.js +32 -32
- package/dist/components/zonos-controller.d.ts +2 -2
- package/dist/components/zonos-controller.js +260 -220
- package/dist/components/zonos-country-flag.d.ts +2 -2
- package/dist/components/zonos-country-flag2.js +41 -36
- package/dist/components/zonos-country-select.d.ts +2 -2
- package/dist/components/zonos-country-select2.js +82 -79
- package/dist/components/zonos-custom-message.d.ts +2 -2
- package/dist/components/zonos-custom-message2.js +44 -41
- package/dist/components/zonos-customer-info.d.ts +2 -2
- package/dist/components/zonos-customer-info2.js +82 -82
- package/dist/components/zonos-dialog.d.ts +2 -2
- package/dist/components/zonos-dialog2.js +105 -103
- package/dist/components/zonos-hello-dialog-footer.d.ts +2 -2
- package/dist/components/zonos-hello-dialog-footer2.js +46 -46
- package/dist/components/zonos-hello-dialog.d.ts +2 -2
- package/dist/components/zonos-hello-dialog2.js +182 -182
- package/dist/components/zonos-hello.d.ts +2 -2
- package/dist/components/zonos-hello.js +437 -437
- package/dist/components/zonos-icon.d.ts +2 -2
- package/dist/components/zonos-icon2.js +40 -38
- package/dist/components/zonos-link-authentication.d.ts +2 -2
- package/dist/components/zonos-link-authentication2.js +60 -60
- package/dist/components/zonos-logo.d.ts +2 -2
- package/dist/components/zonos-logo2.js +37 -35
- package/dist/components/zonos-notification.d.ts +2 -2
- package/dist/components/zonos-notification2.js +82 -79
- package/dist/components/zonos-payment.d.ts +2 -2
- package/dist/components/zonos-payment2.js +64 -64
- package/dist/components/zonos-review.d.ts +2 -2
- package/dist/components/zonos-review2.js +72 -72
- package/dist/components/zonos-shipping-rich-radio.d.ts +2 -2
- package/dist/components/zonos-shipping-rich-radio2.js +62 -62
- package/dist/components/zonos-shipping.d.ts +2 -2
- package/dist/components/zonos-shipping2.js +114 -114
- package/dist/components/zonos-spinner.d.ts +2 -2
- package/dist/components/zonos-spinner2.js +31 -31
- package/dist/components/zonos-text.d.ts +2 -2
- package/dist/components/zonos-text2.js +166 -164
- package/dist/components/zonos-v-stack.d.ts +2 -2
- package/dist/components/zonos-v-stack2.js +29 -26
- package/dist/components/zonosStore.js +101 -97
- package/dist/esm/cart-b439be00.js +626 -0
- package/dist/esm/getBorderRadius-178a0a05.js +16 -0
- package/dist/esm/getHasMoreSpaceOnRight-70eb913a.js +8 -0
- package/dist/esm/{index-d1aa9293.js → index-36ff6342.js} +154 -42
- package/dist/esm/index.js +6 -6
- package/dist/esm/isColorVariable-91c33804.js +14 -0
- package/dist/esm/{isDarkColor-6fbb9b14.js → isDarkColor-416d6047.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/localization-a51ccbc2.js +3652 -0
- package/dist/esm/submitGtag-521826a2.js +24 -0
- package/dist/esm/zonos-address_2.entry.js +108 -108
- package/dist/esm/zonos-badge.entry.js +25 -22
- package/dist/esm/zonos-banner.entry.js +65 -53
- package/dist/esm/zonos-button_2.entry.js +100 -99
- package/dist/esm/zonos-card_2.entry.js +32 -27
- package/dist/esm/zonos-cart-items_10.entry.js +464 -419
- package/dist/esm/zonos-checkout.entry.js +358 -356
- package/dist/esm/zonos-component.entry.js +15 -15
- package/dist/esm/zonos-controller.entry.js +232 -194
- package/dist/esm/zonos-country-flag_4.entry.js +85 -77
- package/dist/esm/zonos-elements.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +101 -101
- package/dist/esm/zonos-hello.entry.js +349 -349
- package/dist/esm/zonos-icon.entry.js +22 -20
- package/dist/esm/zonos-notification.entry.js +60 -57
- package/dist/esm/zonos-payment.entry.js +45 -45
- package/dist/esm/zonos-shipping-rich-radio.entry.js +40 -40
- package/dist/esm/zonos-text.entry.js +145 -143
- package/dist/esm/{zonosStore-05a62104.js → zonosStore-61e74f58.js} +102 -98
- package/dist/esm-es5/cart-b439be00.js +1 -0
- package/dist/esm-es5/getBorderRadius-178a0a05.js +1 -0
- package/dist/esm-es5/getHasMoreSpaceOnRight-70eb913a.js +1 -0
- package/dist/esm-es5/index-36ff6342.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-6fbb9b14.js → isDarkColor-416d6047.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-a51ccbc2.js +1 -0
- package/dist/esm-es5/{submitGtag-a901ece5.js → submitGtag-521826a2.js} +1 -1
- package/dist/esm-es5/zonos-address_2.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_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.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_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-icon.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonosStore-61e74f58.js +1 -0
- package/dist/scripts/extractZonosQaUrl.js +30 -0
- package/dist/scripts/loadZonos.js +172 -48
- package/dist/scripts/zonos.js +172 -48
- package/dist/types/__tests__/build-utils/urlCheckOne.d.ts +6 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.d.ts +2 -2
- package/dist/types/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.d.ts +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +33 -29
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +31 -31
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +77 -77
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +31 -31
- package/dist/types/components/checkout/zonos-checkout/zonos-review/zonos-review.d.ts +14 -14
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +29 -29
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +35 -35
- package/dist/types/components/common/zonos-banner/zonos-banner.d.ts +21 -21
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +92 -92
- package/dist/types/components/common/zonos-card/zonos-card.d.ts +29 -29
- package/dist/types/components/common/zonos-collapse/zonos-collapse.d.ts +14 -14
- package/dist/types/components/common/zonos-country-flag/zonos-country-flag.d.ts +16 -16
- package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +9 -9
- package/dist/types/components/common/zonos-custom-message/zonos-custom-message.d.ts +9 -9
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +75 -75
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +27 -27
- package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +13 -13
- package/dist/types/components/common/zonos-notification/zonos-notification.d.ts +28 -28
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +35 -35
- package/dist/types/components/common/zonos-spinner/zonos-spinner.d.ts +11 -11
- package/dist/types/components/common/zonos-text/zonos-text.d.ts +30 -30
- package/dist/types/components/common/zonos-v-stack/zonos-v-stack.d.ts +10 -10
- package/dist/types/components/component-template/zonos-component/zonos-component.d.ts +14 -14
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +68 -68
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.d.ts +10 -10
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +41 -41
- package/dist/types/components/main/zonos-controller.d.ts +47 -38
- package/dist/types/components/store/checkout/cart.d.ts +64 -64
- package/dist/types/components/store/checkout/stripe.d.ts +44 -43
- package/dist/types/components/store/hello/localization.d.ts +15 -15
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.base.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.danish.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.french.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.german.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.italian.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.korean.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.polish.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.russian.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +147 -147
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +147 -147
- package/dist/types/components/store/translationStore.d.ts +2 -2
- package/dist/types/components/store/zonosStore.d.ts +23 -22
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +17 -17
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +9 -9
- package/dist/types/components/stripe/zonos-payment/zonos-payment.d.ts +10 -10
- package/dist/types/components/utils/addDays.d.ts +6 -6
- package/dist/types/components/utils/api/checkItemRestrictions.d.ts +14 -14
- package/dist/types/components/utils/api/getCountryLandedCost.d.ts +6 -6
- package/dist/types/components/utils/api/getExchangeRate.d.ts +17 -17
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +15 -15
- package/dist/types/components/utils/api/getLocalization.d.ts +2 -2
- package/dist/types/components/utils/api/getZonosSettings.d.ts +8 -0
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +5 -0
- package/dist/types/components/utils/changeDeepProperty.d.ts +4 -4
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +5 -5
- package/dist/types/components/utils/darkenColor.d.ts +2 -2
- package/dist/types/components/utils/formatCurrency.d.ts +3 -3
- package/dist/types/components/utils/formatDate.d.ts +6 -6
- package/dist/types/components/utils/handleFetch.d.ts +7 -7
- package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +10 -10
- package/dist/types/components/utils/hello/getZCountryUrlParam.d.ts +2 -0
- package/dist/types/components/utils/hello/setZCountryUrlParam.d.ts +2 -0
- package/dist/types/components/utils/lightenColor.d.ts +2 -2
- package/dist/types/components/utils/mergeConfig.d.ts +1 -1
- package/dist/types/components/utils/submitGtag.d.ts +3 -3
- package/dist/types/components.d.ts +96 -0
- package/dist/types/environment.d.ts +39 -34
- package/dist/types/scripts/extractZonosQaUrl.d.ts +11 -0
- package/dist/types/scripts/stripe.d.ts +2 -2
- package/dist/types/scripts/zonos.d.ts +51 -40
- package/dist/types/stencil-public-runtime.d.ts +29 -0
- package/dist/types/styles/stripe/addressRuleStyle.d.ts +1 -1
- package/dist/types/styles/stripe/defaultVariable.d.ts +2 -2
- package/dist/types/types/ICountryJson.d.ts +20 -20
- package/dist/types/types/JsonError.d.ts +3 -3
- package/dist/types/types/Translation.d.ts +1 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +55 -53
- package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +16 -16
- package/dist/types/types/generated/graphql.customer.types.d.ts +2217 -1970
- package/dist/types/types/generated/graphql.customer.types.ts +310 -7
- package/dist/types/types/generated/graphql.frontend.types.d.ts +649 -450
- package/dist/types/types/generated/graphql.frontend.types.ts +358 -11
- package/dist/types/types/global.d.ts +12 -0
- package/dist/types/types/hello/HelloConfig.d.ts +20 -20
- package/dist/types/types/hello/Product.d.ts +3 -3
- package/dist/types/types/hello/RestrictedItem.d.ts +1 -1
- package/dist/types/types/online-store/OnlineStoreConfig.d.ts +1 -1
- package/dist/types/types/stripe/Apperance.d.ts +3 -3
- package/dist/types/types/styles/Text.d.ts +90 -90
- package/dist/types/types/utils/deep/IDeepKeyof.d.ts +1 -1
- package/dist/types/types/utils/deep/IDeepKeyofAtIndex.d.ts +2 -2
- package/dist/types/utils/generateVercelDeployUrl.d.ts +2 -2
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-06fb9d1f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-08695f4e.js → p-089ba905.js} +1 -1
- package/dist/zonos-elements/{p-f7875c40.js → p-1685c8df.js} +1 -1
- package/dist/zonos-elements/p-18904b7c.system.js +2 -0
- package/dist/zonos-elements/p-1d4a970b.entry.js +1 -0
- package/dist/zonos-elements/p-23e7c655.system.js +1 -1
- package/dist/zonos-elements/p-24eed2a8.system.js +1 -0
- package/dist/zonos-elements/p-24fbe845.system.js +1 -0
- package/dist/zonos-elements/p-2801d868.entry.js +1 -0
- package/dist/zonos-elements/p-2a307c55.system.entry.js +1 -0
- package/dist/zonos-elements/p-2f43da39.system.entry.js +1 -0
- package/dist/zonos-elements/{p-770c959e.js → p-3c6988d7.js} +1 -1
- package/dist/zonos-elements/p-3cea383b.system.entry.js +1 -0
- package/dist/zonos-elements/p-47390db7.system.entry.js +1 -0
- package/dist/zonos-elements/p-4846796a.js +1 -0
- package/dist/zonos-elements/p-494c77a7.entry.js +1 -0
- package/dist/zonos-elements/p-49f09b91.entry.js +1 -0
- package/dist/zonos-elements/p-4a15c5c7.system.entry.js +1 -0
- package/dist/zonos-elements/p-4bee0bff.system.entry.js +1 -0
- package/dist/zonos-elements/p-4d93275c.entry.js +1 -0
- package/dist/zonos-elements/p-4ed71bd7.entry.js +1 -0
- package/dist/zonos-elements/{p-bf070bf6.js → p-55f49f1e.js} +1 -1
- package/dist/zonos-elements/p-560aa686.system.entry.js +1 -0
- package/dist/zonos-elements/p-639396bb.entry.js +1 -0
- package/dist/zonos-elements/p-67154df2.system.entry.js +1 -0
- package/dist/zonos-elements/p-67aec665.entry.js +1 -0
- package/dist/zonos-elements/p-684ed483.entry.js +1 -0
- package/dist/zonos-elements/p-89c210d6.entry.js +1 -0
- package/dist/zonos-elements/p-8c48b75e.system.js +1 -0
- package/dist/zonos-elements/p-8c5595d9.system.entry.js +1 -0
- package/dist/zonos-elements/p-938803f4.entry.js +1 -0
- package/dist/zonos-elements/p-956efa27.js +2 -0
- package/dist/zonos-elements/{p-3f3fbcea.entry.js → p-a0e36ed3.entry.js} +1 -1
- package/dist/zonos-elements/p-a376a37f.entry.js +1 -0
- package/dist/zonos-elements/p-a504f64f.system.js +1 -0
- package/dist/zonos-elements/p-afe26069.entry.js +1 -0
- package/dist/zonos-elements/p-b4601210.system.entry.js +1 -0
- package/dist/zonos-elements/{p-164fae93.system.js → p-b51de536.system.js} +1 -1
- package/dist/zonos-elements/p-b6148206.entry.js +1 -0
- package/dist/zonos-elements/p-b85be1ab.system.js +1 -0
- package/dist/zonos-elements/p-bc7bf53e.system.js +1 -0
- package/dist/zonos-elements/p-c9348bb0.system.entry.js +1 -0
- package/dist/zonos-elements/p-d2217f09.system.js +1 -0
- package/dist/zonos-elements/p-d856a200.system.entry.js +1 -0
- package/dist/zonos-elements/{p-85ab35c9.system.js → p-da060b1c.system.js} +1 -1
- package/dist/zonos-elements/p-e1f6ab97.entry.js +1 -0
- package/dist/zonos-elements/p-e5ae22a9.system.entry.js +1 -0
- package/dist/zonos-elements/p-e98be2d0.system.entry.js +1 -0
- package/dist/zonos-elements/p-e9b832c5.entry.js +1 -0
- package/dist/zonos-elements/p-edbea8df.system.js +1 -0
- package/dist/zonos-elements/p-f141519c.system.entry.js +1 -0
- package/dist/zonos-elements/p-f367f2fe.system.entry.js +1 -0
- package/dist/zonos-elements/p-ff95f098.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +15 -15
- package/package.json +60 -58
- package/dist/cjs/cart-55512e32.js +0 -616
- package/dist/cjs/getBorderRadius-fdd605c6.js +0 -18
- package/dist/cjs/getHasMoreSpaceOnRight-2855491b.js +0 -10
- package/dist/cjs/isColorVariable-c1ed7303.js +0 -16
- package/dist/cjs/localization-d7fe7290.js +0 -3606
- package/dist/cjs/submitGtag-d65003f9.js +0 -27
- package/dist/collection/components/utils/api/getZonosSetting.js +0 -11
- package/dist/collection/components/utils/hello/setZonosCountryUrlParam.js +0 -9
- package/dist/esm/cart-17650017.js +0 -598
- package/dist/esm/getBorderRadius-45764ad7.js +0 -16
- package/dist/esm/getHasMoreSpaceOnRight-feba1ae2.js +0 -8
- package/dist/esm/isColorVariable-4cda28c9.js +0 -14
- package/dist/esm/localization-f3828793.js +0 -3592
- package/dist/esm/submitGtag-a901ece5.js +0 -24
- package/dist/esm-es5/cart-17650017.js +0 -1
- package/dist/esm-es5/getBorderRadius-45764ad7.js +0 -1
- package/dist/esm-es5/getHasMoreSpaceOnRight-feba1ae2.js +0 -1
- package/dist/esm-es5/index-d1aa9293.js +0 -2
- package/dist/esm-es5/zonosStore-05a62104.js +0 -1
- package/dist/types/components/utils/api/getZonosSetting.d.ts +0 -8
- package/dist/types/components/utils/hello/setZonosCountryUrlParam.d.ts +0 -2
- package/dist/zonos-elements/p-0190f7c4.entry.js +0 -1
- package/dist/zonos-elements/p-0e0b46a5.js +0 -1
- package/dist/zonos-elements/p-0ed3bb9f.system.entry.js +0 -1
- package/dist/zonos-elements/p-15b71f0b.system.entry.js +0 -1
- package/dist/zonos-elements/p-224125da.system.entry.js +0 -1
- package/dist/zonos-elements/p-23204b78.system.entry.js +0 -1
- package/dist/zonos-elements/p-28681677.entry.js +0 -1
- package/dist/zonos-elements/p-2b6325ab.entry.js +0 -1
- package/dist/zonos-elements/p-36425562.system.entry.js +0 -1
- package/dist/zonos-elements/p-3a56c240.entry.js +0 -1
- package/dist/zonos-elements/p-43a25dab.entry.js +0 -1
- package/dist/zonos-elements/p-4a5096d2.system.js +0 -1
- package/dist/zonos-elements/p-64fdb7b6.system.js +0 -1
- package/dist/zonos-elements/p-68d06767.system.js +0 -2
- package/dist/zonos-elements/p-6d82986c.system.entry.js +0 -1
- package/dist/zonos-elements/p-6dcd752e.system.js +0 -1
- package/dist/zonos-elements/p-6e7cd3f7.entry.js +0 -1
- package/dist/zonos-elements/p-7bacecf7.entry.js +0 -1
- package/dist/zonos-elements/p-824395fd.system.entry.js +0 -1
- package/dist/zonos-elements/p-8378d94e.js +0 -1
- package/dist/zonos-elements/p-84b00605.system.entry.js +0 -1
- package/dist/zonos-elements/p-8a75b765.system.entry.js +0 -1
- package/dist/zonos-elements/p-8aabbb9b.system.js +0 -1
- package/dist/zonos-elements/p-8b415737.system.entry.js +0 -1
- package/dist/zonos-elements/p-8c867835.system.js +0 -1
- package/dist/zonos-elements/p-9202375f.entry.js +0 -1
- package/dist/zonos-elements/p-9688bb12.entry.js +0 -1
- package/dist/zonos-elements/p-98a6e093.system.entry.js +0 -1
- package/dist/zonos-elements/p-a1fa50fb.entry.js +0 -1
- package/dist/zonos-elements/p-aca66238.system.entry.js +0 -1
- package/dist/zonos-elements/p-b618cf03.entry.js +0 -1
- package/dist/zonos-elements/p-b75ffe64.system.entry.js +0 -1
- package/dist/zonos-elements/p-bc2c42f5.entry.js +0 -1
- package/dist/zonos-elements/p-c8ad044e.system.entry.js +0 -1
- package/dist/zonos-elements/p-cc070c1c.entry.js +0 -1
- package/dist/zonos-elements/p-cc1c785c.system.entry.js +0 -1
- package/dist/zonos-elements/p-cd71e41e.entry.js +0 -1
- package/dist/zonos-elements/p-cf97cc68.system.entry.js +0 -1
- package/dist/zonos-elements/p-d6b8563b.system.entry.js +0 -1
- package/dist/zonos-elements/p-dc8d7000.js +0 -2
- package/dist/zonos-elements/p-e5908de2.entry.js +0 -1
- package/dist/zonos-elements/p-f6add79c.system.js +0 -1
- package/dist/zonos-elements/p-f8491335.system.js +0 -1
- package/dist/zonos-elements/p-f868ed42.entry.js +0 -1
- package/dist/zonos-elements/p-f95ac9ec.system.js +0 -1
- /package/dist/esm-es5/{isColorVariable-4cda28c9.js → isColorVariable-91c33804.js} +0 -0
- /package/dist/zonos-elements/{p-0636859b.js → p-4c414a92.js} +0 -0
- /package/dist/zonos-elements/{p-b6c499d4.js → p-5883217a.js} +0 -0
|
@@ -1,153 +1,155 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
|
|
2
|
+
import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
|
|
2
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
3
4
|
|
|
4
5
|
const textOptions = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
6
|
+
pageHeader: {
|
|
7
|
+
label: 'Page Header (3XL) · 34px (2.125rem)',
|
|
8
|
+
size: '3xl',
|
|
9
|
+
tag: 'h2',
|
|
10
|
+
weight: 900,
|
|
11
|
+
},
|
|
12
|
+
secondaryPageHeader: {
|
|
13
|
+
label: 'Secondary Page Header (3XL) • 34px, 500 "Medium"',
|
|
14
|
+
size: '3xl',
|
|
15
|
+
tag: 'h2',
|
|
16
|
+
weight: 500,
|
|
17
|
+
},
|
|
18
|
+
// eslint-disable-next-line sort-keys/sort-keys-fix
|
|
19
|
+
header: {
|
|
20
|
+
label: 'Header (2XL) · 28px (1.75rem)',
|
|
21
|
+
size: '2xl',
|
|
22
|
+
tag: 'h3',
|
|
23
|
+
weight: 700,
|
|
24
|
+
},
|
|
25
|
+
// eslint-disable-next-line sort-keys/sort-keys-fix
|
|
26
|
+
descriptionHeader: {
|
|
27
|
+
label: 'Description Header (2XL) · 28px (1.75rem)',
|
|
28
|
+
size: '2xl',
|
|
29
|
+
tag: 'h3',
|
|
30
|
+
weight: 700,
|
|
31
|
+
},
|
|
32
|
+
title: {
|
|
33
|
+
label: 'Title (XL) • 22px (1.375rem)',
|
|
34
|
+
size: 'xl',
|
|
35
|
+
tag: 'h4',
|
|
36
|
+
weight: 600,
|
|
37
|
+
},
|
|
38
|
+
// eslint-disable-next-line sort-keys/sort-keys-fix
|
|
39
|
+
boldSubheader: {
|
|
40
|
+
label: 'Bold Subheader (L) • 18px (1.125rem)',
|
|
41
|
+
size: 'l',
|
|
42
|
+
tag: 'h5',
|
|
43
|
+
weight: 700,
|
|
44
|
+
},
|
|
45
|
+
semiBoldSubheader: {
|
|
46
|
+
label: 'Semi Bold Subheader (L / H4) • 18px (1.125rem)',
|
|
47
|
+
size: 'l',
|
|
48
|
+
tag: 'h5',
|
|
49
|
+
weight: 600,
|
|
50
|
+
},
|
|
51
|
+
subheader: {
|
|
52
|
+
label: 'Subheader (L) • 18px (1.125rem)',
|
|
53
|
+
size: 'l',
|
|
54
|
+
tag: 'h5',
|
|
55
|
+
weight: 500,
|
|
56
|
+
},
|
|
57
|
+
// eslint-disable-next-line sort-keys/sort-keys-fix
|
|
58
|
+
boldLabel: {
|
|
59
|
+
label: 'Bold Label (Base) • 14px (.875rem)',
|
|
60
|
+
size: 'base',
|
|
61
|
+
tag: 'span',
|
|
62
|
+
weight: 700,
|
|
63
|
+
},
|
|
64
|
+
semiBoldLabel: {
|
|
65
|
+
label: 'Semi Bold Label (Base) • 14px (.875rem)',
|
|
66
|
+
size: 'base',
|
|
67
|
+
tag: 'span',
|
|
68
|
+
weight: 600,
|
|
69
|
+
},
|
|
70
|
+
// eslint-disable-next-line sort-keys/sort-keys-fix
|
|
71
|
+
label: {
|
|
72
|
+
label: 'Label (Base) • 14px (.875rem)',
|
|
73
|
+
size: 'base',
|
|
74
|
+
tag: 'span',
|
|
75
|
+
weight: 500,
|
|
76
|
+
},
|
|
77
|
+
// eslint-disable-next-line sort-keys/sort-keys-fix
|
|
78
|
+
body: {
|
|
79
|
+
label: 'Body (Base) • 14px (.875rem)',
|
|
80
|
+
size: 'base',
|
|
81
|
+
tag: 'span',
|
|
82
|
+
weight: 400,
|
|
83
|
+
},
|
|
84
|
+
smallHeader: {
|
|
85
|
+
label: 'Small header (S) • 12px (.75rem)',
|
|
86
|
+
size: 's',
|
|
87
|
+
tag: 'span',
|
|
88
|
+
weight: 600,
|
|
89
|
+
},
|
|
90
|
+
// eslint-disable-next-line sort-keys/sort-keys-fix
|
|
91
|
+
caption: {
|
|
92
|
+
label: 'Caption (S) • 12px (.75rem)',
|
|
93
|
+
size: 's',
|
|
94
|
+
tag: 'span',
|
|
95
|
+
weight: 400,
|
|
96
|
+
},
|
|
97
|
+
hintText: {
|
|
98
|
+
label: 'Hint text (XS) • 10px (.625rem)',
|
|
99
|
+
size: 'xs',
|
|
100
|
+
tag: 'span',
|
|
101
|
+
weight: 400,
|
|
102
|
+
},
|
|
102
103
|
};
|
|
103
104
|
|
|
104
|
-
const zonosTextCss = ":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--amino-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--amino-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--amino-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--amino-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--amino-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--amino-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--amino-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";
|
|
105
|
+
const zonosTextCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--amino-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--amino-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--amino-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--amino-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--amino-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--amino-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--amino-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";
|
|
105
106
|
|
|
106
107
|
const ZonosText = class {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
108
|
+
constructor(hostRef) {
|
|
109
|
+
registerInstance(this, hostRef);
|
|
110
|
+
this.class = '';
|
|
111
|
+
this.color = 'gray-1200';
|
|
112
|
+
this.size = undefined;
|
|
113
|
+
this.type = 'body';
|
|
114
|
+
this.weight = undefined;
|
|
115
|
+
this.content = undefined;
|
|
116
|
+
this.ready = false;
|
|
117
|
+
}
|
|
118
|
+
componentDidRender() {
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
this.ready = true;
|
|
121
|
+
}, 100);
|
|
122
|
+
}
|
|
123
|
+
render() {
|
|
124
|
+
const { size: defaultSize, tag: defaultTag, weight: defaultWeight, } = textOptions.body;
|
|
125
|
+
const { size, tag, weight } = textOptions[this.type];
|
|
126
|
+
const textSize = this.size || size || defaultSize;
|
|
127
|
+
const textWeight = this.weight || weight || defaultWeight;
|
|
128
|
+
const textTag = tag || defaultTag;
|
|
129
|
+
const renderText = () => {
|
|
130
|
+
switch (textTag) {
|
|
131
|
+
case 'h2':
|
|
132
|
+
return (h("h2", null, h("slot", null)));
|
|
133
|
+
case 'h3':
|
|
134
|
+
return (h("h3", null, h("slot", null)));
|
|
135
|
+
case 'h4':
|
|
136
|
+
return (h("h4", null, h("slot", null)));
|
|
137
|
+
case 'h5':
|
|
138
|
+
return (h("h5", null, h("slot", null)));
|
|
139
|
+
case 'span':
|
|
140
|
+
default:
|
|
141
|
+
return (h("span", null, h("slot", null)));
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
return (h(Host, { class: classes([
|
|
145
|
+
`zonos--text-size-${textSize}`,
|
|
146
|
+
`zonos--text-weight-${textWeight}`,
|
|
147
|
+
this.class,
|
|
148
|
+
]), style: {
|
|
149
|
+
'--color': this.color ? `var(--amino-${this.color})` : '',
|
|
150
|
+
'--font-family': zonosStoreFontFamily(),
|
|
151
|
+
} }, renderText()));
|
|
152
|
+
}
|
|
151
153
|
};
|
|
152
154
|
ZonosText.style = zonosTextCss;
|
|
153
155
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getRenderingRef, f as forceUpdate } from './index-
|
|
1
|
+
import { g as getRenderingRef, f as forceUpdate } from './index-36ff6342.js';
|
|
2
2
|
|
|
3
3
|
const appendToMap = (map, propName, value) => {
|
|
4
4
|
const items = map.get(propName);
|
|
@@ -2512,113 +2512,117 @@ var merge_1 = merge;
|
|
|
2512
2512
|
* @param value2[] List of objects to merge (need to have the same shape as value1)
|
|
2513
2513
|
*/
|
|
2514
2514
|
const mergeConfig = (defaultObj, fetchedObj, ...overrideObj) => {
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2515
|
+
// filter out null and undefined values
|
|
2516
|
+
const overrideArgs = [defaultObj, fetchedObj, ...overrideObj].filter(Boolean);
|
|
2517
|
+
return merge_1.apply(null, overrideArgs);
|
|
2518
2518
|
};
|
|
2519
2519
|
|
|
2520
2520
|
const { reset, state: zonosStore } = createStore(() => ({
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2521
|
+
appearance: {
|
|
2522
|
+
colorPrimary: 'purple',
|
|
2523
|
+
fontFamily: 'Inter',
|
|
2524
|
+
logoUrl: '',
|
|
2525
|
+
style: 'ROUNDED',
|
|
2526
|
+
theme: 'LIGHT',
|
|
2527
|
+
zonosAttribution: 'DISABLED',
|
|
2528
|
+
},
|
|
2529
|
+
checkoutSettings: {
|
|
2530
|
+
allowedDomains: [],
|
|
2531
|
+
analyticsProviders: [],
|
|
2532
|
+
orderNotifications: {
|
|
2533
|
+
abandonedCart: {
|
|
2534
|
+
delay: 0,
|
|
2535
|
+
discountPercent: 0,
|
|
2536
|
+
status: {
|
|
2537
|
+
active: 'DISABLED',
|
|
2538
|
+
sendCopiesTo: [],
|
|
2539
|
+
},
|
|
2540
|
+
},
|
|
2541
|
+
orderCancelled: {
|
|
2542
|
+
active: 'DISABLED',
|
|
2543
|
+
sendCopiesTo: [],
|
|
2544
|
+
},
|
|
2545
|
+
orderConfirmation: {
|
|
2546
|
+
active: 'DISABLED',
|
|
2547
|
+
sendCopiesTo: [],
|
|
2548
|
+
},
|
|
2549
|
+
orderShipped: {
|
|
2550
|
+
active: 'DISABLED',
|
|
2551
|
+
sendCopiesTo: [],
|
|
2552
|
+
},
|
|
2539
2553
|
},
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
sendCopiesTo: [],
|
|
2548
|
-
},
|
|
2549
|
-
orderShipped: {
|
|
2550
|
-
active: 'DISABLED',
|
|
2551
|
-
sendCopiesTo: [],
|
|
2552
|
-
},
|
|
2554
|
+
organization: '',
|
|
2555
|
+
placeOrderButtonSelector: null,
|
|
2556
|
+
// default inactive for subscription
|
|
2557
|
+
subscriptionStatus: 'INACTIVE',
|
|
2558
|
+
successBehavior: 'REDIRECT_TO_SUCCESS_PAGE',
|
|
2559
|
+
successRedirectUrl: '',
|
|
2560
|
+
visibilityStatus: 'ENABLED',
|
|
2553
2561
|
},
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
allowedDomains: [],
|
|
2588
|
-
},
|
|
2589
|
-
organizationName: '',
|
|
2590
|
-
sourceCurrency: 'USD',
|
|
2591
|
-
storeId: null,
|
|
2592
|
-
// toggle to know if the config has been loaded with graphql
|
|
2593
|
-
stripeApiKey: '',
|
|
2594
|
-
zonosApiKey: '',
|
|
2562
|
+
currentHelloPage: '',
|
|
2563
|
+
helloSettings: {
|
|
2564
|
+
allowedDomains: [],
|
|
2565
|
+
anchorElementSelector: '',
|
|
2566
|
+
cartUrlPattern: '',
|
|
2567
|
+
currencyBehavior: 'ENABLED',
|
|
2568
|
+
currencyElementSelector: '.money',
|
|
2569
|
+
dutyTaxEstimationBehavior: 'ENABLED',
|
|
2570
|
+
excludedUrlPatterns: [],
|
|
2571
|
+
homepageUrlPattern: '',
|
|
2572
|
+
mobileLocation: 'BOTTOM_RIGHT',
|
|
2573
|
+
mode: 'LIVE',
|
|
2574
|
+
organization: '',
|
|
2575
|
+
peekMessageBehavior: 'ENABLED',
|
|
2576
|
+
peekMessageDelay: 0,
|
|
2577
|
+
productAddToCartElementSelector: '',
|
|
2578
|
+
productDescriptionElementSelector: '',
|
|
2579
|
+
productDetailUrlPattern: '',
|
|
2580
|
+
productListUrlPattern: '',
|
|
2581
|
+
productPriceElementSelector: '',
|
|
2582
|
+
productTitleElementSelector: '',
|
|
2583
|
+
restrictionBehavior: 'DISABLED',
|
|
2584
|
+
},
|
|
2585
|
+
loadedConfig: false,
|
|
2586
|
+
onlineStoreSettings: {
|
|
2587
|
+
allowedDomains: [],
|
|
2588
|
+
},
|
|
2589
|
+
organizationName: '',
|
|
2590
|
+
sourceCurrency: 'USD',
|
|
2591
|
+
storeId: null,
|
|
2592
|
+
// toggle to know if the config has been loaded with graphql
|
|
2593
|
+
stripeApiKey: '',
|
|
2594
|
+
zonosApiKey: '',
|
|
2595
2595
|
}));
|
|
2596
2596
|
let savedZonosSettings = null;
|
|
2597
2597
|
/**
|
|
2598
2598
|
* Init setting from zonos setting
|
|
2599
2599
|
*/
|
|
2600
2600
|
const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2601
|
+
var _a, _b, _c;
|
|
2602
|
+
reset();
|
|
2603
|
+
if (zonosSettings) {
|
|
2604
|
+
// save zonos settings to be used later
|
|
2605
|
+
savedZonosSettings = zonosSettings;
|
|
2606
|
+
}
|
|
2607
|
+
zonosStore.appearance = mergeConfig(zonosStore.appearance, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.appearanceSettings) ||
|
|
2608
|
+
(zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.appearanceSettings) ||
|
|
2609
|
+
null, overrideSettings.appearance);
|
|
2610
|
+
zonosStore.checkoutSettings = mergeConfig(zonosStore.checkoutSettings, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.checkoutSettings) ||
|
|
2611
|
+
(zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.checkoutSettings) ||
|
|
2612
|
+
null, overrideSettings.checkoutSettings);
|
|
2613
|
+
zonosStore.helloSettings = mergeConfig(zonosStore.helloSettings, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.helloSettings) || (zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.helloSettings) || null, overrideSettings.helloSettings);
|
|
2614
|
+
zonosStore.onlineStoreSettings = mergeConfig(zonosStore.onlineStoreSettings, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.onlineStoreSettings) ||
|
|
2615
|
+
(zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.onlineStoreSettings) ||
|
|
2616
|
+
null, overrideSettings.onlineStoreSettings);
|
|
2617
|
+
// set flag to true to indicate that config is ready
|
|
2618
|
+
zonosStore.loadedConfig = true;
|
|
2619
|
+
zonosStore.organizationName = ((_a = zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.organization) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
2620
|
+
zonosStore.storeId = ((_c = (_b = zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.organization) === null || _b === void 0 ? void 0 : _b.references) === null || _c === void 0 ? void 0 : _c.storeId) || null;
|
|
2621
|
+
zonosStore.currencyConverter = overrideSettings.currencyConverter;
|
|
2622
|
+
};
|
|
2623
|
+
const zonosStoreFontFamily = () => {
|
|
2624
|
+
const fontFamily = zonosStore.appearance.fontFamily || 'Inter';
|
|
2625
|
+
return fontFamily;
|
|
2622
2626
|
};
|
|
2623
2627
|
|
|
2624
|
-
export { _root as _, createCommonjsModule as a, commonjsGlobal as b, createStore as c, zonosStoreInitSetting as d,
|
|
2628
|
+
export { _root as _, createCommonjsModule as a, commonjsGlobal as b, createStore as c, zonosStoreInitSetting as d, zonosStoreFontFamily as e, _baseGetTag as f, isObject_1 as g, isObjectLike_1 as i, mergeConfig as m, zonosStore as z };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o["throw"](e))}catch(e){i(e)}}function c(e){e.done?r(e.value):n(e.value).then(a,s)}c((o=o.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:[]},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(t){return c([e,t])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)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:r.label++;return{value:s[1],done:false};case 5:r.label++;n=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];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-61e74f58.js";import{h as handleFetch,l as log,a as localizationStore,b as logError,t as translate}from"./localization-a51ccbc2.js";import{i as isDarkColor}from"./isDarkColor-416d6047.js";import{g as getBorderRadius}from"./getBorderRadius-178a0a05.js";var prepCalculateLandedCost=function(){var e=stripeStore.stripeLinkEventData;var t=stripeStore.stripeAddressEventData;if(!t||!t.complete){throw new Error("Missing stripe address data")}return{checkoutSessionId:cartStore.checkoutSessionId||"",contact:{email:(e===null||e===void 0?void 0:e.value.email)||"",firstName:t.value.firstName||"",lastName:t.value.lastName||"",phone:t.value.phone||""},items:cartStore.items.map((function(e){return e})),shippingAddress:{addressLine1:t.value.address.line1,addressLine2:t.value.address.line2||"",city:t.value.address.city,country:t.value.address.country,postalCode:t.value.address.postal_code,state:t.value.address.state}}};var triggerBuildLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i,a;return __generator(this,(function(s){switch(s.label){case 0:r=prepCalculateLandedCost();return[4,e(r.checkoutSessionId,r.contact,r.shippingAddress)];case 1:o=s.sent();if(!o){throw new Error("Failed to build landed cost")}return[4,handleFetch("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/validate-landed-cost"),{body:o,headers:{"Content-Type":"application/json"},method:"POST"})];case 2:n=s.sent(),i=n.errors,a=n.json;if(!a||i.length){throw new Error("Invalid landed cost object: ".concat(((t=i.find(Boolean))===null||t===void 0?void 0:t.message)||"Unknown error"))}return[2,o]}}))}))};var calculateLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i,a;return __generator(this,(function(s){switch(s.label){case 0:t=zonosStore.checkoutSettings.buildLandedCost;if(!t)return[3,2];return[4,triggerBuildLandedCost(t)];case 1:r=s.sent();return[2,r];case 2:o="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/calculate-landed-cost");return[4,handleFetch(o,{body:prepCalculateLandedCost(),method:"POST",signal:e===null||e===void 0?void 0:e.signal})];case 3:n=s.sent(),i=n.errors,a=n.json;if(i.length||!a){throw new Error("Failed to calculate landed cost")}return[2,a]}}))}))};var addressRuleStyle=function(e){var t=e.theme;switch(t){default:return{".Input":{padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"}}}};var defaultVariable=function(e){var t=e.borderStyle,r=e.theme;switch(r){case"DARK":return{borderRadius:getBorderRadius(t),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"};default:return{borderRadius:getBorderRadius(t)}}};var _f=createStore((function(){return{clientSecret:sessionStorage.getItem("zonos--client-secret")||null,fetchingLandedCostAbordController:null,isFetchingLandedCost:false,isFetchingSession:false,stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenFetchingLC:null,stripeBillingAddressElement:null,stripeElements:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null}})),onChange$1=_f.onChange,reset$1=_f.reset,stripeStore=_f.state;var getStripeOptions=function(e){var t=e.clientSecret,r=e.overrideBorderRaidus,o=e.overridePrimaryColor,n=e.overrideTheme;var i=o||zonosStore.appearance.colorPrimary;var a=i&&isDarkColor(i)?"night":"flat";var s=n==="DARK"?"night":"flat";return{appearance:{labels:"floating",rules:Object.assign({},addressRuleStyle({theme:"LIGHT"})),theme:n?s:a,variables:Object.assign({},defaultVariable({borderStyle:r,theme:"LIGHT"}))},clientSecret:t,locale:localizationStore.selectedLocale}};var initStripeElements=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n;return __generator(this,(function(i){r=stripeStore.clientSecret;if(!stripeStore.stripe){log("Skip. Stripe is not initialized");return[2]}if(r){o=getStripeOptions({clientSecret:r,overrideBorderRaidus:e===null||e===void 0?void 0:e.overrideBorderRaidus,overridePrimaryColor:e===null||e===void 0?void 0:e.overridePrimaryColor,overrideTheme:e===null||e===void 0?void 0:e.overrideTheme});n=JSON.stringify(o)===JSON.stringify(stripeStore.stripeElementsOptions);if(!stripeStore.stripeElements){stripeStore.stripeElements=(t=stripeStore.stripe)===null||t===void 0?void 0:t.elements(o);stripeStore.stripeElementsOptions=o;log("Stripe elements initialized");return[2]}if(!n){stripeStore.stripeElements.update(o);stripeStore.stripeElementsOptions=o}log("Stripe elements initialized")}return[2]}))}))};var stripeStoreReset=function(){sessionStorage.removeItem("zonos--client-secret");reset$1();stripeStore.stripe=window.Zonos.stripe};var isPrefetchInfoOutdated=function(){var e,t,r,o;var n=stripeStore.fetchingLandedCostAbordController;if(!n){return false}var i=JSON.stringify((e=stripeStore.stripeLinkUsedWhenFetchingLC)===null||e===void 0?void 0:e.value)!==JSON.stringify((t=stripeStore.stripeLinkEventData)===null||t===void 0?void 0:t.value);var a=JSON.stringify((r=stripeStore.stripeAddressUsedWhenFetchingLC)===null||r===void 0?void 0:r.value)!==JSON.stringify((o=stripeStore.stripeAddressEventData)===null||o===void 0?void 0:o.value);return i||a};var stripeStorePrefetchLandedCost=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n,i,a,s,c,u,l,d,p,S;return __generator(this,(function(f){switch(f.label){case 0:n=!!((e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.complete);i=!!((t=stripeStore.stripeLinkEventData)===null||t===void 0?void 0:t.complete);a=isPrefetchInfoOutdated();if(a){(r=stripeStore.fetchingLandedCostAbordController)===null||r===void 0?void 0:r.abort();stripeStore.fetchingLandedCostAbordController=null}if(!(n&&i&&(a||!stripeStore.isFetchingLandedCost)))return[3,5];stripeStore.isFetchingLandedCost=true;if(stripeStore.stripeAddressEventData){stripeStore.stripeAddressUsedWhenFetchingLC=Object.assign({},stripeStore.stripeAddressEventData)}if(stripeStore.stripeLinkEventData){stripeStore.stripeLinkUsedWhenFetchingLC=Object.assign({},stripeStore.stripeLinkEventData)}f.label=1;case 1:f.trys.push([1,3,,4]);s=new AbortController;stripeStore.fetchingLandedCostAbordController=s;return[4,calculateLandedCost(s)];case 2:c=f.sent(),u=c.checkoutSessionWorkflow,l=c.shipmentRatingCalculateWorkflow;stripeStore.fetchingLandedCostAbordController=null;cartStore.landedCostData=(u===null||u===void 0?void 0:u.filter(Boolean))||null;cartStore.shippingData=(l===null||l===void 0?void 0:l.filter(Boolean))||null;d=(o=cartStore.landedCostData)===null||o===void 0?void 0:o.find(Boolean);p=!!d?d.subtotals:null;if(p){cartStoreApplySubtotals({exchangeRate:p.exchangeRate,items:p.items,landedCostTotal:0,presentmentCurrencyCode:p.presentmentCurrencyCode,shipping:0,total:p.items})}return[3,4];case 3:S=f.sent();logError(S);return[3,4];case 4:stripeStore.isFetchingLandedCost=false;f.label=5;case 5:return[2]}}))}))};var getStripeMessageBasedOnStatus=function(e){var t=[];var r=true;switch(e){case"succeeded":{t=[translate("Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us."),"","",translate("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.")];r=false;break}case"requires_capture":case"processing":{t=[translate("Payment processing. We'll update you when payment is received.")];r=false;break}case"requires_payment_method":{t=[translate("Payment failed. Please try another payment method.")];break}default:{t=[translate("Something went wrong.")];break}}return{isError:r,messages:t}};var stripeStoreRetrievePayment=function(e){var t=e.clientSecret,r=e.storybookForceStatus;return __awaiter(void 0,void 0,void 0,(function(){var e,o,n,i,a,s,c,u,l;return __generator(this,(function(d){switch(d.label){case 0:if(r){e=getStripeMessageBasedOnStatus(r),o=e.isError,n=e.messages;return[2,{error:o,messages:n}]}i=t||stripeStore.clientSecret;if(!stripeStore.stripe||!i){logError("Failed to retrieve payment intent. Stripe is not initialized");return[2,{error:true,message:[translate("Something went wrong.")]}]}return[4,stripeStore.stripe.retrievePaymentIntent(i)];case 1:a=d.sent().paymentIntent;s=a===null||a===void 0?void 0:a.status;c=getStripeMessageBasedOnStatus(s),u=c.isError,l=c.messages;return[2,{error:u,messages:l}]}}))}))};var stripeStoreConfirmPayment=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n,i,a,s;return __generator(this,(function(c){switch(c.label){case 0:o=!!((e=stripeStore.stripePaymentEventData)===null||e===void 0?void 0:e.complete);n=stripeStore.stripeElements;i=stripeStore.stripe;a=stripeStore.clientSecret;if(!(i&&n&&o&&a))return[3,2];return[4,i.confirmPayment({confirmParams:{receipt_email:(r=(t=stripeStore.stripeLinkEventData)===null||t===void 0?void 0:t.value)===null||r===void 0?void 0:r.email,return_url:window.location.href},elements:n,redirect:"if_required"})];case 1:s=c.sent().error;if(s){if(s.type==="card_error"||s.type==="validation_error"){throw new Error(s.message)}if(s.type==="invalid_request_error"){if(s.code==="payment_intent_unexpected_state"){return[2]}}throw new Error("An unexpected error occurred.")}c.label=2;case 2:return[2]}}))}))};var stripeStoreInitCheckoutSession=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n,i;return __generator(this,(function(a){switch(a.label){case 0:t=cartStore.items.reduce((function(e,t){return e+t.amount*t.quantity}),0);if(!t||!localizationStore.targetCurrency){logError("Fail to create checkout session - invalid total or currency");return[2,false]}stripeStore.isFetchingSession=true;return[4,handleFetch("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/create-checkout-session"),{body:{currency:((e=cartStore.items.find(Boolean))===null||e===void 0?void 0:e.currencyCode)||"",itemsAmount:t,presentmentCountryCode:localizationStore.selectedCountryCode||null},method:"POST"})];case 1:r=a.sent(),o=r.errors,n=r.json;stripeStore.isFetchingSession=false;if(o.length||!n){logError("Error occurs when creating checkout session",JSON.stringify(o,null,2));return[2,false]}i=n.checkoutSessionCreate;stripeStore.clientSecret=i.clientSecret;cartStore.checkoutSessionId=i.id;cartStoreApplySubtotals(Object.assign(Object.assign({},i.subtotals),{landedCostTotal:0,shipping:0,total:i.subtotals.items}));log("Exchange rate updated for cart items (checkout session create)","info",cartStore.exchangeRate);log("done-init-checkout-session");return[2,true]}}))}))};var stripeStoreUpdateCheckoutSession=function(e){var t=e.currency,r=e.id,o=e.itemsAmount,n=e.landedCostId,i=e.presentmentCountryCode;return __awaiter(void 0,void 0,void 0,(function(){var e,a,s;return __generator(this,(function(c){switch(c.label){case 0:return[4,handleFetch("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/update-checkout-session"),{body:{currency:t,id:r,itemsAmount:o,landedCostId:n,presentmentCountryCode:i},method:"POST"})];case 1:e=c.sent(),a=e.errors,s=e.json;if(a.length||!s){logError("Error occurs when updating checkout session",JSON.stringify(a,null,2));return[2,{errors:a,json:s}]}return[2,{errors:[],json:s}]}}))}))};onChange$1("clientSecret",(function(e){if(e&&stripeStore.stripe){sessionStorage.setItem("zonos--client-secret",e)}if(!e){sessionStorage.removeItem("zonos--client-secret")}}));var formatDate=function(e){var t=e.date,r=e.formatOptions,o=r===void 0?{day:"numeric",weekday:"long",year:"numeric"}:r;return new Intl.DateTimeFormat("en-US",o).format(t)};var getDaysDifference=function(e){var t=new Date;var r=e.getTime()-t.getTime();var o=Math.floor(r/(1e3*60*60*24));return o};var _g=createStore((function(){return{checkoutSessionId:sessionStorage.getItem("zonos--checkout-session-id")||null,currency:"USD",dutiesTaxFees:0,error:null,exchangeRate:null,isSelectedShippingAboveDeminimis:false,isSelectedShippingGuarantee:false,items:[],landedCostData:null,selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,step:"customer-info",subtotal:0,total:0}})),onChange=_g.onChange,reset=_g.reset,cartStore=_g.state;var cartStoreGetShippingTransitInfo=function(e){var t=e.minTransitAt?getDaysDifference(new Date(e.minTransitAt)):"";var r=e.maxTransitAt?getDaysDifference(new Date(e.maxTransitAt)):"";var o=e.minTransitAt?formatDate({date:new Date(e.minTransitAt)}):"";return{expectedDate:o,maxTransit:r,minTransit:t}};var cartStoreReset=function(){sessionStorage.removeItem("zonos--checkout-session-id");reset()};var cartStoreUpdateToErrorState=function(e){var t=e.messages,r=e.title;cartStore.step="error";cartStore.error={messages:t,title:r}};var cartStoreApplySubtotals=function(e){cartStore.exchangeRate=e.exchangeRate;cartStore.dutiesTaxFees=e.landedCostTotal;cartStore.subtotal=e.items;cartStore.total=e.total;cartStore.currency=e.presentmentCurrencyCode};var cartStoreReCalculateTotal=function(e){var t=e.currency,r=e.itemsAmount,o=e.landedCostId;return __awaiter(void 0,void 0,void 0,(function(){var e,n;return __generator(this,(function(i){switch(i.label){case 0:if(o&&cartStore.selectedLandedCost){e=cartStore.selectedLandedCost.subtotals;cartStoreApplySubtotals(e);log("Exchange rate updated for cart items (landed cost subtotal)","info",cartStore.exchangeRate)}if(!cartStore.checkoutSessionId){logError("Could not update cart total without checkout session id");return[2,false]}return[4,stripeStoreUpdateCheckoutSession({currency:t,id:cartStore.checkoutSessionId,itemsAmount:r,landedCostId:o,presentmentCountryCode:localizationStore.selectedCountryCode})];case 1:n=i.sent().json;if(!n){logError("Error occurs when updating checkout session");cartStoreUpdateToErrorState({messages:[translate("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists")],title:translate("Error updating Checkout")});return[2,false]}if(!o){cartStoreApplySubtotals(n.checkoutSessionUpdate.subtotals);log("Exchange rate updated for cart items (checkout session update)","info",cartStore.exchangeRate)}return[2,true]}}))}))};var cartStoreUpdateSelectedShippingOption=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i,a,s,c,u,l,d,p,S;return __generator(this,(function(f){switch(f.label){case 0:cartStore.selectedShippingOption=e;a=cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption),s=a.expectedDate,c=a.maxTransit,u=a.minTransit;cartStore.selectedShippingOptionExpectedDate=s;cartStore.selectedShippingOptionTransitTime=u&&c?"".concat(u,"-").concat(c):"".concat(u||c);l=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.find((function(e){var t,r,o;return((r=(t=e.landedCost)===null||t===void 0?void 0:t.shipmentRating)===null||r===void 0?void 0:r.id)===((o=cartStore.selectedShippingOption)===null||o===void 0?void 0:o.id)}));cartStore.selectedLandedCost=l||null;if(!l){return[2,false]}cartStore.shipping=l.subtotals.shipping;d=((r=l===null||l===void 0?void 0:l.landedCost)===null||r===void 0?void 0:r.landedCostGuaranteeCode)==="ZONOS";p=!!((n=(o=l===null||l===void 0?void 0:l.landedCost)===null||o===void 0?void 0:o.deMinimis)===null||n===void 0?void 0:n.find((function(e){return["DUTY","TAX"].includes(e.type)&&e.threshold==="ABOVE"})));cartStore.isSelectedShippingAboveDeminimis=p;cartStore.isSelectedShippingGuarantee=d;return[4,cartStoreReCalculateTotal({landedCostId:(i=l.landedCost)===null||i===void 0?void 0:i.id})];case 1:S=f.sent();return[2,S]}}))}))};onChange("checkoutSessionId",(function(){if(!cartStore.checkoutSessionId){sessionStorage.removeItem("zonos--checkout-session-id");return}sessionStorage.setItem("zonos--checkout-session-id",cartStore.checkoutSessionId)}));var cartStoreUpdateItems=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o;return __generator(this,(function(n){switch(n.label){case 0:cartStore.items=e;r=(t=e.find(Boolean))===null||t===void 0?void 0:t.currencyCode;o=e.reduce((function(e,t){return e+t.amount*t.quantity}),0);if(!r||!o){return[2]}cartStore.currency=r;stripeStore.isFetchingSession=true;return[4,cartStoreReCalculateTotal({currency:r,itemsAmount:o})];case 1:n.sent();stripeStore.isFetchingSession=false;return[2]}}))}))};var cartStoreResetSelectedShippingOption=function(){cartStore.selectedShippingOption=null;cartStore.isSelectedShippingAboveDeminimis=false;cartStore.isSelectedShippingGuarantee=false;cartStore.selectedShippingOptionExpectedDate="";cartStore.selectedShippingOptionTransitTime="";cartStore.shipping=0};var cartStoreNextStep=function(){if(cartStore.step==="customer-info"){cartStore.step="shipping"}else if(cartStore.step==="shipping"){cartStore.step="payment"}else if(cartStore.step==="payment"){cartStore.step="finish"}};var cartStorePreviousStep=function(){if(cartStore.step==="payment"){cartStore.step="shipping"}else if(cartStore.step==="shipping"){cartStore.step="customer-info";cartStoreResetSelectedShippingOption()}};export{cartStoreApplySubtotals as a,cartStoreGetShippingTransitInfo as b,cartStore as c,cartStoreNextStep as d,cartStorePreviousStep as e,cartStoreReCalculateTotal as f,cartStoreReset as g,cartStoreUpdateItems as h,cartStoreUpdateSelectedShippingOption as i,cartStoreUpdateToErrorState as j,initStripeElements as k,stripeStoreInitCheckoutSession as l,stripeStorePrefetchLandedCost as m,stripeStoreConfirmPayment as n,stripeStoreReset as o,stripeStoreRetrievePayment as p,stripeStore as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as zonosStore}from"./zonosStore-61e74f58.js";var getBorderRadius=function(o){if(o){return o==="SHARP"?"0px":"10px"}return zonosStore.appearance.style==="SHARP"?"0px":"10px"};export{getBorderRadius as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var getHasMoreSpaceOnRight=function(a){var r=a.getBoundingClientRect();var e=r.left;var t=window.innerWidth-r.right;return e<=t};export{getHasMoreSpaceOnRight as g};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{f(t.next(e))}catch(e){a(e)}}function u(e){try{f(t["throw"](e))}catch(e){a(e)}}function f(e){e.done?r(e.value):i(e.value).then(o,u)}f((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return f([e,n])}}function f(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};var NAMESPACE="zonos-elements";var scopeId;var hostTagName;var isSvgMode=false;var renderingRef=null;var queuePending=false;var getAssetPath=function(e){var n=new URL(e,plt.t);return n.origin!==win.location.origin?n.href:n.pathname};var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}.hydrated{visibility:inherit}";var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";var EMPTY_OBJ={};var SVG_NS="http://www.w3.org/2000/svg";var HTML_NS="http://www.w3.org/1999/xhtml";var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var i=null;var a=null;var o=false;var u=false;var f=[];var s=function(n){for(var r=0;r<n.length;r++){i=n[r];if(Array.isArray(i)){s(i)}else if(i!=null&&typeof i!=="boolean"){if(o=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(o&&u){f[f.length-1].i+=i}else{f.push(o?newVNode(null,i):i)}u=o}}};s(r);if(n){if(n.key){a=n.key}{var l=n.className||n.class;if(l){n.class=typeof l!=="object"?l:Object.keys(l).filter((function(e){return l[e]})).join(" ")}}}if(typeof e==="function"){return e(n===null?{}:n,f,vdomFnUtils)}var c=newVNode(e,null);c.o=n;if(f.length>0){c.u=f}{c.l=a}return c};var newVNode=function(e,n){var r={v:0,p:e,i:n,m:null,u:null};{r.o=null}{r.l=null}return r};var Host={};var isHost=function(e){return e&&e.p===Host};var vdomFnUtils={forEach:function(e,n){return e.map(convertToPublic).forEach(n)},map:function(e,n){return e.map(convertToPublic).map(n).map(convertToPrivate)}};var convertToPublic=function(e){return{vattrs:e.o,vchildren:e.u,vkey:e.l,vname:e.h,vtag:e.p,vtext:e.i}};var convertToPrivate=function(e){if(typeof e.vtag==="function"){var n=Object.assign({},e.vattrs);if(e.vkey){n.key=e.vkey}if(e.vname){n.name=e.vname}return h.apply(void 0,__spreadArray([e.vtag,n],e.vchildren||[],false))}var r=newVNode(e.vtag,e.vtext);r.o=e.vattrs;r.u=e.vchildren;r.l=e.vkey;r.h=e.vname;return r};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&2){return parseFloat(e)}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var i=getScopeId(n);var a=styles.get(i);e=e.nodeType===11?e:doc;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{u=doc.createElement("style");u.innerHTML=a;var f=(t=plt.S)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(f!=null){u.setAttribute("nonce",f)}e.insertBefore(u,e.querySelector("link"))}if(n.v&4){u.innerHTML+=SLOT_FB_CSS}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var n=e.T;var r=e.$hostElement$;var t=n.v;var i=createTime("attachStyles",n._);var a=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=a;r.classList.add(a+"-h");if(t&2){r.classList.add(a+"-s")}}i()};var getScopeId=function(e,n){return"sc-"+e._};var setAccessor=function(e,n,r,t,i,a){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var f=e.classList;var s=parseClassList(r);var l=parseClassList(t);f.remove.apply(f,s.filter((function(e){return e&&!l.includes(e)})));f.add.apply(f,l.filter((function(e){return e&&!s.includes(e)})))}else if(n==="style"){{for(var c in r){if(!t||t[c]==null){if(c.includes("-")){e.style.removeProperty(c)}else{e.style[c]=""}}}}for(var c in t){if(!r||t[c]!==r[c]){if(c.includes("-")){e.style.setProperty(c,t[c])}else{e.style[c]=t[c]}}}}else if(n==="key");else if(n==="ref"){if(t){t(e)}}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r||t){var v=n.endsWith(CAPTURE_EVENT_SUFFIX);n=n.replace(CAPTURE_EVENT_REGEX,"");if(r){plt.rel(e,n,r,v)}if(t){plt.ael(e,n,t,v)}}}else{var d=isComplexType(t);if((o||d&&t!==null)&&!i){try{if(!e.tagName.includes("-")){var p=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=p){e[n]=p}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||a&4||i)&&!d){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var CAPTURE_EVENT_SUFFIX="Capture";var CAPTURE_EVENT_REGEX=new RegExp(CAPTURE_EVENT_SUFFIX+"$");var updateElement=function(e,n,r,t){var i=n.m.nodeType===11&&n.m.host?n.m.host:n.m;var a=e&&e.o||EMPTY_OBJ;var o=n.o||EMPTY_OBJ;{for(t in a){if(!(t in o)){setAccessor(i,t,a[t],undefined,r,n.v)}}}for(t in o){setAccessor(i,t,a[t],o[t],r,n.v)}};var createElm=function(e,n,r,t){var i=n.u[r];var a=0;var o;var u;if(i.i!==null){o=i.m=doc.createTextNode(i.i)}else{if(!isSvgMode){isSvgMode=i.p==="svg"}o=i.m=doc.createElementNS(isSvgMode?SVG_NS:HTML_NS,i.p);if(isSvgMode&&i.p==="foreignObject"){isSvgMode=false}{updateElement(null,i,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(i.u){for(a=0;a<i.u.length;++a){u=createElm(e,i,a);if(u){o.appendChild(u)}}}{if(i.p==="svg"){isSvgMode=false}else if(o.tagName==="foreignObject"){isSvgMode=true}}}o["s-hn"]=hostTagName;return o};var addVnodes=function(e,n,r,t,i,a){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(t[i]){u=createElm(null,r,i);if(u){t[i].m=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var i=e[t];if(i){var a=i.m;nullifyVNodeRefs(i);if(a){a.remove()}}}};var updateChildren=function(e,n,r,t,i){if(i===void 0){i=false}var a=0;var o=0;var u=0;var f=0;var s=n.length-1;var l=n[0];var c=n[s];var v=t.length-1;var d=t[0];var p=t[v];var m;var h;while(a<=s&&o<=v){if(l==null){l=n[++a]}else if(c==null){c=n[--s]}else if(d==null){d=t[++o]}else if(p==null){p=t[--v]}else if(isSameVnode(l,d,i)){patch(l,d,i);l=n[++a];d=t[++o]}else if(isSameVnode(c,p,i)){patch(c,p,i);c=n[--s];p=t[--v]}else if(isSameVnode(l,p,i)){patch(l,p,i);e.insertBefore(l.m,c.m.nextSibling);l=n[++a];p=t[--v]}else if(isSameVnode(c,d,i)){patch(c,d,i);e.insertBefore(c.m,l.m);c=n[--s];d=t[++o]}else{u=-1;{for(f=a;f<=s;++f){if(n[f]&&n[f].l!==null&&n[f].l===d.l){u=f;break}}}if(u>=0){h=n[u];if(h.p!==d.p){m=createElm(n&&n[o],r,u)}else{patch(h,d,i);n[u]=undefined;m=h.m}d=t[++o]}else{m=createElm(n&&n[o],r,o);d=t[++o]}if(m){{l.m.parentNode.insertBefore(m,l.m)}}}}if(a>s){addVnodes(e,t[v+1]==null?null:t[v+1].m,r,t,o,v)}else if(o>v){removeVnodes(n,a,s)}};var isSameVnode=function(e,n,r){if(r===void 0){r=false}if(e.p===n.p){if(!r){return e.l===n.l}return true}return false};var patch=function(e,n,r){if(r===void 0){r=false}var t=n.m=e.m;var i=e.u;var a=n.u;var o=n.p;var u=n.i;if(u===null){{isSvgMode=o==="svg"?true:o==="foreignObject"?false:isSvgMode}{if(o==="slot");else{updateElement(e,n,isSvgMode)}}if(i!==null&&a!==null){updateChildren(t,i,n,a,r)}else if(a!==null){if(e.i!==null){t.textContent=""}addVnodes(t,null,n,a,0,a.length-1)}else if(i!==null){removeVnodes(i,0,i.length-1)}if(isSvgMode&&o==="svg"){isSvgMode=false}}else if(e.i!==u){t.data=u}};var nullifyVNodeRefs=function(e){{e.o&&e.o.ref&&e.o.ref(null);e.u&&e.u.map(nullifyVNodeRefs)}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var i=e.C||newVNode(null,null);var a=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(r&&a.o){for(var o=0,u=Object.keys(a.o);o<u.length;o++){var f=u[o];if(t.hasAttribute(f)&&!["key","ref","style","class"].includes(f)){a.o[f]=t[f]}}}a.p=null;a.v|=4;e.C=a;a.m=i.m=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(i,a,r)};var attachToAncestor=function(e,n){if(n&&!e.R&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.R=n})))}};var scheduleUpdate=function(e,n){{e.v|=16}if(e.v&4){e.v|=512;return}attachToAncestor(e,e.M);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.T._);var t=e.V;var i;if(n){{e.v|=256;if(e.A){e.A.map((function(e){var n=e[0],r=e[1];return safeCall(t,n,r)}));e.A=undefined}}{i=safeCall(t,"componentWillLoad")}}r();return enqueue(i,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,f,s;return __generator(this,(function(l){i=e.$hostElement$;a=createTime("update",e.T._);o=i["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.T._);{callRender(e,n,i,r)}if(o){o.map((function(e){return e()}));i["s-rc"]=undefined}u();a();{f=(t=i["s-p"])!==null&&t!==void 0?t:[];s=function(){return postUpdateComponent(e)};if(f.length===0){s()}else{Promise.all(f).then(s);e.v|=4;f.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{renderingRef=n;n=n.render();{e.v&=~16}{e.v|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}renderingRef=null;return null};var getRenderingRef=function(){return renderingRef};var postUpdateComponent=function(e){var n=e.T._;var r=e.$hostElement$;var t=createTime("postUpdate",n);var i=e.V;var a=e.M;{safeCall(i,"componentDidRender")}if(!(e.v&64)){e.v|=64;{addHydratedFlag(r)}{safeCall(i,"componentDidLoad")}t();{e.P(r);if(!a){appDidLoad()}}}else{t()}{e.H(r)}{if(e.R){e.R();e.R=undefined}if(e.v&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.v&=~(4|512)}};var forceUpdate=function(e){{var n=getHostRef(e);var r=n.$hostElement$.isConnected;if(r&&(n.v&(2|16))===2){scheduleUpdate(n,false)}return r}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.classList.add("hydrated")};var getValue=function(e,n){return getHostRef(e).N.get(n)};var setValue=function(e,n,r,t){var i=getHostRef(e);var a=i.$hostElement$;var o=i.N.get(n);var u=i.v;var f=i.V;r=parsePropertyValue(r,t.$[n][0]);var s=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!s;if((!(u&8)||o===undefined)&&l){i.N.set(n,r);if(f){if(t.k&&u&128){var c=t.k[n];if(c){c.map((function(e){try{f[e](r,o,n)}catch(e){consoleError(e,a)}}))}}if((u&(2|16))===2){scheduleUpdate(i,false)}}}};var proxyComponent=function(e,n,r){var t;var i=e.prototype;if(n.$){if(e.watchers){n.k=e.watchers}var a=Object.entries(n.$);a.map((function(e){var t=e[0],a=e[1][0];if(a&31||r&2&&a&32){Object.defineProperty(i,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}else if(r&1&&a&64){Object.defineProperty(i,t,{value:function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}var r;var i=getHostRef(this);return(r=i===null||i===void 0?void 0:i.L)===null||r===void 0?void 0:r.then((function(){var n;return(n=i.V)===null||n===void 0?void 0:n[t].apply(n,e)}))}})}}));if(r&1){var o=new Map;i.attributeChangedCallback=function(e,r,t){var a=this;plt.jmp((function(){var u;var f=o.get(e);if(a.hasOwnProperty(f)){t=a[f];delete a[f]}else if(i.hasOwnProperty(f)&&typeof a[f]==="number"&&a[f]==t){return}else if(f==null){var s=getHostRef(a);var l=s===null||s===void 0?void 0:s.v;if(l&&!(l&8)&&l&128&&t!==r){var c=s.V;var v=(u=n.k)===null||u===void 0?void 0:u[e];v===null||v===void 0?void 0:v.forEach((function(n){if(c[n]!=null){c[n].call(c,t,r,e)}}))}return}a[f]=t===null&&typeof a[f]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.k)!==null&&t!==void 0?t:{}),true),a.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var n=e[0],r=e[1];var t=r[1]||n;o.set(t,n);return t})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,a,o,u,f,s;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.v&32)===0))return[3,3];n.v|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){{r.k=e.watchers}proxyComponent(e,r,2);e.isProxied=true}i=createTime("createInstance",r._);{n.v|=8}try{new e(n)}catch(e){consoleError(e)}{n.v&=~8}{n.v|=128}i();if(e.style){a=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r._);registerStyle(o,a,!!(r.v&1));u()}}l.label=3;case 3:f=n.M;s=function(){return scheduleUpdate(n,true)};if(f&&f["s-rc"]){f["s-rc"].push(s)}else{s()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.v&1)===0){var n=getHostRef(e);var r=n.T;var t=createTime("connectedCallback",r._);if(!(n.v&1)){n.v|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(n,n.M=i);break}}}if(r.$){Object.entries(r.$).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var i=e[r];delete e[r];e[r]=i}}))}{initializeComponent(e,n,r)}}else{addHostEventListeners(e,n,r.U);if(n===null||n===void 0?void 0:n.V);else if(n===null||n===void 0?void 0:n.O){n.O.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){{safeCall(e,"disconnectedCallback")}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.v&1)===0){n=getHostRef(e);{if(n.q){n.q.map((function(e){return e()}));n.q=undefined}}if(n===null||n===void 0?void 0:n.V){disconnectInstance(n.V)}else if(n===null||n===void 0?void 0:n.O){n.O.then((function(){return disconnectInstance(n.V)}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var i=[];var a=n.exclude||[];var o=win.customElements;var u=doc.head;var f=u.querySelector("meta[charset]");var s=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.t=new URL(n.resourcesUrl||"./",doc.baseURI).href;var d=false;e.map((function(e){e[1].map((function(n){var r;var t={v:n[0],_:n[1],$:n[2],U:n[3]};if(t.v&4){d=true}{t.$=n[2]}{t.U=n[3]}{t.k=(r=n[4])!==null&&r!==void 0?r:{}}var u=t._;var f=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.v&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).O};return n}(HTMLElement);t.I=e[0];if(!a.includes(u)&&!o.get(u)){i.push(u);o.define(u,proxyComponent(f,t,1))}}))}));if(d){s.innerHTML+=SLOT_FB_CSS}{s.innerHTML+=i+HYDRATED_CSS}if(s.innerHTML.length){s.setAttribute("data-styles","");var p=(r=plt.S)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(p!=null){s.setAttribute("nonce",p)}u.insertBefore(s,f?f.nextSibling:u.firstChild)}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var Fragment=function(e,n){return n};var addHostEventListeners=function(e,n,r,t){if(r){r.map((function(r){var t=r[0],i=r[1],a=r[2];var o=getHostListenerTarget(e,t);var u=hostListenerProxy(n,a);var f=hostListenerOpts(t);plt.ael(o,i,u,f);(n.q=n.q||[]).push((function(){return plt.rel(o,i,u,f)}))}))}};var hostListenerProxy=function(e,n){return function(r){try{{if(e.v&256){e.V[n](r)}else{(e.A=e.A||[]).push([n,r])}}}catch(e){consoleError(e)}}};var getHostListenerTarget=function(e,n){if(n&4)return doc;if(n&8)return win;if(n&16)return doc.body;return e};var hostListenerOpts=function(e){return(e&2)!==0};var setNonce=function(e){return plt.S=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.V=e,n)};var registerHost=function(e,n){var r={v:0,$hostElement$:e,T:n,N:new Map};{r.L=new Promise((function(e){return r.H=e}))}{r.O=new Promise((function(e){return r.P=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,r,n.U);return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e._.replace(/-/g,"_");var i=e.I;var a=cmpModules.get(i);if(a){return a[t]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(i,".entry.js").concat("")).then((function(e){{cmpModules.set(i,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={v:0,t:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.v&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Fragment as F,Host as H,getAssetPath as a,bootstrapLazy as b,createEvent as c,getElement as d,forceUpdate as f,getRenderingRef as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|