PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 3.0.0-beta2
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v3.0.0-beta2
4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.11.1 1.11.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.15.1 2.16.0 2.16.1 2.16.2 2.16.3 2.17.0 2.17.1 2.17.2 2.18.0 2.19.0 2.19.2 2.19.3 2.19.4 2.2.0 2.2.1 2.20.0 2.20.1 2.20.2 2.20.3 2.20.4 2.20.5 2.20.6 2.21.0 2.22.0 2.22.1 2.23.0 2.24.0 2.25.0 2.25.1 2.25.2 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.29.1 2.29.2 2.29.3 2.29.4 2.3.0 2.3.1 2.30.0 2.31.0 2.31.1 2.31.2 2.31.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.40.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.9.0 3.0.0 3.0.0-RC1 3.0.0-RC2 3.0.0-beta1 3.0.0-beta2 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.10.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.14.0 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 3.16.8 3.17.0 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.18.0 3.19.0 3.19.1 3.19.2 3.2.0 3.2.1 3.2.2 3.20.0 3.20.1 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 trunk 4.1.0 0.2.19.1 4.1.1 1.0.0 4.2.0 1.0.1 1.0.2
surecart / dist / components / cjs / sc-address_3.cjs.entry.js
surecart / dist / components / cjs Last commit date
MockProcessor-48b83649.js 1 year ago MockProcessor-48b83649.js.map 1 year ago add-query-args-49dcb630.js 1 year ago add-query-args-49dcb630.js.map 1 year ago address-4c70d641.js 1 year ago address-4c70d641.js.map 1 year ago animation-registry-f7f1a08b.js 1 year ago animation-registry-f7f1a08b.js.map 1 year ago app-globals-9f96f14c.js 1 year ago app-globals-9f96f14c.js.map 1 year ago consumer-9f4ee0e3.js 1 year ago consumer-9f4ee0e3.js.map 1 year ago countries-367b507a.js 1 year ago countries-367b507a.js.map 1 year ago currency-71fce0f0.js 1 year ago currency-71fce0f0.js.map 1 year ago error-b46e23c3.js 1 year ago error-b46e23c3.js.map 1 year ago fetch-6192c074.js 1 year ago fetch-6192c074.js.map 1 year ago form-data-0da9940f.js 1 year ago form-data-0da9940f.js.map 1 year ago functions-b63256c8.js 1 year ago functions-b63256c8.js.map 1 year ago getters-305b8266.js 1 year ago getters-305b8266.js.map 1 year ago getters-36e9dc10.js 1 year ago getters-36e9dc10.js.map 1 year ago getters-3f9f8286.js 1 year ago getters-3f9f8286.js.map 1 year ago getters-810d572b.js 1 year ago getters-810d572b.js.map 1 year ago getters-f6bbfe30.js 1 year ago getters-f6bbfe30.js.map 1 year ago google-03835677.js 1 year ago google-03835677.js.map 1 year ago google-59d23803.js 1 year ago google-59d23803.js.map 1 year ago index-252211ea.js 1 year ago index-252211ea.js.map 1 year ago index-6c7d178b.js 1 year ago index-6c7d178b.js.map 1 year ago index-8acc3c89.js 1 year ago index-8acc3c89.js.map 1 year ago index-adacfa36.js 1 year ago index-adacfa36.js.map 1 year ago index-bcdafe6e.js 1 year ago index-bcdafe6e.js.map 1 year ago index-fb76df07.js 2 years ago index-fb76df07.js.map 2 years ago index.cjs.js 1 year ago index.cjs.js.map 2 years ago inline-aa15f113.js 1 year ago inline-aa15f113.js.map 1 year ago lazy-2b509fa7.js 1 year ago lazy-2b509fa7.js.map 1 year ago library-b4e9d7e3.js 1 year ago library-b4e9d7e3.js.map 1 year ago loader.cjs.js 1 year ago loader.cjs.js.map 1 year ago media-43b85f3d.js 1 year ago media-43b85f3d.js.map 1 year ago mutations-11c8f9a8.js 1 year ago mutations-11c8f9a8.js.map 1 year ago mutations-14b05e96.js 1 year ago mutations-14b05e96.js.map 1 year ago mutations-35e01219.js 1 year ago mutations-35e01219.js.map 1 year ago mutations-76f337c0.js 1 year ago mutations-76f337c0.js.map 1 year ago mutations-a920eef8.js 1 year ago mutations-a920eef8.js.map 1 year ago page-align-5a2ab493.js 1 year ago page-align-5a2ab493.js.map 1 year ago price-653ec1cb.js 1 year ago price-653ec1cb.js.map 1 year ago pure-bd6f0a6e.js 1 year ago pure-bd6f0a6e.js.map 1 year ago quantity-bff7f892.js 1 year ago quantity-bff7f892.js.map 1 year ago remove-query-args-b57e8cd3.js 1 year ago remove-query-args-b57e8cd3.js.map 1 year ago sc-address_3.cjs.entry.js 1 year ago sc-address_3.cjs.entry.js.map 1 year ago sc-alert_13.cjs.entry.js 1 year ago sc-alert_13.cjs.entry.js.map 1 year ago sc-avatar.cjs.entry.js 1 year ago sc-avatar.cjs.entry.js.map 1 year ago sc-badge-notice.cjs.entry.js 1 year ago sc-badge-notice.cjs.entry.js.map 1 year ago sc-breadcrumb.cjs.entry.js 1 year ago sc-breadcrumb.cjs.entry.js.map 1 year ago sc-breadcrumbs.cjs.entry.js 1 year ago sc-breadcrumbs.cjs.entry.js.map 1 year ago sc-button-group.cjs.entry.js 1 year ago sc-button-group.cjs.entry.js.map 1 year ago sc-cancel-dialog_2.cjs.entry.js 1 year ago sc-cancel-dialog_2.cjs.entry.js.map 1 year ago sc-cancel-discount_4.cjs.entry.js 1 year ago sc-cancel-discount_4.cjs.entry.js.map 1 year ago sc-card.cjs.entry.js 1 year ago sc-card.cjs.entry.js.map 1 year ago sc-cart-button.cjs.entry.js 1 year ago sc-cart-button.cjs.entry.js.map 1 year ago sc-cart-form-submit.cjs.entry.js 1 year ago sc-cart-form-submit.cjs.entry.js.map 1 year ago sc-cart-form.cjs.entry.js 1 year ago sc-cart-form.cjs.entry.js.map 1 year ago sc-cart-header.cjs.entry.js 1 year ago sc-cart-header.cjs.entry.js.map 1 year ago sc-cart-icon.cjs.entry.js 1 year ago sc-cart-icon.cjs.entry.js.map 1 year ago sc-cart-loader.cjs.entry.js 1 year ago sc-cart-loader.cjs.entry.js.map 1 year ago sc-cart-session-provider_3.cjs.entry.js 1 year ago sc-cart-session-provider_3.cjs.entry.js.map 1 year ago sc-cart-submit.cjs.entry.js 1 year ago sc-cart-submit.cjs.entry.js.map 1 year ago sc-cart.cjs.entry.js 1 year ago sc-cart.cjs.entry.js.map 1 year ago sc-cc-logo_2.cjs.entry.js 1 year ago sc-cc-logo_2.cjs.entry.js.map 1 year ago sc-charges-list.cjs.entry.js 1 year ago sc-charges-list.cjs.entry.js.map 1 year ago sc-checkout-form-errors.cjs.entry.js 1 year ago sc-checkout-form-errors.cjs.entry.js.map 1 year ago sc-checkout-mollie-payment_2.cjs.entry.js 1 year ago sc-checkout-mollie-payment_2.cjs.entry.js.map 1 year ago sc-checkout-product-price-variant-selector.cjs.entry.js 1 year ago sc-checkout-product-price-variant-selector.cjs.entry.js.map 1 year ago sc-checkout-stock-alert_8.cjs.entry.js 1 year ago sc-checkout-stock-alert_8.cjs.entry.js.map 1 year ago sc-checkout.cjs.entry.js 1 year ago sc-checkout.cjs.entry.js.map 1 year ago sc-choice-container.cjs.entry.js 1 year ago sc-choice-container.cjs.entry.js.map 1 year ago sc-choice.cjs.entry.js 1 year ago sc-choice.cjs.entry.js.map 1 year ago sc-choices.cjs.entry.js 1 year ago sc-choices.cjs.entry.js.map 1 year ago sc-column_2.cjs.entry.js 1 year ago sc-column_2.cjs.entry.js.map 1 year ago sc-compact-address_11.cjs.entry.js 1 year ago sc-compact-address_11.cjs.entry.js.map 1 year ago sc-conditional-form.cjs.entry.js 1 year ago sc-conditional-form.cjs.entry.js.map 1 year ago sc-consumer.cjs.entry.js 1 year ago sc-consumer.cjs.entry.js.map 1 year ago sc-coupon-form.cjs.entry.js 1 year ago sc-coupon-form.cjs.entry.js.map 1 year ago sc-custom-order-price-input.cjs.entry.js 1 year ago sc-custom-order-price-input.cjs.entry.js.map 1 year ago sc-customer-details.cjs.entry.js 1 year ago sc-customer-details.cjs.entry.js.map 1 year ago sc-customer-edit.cjs.entry.js 1 year ago sc-customer-edit.cjs.entry.js.map 1 year ago sc-customer-email.cjs.entry.js 1 year ago sc-customer-email.cjs.entry.js.map 1 year ago sc-customer-firstname.cjs.entry.js 1 year ago sc-customer-firstname.cjs.entry.js.map 1 year ago sc-customer-lastname.cjs.entry.js 1 year ago sc-customer-lastname.cjs.entry.js.map 1 year ago sc-customer-name.cjs.entry.js 1 year ago sc-customer-name.cjs.entry.js.map 1 year ago sc-customer-phone.cjs.entry.js 1 year ago sc-customer-phone.cjs.entry.js.map 1 year ago sc-dashboard-customer-details.cjs.entry.js 1 year ago sc-dashboard-customer-details.cjs.entry.js.map 1 year ago sc-dashboard-downloads-list.cjs.entry.js 1 year ago sc-dashboard-downloads-list.cjs.entry.js.map 1 year ago sc-divider.cjs.entry.js 1 year ago sc-divider.cjs.entry.js.map 1 year ago sc-donation-choices.cjs.entry.js 1 year ago sc-donation-choices.cjs.entry.js.map 1 year ago sc-downloads-list.cjs.entry.js 1 year ago sc-downloads-list.cjs.entry.js.map 1 year ago sc-dropdown_3.cjs.entry.js 1 year ago sc-dropdown_3.cjs.entry.js.map 1 year ago sc-empty.cjs.entry.js 1 year ago sc-empty.cjs.entry.js.map 1 year ago sc-express-payment.cjs.entry.js 1 year ago sc-express-payment.cjs.entry.js.map 1 year ago sc-feature-demo-banner.cjs.entry.js 1 year ago sc-feature-demo-banner.cjs.entry.js.map 1 year ago sc-form-control_2.cjs.entry.js 1 year ago sc-form-control_2.cjs.entry.js.map 1 year ago sc-form-row.cjs.entry.js 1 year ago sc-form-row.cjs.entry.js.map 1 year ago sc-form.cjs.entry.js 1 year ago sc-form.cjs.entry.js.map 1 year ago sc-format-bytes.cjs.entry.js 1 year ago sc-format-bytes.cjs.entry.js.map 1 year ago sc-format-interval.cjs.entry.js 1 year ago sc-format-interval.cjs.entry.js.map 1 year ago sc-fulfillment-shipping-status-badge.cjs.entry.js 1 year ago sc-fulfillment-shipping-status-badge.cjs.entry.js.map 1 year ago sc-fulfillments.cjs.entry.js 1 year ago sc-fulfillments.cjs.entry.js.map 1 year ago sc-heading_2.cjs.entry.js 1 year ago sc-heading_2.cjs.entry.js.map 1 year ago sc-image-slider.cjs.entry.js 1 year ago sc-image-slider.cjs.entry.js.map 1 year ago sc-invoices-list.cjs.entry.js 1 year ago sc-invoices-list.cjs.entry.js.map 1 year ago sc-license.cjs.entry.js 1 year ago sc-license.cjs.entry.js.map 1 year ago sc-licenses-list.cjs.entry.js 1 year ago sc-licenses-list.cjs.entry.js.map 1 year ago sc-line-item-bump.cjs.entry.js 1 year ago sc-line-item-bump.cjs.entry.js.map 1 year ago sc-line-item-total.cjs.entry.js 1 year ago sc-line-item-total.cjs.entry.js.map 1 year ago sc-line-item.cjs.entry.js 1 year ago sc-line-item.cjs.entry.js.map 1 year ago sc-line-items-provider.cjs.entry.js 1 year ago sc-line-items-provider.cjs.entry.js.map 1 year ago sc-line-items.cjs.entry.js 1 year ago sc-line-items.cjs.entry.js.map 1 year ago sc-login-form.cjs.entry.js 1 year ago sc-login-form.cjs.entry.js.map 1 year ago sc-manual-payment-method_3.cjs.entry.js 1 year ago sc-manual-payment-method_3.cjs.entry.js.map 1 year ago sc-menu-divider.cjs.entry.js 1 year ago sc-menu-divider.cjs.entry.js.map 1 year ago sc-menu-label_2.cjs.entry.js 1 year ago sc-menu-label_2.cjs.entry.js.map 1 year ago sc-mollie-add-method.cjs.entry.js 1 year ago sc-mollie-add-method.cjs.entry.js.map 1 year ago sc-order-confirmation-customer.cjs.entry.js 1 year ago sc-order-confirmation-customer.cjs.entry.js.map 1 year ago sc-order-confirmation-details.cjs.entry.js 1 year ago sc-order-confirmation-details.cjs.entry.js.map 1 year ago sc-order-confirmation-line-items_2.cjs.entry.js 1 year ago sc-order-confirmation-line-items_2.cjs.entry.js.map 1 year ago sc-order-confirmation.cjs.entry.js 1 year ago sc-order-confirmation.cjs.entry.js.map 1 year ago sc-order-coupon-form.cjs.entry.js 1 year ago sc-order-coupon-form.cjs.entry.js.map 1 year ago sc-order-detail.cjs.entry.js 1 year ago sc-order-detail.cjs.entry.js.map 1 year ago sc-order-fulfillment-badge.cjs.entry.js 1 year ago sc-order-fulfillment-badge.cjs.entry.js.map 1 year ago sc-order-manual-instructions.cjs.entry.js 1 year ago sc-order-manual-instructions.cjs.entry.js.map 1 year ago sc-order-password.cjs.entry.js 1 year ago sc-order-password.cjs.entry.js.map 1 year ago sc-order-return-badge.cjs.entry.js 1 year ago sc-order-return-badge.cjs.entry.js.map 1 year ago sc-order-shipment-badge.cjs.entry.js 1 year ago sc-order-shipment-badge.cjs.entry.js.map 1 year ago sc-order-status-badge.cjs.entry.js 1 year ago sc-order-status-badge.cjs.entry.js.map 1 year ago sc-order-submit.cjs.entry.js 1 year ago sc-order-submit.cjs.entry.js.map 1 year ago sc-order-summary.cjs.entry.js 1 year ago sc-order-summary.cjs.entry.js.map 1 year ago sc-order.cjs.entry.js 1 year ago sc-order.cjs.entry.js.map 1 year ago sc-orders-list.cjs.entry.js 1 year ago sc-orders-list.cjs.entry.js.map 1 year ago sc-pagination.cjs.entry.js 1 year ago sc-pagination.cjs.entry.js.map 1 year ago sc-password-nag.cjs.entry.js 1 year ago sc-password-nag.cjs.entry.js.map 1 year ago sc-password.cjs.entry.js 1 year ago sc-password.cjs.entry.js.map 1 year ago sc-payment-method-choice_2.cjs.entry.js 1 year ago sc-payment-method-choice_2.cjs.entry.js.map 1 year ago sc-payment-method-details.cjs.entry.js 1 year ago sc-payment-method-details.cjs.entry.js.map 1 year ago sc-payment-methods-list.cjs.entry.js 1 year ago sc-payment-methods-list.cjs.entry.js.map 1 year ago sc-payment.cjs.entry.js 1 year ago sc-payment.cjs.entry.js.map 1 year ago sc-paypal-add-method.cjs.entry.js 1 year ago sc-paypal-add-method.cjs.entry.js.map 1 year ago sc-paypal-buttons_2.cjs.entry.js 1 year ago sc-paypal-buttons_2.cjs.entry.js.map 1 year ago sc-paystack-add-method.cjs.entry.js 1 year ago sc-paystack-add-method.cjs.entry.js.map 1 year ago sc-phone-input.cjs.entry.js 1 year ago sc-phone-input.cjs.entry.js.map 1 year ago sc-pill-option.cjs.entry.js 1 year ago sc-pill-option.cjs.entry.js.map 1 year ago sc-premium-tag.cjs.entry.js 1 year ago sc-premium-tag.cjs.entry.js.map 1 year ago sc-price-choice-container.cjs.entry.js 1 year ago sc-price-choice-container.cjs.entry.js.map 1 year ago sc-price-choice.cjs.entry.js 1 year ago sc-price-choice.cjs.entry.js.map 1 year ago sc-price-choices.cjs.entry.js 1 year ago sc-price-choices.cjs.entry.js.map 1 year ago sc-price-input.cjs.entry.js 1 year ago sc-price-input.cjs.entry.js.map 1 year ago sc-price-range.cjs.entry.js 1 year ago sc-price-range.cjs.entry.js.map 1 year ago sc-price.cjs.entry.js 1 year ago sc-price.cjs.entry.js.map 1 year ago sc-product-buy-button.cjs.entry.js 1 year ago sc-product-buy-button.cjs.entry.js.map 1 year ago sc-product-donation-amount-choice.cjs.entry.js 1 year ago sc-product-donation-amount-choice.cjs.entry.js.map 1 year ago sc-product-donation-choices.cjs.entry.js 1 year ago sc-product-donation-choices.cjs.entry.js.map 1 year ago sc-product-donation-custom-amount.cjs.entry.js 1 year ago sc-product-donation-custom-amount.cjs.entry.js.map 1 year ago sc-product-item-image_3.cjs.entry.js 1 year ago sc-product-item-image_3.cjs.entry.js.map 1 year ago sc-product-item-list.cjs.entry.js 1 year ago sc-product-item-list.cjs.entry.js.map 1 year ago sc-product-item.cjs.entry.js 1 year ago sc-product-item.cjs.entry.js.map 1 year ago sc-product-line-item_2.cjs.entry.js 1 year ago sc-product-line-item_2.cjs.entry.js.map 1 year ago sc-product-pills-variant-option.cjs.entry.js 1 year ago sc-product-pills-variant-option.cjs.entry.js.map 1 year ago sc-product-price-choices.cjs.entry.js 1 year ago sc-product-price-choices.cjs.entry.js.map 1 year ago sc-product-price-modal.cjs.entry.js 1 year ago sc-product-price-modal.cjs.entry.js.map 1 year ago sc-product-price.cjs.entry.js 1 year ago sc-product-price.cjs.entry.js.map 1 year ago sc-product-quantity.cjs.entry.js 1 year ago sc-product-quantity.cjs.entry.js.map 1 year ago sc-product-selected-price.cjs.entry.js 1 year ago sc-product-selected-price.cjs.entry.js.map 1 year ago sc-product-text.cjs.entry.js 1 year ago sc-product-text.cjs.entry.js.map 1 year ago sc-provider.cjs.entry.js 1 year ago sc-provider.cjs.entry.js.map 1 year ago sc-provisional-banner.cjs.entry.js 1 year ago sc-provisional-banner.cjs.entry.js.map 1 year ago sc-purchase-downloads-list.cjs.entry.js 1 year ago sc-purchase-downloads-list.cjs.entry.js.map 1 year ago sc-recurring-price-choice-container.cjs.entry.js 1 year ago sc-recurring-price-choice-container.cjs.entry.js.map 1 year ago sc-rich-text.cjs.entry.js 1 year ago sc-rich-text.cjs.entry.js.map 1 year ago sc-spacing.cjs.entry.js 1 year ago sc-spacing.cjs.entry.js.map 1 year ago sc-stacked-list_2.cjs.entry.js 1 year ago sc-stacked-list_2.cjs.entry.js.map 1 year ago sc-stripe-add-method.cjs.entry.js 1 year ago sc-stripe-add-method.cjs.entry.js.map 1 year ago sc-stripe-element.cjs.entry.js 1 year ago sc-stripe-element.cjs.entry.js.map 1 year ago sc-stripe-payment-element.cjs.entry.js 1 year ago sc-stripe-payment-element.cjs.entry.js.map 1 year ago sc-stripe-payment-request.cjs.entry.js 1 year ago sc-stripe-payment-request.cjs.entry.js.map 1 year ago sc-subscription-ad-hoc-confirm.cjs.entry.js 1 year ago sc-subscription-ad-hoc-confirm.cjs.entry.js.map 1 year ago sc-subscription-details_2.cjs.entry.js 1 year ago sc-subscription-details_2.cjs.entry.js.map 1 year ago sc-subscription-payment-method.cjs.entry.js 1 year ago sc-subscription-payment-method.cjs.entry.js.map 1 year ago sc-subscription-payment.cjs.entry.js 1 year ago sc-subscription-payment.cjs.entry.js.map 1 year ago sc-subscription-switch.cjs.entry.js 1 year ago sc-subscription-switch.cjs.entry.js.map 1 year ago sc-subscription-variation-confirm.cjs.entry.js 1 year ago sc-subscription-variation-confirm.cjs.entry.js.map 1 year ago sc-subscription.cjs.entry.js 1 year ago sc-subscription.cjs.entry.js.map 1 year ago sc-subscriptions-list.cjs.entry.js 1 year ago sc-subscriptions-list.cjs.entry.js.map 1 year ago sc-summary.cjs.entry.js 1 year ago sc-summary.cjs.entry.js.map 1 year ago sc-switch.cjs.entry.js 1 year ago sc-switch.cjs.entry.js.map 1 year ago sc-tab-group.cjs.entry.js 1 year ago sc-tab-group.cjs.entry.js.map 1 year ago sc-tab-panel.cjs.entry.js 1 year ago sc-tab-panel.cjs.entry.js.map 1 year ago sc-tab.cjs.entry.js 1 year ago sc-tab.cjs.entry.js.map 1 year ago sc-table-head.cjs.entry.js 1 year ago sc-table-head.cjs.entry.js.map 1 year ago sc-table_3.cjs.entry.js 1 year ago sc-table_3.cjs.entry.js.map 1 year ago sc-tag.cjs.entry.js 1 year ago sc-tag.cjs.entry.js.map 1 year ago sc-toggle.cjs.entry.js 1 year ago sc-toggle.cjs.entry.js.map 1 year ago sc-toggles.cjs.entry.js 1 year ago sc-toggles.cjs.entry.js.map 1 year ago sc-total.cjs.entry.js 1 year ago sc-total.cjs.entry.js.map 1 year ago sc-upcoming-invoice.cjs.entry.js 1 year ago sc-upcoming-invoice.cjs.entry.js.map 1 year ago sc-upgrade-required.cjs.entry.js 1 year ago sc-upgrade-required.cjs.entry.js.map 1 year ago sc-upsell-countdown-timer.cjs.entry.js 1 year ago sc-upsell-countdown-timer.cjs.entry.js.map 1 year ago sc-upsell-no-thanks-button.cjs.entry.js 1 year ago sc-upsell-no-thanks-button.cjs.entry.js.map 1 year ago sc-upsell-submit-button.cjs.entry.js 1 year ago sc-upsell-submit-button.cjs.entry.js.map 1 year ago sc-upsell-totals.cjs.entry.js 1 year ago sc-upsell-totals.cjs.entry.js.map 1 year ago sc-upsell.cjs.entry.js 1 year ago sc-upsell.cjs.entry.js.map 1 year ago sc-visually-hidden.cjs.entry.js 1 year ago sc-visually-hidden.cjs.entry.js.map 1 year ago sc-wordpress-password-edit.cjs.entry.js 1 year ago sc-wordpress-password-edit.cjs.entry.js.map 1 year ago sc-wordpress-user-edit.cjs.entry.js 1 year ago sc-wordpress-user-edit.cjs.entry.js.map 1 year ago sc-wordpress-user.cjs.entry.js 1 year ago sc-wordpress-user.cjs.entry.js.map 1 year ago store-34d62f12.js 1 year ago store-34d62f12.js.map 1 year ago store-7e035943.js 1 year ago store-7e035943.js.map 1 year ago store-d24717c6.js 1 year ago store-d24717c6.js.map 1 year ago surecart.cjs.js 1 year ago surecart.cjs.js.map 1 year ago tax-736ff458.js 1 year ago tax-736ff458.js.map 1 year ago universe-0cf1168a.js 1 year ago universe-0cf1168a.js.map 1 year ago util-b877b2bd.js 1 year ago util-b877b2bd.js.map 1 year ago utils-ee1bb9d3.js 1 year ago utils-ee1bb9d3.js.map 1 year ago watchers-2ad3abd1.js 1 year ago watchers-2ad3abd1.js.map 1 year ago watchers-758e6979.js 1 year ago watchers-758e6979.js.map 1 year ago watchers-cb566474.js 1 year ago watchers-cb566474.js.map 1 year ago watchers-dc559477.js 1 year ago watchers-dc559477.js.map 1 year ago watchers-fb1bab08.js 1 year ago watchers-fb1bab08.js.map 1 year ago
sc-address_3.cjs.entry.js
351 lines
1 'use strict';
2
3 Object.defineProperty(exports, '__esModule', { value: true });
4
5 const index = require('./index-8acc3c89.js');
6 const address = require('./address-4c70d641.js');
7 const formData = require('./form-data-0da9940f.js');
8 const pageAlign = require('./page-align-5a2ab493.js');
9 const index$1 = require('./index-fb76df07.js');
10 const tax = require('./tax-736ff458.js');
11
12 const scAddressCss = ":host{display:block}.sc-address{display:block;position:relative}.sc-address [hidden]{display:none}.sc-address--loading{min-height:230px}.sc-address sc-skeleton{display:block;margin-bottom:1em}.sc-address__control{display:block}.sc-address__control>*{margin-bottom:var(--sc-address-column-spacing, -1px)}.sc-address__columns{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;justify-content:space-between}.sc-address__columns>*{flex:1;width:50%;margin-right:var(--sc-address-column-spacing, -1px)}.sc-address__columns>*:last-child{margin-right:0}";
13 const ScAddressStyle0 = scAddressCss;
14
15 const ScAddress = class {
16 constructor(hostRef) {
17 index.registerInstance(this, hostRef);
18 this.scChangeAddress = index.createEvent(this, "scChangeAddress", 7);
19 this.scInputAddress = index.createEvent(this, "scInputAddress", 7);
20 this.address = {
21 country: null,
22 city: null,
23 line_1: null,
24 line_2: null,
25 postal_code: null,
26 state: null,
27 };
28 this.names = {
29 name: 'shipping_name',
30 country: 'shipping_country',
31 city: 'shipping_city',
32 line_1: 'shipping_line_1',
33 line_2: 'shipping_line_2',
34 postal_code: 'shipping_postal_code',
35 state: 'shipping_state',
36 };
37 this.placeholders = {};
38 this.loading = false;
39 this.disabled = undefined;
40 this.label = undefined;
41 this.showName = undefined;
42 this.showLine2 = undefined;
43 this.required = false;
44 this.requireName = false;
45 this.showCity = true;
46 this.showPostal = true;
47 this.regions = undefined;
48 this.countryChoices = address.countryChoices;
49 }
50 /** When the state changes, we want to update city and postal fields. */
51 handleAddressChange() {
52 if (!this.address.country)
53 return;
54 this.setRegions();
55 this.showPostal = address.hasPostal(this.address.country);
56 this.showCity = address.hasCity(this.address.country);
57 this.scChangeAddress.emit(this.address);
58 this.scInputAddress.emit(this.address);
59 }
60 handleNameChange() {
61 if (this.requireName) {
62 this.showName = true;
63 }
64 }
65 decodeHtmlEntities(html) {
66 var _a;
67 return ((_a = new DOMParser().parseFromString(html, 'text/html')) === null || _a === void 0 ? void 0 : _a.body.textContent) || html;
68 }
69 updateAddress(address) {
70 this.address = { ...this.address, ...address };
71 }
72 handleAddressInput(address) {
73 this.scInputAddress.emit({ ...this.address, ...address });
74 }
75 clearAddress() {
76 var _a;
77 this.address = {
78 name: (_a = this.address) === null || _a === void 0 ? void 0 : _a.name,
79 country: null,
80 city: null,
81 line_1: null,
82 line_2: null,
83 postal_code: null,
84 state: null,
85 };
86 }
87 /** Set the regions based on the country. */
88 setRegions() {
89 if (address.hasState(this.address.country)) {
90 Promise.resolve().then(function () { return require('./countries-367b507a.js'); }).then(module => {
91 const countryRegions = module === null || module === void 0 ? void 0 : module[this.address.country];
92 this.regions = (countryRegions || []).map(region => ({
93 ...region,
94 label: this.decodeHtmlEntities(region.label),
95 }));
96 });
97 }
98 else {
99 this.regions = [];
100 }
101 }
102 componentWillLoad() {
103 var _a;
104 this.handleAddressChange();
105 const country = ((_a = this.countryChoices.find(country => country.value === this.address.country)) === null || _a === void 0 ? void 0 : _a.value) || null;
106 this.updateAddress({ country });
107 this.handleNameChange();
108 }
109 async reportValidity() {
110 return formData.reportChildrenValidity(this.el);
111 }
112 render() {
113 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
114 return (index.h("div", { key: 'eea78eb33593e7fc56fa9296189df8ed0f1cadfb', class: "sc-address", part: "base" }, index.h("sc-form-control", { key: '61b64422c11fa77c544c40c7c71790067b10abf0', label: this.label, exportparts: "label, help-text, form-control", class: "sc-address__control", required: this.required }, this.showName && (index.h("sc-input", { key: '763d340462f6dbcc8574d1a3c7be3eb3628aaace', exportparts: "base:input__base, input, form-control, label, help-text", value: (_a = this === null || this === void 0 ? void 0 : this.address) === null || _a === void 0 ? void 0 : _a.name, onScChange: (e) => this.updateAddress({ name: e.target.value || null }), onScInput: (e) => this.handleAddressInput({ name: e.target.value || null }), autocomplete: "street-address", placeholder: this.placeholders.name || wp.i18n.__('Name or Company Name', 'surecart'), name: (_b = this.names) === null || _b === void 0 ? void 0 : _b.name, "squared-bottom": true, disabled: this.disabled, required: this.requireName, "aria-label": this.placeholders.name || wp.i18n.__('Name or Company Name', 'surecart') })), index.h("sc-select", { key: '08a06f257e72467601dd3312eace2d02ec5e8f8b', exportparts: "base:select__base, input, form-control, label, help-text, trigger, panel, caret, search__base, search__input, search__form-control, menu__base, spinner__base, empty", part: "name__input", value: (_c = this.address) === null || _c === void 0 ? void 0 : _c.country, onScChange: (e) => {
115 this.clearAddress();
116 this.updateAddress({ country: e.target.value });
117 }, choices: this.countryChoices, autocomplete: 'country-name', placeholder: this.placeholders.country || wp.i18n.__('Country', 'surecart'), name: (_d = this.names) === null || _d === void 0 ? void 0 : _d.country, search: true, unselect: false, "squared-bottom": true, squared: this.showName, disabled: this.disabled, required: this.required, "aria-label": this.placeholders.country || wp.i18n.__('Country', 'surecart') }), index.h("sc-input", { key: 'a611c453d0cca584b6cd17eae2b8d582ff3414aa', exportparts: "base:input__base, input, form-control, label, help-text", value: (_e = this === null || this === void 0 ? void 0 : this.address) === null || _e === void 0 ? void 0 : _e.line_1, onScChange: (e) => this.updateAddress({ line_1: e.target.value || null }), onScInput: (e) => this.handleAddressInput({ line_1: e.target.value || null }), autocomplete: "street-address", placeholder: this.placeholders.line_1 || wp.i18n.__('Address', 'surecart'), name: (_f = this.names) === null || _f === void 0 ? void 0 : _f.line_1, squared: true, disabled: this.disabled, required: this.required, "aria-label": this.placeholders.line_1 || wp.i18n.__('Address', 'surecart') }), this.showLine2 && (index.h("sc-input", { key: '7e85d8f6af58b77a426735e966206511b9142a81', exportparts: "base:input__base, input, form-control, label, help-text", value: (_g = this === null || this === void 0 ? void 0 : this.address) === null || _g === void 0 ? void 0 : _g.line_2, onScChange: (e) => this.updateAddress({ line_2: e.target.value || null }), onScInput: (e) => this.handleAddressInput({ line_2: e.target.value || null }), autocomplete: "street-address", placeholder: this.placeholders.line_2 || wp.i18n.__('Address Line 2', 'surecart'), name: (_h = this.names) === null || _h === void 0 ? void 0 : _h.line_2, squared: true, disabled: this.disabled, "aria-label": this.placeholders.line_2 || wp.i18n.__('Address Line 2', 'surecart') })), index.h("div", { key: 'a7dafa92b4edbd25d78c8d0e7ced690014f740cd', class: "sc-address__columns", part: "columns" }, this.showCity && (index.h("sc-input", { key: 'ba5b4ccbb2ead7beaf98fc147a06e8f7d4628fe4', exportparts: "base:input__base, input, form-control, label, help-text", placeholder: this.placeholders.city || wp.i18n.__('City', 'surecart'), name: (_j = this.names) === null || _j === void 0 ? void 0 : _j.city, value: (_k = this === null || this === void 0 ? void 0 : this.address) === null || _k === void 0 ? void 0 : _k.city, onScChange: (e) => this.updateAddress({ city: e.target.value || null }), onScInput: (e) => this.handleAddressInput({ city: e.target.value || null }), required: this.required, squared: !!((_l = this === null || this === void 0 ? void 0 : this.regions) === null || _l === void 0 ? void 0 : _l.length), "squared-top": true, disabled: this.disabled, "squared-right": this.showPostal, "aria-label": this.placeholders.city || wp.i18n.__('City', 'surecart') })), this.showPostal && (index.h("sc-input", { key: '2299f3bbc6a6da81eda8f94ea4d0d32f4147853d', exportparts: "base:input__base, input, form-control, label, help-text", placeholder: this.placeholders.postal_code || wp.i18n.__('Postal Code/Zip', 'surecart'), name: (_m = this.names) === null || _m === void 0 ? void 0 : _m.postal_code, onScChange: (e) => this.updateAddress({ postal_code: e.target.value || null }), onScInput: (e) => this.handleAddressInput({ postal_code: e.target.value || null }), autocomplete: 'postal-code', required: this.required, value: (_o = this === null || this === void 0 ? void 0 : this.address) === null || _o === void 0 ? void 0 : _o.postal_code, squared: !!((_p = this === null || this === void 0 ? void 0 : this.regions) === null || _p === void 0 ? void 0 : _p.length), "squared-top": true, disabled: this.disabled, maxlength: ((_q = this.address) === null || _q === void 0 ? void 0 : _q.country) === 'US' ? 5 : null, "squared-left": this.showCity, "aria-label": this.placeholders.postal_code || wp.i18n.__('Postal Code/Zip', 'surecart') }))), !!((_r = this === null || this === void 0 ? void 0 : this.regions) === null || _r === void 0 ? void 0 : _r.length) && !!((_s = this === null || this === void 0 ? void 0 : this.address) === null || _s === void 0 ? void 0 : _s.country) && (index.h("sc-select", { key: '4bf316bca0b18123c9e41328b3786272ea40fe3b', exportparts: "base:select__base, input, form-control, label, help-text, trigger, panel, caret, search__base, search__input, search__form-control, menu__base, spinner__base, empty", placeholder: this.placeholders.state || wp.i18n.__('State/Province/Region', 'surecart'), name: (_t = this.names) === null || _t === void 0 ? void 0 : _t.state, autocomplete: 'address-level1', value: (_u = this === null || this === void 0 ? void 0 : this.address) === null || _u === void 0 ? void 0 : _u.state, onScChange: (e) => { var _a; return this.updateAddress({ state: e.target.value || ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.value) || null }); }, choices: this.regions, required: this.required, disabled: this.disabled, search: true, "squared-top": true, "aria-label": this.placeholders.state || wp.i18n.__('State/Province/Region', 'surecart') }))), this.loading && index.h("sc-block-ui", { key: 'ca95908bfb55132a31fdb98148e5c5cd131bc0af', exportparts: "base:block-ui, content:block-ui__content" })));
118 }
119 get el() { return index.getElement(this); }
120 static get watchers() { return {
121 "address": ["handleAddressChange"],
122 "requireName": ["handleNameChange"]
123 }; }
124 };
125 ScAddress.style = ScAddressStyle0;
126
127 const scCheckboxCss = ":host{display:block}.checkbox{display:flex;font-family:var(--sc-input-font-family);font-size:var(--sc-input-font-size-medium);font-weight:var(--sc-input-font-weight);color:var(--sc-input-color);vertical-align:middle;cursor:pointer}.checkbox__control{flex:0 0 auto;position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sc-checkbox-size);height:var(--sc-checkbox-size);border:solid var(--sc-input-border-width) var(--sc-input-border-color);border-radius:2px;background-color:var(--sc-input-background-color);color:var(--sc-color-white);transition:var(--sc-input-transition, var(--sc-transition-medium)) border-color, var(--sc-input-transition, var(--sc-transition-medium)) opacity, var(--sc-input-transition, var(--sc-transition-medium)) background-color, var(--sc-input-transition, var(--sc-transition-medium)) color, var(--sc-input-transition, var(--sc-transition-medium)) box-shadow}.checkbox__control input[type=checkbox]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.checkbox__control .checkbox__icon{display:inline-flex;width:var(--sc-checkbox-size);height:var(--sc-checkbox-size)}.checkbox__control .checkbox__icon svg{width:100%;height:100%}.checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover{border-color:var(--sc-input-border-color-hover);background-color:var(--sc-input-background-color-hover)}.checkbox.checkbox--focused:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control{border-color:var(--sc-input-border-color-focus);background-color:var(--sc-input-background-color-focus);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.checkbox--checked .checkbox__control,.checkbox--indeterminate .checkbox__control{border-color:var(--sc-color-primary-500);background-color:var(--sc-color-primary-500)}.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,.checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover{opacity:0.8}.checkbox.checkbox--checked:not(.checkbox--disabled).checkbox--focused .checkbox__control,.checkbox.checkbox--indeterminate:not(.checkbox--disabled).checkbox--focused .checkbox__control{border-color:var(--sc-color-white);background-color:var(--sc-color-primary-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.checkbox--disabled{opacity:0.5;cursor:not-allowed}.checkbox__label{line-height:var(--sc-checkbox-size);margin-top:var(--sc-input-border-width);margin-left:0.5em;flex:1}.checkbox--is-required .checkbox__label:after{content:\" *\";color:var(--sc-color-danger-500)}::slotted(*){display:inline-block}.checkbox--is-rtl .checkbox__label{margin-left:0;margin-right:0.5em}";
128 const ScCheckboxStyle0 = scCheckboxCss;
129
130 let id = 0;
131 const ScCheckbox = class {
132 constructor(hostRef) {
133 index.registerInstance(this, hostRef);
134 this.scBlur = index.createEvent(this, "scBlur", 7);
135 this.scChange = index.createEvent(this, "scChange", 7);
136 this.scFocus = index.createEvent(this, "scFocus", 7);
137 this.inputId = `checkbox-${++id}`;
138 this.labelId = `checkbox-label-${id}`;
139 this.hasFocus = false;
140 this.name = undefined;
141 this.value = undefined;
142 this.disabled = false;
143 this.edit = false;
144 this.required = false;
145 this.checked = false;
146 this.indeterminate = false;
147 this.invalid = false;
148 }
149 firstUpdated() {
150 this.input.indeterminate = this.indeterminate;
151 }
152 /** Simulates a click on the checkbox. */
153 async triggerClick() {
154 return this.input.click();
155 }
156 /** Sets focus on the checkbox. */
157 async triggerFocus(options) {
158 return this.input.focus(options);
159 }
160 /** Removes focus from the checkbox. */
161 async triggerBlur() {
162 return this.input.blur();
163 }
164 /** Checks for validity and shows the browser's validation message if the control is invalid. */
165 async reportValidity() {
166 this.invalid = !this.input.checkValidity();
167 return this.input.reportValidity();
168 }
169 /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
170 setCustomValidity(message) {
171 this.input.setCustomValidity(message);
172 this.invalid = !this.input.checkValidity();
173 }
174 handleClick() {
175 this.checked = !this.checked;
176 this.indeterminate = false;
177 }
178 handleBlur() {
179 this.hasFocus = false;
180 this.scBlur.emit();
181 }
182 handleFocus() {
183 this.hasFocus = true;
184 this.scFocus.emit();
185 }
186 handleLabelMouseDown() {
187 // Prevent clicks on the label from briefly blurring the input
188 // event.preventDefault();
189 this.input.focus();
190 }
191 handleStateChange() {
192 this.input.checked = this.checked;
193 this.input.indeterminate = this.indeterminate;
194 this.scChange.emit();
195 }
196 componentDidLoad() {
197 this.formController = new formData.FormSubmitController(this.el, {
198 value: (control) => (control.checked ? control.value : undefined),
199 }).addFormData();
200 }
201 disconnectedCallback() {
202 var _a;
203 (_a = this.formController) === null || _a === void 0 ? void 0 : _a.removeFormData();
204 }
205 render() {
206 const Tag = this.edit ? 'div' : 'label';
207 return (index.h(Tag, { key: '7b92a916434d8644af219359244aa97643fd596d', part: "base", class: {
208 'checkbox': true,
209 'checkbox--is-required': this.required,
210 'checkbox--checked': this.checked,
211 'checkbox--disabled': this.disabled,
212 'checkbox--focused': this.hasFocus,
213 'checkbox--indeterminate': this.indeterminate,
214 'checkbox--is-rtl': pageAlign.isRtl()
215 }, htmlFor: this.inputId, onMouseDown: () => this.handleLabelMouseDown() }, index.h("span", { key: '83b81c62010ef9e24bfb44b2f68f05a004d1fc67', part: "control", class: "checkbox__control" }, this.checked ? (index.h("span", { part: "checked-icon", class: "checkbox__icon" }, index.h("svg", { viewBox: "0 0 16 16" }, index.h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round" }, index.h("g", { stroke: "currentColor", "stroke-width": "2" }, index.h("g", { transform: "translate(3.428571, 3.428571)" }, index.h("path", { d: "M0,5.71428571 L3.42857143,9.14285714" }), index.h("path", { d: "M9.14285714,0 L3.42857143,9.14285714" }))))))) : (''), !this.checked && this.indeterminate ? (index.h("span", { part: "indeterminate-icon", class: "checkbox__icon" }, index.h("svg", { viewBox: "0 0 16 16" }, index.h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round" }, index.h("g", { stroke: "currentColor", "stroke-width": "2" }, index.h("g", { transform: "translate(2.285714, 6.857143)" }, index.h("path", { d: "M10.2857143,1.14285714 L1.14285714,1.14285714" }))))))) : (''), index.h("input", { key: '4c54c89d5a0583428a22d8eba867db19829495dd', id: this.inputId, ref: el => (this.input = el), type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "checkbox", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: () => this.handleClick(), onBlur: () => this.handleBlur(), onFocus: () => this.handleFocus() })), index.h("span", { key: 'd246b14c97a06fc53697272811a49b98c3098c41', part: "label", id: this.labelId, class: "checkbox__label" }, index.h("slot", { key: 'b9704cf940866c2b1aecf7d9e4a22cdd7ac84240' }))));
216 }
217 get el() { return index.getElement(this); }
218 static get watchers() { return {
219 "checked": ["handleStateChange"],
220 "indeterminate": ["handleStateChange"]
221 }; }
222 };
223 ScCheckbox.style = ScCheckboxStyle0;
224
225 const scTaxIdInputCss = ":host{display:block;z-index:3;position:relative}";
226 const ScTaxIdInputStyle0 = scTaxIdInputCss;
227
228 const ScTaxIdInput = class {
229 constructor(hostRef) {
230 index.registerInstance(this, hostRef);
231 this.scChange = index.createEvent(this, "scChange", 7);
232 this.scInput = index.createEvent(this, "scInput", 7);
233 this.scInputType = index.createEvent(this, "scInputType", 7);
234 this.scSetState = index.createEvent(this, "scSetState", 7);
235 this.country = undefined;
236 this.show = false;
237 this.type = 'other';
238 this.number = null;
239 this.status = 'unknown';
240 this.loading = undefined;
241 this.help = undefined;
242 this.otherLabel = wp.i18n.__('Tax ID', 'surecart');
243 this.caGstLabel = wp.i18n.__('GST Number', 'surecart');
244 this.auAbnLabel = wp.i18n.__('ABN Number', 'surecart');
245 this.gbVatLabel = wp.i18n.__('UK VAT', 'surecart');
246 this.euVatLabel = wp.i18n.__('EU VAT', 'surecart');
247 this.taxIdTypes = [];
248 this.required = false;
249 }
250 async reportValidity() {
251 return this.input.reportValidity();
252 }
253 onLabelChange() {
254 tax.zones.ca_gst.label = this.caGstLabel || tax.zones.ca_gst.label;
255 tax.zones.au_abn.label = this.auAbnLabel || tax.zones.au_abn.label;
256 tax.zones.gb_vat.label = this.gbVatLabel || tax.zones.gb_vat.label;
257 tax.zones.eu_vat.label = this.euVatLabel || tax.zones.eu_vat.label;
258 tax.zones.other.label = this.otherLabel || tax.zones.other.label;
259 }
260 componentWillLoad() {
261 this.onLabelChange();
262 }
263 renderStatus() {
264 if (this.status === 'valid') {
265 return index.h("sc-icon", { name: "check", slot: "prefix", style: { color: 'var(--sc-color-success-500)' } });
266 }
267 if (this.status === 'invalid') {
268 return index.h("sc-icon", { name: "x", slot: "prefix", style: { color: 'var(--sc-color-danger-500)' } });
269 }
270 }
271 filteredZones() {
272 if (!!this.taxIdTypes.length) {
273 return Object.keys(tax.zones)
274 .filter(name => this.taxIdTypes.includes(name))
275 .reduce((obj, key) => {
276 obj[key] = tax.zones[key];
277 return obj;
278 }, {});
279 }
280 return tax.zones;
281 }
282 onTaxIdTypesChange() {
283 // If there is no other type, set the first one as default type.
284 if (!!this.taxIdTypes.length) {
285 this.type = !this.taxIdTypes.includes('other') ? this.taxIdTypes[0] : 'other';
286 }
287 }
288 getZoneLabel() {
289 var _a, _b;
290 const filteredZones = this.filteredZones() || {};
291 // Get the label of the current type or the other type.
292 // If there is no other type, get the first one.
293 return ((_a = filteredZones === null || filteredZones === void 0 ? void 0 : filteredZones[(this === null || this === void 0 ? void 0 : this.type) || 'other']) === null || _a === void 0 ? void 0 : _a.label) || ((_b = filteredZones === null || filteredZones === void 0 ? void 0 : filteredZones[Object.keys(filteredZones)[0]]) === null || _b === void 0 ? void 0 : _b.label);
294 }
295 render() {
296 var _a, _b, _c, _d, _e;
297 return (index.h(index.Fragment, { key: 'd523db5e565e6e2804c808bd08f6e24810bb9858' }, index.h("sc-input", { key: 'e87ba7625fe306aa44d195bd87c935c7e8a6e36f', name: "tax_identifier.number_type", required: this.required, value: this.type, style: { display: 'none' } }), index.h("sc-input", { key: 'a51f80c1d5f3708abc16352d0ad7d088bf62e662', ref: el => (this.input = el), label: this.getZoneLabel(), "aria-label": wp.i18n.__('Tax ID', 'surecart'), placeholder: wp.i18n.__('Enter Tax ID', 'surecart'), name: "tax_identifier.number", value: this.number, onScInput: (e) => {
298 e.stopImmediatePropagation();
299 this.scInput.emit({
300 number: e.target.value,
301 number_type: this.type || 'other',
302 });
303 }, onScChange: (e) => {
304 e.stopImmediatePropagation();
305 this.scChange.emit({
306 number: e.target.value,
307 number_type: this.type || 'other',
308 });
309 }, help: this.help, required: this.required }, this.loading && this.type === 'eu_vat' ? index.h("sc-spinner", { slot: "prefix", style: { '--spinner-size': '10px' } }) : this.renderStatus(), ((_a = Object.keys(this.filteredZones() || {})) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (index.h("span", { slot: "suffix" }, (_c = (_b = Object.values(this.filteredZones() || {})) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c['label_small'])) : (index.h("sc-dropdown", { slot: "suffix", position: "bottom-right", role: "select", "aria-multiselectable": "false", "aria-label": wp.i18n.__('Select number type', 'surecart') }, index.h("sc-button", { type: "text", slot: "trigger", caret: true, loading: false, style: { color: 'var(--sc-input-label-color)' }, tabindex: "0" }, (_e = (_d = this.filteredZones()) === null || _d === void 0 ? void 0 : _d[(this === null || this === void 0 ? void 0 : this.type) || 'other']) === null || _e === void 0 ? void 0 : _e.label_small), index.h("sc-menu", null, Object.keys(this.filteredZones() || {}).map(name => (index.h("sc-menu-item", { role: "option", onClick: () => {
310 this.scInput.emit({
311 number: this.number,
312 number_type: name,
313 });
314 this.scChange.emit({
315 number: this.number,
316 number_type: name,
317 });
318 this.type = name;
319 }, onKeyDown: e => {
320 var _a;
321 if (e.key === 'Enter') {
322 this.scInput.emit({
323 number: this.number,
324 number_type: name,
325 });
326 this.scChange.emit({
327 number: this.number,
328 number_type: name,
329 });
330 this.type = name;
331 (_a = this.input) === null || _a === void 0 ? void 0 : _a.triggerFocus();
332 index$1.speak(wp.i18n.sprintf(wp.i18n.__('%s selected', 'surecart'), tax.zones[name].label_small, 'assertive'));
333 }
334 }, checked: this.type === name, "aria-selected": this.type === name ? 'true' : 'false', "aria-label": tax.zones[name].label_small }, tax.zones[name].label_small)))))))));
335 }
336 static get watchers() { return {
337 "otherLabel": ["onLabelChange"],
338 "caGstLabel": ["onLabelChange"],
339 "auAbnLabel": ["onLabelChange"],
340 "gbVatLabel": ["onLabelChange"],
341 "euVatLabel": ["onLabelChange"],
342 "taxIdTypes": ["onTaxIdTypesChange"]
343 }; }
344 };
345 ScTaxIdInput.style = ScTaxIdInputStyle0;
346
347 exports.sc_address = ScAddress;
348 exports.sc_checkbox = ScCheckbox;
349 exports.sc_tax_id_input = ScTaxIdInput;
350
351 //# sourceMappingURL=sc-address_3.cjs.entry.js.map