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-dropdown_3.cjs.entry.js
1619 lines
| 1 | 'use strict'; |
| 2 | |
| 3 | Object.defineProperty(exports, '__esModule', { value: true }); |
| 4 | |
| 5 | const index = require('./index-8acc3c89.js'); |
| 6 | const index$1 = require('./index-fb76df07.js'); |
| 7 | const pageAlign = require('./page-align-5a2ab493.js'); |
| 8 | |
| 9 | function getSide(placement) { |
| 10 | return placement.split('-')[0]; |
| 11 | } |
| 12 | |
| 13 | function getAlignment(placement) { |
| 14 | return placement.split('-')[1]; |
| 15 | } |
| 16 | |
| 17 | function getMainAxisFromPlacement(placement) { |
| 18 | return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y'; |
| 19 | } |
| 20 | |
| 21 | function getLengthFromAxis(axis) { |
| 22 | return axis === 'y' ? 'height' : 'width'; |
| 23 | } |
| 24 | |
| 25 | function computeCoordsFromPlacement(_ref, placement, rtl) { |
| 26 | let { |
| 27 | reference, |
| 28 | floating |
| 29 | } = _ref; |
| 30 | const commonX = reference.x + reference.width / 2 - floating.width / 2; |
| 31 | const commonY = reference.y + reference.height / 2 - floating.height / 2; |
| 32 | const mainAxis = getMainAxisFromPlacement(placement); |
| 33 | const length = getLengthFromAxis(mainAxis); |
| 34 | const commonAlign = reference[length] / 2 - floating[length] / 2; |
| 35 | const side = getSide(placement); |
| 36 | const isVertical = mainAxis === 'x'; |
| 37 | let coords; |
| 38 | |
| 39 | switch (side) { |
| 40 | case 'top': |
| 41 | coords = { |
| 42 | x: commonX, |
| 43 | y: reference.y - floating.height |
| 44 | }; |
| 45 | break; |
| 46 | |
| 47 | case 'bottom': |
| 48 | coords = { |
| 49 | x: commonX, |
| 50 | y: reference.y + reference.height |
| 51 | }; |
| 52 | break; |
| 53 | |
| 54 | case 'right': |
| 55 | coords = { |
| 56 | x: reference.x + reference.width, |
| 57 | y: commonY |
| 58 | }; |
| 59 | break; |
| 60 | |
| 61 | case 'left': |
| 62 | coords = { |
| 63 | x: reference.x - floating.width, |
| 64 | y: commonY |
| 65 | }; |
| 66 | break; |
| 67 | |
| 68 | default: |
| 69 | coords = { |
| 70 | x: reference.x, |
| 71 | y: reference.y |
| 72 | }; |
| 73 | } |
| 74 | |
| 75 | switch (getAlignment(placement)) { |
| 76 | case 'start': |
| 77 | coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); |
| 78 | break; |
| 79 | |
| 80 | case 'end': |
| 81 | coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1); |
| 82 | break; |
| 83 | } |
| 84 | |
| 85 | return coords; |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Computes the `x` and `y` coordinates that will place the floating element |
| 90 | * next to a reference element when it is given a certain positioning strategy. |
| 91 | * |
| 92 | * This export does not have any `platform` interface logic. You will need to |
| 93 | * write one for the platform you are using Floating UI with. |
| 94 | */ |
| 95 | |
| 96 | const computePosition$1 = async (reference, floating, config) => { |
| 97 | const { |
| 98 | placement = 'bottom', |
| 99 | strategy = 'absolute', |
| 100 | middleware = [], |
| 101 | platform |
| 102 | } = config; |
| 103 | const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); |
| 104 | |
| 105 | let rects = await platform.getElementRects({ |
| 106 | reference, |
| 107 | floating, |
| 108 | strategy |
| 109 | }); |
| 110 | let { |
| 111 | x, |
| 112 | y |
| 113 | } = computeCoordsFromPlacement(rects, placement, rtl); |
| 114 | let statefulPlacement = placement; |
| 115 | let middlewareData = {}; |
| 116 | let resetCount = 0; |
| 117 | |
| 118 | for (let i = 0; i < middleware.length; i++) { |
| 119 | const { |
| 120 | name, |
| 121 | fn |
| 122 | } = middleware[i]; |
| 123 | const { |
| 124 | x: nextX, |
| 125 | y: nextY, |
| 126 | data, |
| 127 | reset |
| 128 | } = await fn({ |
| 129 | x, |
| 130 | y, |
| 131 | initialPlacement: placement, |
| 132 | placement: statefulPlacement, |
| 133 | strategy, |
| 134 | middlewareData, |
| 135 | rects, |
| 136 | platform, |
| 137 | elements: { |
| 138 | reference, |
| 139 | floating |
| 140 | } |
| 141 | }); |
| 142 | x = nextX != null ? nextX : x; |
| 143 | y = nextY != null ? nextY : y; |
| 144 | middlewareData = { ...middlewareData, |
| 145 | [name]: { ...middlewareData[name], |
| 146 | ...data |
| 147 | } |
| 148 | }; |
| 149 | |
| 150 | if (reset && resetCount <= 50) { |
| 151 | resetCount++; |
| 152 | |
| 153 | if (typeof reset === 'object') { |
| 154 | if (reset.placement) { |
| 155 | statefulPlacement = reset.placement; |
| 156 | } |
| 157 | |
| 158 | if (reset.rects) { |
| 159 | rects = reset.rects === true ? await platform.getElementRects({ |
| 160 | reference, |
| 161 | floating, |
| 162 | strategy |
| 163 | }) : reset.rects; |
| 164 | } |
| 165 | |
| 166 | ({ |
| 167 | x, |
| 168 | y |
| 169 | } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); |
| 170 | } |
| 171 | |
| 172 | i = -1; |
| 173 | continue; |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | return { |
| 178 | x, |
| 179 | y, |
| 180 | placement: statefulPlacement, |
| 181 | strategy, |
| 182 | middlewareData |
| 183 | }; |
| 184 | }; |
| 185 | |
| 186 | function expandPaddingObject(padding) { |
| 187 | return { |
| 188 | top: 0, |
| 189 | right: 0, |
| 190 | bottom: 0, |
| 191 | left: 0, |
| 192 | ...padding |
| 193 | }; |
| 194 | } |
| 195 | |
| 196 | function getSideObjectFromPadding(padding) { |
| 197 | return typeof padding !== 'number' ? expandPaddingObject(padding) : { |
| 198 | top: padding, |
| 199 | right: padding, |
| 200 | bottom: padding, |
| 201 | left: padding |
| 202 | }; |
| 203 | } |
| 204 | |
| 205 | function rectToClientRect(rect) { |
| 206 | return { ...rect, |
| 207 | top: rect.y, |
| 208 | left: rect.x, |
| 209 | right: rect.x + rect.width, |
| 210 | bottom: rect.y + rect.height |
| 211 | }; |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | * Resolves with an object of overflow side offsets that determine how much the |
| 216 | * element is overflowing a given clipping boundary. |
| 217 | * - positive = overflowing the boundary by that number of pixels |
| 218 | * - negative = how many pixels left before it will overflow |
| 219 | * - 0 = lies flush with the boundary |
| 220 | * @see https://floating-ui.com/docs/detectOverflow |
| 221 | */ |
| 222 | async function detectOverflow(middlewareArguments, options) { |
| 223 | var _await$platform$isEle; |
| 224 | |
| 225 | if (options === void 0) { |
| 226 | options = {}; |
| 227 | } |
| 228 | |
| 229 | const { |
| 230 | x, |
| 231 | y, |
| 232 | platform, |
| 233 | rects, |
| 234 | elements, |
| 235 | strategy |
| 236 | } = middlewareArguments; |
| 237 | const { |
| 238 | boundary = 'clippingAncestors', |
| 239 | rootBoundary = 'viewport', |
| 240 | elementContext = 'floating', |
| 241 | altBoundary = false, |
| 242 | padding = 0 |
| 243 | } = options; |
| 244 | const paddingObject = getSideObjectFromPadding(padding); |
| 245 | const altContext = elementContext === 'floating' ? 'reference' : 'floating'; |
| 246 | const element = elements[altBoundary ? altContext : elementContext]; |
| 247 | const clippingClientRect = rectToClientRect(await platform.getClippingRect({ |
| 248 | element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))), |
| 249 | boundary, |
| 250 | rootBoundary, |
| 251 | strategy |
| 252 | })); |
| 253 | const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({ |
| 254 | rect: elementContext === 'floating' ? { ...rects.floating, |
| 255 | x, |
| 256 | y |
| 257 | } : rects.reference, |
| 258 | offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)), |
| 259 | strategy |
| 260 | }) : rects[elementContext]); |
| 261 | return { |
| 262 | top: clippingClientRect.top - elementClientRect.top + paddingObject.top, |
| 263 | bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, |
| 264 | left: clippingClientRect.left - elementClientRect.left + paddingObject.left, |
| 265 | right: elementClientRect.right - clippingClientRect.right + paddingObject.right |
| 266 | }; |
| 267 | } |
| 268 | |
| 269 | const min$1 = Math.min; |
| 270 | const max$1 = Math.max; |
| 271 | |
| 272 | function within(min$1$1, value, max$1$1) { |
| 273 | return max$1(min$1$1, min$1(value, max$1$1)); |
| 274 | } |
| 275 | |
| 276 | const hash$1 = { |
| 277 | left: 'right', |
| 278 | right: 'left', |
| 279 | bottom: 'top', |
| 280 | top: 'bottom' |
| 281 | }; |
| 282 | function getOppositePlacement(placement) { |
| 283 | return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]); |
| 284 | } |
| 285 | |
| 286 | function getAlignmentSides(placement, rects, rtl) { |
| 287 | if (rtl === void 0) { |
| 288 | rtl = false; |
| 289 | } |
| 290 | |
| 291 | const alignment = getAlignment(placement); |
| 292 | const mainAxis = getMainAxisFromPlacement(placement); |
| 293 | const length = getLengthFromAxis(mainAxis); |
| 294 | let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; |
| 295 | |
| 296 | if (rects.reference[length] > rects.floating[length]) { |
| 297 | mainAlignmentSide = getOppositePlacement(mainAlignmentSide); |
| 298 | } |
| 299 | |
| 300 | return { |
| 301 | main: mainAlignmentSide, |
| 302 | cross: getOppositePlacement(mainAlignmentSide) |
| 303 | }; |
| 304 | } |
| 305 | |
| 306 | const hash = { |
| 307 | start: 'end', |
| 308 | end: 'start' |
| 309 | }; |
| 310 | function getOppositeAlignmentPlacement(placement) { |
| 311 | return placement.replace(/start|end/g, matched => hash[matched]); |
| 312 | } |
| 313 | |
| 314 | function getExpandedPlacements(placement) { |
| 315 | const oppositePlacement = getOppositePlacement(placement); |
| 316 | return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; |
| 317 | } |
| 318 | |
| 319 | /** |
| 320 | * Changes the placement of the floating element to one that will fit if the |
| 321 | * initially specified `placement` does not. |
| 322 | * @see https://floating-ui.com/docs/flip |
| 323 | */ |
| 324 | const flip = function (options) { |
| 325 | if (options === void 0) { |
| 326 | options = {}; |
| 327 | } |
| 328 | |
| 329 | return { |
| 330 | name: 'flip', |
| 331 | options, |
| 332 | |
| 333 | async fn(middlewareArguments) { |
| 334 | var _middlewareData$flip; |
| 335 | |
| 336 | const { |
| 337 | placement, |
| 338 | middlewareData, |
| 339 | rects, |
| 340 | initialPlacement, |
| 341 | platform, |
| 342 | elements |
| 343 | } = middlewareArguments; |
| 344 | const { |
| 345 | mainAxis: checkMainAxis = true, |
| 346 | crossAxis: checkCrossAxis = true, |
| 347 | fallbackPlacements: specifiedFallbackPlacements, |
| 348 | fallbackStrategy = 'bestFit', |
| 349 | flipAlignment = true, |
| 350 | ...detectOverflowOptions |
| 351 | } = options; |
| 352 | const side = getSide(placement); |
| 353 | const isBasePlacement = side === initialPlacement; |
| 354 | const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); |
| 355 | const placements = [initialPlacement, ...fallbackPlacements]; |
| 356 | const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions); |
| 357 | const overflows = []; |
| 358 | let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; |
| 359 | |
| 360 | if (checkMainAxis) { |
| 361 | overflows.push(overflow[side]); |
| 362 | } |
| 363 | |
| 364 | if (checkCrossAxis) { |
| 365 | const { |
| 366 | main, |
| 367 | cross |
| 368 | } = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); |
| 369 | overflows.push(overflow[main], overflow[cross]); |
| 370 | } |
| 371 | |
| 372 | overflowsData = [...overflowsData, { |
| 373 | placement, |
| 374 | overflows |
| 375 | }]; // One or more sides is overflowing |
| 376 | |
| 377 | if (!overflows.every(side => side <= 0)) { |
| 378 | var _middlewareData$flip$, _middlewareData$flip2; |
| 379 | |
| 380 | const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1; |
| 381 | const nextPlacement = placements[nextIndex]; |
| 382 | |
| 383 | if (nextPlacement) { |
| 384 | // Try next placement and re-run the lifecycle |
| 385 | return { |
| 386 | data: { |
| 387 | index: nextIndex, |
| 388 | overflows: overflowsData |
| 389 | }, |
| 390 | reset: { |
| 391 | placement: nextPlacement |
| 392 | } |
| 393 | }; |
| 394 | } |
| 395 | |
| 396 | let resetPlacement = 'bottom'; |
| 397 | |
| 398 | switch (fallbackStrategy) { |
| 399 | case 'bestFit': |
| 400 | { |
| 401 | var _overflowsData$map$so; |
| 402 | |
| 403 | const placement = (_overflowsData$map$so = overflowsData.map(d => [d, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0].placement; |
| 404 | |
| 405 | if (placement) { |
| 406 | resetPlacement = placement; |
| 407 | } |
| 408 | |
| 409 | break; |
| 410 | } |
| 411 | |
| 412 | case 'initialPlacement': |
| 413 | resetPlacement = initialPlacement; |
| 414 | break; |
| 415 | } |
| 416 | |
| 417 | if (placement !== resetPlacement) { |
| 418 | return { |
| 419 | reset: { |
| 420 | placement: resetPlacement |
| 421 | } |
| 422 | }; |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | return {}; |
| 427 | } |
| 428 | |
| 429 | }; |
| 430 | }; |
| 431 | |
| 432 | async function convertValueToCoords(middlewareArguments, value) { |
| 433 | const { |
| 434 | placement, |
| 435 | platform, |
| 436 | elements |
| 437 | } = middlewareArguments; |
| 438 | const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); |
| 439 | const side = getSide(placement); |
| 440 | const alignment = getAlignment(placement); |
| 441 | const isVertical = getMainAxisFromPlacement(placement) === 'x'; |
| 442 | const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1; |
| 443 | const crossAxisMulti = rtl && isVertical ? -1 : 1; |
| 444 | const rawValue = typeof value === 'function' ? value(middlewareArguments) : value; // eslint-disable-next-line prefer-const |
| 445 | |
| 446 | let { |
| 447 | mainAxis, |
| 448 | crossAxis, |
| 449 | alignmentAxis |
| 450 | } = typeof rawValue === 'number' ? { |
| 451 | mainAxis: rawValue, |
| 452 | crossAxis: 0, |
| 453 | alignmentAxis: null |
| 454 | } : { |
| 455 | mainAxis: 0, |
| 456 | crossAxis: 0, |
| 457 | alignmentAxis: null, |
| 458 | ...rawValue |
| 459 | }; |
| 460 | |
| 461 | if (alignment && typeof alignmentAxis === 'number') { |
| 462 | crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis; |
| 463 | } |
| 464 | |
| 465 | return isVertical ? { |
| 466 | x: crossAxis * crossAxisMulti, |
| 467 | y: mainAxis * mainAxisMulti |
| 468 | } : { |
| 469 | x: mainAxis * mainAxisMulti, |
| 470 | y: crossAxis * crossAxisMulti |
| 471 | }; |
| 472 | } |
| 473 | /** |
| 474 | * Displaces the floating element from its reference element. |
| 475 | * @see https://floating-ui.com/docs/offset |
| 476 | */ |
| 477 | |
| 478 | const offset = function (value) { |
| 479 | if (value === void 0) { |
| 480 | value = 0; |
| 481 | } |
| 482 | |
| 483 | return { |
| 484 | name: 'offset', |
| 485 | options: value, |
| 486 | |
| 487 | async fn(middlewareArguments) { |
| 488 | const { |
| 489 | x, |
| 490 | y |
| 491 | } = middlewareArguments; |
| 492 | const diffCoords = await convertValueToCoords(middlewareArguments, value); |
| 493 | return { |
| 494 | x: x + diffCoords.x, |
| 495 | y: y + diffCoords.y, |
| 496 | data: diffCoords |
| 497 | }; |
| 498 | } |
| 499 | |
| 500 | }; |
| 501 | }; |
| 502 | |
| 503 | function getCrossAxis(axis) { |
| 504 | return axis === 'x' ? 'y' : 'x'; |
| 505 | } |
| 506 | |
| 507 | /** |
| 508 | * Shifts the floating element in order to keep it in view when it will overflow |
| 509 | * a clipping boundary. |
| 510 | * @see https://floating-ui.com/docs/shift |
| 511 | */ |
| 512 | const shift = function (options) { |
| 513 | if (options === void 0) { |
| 514 | options = {}; |
| 515 | } |
| 516 | |
| 517 | return { |
| 518 | name: 'shift', |
| 519 | options, |
| 520 | |
| 521 | async fn(middlewareArguments) { |
| 522 | const { |
| 523 | x, |
| 524 | y, |
| 525 | placement |
| 526 | } = middlewareArguments; |
| 527 | const { |
| 528 | mainAxis: checkMainAxis = true, |
| 529 | crossAxis: checkCrossAxis = false, |
| 530 | limiter = { |
| 531 | fn: _ref => { |
| 532 | let { |
| 533 | x, |
| 534 | y |
| 535 | } = _ref; |
| 536 | return { |
| 537 | x, |
| 538 | y |
| 539 | }; |
| 540 | } |
| 541 | }, |
| 542 | ...detectOverflowOptions |
| 543 | } = options; |
| 544 | const coords = { |
| 545 | x, |
| 546 | y |
| 547 | }; |
| 548 | const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions); |
| 549 | const mainAxis = getMainAxisFromPlacement(getSide(placement)); |
| 550 | const crossAxis = getCrossAxis(mainAxis); |
| 551 | let mainAxisCoord = coords[mainAxis]; |
| 552 | let crossAxisCoord = coords[crossAxis]; |
| 553 | |
| 554 | if (checkMainAxis) { |
| 555 | const minSide = mainAxis === 'y' ? 'top' : 'left'; |
| 556 | const maxSide = mainAxis === 'y' ? 'bottom' : 'right'; |
| 557 | const min = mainAxisCoord + overflow[minSide]; |
| 558 | const max = mainAxisCoord - overflow[maxSide]; |
| 559 | mainAxisCoord = within(min, mainAxisCoord, max); |
| 560 | } |
| 561 | |
| 562 | if (checkCrossAxis) { |
| 563 | const minSide = crossAxis === 'y' ? 'top' : 'left'; |
| 564 | const maxSide = crossAxis === 'y' ? 'bottom' : 'right'; |
| 565 | const min = crossAxisCoord + overflow[minSide]; |
| 566 | const max = crossAxisCoord - overflow[maxSide]; |
| 567 | crossAxisCoord = within(min, crossAxisCoord, max); |
| 568 | } |
| 569 | |
| 570 | const limitedCoords = limiter.fn({ ...middlewareArguments, |
| 571 | [mainAxis]: mainAxisCoord, |
| 572 | [crossAxis]: crossAxisCoord |
| 573 | }); |
| 574 | return { ...limitedCoords, |
| 575 | data: { |
| 576 | x: limitedCoords.x - x, |
| 577 | y: limitedCoords.y - y |
| 578 | } |
| 579 | }; |
| 580 | } |
| 581 | |
| 582 | }; |
| 583 | }; |
| 584 | |
| 585 | /** |
| 586 | * Provides data to change the size of the floating element. For instance, |
| 587 | * prevent it from overflowing its clipping boundary or match the width of the |
| 588 | * reference element. |
| 589 | * @see https://floating-ui.com/docs/size |
| 590 | */ |
| 591 | const size = function (options) { |
| 592 | if (options === void 0) { |
| 593 | options = {}; |
| 594 | } |
| 595 | |
| 596 | return { |
| 597 | name: 'size', |
| 598 | options, |
| 599 | |
| 600 | async fn(middlewareArguments) { |
| 601 | const { |
| 602 | placement, |
| 603 | rects, |
| 604 | platform, |
| 605 | elements |
| 606 | } = middlewareArguments; |
| 607 | const { |
| 608 | apply, |
| 609 | ...detectOverflowOptions |
| 610 | } = options; |
| 611 | const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions); |
| 612 | const side = getSide(placement); |
| 613 | const alignment = getAlignment(placement); |
| 614 | let heightSide; |
| 615 | let widthSide; |
| 616 | |
| 617 | if (side === 'top' || side === 'bottom') { |
| 618 | heightSide = side; |
| 619 | widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right'; |
| 620 | } else { |
| 621 | widthSide = side; |
| 622 | heightSide = alignment === 'end' ? 'top' : 'bottom'; |
| 623 | } |
| 624 | |
| 625 | const xMin = max$1(overflow.left, 0); |
| 626 | const xMax = max$1(overflow.right, 0); |
| 627 | const yMin = max$1(overflow.top, 0); |
| 628 | const yMax = max$1(overflow.bottom, 0); |
| 629 | const dimensions = { |
| 630 | availableHeight: rects.floating.height - (['left', 'right'].includes(placement) ? 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$1(overflow.top, overflow.bottom)) : overflow[heightSide]), |
| 631 | availableWidth: rects.floating.width - (['top', 'bottom'].includes(placement) ? 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$1(overflow.left, overflow.right)) : overflow[widthSide]) |
| 632 | }; |
| 633 | const prevDimensions = await platform.getDimensions(elements.floating); |
| 634 | apply == null ? void 0 : apply({ ...middlewareArguments, |
| 635 | ...dimensions |
| 636 | }); |
| 637 | const nextDimensions = await platform.getDimensions(elements.floating); |
| 638 | |
| 639 | if (prevDimensions.width !== nextDimensions.width || prevDimensions.height !== nextDimensions.height) { |
| 640 | return { |
| 641 | reset: { |
| 642 | rects: true |
| 643 | } |
| 644 | }; |
| 645 | } |
| 646 | |
| 647 | return {}; |
| 648 | } |
| 649 | |
| 650 | }; |
| 651 | }; |
| 652 | |
| 653 | function isWindow(value) { |
| 654 | return value && value.document && value.location && value.alert && value.setInterval; |
| 655 | } |
| 656 | function getWindow(node) { |
| 657 | if (node == null) { |
| 658 | return window; |
| 659 | } |
| 660 | |
| 661 | if (!isWindow(node)) { |
| 662 | const ownerDocument = node.ownerDocument; |
| 663 | return ownerDocument ? ownerDocument.defaultView || window : window; |
| 664 | } |
| 665 | |
| 666 | return node; |
| 667 | } |
| 668 | |
| 669 | function getComputedStyle$1(element) { |
| 670 | return getWindow(element).getComputedStyle(element); |
| 671 | } |
| 672 | |
| 673 | function getNodeName(node) { |
| 674 | return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : ''; |
| 675 | } |
| 676 | |
| 677 | function getUAString() { |
| 678 | const uaData = navigator.userAgentData; |
| 679 | |
| 680 | if (uaData != null && uaData.brands) { |
| 681 | return uaData.brands.map(item => item.brand + "/" + item.version).join(' '); |
| 682 | } |
| 683 | |
| 684 | return navigator.userAgent; |
| 685 | } |
| 686 | |
| 687 | function isHTMLElement(value) { |
| 688 | return value instanceof getWindow(value).HTMLElement; |
| 689 | } |
| 690 | function isElement(value) { |
| 691 | return value instanceof getWindow(value).Element; |
| 692 | } |
| 693 | function isNode(value) { |
| 694 | return value instanceof getWindow(value).Node; |
| 695 | } |
| 696 | function isShadowRoot(node) { |
| 697 | // Browsers without `ShadowRoot` support |
| 698 | if (typeof ShadowRoot === 'undefined') { |
| 699 | return false; |
| 700 | } |
| 701 | |
| 702 | const OwnElement = getWindow(node).ShadowRoot; |
| 703 | return node instanceof OwnElement || node instanceof ShadowRoot; |
| 704 | } |
| 705 | function isOverflowElement(element) { |
| 706 | // Firefox wants us to check `-x` and `-y` variations as well |
| 707 | const { |
| 708 | overflow, |
| 709 | overflowX, |
| 710 | overflowY |
| 711 | } = getComputedStyle$1(element); |
| 712 | return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); |
| 713 | } |
| 714 | function isTableElement(element) { |
| 715 | return ['table', 'td', 'th'].includes(getNodeName(element)); |
| 716 | } |
| 717 | function isContainingBlock(element) { |
| 718 | // TODO: Try and use feature detection here instead |
| 719 | const isFirefox = /firefox/i.test(getUAString()); |
| 720 | const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that |
| 721 | // create a containing block. |
| 722 | // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block |
| 723 | |
| 724 | return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat) |
| 725 | css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false); |
| 726 | } |
| 727 | function isLayoutViewport() { |
| 728 | // Not Safari |
| 729 | return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways |
| 730 | // • Always-visible scrollbar or not |
| 731 | // • Width of <html>, etc. |
| 732 | // const vV = win.visualViewport; |
| 733 | // return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true; |
| 734 | } |
| 735 | |
| 736 | const min = Math.min; |
| 737 | const max = Math.max; |
| 738 | const round = Math.round; |
| 739 | |
| 740 | function getBoundingClientRect(element, includeScale, isFixedStrategy) { |
| 741 | var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2; |
| 742 | |
| 743 | if (includeScale === void 0) { |
| 744 | includeScale = false; |
| 745 | } |
| 746 | |
| 747 | if (isFixedStrategy === void 0) { |
| 748 | isFixedStrategy = false; |
| 749 | } |
| 750 | |
| 751 | const clientRect = element.getBoundingClientRect(); |
| 752 | let scaleX = 1; |
| 753 | let scaleY = 1; |
| 754 | |
| 755 | if (includeScale && isHTMLElement(element)) { |
| 756 | scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; |
| 757 | scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; |
| 758 | } |
| 759 | |
| 760 | const win = isElement(element) ? getWindow(element) : window; |
| 761 | const addVisualOffsets = !isLayoutViewport() && isFixedStrategy; |
| 762 | const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX; |
| 763 | const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY; |
| 764 | const width = clientRect.width / scaleX; |
| 765 | const height = clientRect.height / scaleY; |
| 766 | return { |
| 767 | width, |
| 768 | height, |
| 769 | top: y, |
| 770 | right: x + width, |
| 771 | bottom: y + height, |
| 772 | left: x, |
| 773 | x, |
| 774 | y |
| 775 | }; |
| 776 | } |
| 777 | |
| 778 | function getDocumentElement(node) { |
| 779 | return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement; |
| 780 | } |
| 781 | |
| 782 | function getNodeScroll(element) { |
| 783 | if (isElement(element)) { |
| 784 | return { |
| 785 | scrollLeft: element.scrollLeft, |
| 786 | scrollTop: element.scrollTop |
| 787 | }; |
| 788 | } |
| 789 | |
| 790 | return { |
| 791 | scrollLeft: element.pageXOffset, |
| 792 | scrollTop: element.pageYOffset |
| 793 | }; |
| 794 | } |
| 795 | |
| 796 | function getWindowScrollBarX(element) { |
| 797 | // If <html> has a CSS width greater than the viewport, then this will be |
| 798 | // incorrect for RTL. |
| 799 | return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft; |
| 800 | } |
| 801 | |
| 802 | function isScaled(element) { |
| 803 | const rect = getBoundingClientRect(element); |
| 804 | return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight; |
| 805 | } |
| 806 | |
| 807 | function getRectRelativeToOffsetParent(element, offsetParent, strategy) { |
| 808 | const isOffsetParentAnElement = isHTMLElement(offsetParent); |
| 809 | const documentElement = getDocumentElement(offsetParent); |
| 810 | const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat) |
| 811 | isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed'); |
| 812 | let scroll = { |
| 813 | scrollLeft: 0, |
| 814 | scrollTop: 0 |
| 815 | }; |
| 816 | const offsets = { |
| 817 | x: 0, |
| 818 | y: 0 |
| 819 | }; |
| 820 | |
| 821 | if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') { |
| 822 | if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { |
| 823 | scroll = getNodeScroll(offsetParent); |
| 824 | } |
| 825 | |
| 826 | if (isHTMLElement(offsetParent)) { |
| 827 | const offsetRect = getBoundingClientRect(offsetParent, true); |
| 828 | offsets.x = offsetRect.x + offsetParent.clientLeft; |
| 829 | offsets.y = offsetRect.y + offsetParent.clientTop; |
| 830 | } else if (documentElement) { |
| 831 | offsets.x = getWindowScrollBarX(documentElement); |
| 832 | } |
| 833 | } |
| 834 | |
| 835 | return { |
| 836 | x: rect.left + scroll.scrollLeft - offsets.x, |
| 837 | y: rect.top + scroll.scrollTop - offsets.y, |
| 838 | width: rect.width, |
| 839 | height: rect.height |
| 840 | }; |
| 841 | } |
| 842 | |
| 843 | function getParentNode(node) { |
| 844 | if (getNodeName(node) === 'html') { |
| 845 | return node; |
| 846 | } |
| 847 | |
| 848 | return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle |
| 849 | // @ts-ignore |
| 850 | node.assignedSlot || // step into the shadow DOM of the parent of a slotted node |
| 851 | node.parentNode || ( // DOM Element detected |
| 852 | isShadowRoot(node) ? node.host : null) || // ShadowRoot detected |
| 853 | getDocumentElement(node) // fallback |
| 854 | |
| 855 | ); |
| 856 | } |
| 857 | |
| 858 | function getTrueOffsetParent(element) { |
| 859 | if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') { |
| 860 | return null; |
| 861 | } |
| 862 | |
| 863 | return element.offsetParent; |
| 864 | } |
| 865 | |
| 866 | function getContainingBlock(element) { |
| 867 | let currentNode = getParentNode(element); |
| 868 | |
| 869 | if (isShadowRoot(currentNode)) { |
| 870 | currentNode = currentNode.host; |
| 871 | } |
| 872 | |
| 873 | while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) { |
| 874 | if (isContainingBlock(currentNode)) { |
| 875 | return currentNode; |
| 876 | } else { |
| 877 | currentNode = currentNode.parentNode; |
| 878 | } |
| 879 | } |
| 880 | |
| 881 | return null; |
| 882 | } // Gets the closest ancestor positioned element. Handles some edge cases, |
| 883 | // such as table ancestors and cross browser bugs. |
| 884 | |
| 885 | |
| 886 | function getOffsetParent(element) { |
| 887 | const window = getWindow(element); |
| 888 | let offsetParent = getTrueOffsetParent(element); |
| 889 | |
| 890 | while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { |
| 891 | offsetParent = getTrueOffsetParent(offsetParent); |
| 892 | } |
| 893 | |
| 894 | if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) { |
| 895 | return window; |
| 896 | } |
| 897 | |
| 898 | return offsetParent || getContainingBlock(element) || window; |
| 899 | } |
| 900 | |
| 901 | function getDimensions(element) { |
| 902 | if (isHTMLElement(element)) { |
| 903 | return { |
| 904 | width: element.offsetWidth, |
| 905 | height: element.offsetHeight |
| 906 | }; |
| 907 | } |
| 908 | |
| 909 | const rect = getBoundingClientRect(element); |
| 910 | return { |
| 911 | width: rect.width, |
| 912 | height: rect.height |
| 913 | }; |
| 914 | } |
| 915 | |
| 916 | function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { |
| 917 | let { |
| 918 | rect, |
| 919 | offsetParent, |
| 920 | strategy |
| 921 | } = _ref; |
| 922 | const isOffsetParentAnElement = isHTMLElement(offsetParent); |
| 923 | const documentElement = getDocumentElement(offsetParent); |
| 924 | |
| 925 | if (offsetParent === documentElement) { |
| 926 | return rect; |
| 927 | } |
| 928 | |
| 929 | let scroll = { |
| 930 | scrollLeft: 0, |
| 931 | scrollTop: 0 |
| 932 | }; |
| 933 | const offsets = { |
| 934 | x: 0, |
| 935 | y: 0 |
| 936 | }; |
| 937 | |
| 938 | if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') { |
| 939 | if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { |
| 940 | scroll = getNodeScroll(offsetParent); |
| 941 | } |
| 942 | |
| 943 | if (isHTMLElement(offsetParent)) { |
| 944 | const offsetRect = getBoundingClientRect(offsetParent, true); |
| 945 | offsets.x = offsetRect.x + offsetParent.clientLeft; |
| 946 | offsets.y = offsetRect.y + offsetParent.clientTop; |
| 947 | } // This doesn't appear to be need to be negated. |
| 948 | // else if (documentElement) { |
| 949 | // offsets.x = getWindowScrollBarX(documentElement); |
| 950 | // } |
| 951 | |
| 952 | } |
| 953 | |
| 954 | return { ...rect, |
| 955 | x: rect.x - scroll.scrollLeft + offsets.x, |
| 956 | y: rect.y - scroll.scrollTop + offsets.y |
| 957 | }; |
| 958 | } |
| 959 | |
| 960 | function getViewportRect(element, strategy) { |
| 961 | const win = getWindow(element); |
| 962 | const html = getDocumentElement(element); |
| 963 | const visualViewport = win.visualViewport; |
| 964 | let width = html.clientWidth; |
| 965 | let height = html.clientHeight; |
| 966 | let x = 0; |
| 967 | let y = 0; |
| 968 | |
| 969 | if (visualViewport) { |
| 970 | width = visualViewport.width; |
| 971 | height = visualViewport.height; |
| 972 | const layoutViewport = isLayoutViewport(); |
| 973 | |
| 974 | if (layoutViewport || !layoutViewport && strategy === 'fixed') { |
| 975 | x = visualViewport.offsetLeft; |
| 976 | y = visualViewport.offsetTop; |
| 977 | } |
| 978 | } |
| 979 | |
| 980 | return { |
| 981 | width, |
| 982 | height, |
| 983 | x, |
| 984 | y |
| 985 | }; |
| 986 | } |
| 987 | |
| 988 | // of the `<html>` and `<body>` rect bounds if horizontally scrollable |
| 989 | |
| 990 | function getDocumentRect(element) { |
| 991 | var _element$ownerDocumen; |
| 992 | |
| 993 | const html = getDocumentElement(element); |
| 994 | const scroll = getNodeScroll(element); |
| 995 | const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; |
| 996 | const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); |
| 997 | const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); |
| 998 | let x = -scroll.scrollLeft + getWindowScrollBarX(element); |
| 999 | const y = -scroll.scrollTop; |
| 1000 | |
| 1001 | if (getComputedStyle$1(body || html).direction === 'rtl') { |
| 1002 | x += max(html.clientWidth, body ? body.clientWidth : 0) - width; |
| 1003 | } |
| 1004 | |
| 1005 | return { |
| 1006 | width, |
| 1007 | height, |
| 1008 | x, |
| 1009 | y |
| 1010 | }; |
| 1011 | } |
| 1012 | |
| 1013 | function getNearestOverflowAncestor(node) { |
| 1014 | const parentNode = getParentNode(node); |
| 1015 | |
| 1016 | if (['html', 'body', '#document'].includes(getNodeName(parentNode))) { |
| 1017 | // @ts-ignore assume body is always available |
| 1018 | return node.ownerDocument.body; |
| 1019 | } |
| 1020 | |
| 1021 | if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { |
| 1022 | return parentNode; |
| 1023 | } |
| 1024 | |
| 1025 | return getNearestOverflowAncestor(parentNode); |
| 1026 | } |
| 1027 | |
| 1028 | function getOverflowAncestors(node, list) { |
| 1029 | var _node$ownerDocument; |
| 1030 | |
| 1031 | if (list === void 0) { |
| 1032 | list = []; |
| 1033 | } |
| 1034 | |
| 1035 | const scrollableAncestor = getNearestOverflowAncestor(node); |
| 1036 | const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body); |
| 1037 | const win = getWindow(scrollableAncestor); |
| 1038 | const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor; |
| 1039 | const updatedList = list.concat(target); |
| 1040 | return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here |
| 1041 | updatedList.concat(getOverflowAncestors(target)); |
| 1042 | } |
| 1043 | |
| 1044 | function contains(parent, child) { |
| 1045 | const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method |
| 1046 | |
| 1047 | if (parent.contains(child)) { |
| 1048 | return true; |
| 1049 | } // then fallback to custom implementation with Shadow DOM support |
| 1050 | else if (rootNode && isShadowRoot(rootNode)) { |
| 1051 | let next = child; |
| 1052 | |
| 1053 | do { |
| 1054 | // use `===` replace node.isSameNode() |
| 1055 | if (next && parent === next) { |
| 1056 | return true; |
| 1057 | } // @ts-ignore: need a better way to handle this... |
| 1058 | |
| 1059 | |
| 1060 | next = next.parentNode || next.host; |
| 1061 | } while (next); |
| 1062 | } |
| 1063 | |
| 1064 | return false; |
| 1065 | } |
| 1066 | |
| 1067 | function getInnerBoundingClientRect(element, strategy) { |
| 1068 | const clientRect = getBoundingClientRect(element, false, strategy === 'fixed'); |
| 1069 | const top = clientRect.top + element.clientTop; |
| 1070 | const left = clientRect.left + element.clientLeft; |
| 1071 | return { |
| 1072 | top, |
| 1073 | left, |
| 1074 | x: left, |
| 1075 | y: top, |
| 1076 | right: left + element.clientWidth, |
| 1077 | bottom: top + element.clientHeight, |
| 1078 | width: element.clientWidth, |
| 1079 | height: element.clientHeight |
| 1080 | }; |
| 1081 | } |
| 1082 | |
| 1083 | function getClientRectFromClippingAncestor(element, clippingParent, strategy) { |
| 1084 | if (clippingParent === 'viewport') { |
| 1085 | return rectToClientRect(getViewportRect(element, strategy)); |
| 1086 | } |
| 1087 | |
| 1088 | if (isElement(clippingParent)) { |
| 1089 | return getInnerBoundingClientRect(clippingParent, strategy); |
| 1090 | } |
| 1091 | |
| 1092 | return rectToClientRect(getDocumentRect(getDocumentElement(element))); |
| 1093 | } // A "clipping ancestor" is an overflowable container with the characteristic of |
| 1094 | // clipping (or hiding) overflowing elements with a position different from |
| 1095 | // `initial` |
| 1096 | |
| 1097 | |
| 1098 | function getClippingAncestors(element) { |
| 1099 | const clippingAncestors = getOverflowAncestors(element); |
| 1100 | const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position); |
| 1101 | const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; |
| 1102 | |
| 1103 | if (!isElement(clipperElement)) { |
| 1104 | return []; |
| 1105 | } // @ts-ignore isElement check ensures we return Array<Element> |
| 1106 | |
| 1107 | |
| 1108 | return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body'); |
| 1109 | } // Gets the maximum area that the element is visible in due to any number of |
| 1110 | // clipping ancestors |
| 1111 | |
| 1112 | |
| 1113 | function getClippingRect(_ref) { |
| 1114 | let { |
| 1115 | element, |
| 1116 | boundary, |
| 1117 | rootBoundary, |
| 1118 | strategy |
| 1119 | } = _ref; |
| 1120 | const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary); |
| 1121 | const clippingAncestors = [...mainClippingAncestors, rootBoundary]; |
| 1122 | const firstClippingAncestor = clippingAncestors[0]; |
| 1123 | const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { |
| 1124 | const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); |
| 1125 | accRect.top = max(rect.top, accRect.top); |
| 1126 | accRect.right = min(rect.right, accRect.right); |
| 1127 | accRect.bottom = min(rect.bottom, accRect.bottom); |
| 1128 | accRect.left = max(rect.left, accRect.left); |
| 1129 | return accRect; |
| 1130 | }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); |
| 1131 | return { |
| 1132 | width: clippingRect.right - clippingRect.left, |
| 1133 | height: clippingRect.bottom - clippingRect.top, |
| 1134 | x: clippingRect.left, |
| 1135 | y: clippingRect.top |
| 1136 | }; |
| 1137 | } |
| 1138 | |
| 1139 | const platform = { |
| 1140 | getClippingRect, |
| 1141 | convertOffsetParentRelativeRectToViewportRelativeRect, |
| 1142 | isElement, |
| 1143 | getDimensions, |
| 1144 | getOffsetParent, |
| 1145 | getDocumentElement, |
| 1146 | getElementRects: _ref => { |
| 1147 | let { |
| 1148 | reference, |
| 1149 | floating, |
| 1150 | strategy |
| 1151 | } = _ref; |
| 1152 | return { |
| 1153 | reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy), |
| 1154 | floating: { ...getDimensions(floating), |
| 1155 | x: 0, |
| 1156 | y: 0 |
| 1157 | } |
| 1158 | }; |
| 1159 | }, |
| 1160 | getClientRects: element => Array.from(element.getClientRects()), |
| 1161 | isRTL: element => getComputedStyle$1(element).direction === 'rtl' |
| 1162 | }; |
| 1163 | |
| 1164 | /** |
| 1165 | * Automatically updates the position of the floating element when necessary. |
| 1166 | * @see https://floating-ui.com/docs/autoUpdate |
| 1167 | */ |
| 1168 | function autoUpdate(reference, floating, update, options) { |
| 1169 | if (options === void 0) { |
| 1170 | options = {}; |
| 1171 | } |
| 1172 | |
| 1173 | const { |
| 1174 | ancestorScroll: _ancestorScroll = true, |
| 1175 | ancestorResize: _ancestorResize = true, |
| 1176 | elementResize = true, |
| 1177 | animationFrame = false |
| 1178 | } = options; |
| 1179 | const ancestorScroll = _ancestorScroll && !animationFrame; |
| 1180 | const ancestorResize = _ancestorResize && !animationFrame; |
| 1181 | const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : []; |
| 1182 | ancestors.forEach(ancestor => { |
| 1183 | ancestorScroll && ancestor.addEventListener('scroll', update, { |
| 1184 | passive: true |
| 1185 | }); |
| 1186 | ancestorResize && ancestor.addEventListener('resize', update); |
| 1187 | }); |
| 1188 | let observer = null; |
| 1189 | |
| 1190 | if (elementResize) { |
| 1191 | let initialUpdate = true; |
| 1192 | observer = new ResizeObserver(() => { |
| 1193 | if (!initialUpdate) { |
| 1194 | update(); |
| 1195 | } |
| 1196 | |
| 1197 | initialUpdate = false; |
| 1198 | }); |
| 1199 | isElement(reference) && !animationFrame && observer.observe(reference); |
| 1200 | observer.observe(floating); |
| 1201 | } |
| 1202 | |
| 1203 | let frameId; |
| 1204 | let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null; |
| 1205 | |
| 1206 | if (animationFrame) { |
| 1207 | frameLoop(); |
| 1208 | } |
| 1209 | |
| 1210 | function frameLoop() { |
| 1211 | const nextRefRect = getBoundingClientRect(reference); |
| 1212 | |
| 1213 | if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) { |
| 1214 | update(); |
| 1215 | } |
| 1216 | |
| 1217 | prevRefRect = nextRefRect; |
| 1218 | frameId = requestAnimationFrame(frameLoop); |
| 1219 | } |
| 1220 | |
| 1221 | update(); |
| 1222 | return () => { |
| 1223 | var _observer; |
| 1224 | |
| 1225 | ancestors.forEach(ancestor => { |
| 1226 | ancestorScroll && ancestor.removeEventListener('scroll', update); |
| 1227 | ancestorResize && ancestor.removeEventListener('resize', update); |
| 1228 | }); |
| 1229 | (_observer = observer) == null ? void 0 : _observer.disconnect(); |
| 1230 | observer = null; |
| 1231 | |
| 1232 | if (animationFrame) { |
| 1233 | cancelAnimationFrame(frameId); |
| 1234 | } |
| 1235 | }; |
| 1236 | } |
| 1237 | |
| 1238 | /** |
| 1239 | * Computes the `x` and `y` coordinates that will place the floating element |
| 1240 | * next to a reference element when it is given a certain CSS positioning |
| 1241 | * strategy. |
| 1242 | */ |
| 1243 | |
| 1244 | const computePosition = (reference, floating, options) => computePosition$1(reference, floating, { |
| 1245 | platform, |
| 1246 | ...options |
| 1247 | }); |
| 1248 | |
| 1249 | const dropdownCss = ":host{display:inline-block;--panel-height:75vh;--panel-width:11rem}.dropdown{position:relative}.dropdown.dropdown--open .dropdown__positioner{visibility:visible;opacity:1;transform:scale(1)}.dropdown__trigger{display:block;cursor:pointer;border-width:0;outline:none;background-color:unset}.dropdown--disabled,.dropdown--disabled .dropdown__trigger{cursor:not-allowed}.dropdown__positioner{position:absolute;right:0;width:100%;z-index:var(--sc-z-index-dropdown);opacity:0;visibility:hidden;transform:scale(0.9);min-width:var(--panel-width)}.dropdown__panel{transform-origin:top left;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);max-height:var(--panel-height);font-family:var(--sc-font-sans);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-normal);color:var(--color);background-color:var(--sc-panel-background-color);border:solid 1px var(--sc-panel-border-color);border-radius:var(--sc-border-radius-medium);box-shadow:var(--sc-shadow-large);overflow:auto;overscroll-behavior:none;transition:var(--sc-transition-fast) opacity, var(--sc-transition-fast) transform;z-index:5}"; |
| 1250 | const ScDropdownStyle0 = dropdownCss; |
| 1251 | |
| 1252 | let itemIndex = 0; |
| 1253 | let arrowFlag = ''; |
| 1254 | const ScDropdown = class { |
| 1255 | constructor(hostRef) { |
| 1256 | index.registerInstance(this, hostRef); |
| 1257 | this.scShow = index.createEvent(this, "scShow", 7); |
| 1258 | this.scHide = index.createEvent(this, "scHide", 7); |
| 1259 | this.clickEl = undefined; |
| 1260 | this.disabled = undefined; |
| 1261 | this.open = false; |
| 1262 | this.position = undefined; |
| 1263 | this.placement = 'bottom-start'; |
| 1264 | this.distance = 10; |
| 1265 | this.skidding = 0; |
| 1266 | this.hoist = false; |
| 1267 | this.closeOnSelect = true; |
| 1268 | this.isVisible = undefined; |
| 1269 | } |
| 1270 | handleOpenChange() { |
| 1271 | this.open ? this.show() : this.hide(); |
| 1272 | } |
| 1273 | handleOutsideClick(evt) { |
| 1274 | const path = evt.composedPath(); |
| 1275 | if (!path.some(item => { |
| 1276 | return item === this.el; |
| 1277 | })) { |
| 1278 | this.open = false; |
| 1279 | } |
| 1280 | } |
| 1281 | startPositioner() { |
| 1282 | this.stopPositioner(); |
| 1283 | this.updatePositioner(); |
| 1284 | this.positionerCleanup = autoUpdate(this.trigger, this.positioner, this.updatePositioner.bind(this)); |
| 1285 | } |
| 1286 | updatePositioner() { |
| 1287 | if (!this.open || !this.trigger || !this.positioner) { |
| 1288 | return; |
| 1289 | } |
| 1290 | computePosition(this.trigger, this.positioner, { |
| 1291 | placement: this.placement, |
| 1292 | middleware: [ |
| 1293 | offset({ mainAxis: this.distance, crossAxis: this.skidding }), |
| 1294 | flip(), |
| 1295 | shift(), |
| 1296 | size({ |
| 1297 | apply: ({ availableWidth: width, availableHeight: height }) => { |
| 1298 | // Ensure the panel stays within the viewport when we have lots of menu items |
| 1299 | Object.assign(this.panel.style, { |
| 1300 | maxWidth: `${width}px`, |
| 1301 | maxHeight: `${height}px`, |
| 1302 | }); |
| 1303 | }, |
| 1304 | padding: 8, |
| 1305 | }), |
| 1306 | ], |
| 1307 | strategy: this.hoist ? 'fixed' : 'absolute', |
| 1308 | }).then(({ x, y, placement }) => { |
| 1309 | this.positioner.setAttribute('data-placement', placement); |
| 1310 | Object.assign(this.positioner.style, { |
| 1311 | position: this.hoist ? 'fixed' : 'absolute', |
| 1312 | left: `${x}px`, |
| 1313 | top: `${y}px`, |
| 1314 | right: 'auto', |
| 1315 | }); |
| 1316 | }); |
| 1317 | } |
| 1318 | stopPositioner() { |
| 1319 | if (this.positionerCleanup) { |
| 1320 | this.positionerCleanup(); |
| 1321 | this.positionerCleanup = undefined; |
| 1322 | this.positioner.removeAttribute('data-placement'); |
| 1323 | } |
| 1324 | } |
| 1325 | show() { |
| 1326 | index$1.speak(wp.i18n.__('Menu Selection Dropdown opened. Press Up/Down arrow to toggle between menu items.', 'surecart'), 'assertive'); |
| 1327 | this.scShow.emit(); |
| 1328 | // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher |
| 1329 | if (this.isVisible) { |
| 1330 | return; |
| 1331 | } |
| 1332 | this.isVisible = true; |
| 1333 | this.open = true; |
| 1334 | this.startPositioner(); |
| 1335 | this.panel.focus(); |
| 1336 | } |
| 1337 | hide() { |
| 1338 | index$1.speak(wp.i18n.__('Menu Selection Dropdown closed.', 'surecart'), 'assertive'); |
| 1339 | this.scHide.emit(); |
| 1340 | // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher |
| 1341 | if (!this.isVisible) { |
| 1342 | return; |
| 1343 | } |
| 1344 | this.stopPositioner(); |
| 1345 | this.isVisible = false; |
| 1346 | this.open = false; |
| 1347 | const slotted = this.el.shadowRoot.querySelector('slot[name="trigger"]'); |
| 1348 | const trigger = slotted.assignedElements({ flatten: true })[0]; |
| 1349 | trigger.focus(); |
| 1350 | } |
| 1351 | handleClick(e) { |
| 1352 | if (this.closeOnSelect) { |
| 1353 | const path = e.composedPath(); |
| 1354 | if (path.some(item => { |
| 1355 | return item.classList && item.classList.contains('menu-item'); |
| 1356 | })) { |
| 1357 | this.open = false; |
| 1358 | } |
| 1359 | } |
| 1360 | } |
| 1361 | componentWillLoad() { |
| 1362 | document.addEventListener('mousedown', evt => this.handleOutsideClick(evt)); |
| 1363 | } |
| 1364 | /* Get the slotted menu */ |
| 1365 | getMenu() { |
| 1366 | let slotted = this.el.shadowRoot.querySelector('slot'); |
| 1367 | return slotted.assignedNodes().find(node => { |
| 1368 | return node.nodeName === 'sc-menu'; |
| 1369 | }); |
| 1370 | } |
| 1371 | getItems() { |
| 1372 | return [...this.el.querySelectorAll('sc-menu-item')]; |
| 1373 | } |
| 1374 | handleHide() { |
| 1375 | this.open = false; |
| 1376 | itemIndex = 0; |
| 1377 | this.trigger.focus(); |
| 1378 | } |
| 1379 | handleKeyDown(event) { |
| 1380 | const items = this.getItems(); |
| 1381 | // Tabbing out of the control closes it |
| 1382 | if (event.key === 'Tab') { |
| 1383 | if (this.open) { |
| 1384 | this.handleHide(); |
| 1385 | } |
| 1386 | return; |
| 1387 | } |
| 1388 | // Up/down opens the menu |
| 1389 | if (['ArrowDown', 'ArrowUp'].includes(event.key)) { |
| 1390 | event.preventDefault(); |
| 1391 | event.stopImmediatePropagation(); |
| 1392 | // Show the menu if it's not already open |
| 1393 | if (!this.open) { |
| 1394 | this.open = true; |
| 1395 | } |
| 1396 | // Focus on a menu item |
| 1397 | // Focus on a menu item |
| 1398 | if (event.key === 'ArrowDown') { |
| 1399 | if (arrowFlag == 'up') { |
| 1400 | itemIndex = itemIndex + 2; |
| 1401 | } |
| 1402 | if (itemIndex > items.length - 1) { |
| 1403 | itemIndex = 0; |
| 1404 | } |
| 1405 | items[itemIndex].setFocus(); |
| 1406 | arrowFlag = 'down'; |
| 1407 | itemIndex++; |
| 1408 | return; |
| 1409 | } |
| 1410 | if (event.key === 'ArrowUp') { |
| 1411 | if (arrowFlag == 'down') { |
| 1412 | itemIndex = itemIndex - 2; |
| 1413 | } |
| 1414 | if (itemIndex < 0) { |
| 1415 | itemIndex = items.length - 1; |
| 1416 | } |
| 1417 | items[itemIndex].setFocus(); |
| 1418 | arrowFlag = 'up'; |
| 1419 | itemIndex--; |
| 1420 | return; |
| 1421 | } |
| 1422 | } |
| 1423 | // Close select dropdown on Esc/Escape key |
| 1424 | if (event.key === 'Escape') { |
| 1425 | if (this.open) { |
| 1426 | this.handleHide(); |
| 1427 | } |
| 1428 | return; |
| 1429 | } |
| 1430 | // Open select dropdown with Enter |
| 1431 | if (event.key === 'Enter') { |
| 1432 | if (this.open) { |
| 1433 | this.handleHide(); |
| 1434 | } |
| 1435 | else { |
| 1436 | event.stopImmediatePropagation(); |
| 1437 | event.preventDefault(); |
| 1438 | this.open = true; |
| 1439 | } |
| 1440 | } |
| 1441 | // don't open the menu when a CTRL/Command key is pressed |
| 1442 | if (event.ctrlKey || event.metaKey) { |
| 1443 | return; |
| 1444 | } |
| 1445 | } |
| 1446 | render() { |
| 1447 | return (index.h("div", { key: '1e7aca1ce79cc4a4c8971986cad5c6b8e01d0ed2', part: "base", class: { |
| 1448 | 'dropdown': true, |
| 1449 | 'dropdown--open': this.open, |
| 1450 | 'dropdown--disabled': this.disabled, |
| 1451 | } }, index.h("span", { key: 'a26f613ce09b4a7f8a6359000ec612b7bf44325e', part: "trigger", class: "dropdown__trigger", ref: el => (this.trigger = el), onClick: () => { |
| 1452 | if (this.disabled) |
| 1453 | return; |
| 1454 | if (this.open) { |
| 1455 | this.hide(); |
| 1456 | } |
| 1457 | else { |
| 1458 | setTimeout(() => { |
| 1459 | this.show(); |
| 1460 | }, 0); |
| 1461 | } |
| 1462 | }, "aria-expanded": this.open ? 'true' : 'false', "aria-haspopup": "true" }, index.h("slot", { key: '84ef48e1c9c8b85ff0ec205e5d8ed8689906dafc', name: "trigger" })), index.h("div", { key: '42301b117bbaaefb50acc37fb6b2e636db65833d', class: "dropdown__positioner", ref: el => (this.positioner = el) }, index.h("div", { key: 'e25303b88a027f9c8624550c71bca32535da9e73', part: "panel", class: { |
| 1463 | 'dropdown__panel': true, |
| 1464 | 'position--top-left': this.position === 'top-left', |
| 1465 | 'position--top-right': this.position === 'top-right', |
| 1466 | 'position--bottom-left': this.position === 'bottom-left', |
| 1467 | 'position--bottom-right': this.position === 'bottom-right', |
| 1468 | }, "aria-orientation": "vertical", tabindex: "-1", onClick: e => this.handleClick(e), ref: el => (this.panel = el) }, index.h("slot", { key: '105ea2bf6ed0dff40f12938997b1241076da8de0' }))))); |
| 1469 | } |
| 1470 | get el() { return index.getElement(this); } |
| 1471 | static get watchers() { return { |
| 1472 | "open": ["handleOpenChange"] |
| 1473 | }; } |
| 1474 | }; |
| 1475 | ScDropdown.style = ScDropdownStyle0; |
| 1476 | |
| 1477 | const scMenuCss = ":host{display:block}.menu{padding:var(--sc-spacing-x-small) 0}.menu:focus{outline:none}::slotted(sc-input){margin-top:-var(--sc-spacing-x-small)}::slotted(sc-divider){--spacing:var(--sc-spacing-x-small)}"; |
| 1478 | const ScMenuStyle0 = scMenuCss; |
| 1479 | |
| 1480 | const ScMenu = class { |
| 1481 | constructor(hostRef) { |
| 1482 | index.registerInstance(this, hostRef); |
| 1483 | this.scSelect = index.createEvent(this, "scSelect", 7); |
| 1484 | this.items = []; |
| 1485 | this.ariaLabel = undefined; |
| 1486 | } |
| 1487 | /** TODO: Click test */ |
| 1488 | handleClick(event) { |
| 1489 | const target = event.target; |
| 1490 | const item = target.closest('sc-menu-item'); |
| 1491 | if (item && !item.disabled) { |
| 1492 | this.scSelect.emit({ item }); |
| 1493 | } |
| 1494 | } |
| 1495 | /** TODO: Keydown Test */ |
| 1496 | handleKeyDown(event) { |
| 1497 | // Make a selection when pressing enter |
| 1498 | if (event.key === 'Enter') { |
| 1499 | const item = this.getCurrentItem(); |
| 1500 | event.preventDefault(); |
| 1501 | if (item) { |
| 1502 | this.scSelect.emit({ item }); |
| 1503 | } |
| 1504 | index$1.speak(wp.i18n.sprintf(wp.i18n.__('Menu %s selected', 'surecart'), item.textContent), 'assertive'); |
| 1505 | } |
| 1506 | // Prevent scrolling when space is pressed |
| 1507 | if (event.key === ' ') { |
| 1508 | event.preventDefault(); |
| 1509 | } |
| 1510 | // Move the selection when pressing down or up |
| 1511 | if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) { |
| 1512 | const selectedItem = this.getCurrentItem(); |
| 1513 | let index = selectedItem ? this.items.indexOf(selectedItem) : 0; |
| 1514 | if (this.items.length) { |
| 1515 | event.preventDefault(); |
| 1516 | if (event.key === 'ArrowDown') { |
| 1517 | index++; |
| 1518 | } |
| 1519 | else if (event.key === 'ArrowUp') { |
| 1520 | index--; |
| 1521 | } |
| 1522 | else if (event.key === 'Home') { |
| 1523 | index = 0; |
| 1524 | } |
| 1525 | else if (event.key === 'End') { |
| 1526 | index = this.items.length - 1; |
| 1527 | } |
| 1528 | if (index < 0) |
| 1529 | index = 0; |
| 1530 | if (index > this.items.length - 1) |
| 1531 | index = this.items.length - 1; |
| 1532 | this.setCurrentItem(this.items[index]); |
| 1533 | return; |
| 1534 | } |
| 1535 | } |
| 1536 | } |
| 1537 | /** Get the active item */ |
| 1538 | getCurrentItem() { |
| 1539 | return this.items.find(i => i.getAttribute('tabindex') === '0'); |
| 1540 | } |
| 1541 | /** |
| 1542 | * @internal Sets the current menu item to the specified element. This sets `tabindex="0"` on the target element and |
| 1543 | * `tabindex="-1"` to all other items. This method must be called prior to setting focus on a menu item. |
| 1544 | */ |
| 1545 | async setCurrentItem(item) { |
| 1546 | const activeItem = item.disabled ? this.items[0] : item; |
| 1547 | // Update tab indexes |
| 1548 | this.items.forEach(i => { |
| 1549 | i.setAttribute('tabindex', i === activeItem ? '0' : '-1'); |
| 1550 | }); |
| 1551 | } |
| 1552 | /** Sync slotted items with internal state */ |
| 1553 | syncItems() { |
| 1554 | const slottedElements = this.el.shadowRoot.querySelector('slot').assignedElements({ flatten: true }); |
| 1555 | this.items = slottedElements.filter(node => { |
| 1556 | return node.nodeName === 'sc-menu-item'; |
| 1557 | }); |
| 1558 | } |
| 1559 | /** Handle items change in slot */ |
| 1560 | handleSlotChange() { |
| 1561 | this.syncItems(); |
| 1562 | } |
| 1563 | render() { |
| 1564 | return (index.h("div", { key: '9ba9577b109f76589a4c3ce1212718278898a60d', part: "base", class: "menu", tabindex: "0", onKeyDown: e => this.handleKeyDown(e) }, index.h("slot", { key: 'c763698156f7f37b11b94863a28f0c389e21379d', onSlotchange: () => this.handleSlotChange() }))); |
| 1565 | } |
| 1566 | get el() { return index.getElement(this); } |
| 1567 | }; |
| 1568 | ScMenu.style = ScMenuStyle0; |
| 1569 | |
| 1570 | const scMenuItemCss = ":host{display:block}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--sc-font-sans);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-normal);line-height:var(--sc-menu-item-line-height, var(--sc-line-height-normal));letter-spacing:var(--sc-letter-spacing-normal);text-align:left;color:var(--sc-menu-item-color, var(--sc-color-gray-700));padding:var(--sc-spacing-xx-small) var(--sc-spacing-x-large);transition:var(--sc-input-transition, var(--sc-transition-medium)) fill, var(--sc-input-transition, var(--sc-transition-medium)) background-color;user-select:none;white-space:var(--sc-menu-item-white-space, nowrap);cursor:pointer;text-decoration:none}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--sc-menu-item-background-focused, var(--sc-color-primary-500));color:var(--sc-color-white)}.menu-item.menu-item--disabled{outline:none;color:var(--sc-color-gray-400);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(*){display:inline-flex;margin-right:var(--sc-spacing-small)}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(*){margin-left:var(--sc-spacing-x-small);text-align:right}.menu-item .menu-item__check{display:flex;position:absolute;left:0.5em;top:0.6em;visibility:hidden;align-items:center;font-size:inherit}.menu-item--checked .menu-item__check{visibility:visible}.menu-item--is-rtl.menu-item{text-align:right}.menu-item--is-rtl.menu-item .menu-item__check{left:auto;right:0.5em}"; |
| 1571 | const ScMenuItemStyle0 = scMenuItemCss; |
| 1572 | |
| 1573 | const ScMenuItem = class { |
| 1574 | constructor(hostRef) { |
| 1575 | index.registerInstance(this, hostRef); |
| 1576 | this.hasFocus = false; |
| 1577 | this.href = undefined; |
| 1578 | this.target = undefined; |
| 1579 | this.checked = false; |
| 1580 | this.value = ''; |
| 1581 | this.disabled = false; |
| 1582 | } |
| 1583 | /** Sets focus on the button. */ |
| 1584 | async setFocus(options) { |
| 1585 | this.menuItem.focus(options); |
| 1586 | } |
| 1587 | /** Removes focus from the button. */ |
| 1588 | async setBlur() { |
| 1589 | this.menuItem.blur(); |
| 1590 | } |
| 1591 | handleBlur() { |
| 1592 | this.hasFocus = false; |
| 1593 | } |
| 1594 | handleFocus() { |
| 1595 | this.hasFocus = true; |
| 1596 | } |
| 1597 | render() { |
| 1598 | const Tag = this.href ? 'a' : 'div'; |
| 1599 | return (index.h(Tag, { key: '20ea51e8e6f0da05e485dc65299b34768a75acca', ref: el => (this.menuItem = el), part: "base", class: { |
| 1600 | 'menu-item': true, |
| 1601 | 'menu-item--checked': this.checked, |
| 1602 | 'menu-item--disabled': this.disabled, |
| 1603 | 'menu-item--focused': this.hasFocus, |
| 1604 | 'menu-item--is-rtl': pageAlign.isRtl(), |
| 1605 | }, href: this.href, role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false', "aria-checked": this.checked ? 'true' : 'false', tabindex: !this.disabled ? '0' : undefined, onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur(), onMouseEnter: () => this.handleFocus(), onMouseLeave: () => this.handleBlur(), onKeyDown: e => { |
| 1606 | if (e.key === ' ' || e.key === 'Spacebar' || e.key === 'Enter') { |
| 1607 | this.menuItem.click(); |
| 1608 | } |
| 1609 | }, "aria-label": this.el.innerText, target: this.target }, index.h("span", { key: 'd4e58e4c3e018c2ac486eef83483a49cd1ea6be8', part: "checked-icon", class: "menu-item__check" }, index.h("svg", { key: 'f85b93260e2844121bfe69153ac11a431a3e292d', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentColor", class: "bi bi-check", viewBox: "0 0 16 16" }, index.h("path", { key: 'c38a1e85048add5011eb1988217b33615d93d58a', d: "M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z" }))), index.h("span", { key: '331a165555ba8ea443ed16080e68e51003a1b417', part: "prefix", class: "menu-item__prefix" }, index.h("slot", { key: '2ee600e67959428bf202e37160de05e7ea6d321c', name: "prefix" })), index.h("span", { key: '9c28f05fca86a36020e583ade87d8bd33b6ccd86', part: "label", class: "menu-item__label" }, index.h("slot", { key: '1c7366ac2ec2a6a7846d7346447215001d1dc506' })), index.h("span", { key: '3bad55c0f24bb042901e7c648ca6cc572e0ab219', part: "suffix", class: "menu-item__suffix" }, index.h("slot", { key: '76faea3a3d36f0b8f4df949d6eb33d0936468b6c', name: "suffix" })))); |
| 1610 | } |
| 1611 | get el() { return index.getElement(this); } |
| 1612 | }; |
| 1613 | ScMenuItem.style = ScMenuItemStyle0; |
| 1614 | |
| 1615 | exports.sc_dropdown = ScDropdown; |
| 1616 | exports.sc_menu = ScMenu; |
| 1617 | exports.sc_menu_item = ScMenuItem; |
| 1618 | |
| 1619 | //# sourceMappingURL=sc-dropdown_3.cjs.entry.js.map |