PluginProbe ʕ •ᴥ•ʔ
WooCommerce / 8.5.0-beta.1
WooCommerce v8.5.0-beta.1
10.9.1 10.9.0 10.9.0-rc.1 10.9.0-beta.2 10.9.0-beta.1 10.8.1 10.8.0 10.8.0-rc.1 10.8.0-beta.2 10.8.0-beta.1 7.8.0-beta.1 7.8.0-beta.2 7.8.0-rc.1 7.8.0-rc.2 7.8.1 7.8.2 7.8.3 7.8.4 7.9.0 7.9.0-beta.1 7.9.0-beta.2 7.9.0-rc.2 7.9.0-rc.3 7.9.1 7.9.2 8.0.0 8.0.0-beta.1 8.0.0-beta.2 8.0.0-rc.1 8.0.0-rc.2 8.0.1 8.0.2 8.0.3 8.0.4 8.0.5 8.1.0 8.1.0-beta.1 8.1.0-rc.1 8.1.0-rc.2 8.1.1 8.1.2 8.1.3 8.1.4 8.2.0 8.2.0-beta.1 8.2.0-rc.1 8.2.0-rc.2 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.3.0 8.3.0-beta.1 8.3.0-rc.1 8.3.0-rc.2 8.3.1 8.3.2 8.3.3 8.3.4 8.4.0 8.4.0-beta.1 8.4.0-rc.1 8.4.1 8.4.2 8.4.3 8.5.0 8.5.0-beta.1 8.5.0-rc.1 8.5.1 8.5.2 8.5.3 8.5.4 8.5.5 8.6.0 8.6.0-beta.1 8.6.0-rc.1 8.6.1 8.6.2 8.6.3 8.6.4 8.7.0 8.7.0-beta.1 8.7.0-beta.2 8.7.0-rc.1 8.7.1 8.7.2 8.7.3 8.8.0 8.8.0-beta.1 8.8.0-rc.1 8.8.1 8.8.2 8.8.3 8.8.4 8.8.5 8.8.6 8.8.7 8.9.0 8.9.0-beta.1 8.9.0-rc.1 8.9.1 8.9.2 8.9.3 8.9.4 8.9.5 9.0.0 9.0.0-beta.1 9.0.0-beta.2 9.0.0-rc.1 9.0.1 9.0.2 9.0.3 9.0.4 9.1.0 9.1.0-beta.1 9.1.0-rc.1 9.1.1 9.1.2 9.1.3 9.1.4 9.1.5 9.1.6 9.2.0 9.2.0-beta.1 9.2.0-rc.1 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.3.0 9.3.0-beta.1 9.3.0-rc.1 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6 9.4.0 9.4.0-beta.1 9.4.0-beta.2 9.4.0-rc.1 9.4.0-rc.2 9.4.0-rc.3 9.4.0-rc.4 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.5.0 9.5.0-beta.1 9.5.0-beta.2 9.5.0-rc.1 9.5.1 9.5.2 9.5.3 9.5.4 9.6.0 9.6.0-beta.1 9.6.0-beta.2 9.6.0-rc.1 9.6.1 9.6.2 9.6.3 9.6.4 9.7.0 9.7.0-beta.1 9.7.0-rc.1 9.7.1 9.7.2 9.7.3 9.8.0 9.8.0-beta.1 9.8.0-rc.1 9.8.1 9.8.2 9.8.3 9.8.4 9.8.5 9.8.6 9.8.7 9.9.0 9.9.0-beta.1 9.9.0-rc.1 9.9.1 9.9.2 9.9.3 9.9.4 9.9.5 9.9.6 9.9.7 3.7.3 7.1.2 3.8.0 7.2.0 3.8.0-beta.1 7.2.0-beta.1 3.8.0-rc.1 7.2.0-beta.2 3.8.0-rc.2 7.2.0-rc.1 3.8.1 7.2.0-rc.2 3.8.2 7.2.1 3.8.3 7.2.2 3.9.0 7.2.3 3.9.0-beta.1 7.2.4 3.9.0-beta.2 7.3.0 3.9.0-rc.1 7.3.0-beta.1 3.9.0-rc.2 7.3.0-beta.2 3.9.0-rc.3 7.3.0-rc.1 3.9.0-rc.4 7.3.0-rc.2 3.9.1 7.3.1 3.9.2 7.4.0 3.9.3 7.4.0-beta.1 3.9.4 7.4.0-beta.2 3.9.5 7.4.0-rc.1 4.0.0 7.4.0-rc.2 4.0.0-beta.1 7.4.1 4.0.0-rc.1 7.4.2 4.0.0-rc.2 7.5.0 4.0.1 7.5.0-beta.1 4.0.2 7.5.0-beta.2 4.0.3 7.5.0-rc.1 4.0.4 7.5.1 4.1.0 7.5.2 4.1.0-beta.1 7.6.0 4.1.0-beta.2 7.6.0-beta.1 4.1.0-rc.1 7.6.0-beta.2 4.1.0-rc.2 7.6.0-rc.1 4.1.1 7.6.0-rc.2 4.1.2 7.6.0-rc.3 4.1.3 7.6.1 4.1.4 7.6.2 4.2.0 7.7.0 4.2.0-RC.1 7.7.0-beta.1 4.2.0-RC.2 7.7.0-beta.2 4.2.0-beta.1 7.7.0-rc.1 4.2.1 7.7.1 4.2.2 7.7.2 4.2.3 7.7.3 4.2.4 7.8.0 4.2.5 4.3.0 4.3.0-beta.1 4.3.0-rc.1 4.3.0-rc.2 4.3.0-rc.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.4.0 4.4.0-beta.1 4.4.0-rc.1 4.4.1 4.4.2 4.4.3 4.4.4 4.5.0 4.5.0-beta.1 4.5.0-rc.1 4.5.0-rc.3 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.0-beta.1 4.6.0-rc.1 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.7.0 4.7.0-beta.1 4.7.0-beta.2 4.7.0-rc.1 4.7.1 4.7.1-beta.1 4.7.2 4.7.3 4.7.4 4.8.0 4.8.0-beta.1 4.8.0-rc.1 4.8.0-rc.2 4.8.1 4.8.2 4.8.3 4.9.0 4.9.0-beta.1 4.9.0-rc.1 4.9.0-rc.2 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 5.0.0 5.0.0-beta.1 5.0.0-beta.2 5.0.0-rc.1 5.0.0-rc.2 5.0.0-rc.3 5.0.1 5.0.2 5.0.3 5.1.0 5.1.0-beta.1 5.1.0-rc.1 trunk 5.1.1 10.0.0 5.1.2 10.0.0-rc.1 5.1.3 10.0.0-rc.2 5.2.0 10.0.1 5.2.0-beta.1 10.0.2 5.2.0-rc.1 10.0.3 5.2.0-rc.2 10.0.4 5.2.1 10.0.5 5.2.2 10.0.6 5.2.3 10.1.0 5.2.4 10.1.0-rc.1 5.2.5 10.1.0-rc.2 5.3.0 10.1.0-rc.3 5.3.0-beta.1 10.1.0-rc.4 5.3.0-rc.1 10.1.1 5.3.0-rc.2 10.1.2 5.3.1 10.1.3 5.3.2 10.1.4 5.3.3 10.2.0 5.4.0 10.2.0-beta.1 5.4.0-beta.1 10.2.0-beta.2 5.4.0-rc.1 10.2.0-rc.1 5.4.1 10.2.1 5.4.2 10.2.2 5.4.3 10.2.3 5.4.4 10.2.4 5.4.5 10.3.0 5.5.0 10.3.0-beta.1 5.5.0-beta.1 10.3.0-beta.2 5.5.0-rc.1 10.3.0-rc.1 5.5.0-rc.2 10.3.0-rc.2 5.5.1 10.3.1 5.5.2 10.3.2 5.5.3 10.3.3 5.5.4 10.3.4 5.5.5 10.3.5 5.6.0 10.3.6 5.6.0-beta.1 10.3.7 5.6.0-rc.1 10.3.8 5.6.0-rc.2 10.4.0 5.6.1 10.4.0-beta.1 5.6.2 10.4.0-beta.2 5.6.3 10.4.0-rc.1 5.7.0 10.4.1 5.7.0-beta.1 10.4.2 5.7.0-rc.1 10.4.3 5.7.1 10.4.4 5.7.2 10.5.0 5.7.3 10.5.0-beta.1 5.8.0 10.5.0-beta.2 5.8.0-beta.1 10.5.0-rc.1 5.8.0-beta.2 10.5.0-rc.2 5.8.0-rc.1 10.5.0-rc.3 5.8.1 10.5.1 5.8.2 10.5.2 5.9.0 10.5.3 5.9.0-beta.1 10.6.0 5.9.0-rc.1 10.6.0-beta.1 5.9.0-rc.2 10.6.0-beta.2 5.9.1 10.6.0-rc.1 5.9.2 10.6.1 6.0.0 10.6.2 6.0.0-beta.1 10.7.0 6.0.0-rc.1 10.7.0-beta.1 6.0.1 10.7.0-beta.2 6.0.2 10.7.0-rc.1 6.1.0 3.0.0 6.1.0-beta.1 3.0.1 6.1.0-rc.1 3.0.2 6.1.0-rc.2 3.0.3 6.1.1 3.0.4 6.1.2 3.0.5 6.1.3 3.0.6 6.2.0 3.0.7 6.2.0-beta.1 3.0.8 6.2.0-rc.1 3.0.9 6.2.0-rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / assets / client / blocks / active-filters-wrapper-frontend.js
woocommerce / assets / client / blocks Last commit date
active-filters 2 years ago add-to-cart-form 2 years ago all-products 2 years ago attribute-filter 2 years ago base-components-mini-cart-contents-block 2 years ago base-components-product-price~mini-cart-contents-block 2 years ago breadcrumbs 2 years ago cart-blocks 2 years ago catalog-sorting 2 years ago checkout 2 years ago checkout-blocks 2 years ago classic-shortcode 2 years ago collection-active-filters 2 years ago collection-attribute-filter 2 years ago collection-filters 2 years ago collection-price-filter 2 years ago collection-rating-filter 2 years ago collection-stock-filter 2 years ago customer-account 2 years ago featured-category 2 years ago featured-product 2 years ago filter-wrapper 2 years ago handpicked-products 2 years ago inner-blocks 2 years ago mini-cart 2 years ago mini-cart-contents-block 2 years ago order-confirmation-additional-information 2 years ago order-confirmation-billing-address 2 years ago order-confirmation-billing-wrapper 2 years ago order-confirmation-downloads 2 years ago order-confirmation-downloads-wrapper 2 years ago order-confirmation-shipping-address 2 years ago order-confirmation-shipping-wrapper 2 years ago order-confirmation-status 2 years ago order-confirmation-summary 2 years ago order-confirmation-totals 2 years ago order-confirmation-totals-wrapper 2 years ago page-content-wrapper 2 years ago price-filter 2 years ago product-average-rating 2 years ago product-best-sellers 2 years ago product-button 2 years ago product-categories 2 years ago product-category 2 years ago product-collection 2 years ago product-collection-no-results 2 years ago product-details 2 years ago product-gallery 2 years ago product-gallery-large-image 2 years ago product-gallery-large-image-next-previous 2 years ago product-gallery-pager 2 years ago product-gallery-thumbnails 2 years ago product-image-gallery 2 years ago product-meta 2 years ago product-new 2 years ago product-rating 2 years ago product-rating-counter 2 years ago product-rating-stars 2 years ago product-results-count 2 years ago product-reviews 2 years ago product-tag 2 years ago product-template 2 years ago product-top-rated 2 years ago products-by-attribute 2 years ago rating-filter 2 years ago related-products 2 years ago single-product 2 years ago stock-filter 2 years ago store-notices 2 years ago active-filters-frontend.asset.php 2 years ago active-filters-frontend.js 2 years ago active-filters-frontend.js.map 2 years ago active-filters-rtl.css 2 years ago active-filters-style.asset.php 2 years ago active-filters-style.js.map 2 years ago active-filters-wrapper-frontend.js 2 years ago active-filters-wrapper-frontend.js.map 2 years ago active-filters-wrapper-rtl.css 2 years ago active-filters-wrapper-style.js.map 2 years ago active-filters-wrapper.css 2 years ago active-filters-wrapper.css.map 2 years ago active-filters.asset.php 2 years ago active-filters.css 2 years ago active-filters.css.map 2 years ago active-filters.js 2 years ago active-filters.js.map 2 years ago add-to-cart-form-rtl.css 2 years ago add-to-cart-form-style.asset.php 2 years ago add-to-cart-form-style.js.map 2 years ago add-to-cart-form.css 2 years ago add-to-cart-form.css.map 2 years ago all-products-frontend.asset.php 2 years ago all-products-frontend.js 2 years ago all-products-frontend.js.map 2 years ago all-products-rtl.css 2 years ago all-products-style.asset.php 2 years ago all-products-style.js.map 2 years ago all-products.asset.php 2 years ago all-products.css 2 years ago all-products.css.map 2 years ago all-products.js 2 years ago all-products.js.map 2 years ago all-reviews-rtl.css 2 years ago all-reviews-style.asset.php 2 years ago all-reviews-style.js.map 2 years ago all-reviews.asset.php 2 years ago all-reviews.css 2 years ago all-reviews.css.map 2 years ago all-reviews.js 2 years ago all-reviews.js.map 2 years ago assets_js_base_context_hooks_collections_use-collection_ts-assets_js_base_context_hooks_use-q-fdf7ba-style.js.map 2 years ago assets_js_base_context_hooks_use-store-add-to-cart_ts-assets_js_base_context_hooks_use-store--e30f56-style.js.map 2 years ago attribute-filter-frontend.asset.php 2 years ago attribute-filter-frontend.js 2 years ago attribute-filter-frontend.js.map 2 years ago attribute-filter-rtl.css 2 years ago attribute-filter-style.asset.php 2 years ago attribute-filter-style.js.map 2 years ago attribute-filter-wrapper-frontend.js 2 years ago attribute-filter-wrapper-frontend.js.map 2 years ago attribute-filter-wrapper-rtl.css 2 years ago attribute-filter-wrapper-style.js.map 2 years ago attribute-filter-wrapper.css 2 years ago attribute-filter-wrapper.css.map 2 years ago attribute-filter.asset.php 2 years ago attribute-filter.css 2 years ago attribute-filter.css.map 2 years ago attribute-filter.js 2 years ago attribute-filter.js.map 2 years ago base-components-attribute-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-price-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-price-filter-wrapper-style.scss-rtl.css 2 years ago base-components-price-filter-wrapper-style.scss.css 2 years ago base-components-price-filter-wrapper-style.scss.css.map 2 years ago base-components-rating-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-rating-filter-wrapper-style.scss-rtl.css 2 years ago base-components-rating-filter-wrapper-style.scss.css 2 years ago base-components-rating-filter-wrapper-style.scss.css.map 2 years ago base-components-stock-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss-rtl.css 2 years ago base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css 2 years ago base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css.map 2 years ago base-context-product-add-to-cart-index.js-style.js.map 2 years ago blocks-checkout.asset.php 2 years ago blocks-checkout.js 2 years ago blocks-checkout.js.map 2 years ago blocks-components.asset.php 2 years ago blocks-components.js 2 years ago blocks-components.js.map 2 years ago breadcrumbs-rtl.css 2 years ago breadcrumbs-style.asset.php 2 years ago breadcrumbs-style.js.map 2 years ago breadcrumbs.asset.php 2 years ago breadcrumbs.css 2 years ago breadcrumbs.css.map 2 years ago breadcrumbs.js 2 years ago breadcrumbs.js.map 2 years ago cart-frontend.asset.php 2 years ago cart-frontend.js 2 years ago cart-frontend.js.map 2 years ago cart-rtl.css 2 years ago cart-style.asset.php 2 years ago cart-style.js.map 2 years ago cart.asset.php 2 years ago cart.css 2 years ago cart.css.map 2 years ago cart.js 2 years ago cart.js.map 2 years ago catalog-sorting-rtl.css 2 years ago catalog-sorting-style.asset.php 2 years ago catalog-sorting-style.js.map 2 years ago catalog-sorting.asset.php 2 years ago catalog-sorting.css 2 years ago catalog-sorting.css.map 2 years ago catalog-sorting.js 2 years ago catalog-sorting.js.map 2 years ago checkout-frontend.asset.php 2 years ago checkout-frontend.js 2 years ago checkout-frontend.js.map 2 years ago checkout-rtl.css 2 years ago checkout-style.asset.php 2 years ago checkout-style.js.map 2 years ago checkout.asset.php 2 years ago checkout.css 2 years ago checkout.css.map 2 years ago checkout.js 2 years ago checkout.js.map 2 years ago classic-shortcode-rtl.css 2 years ago classic-shortcode-style.asset.php 2 years ago classic-shortcode-style.js.map 2 years ago classic-shortcode.asset.php 2 years ago classic-shortcode.css 2 years ago classic-shortcode.css.map 2 years ago classic-shortcode.js 2 years ago classic-shortcode.js.map 2 years ago collection-active-filters-frontend.asset.php 2 years ago collection-active-filters-frontend.js 2 years ago collection-active-filters-frontend.js.map 2 years ago collection-active-filters-rtl.css 2 years ago collection-active-filters-style.asset.php 2 years ago collection-active-filters-style.js.map 2 years ago collection-active-filters.asset.php 2 years ago collection-active-filters.css 2 years ago collection-active-filters.css.map 2 years ago collection-active-filters.js 2 years ago collection-active-filters.js.map 2 years ago collection-attribute-filter-frontend.asset.php 2 years ago collection-attribute-filter-frontend.js 2 years ago collection-attribute-filter-frontend.js.map 2 years ago collection-attribute-filter-rtl.css 2 years ago collection-attribute-filter-style.asset.php 2 years ago collection-attribute-filter-style.js.map 2 years ago collection-attribute-filter.asset.php 2 years ago collection-attribute-filter.css 2 years ago collection-attribute-filter.css.map 2 years ago collection-attribute-filter.js 2 years ago collection-attribute-filter.js.map 2 years ago collection-filters-style.asset.php 2 years ago collection-filters-style.js.map 2 years ago collection-filters.asset.php 2 years ago collection-filters.js 2 years ago collection-filters.js.map 2 years ago collection-price-filter-frontend.asset.php 2 years ago collection-price-filter-frontend.js 2 years ago collection-price-filter-frontend.js.map 2 years ago collection-price-filter-rtl.css 2 years ago collection-price-filter-style.asset.php 2 years ago collection-price-filter-style.js.map 2 years ago collection-price-filter.asset.php 2 years ago collection-price-filter.css 2 years ago collection-price-filter.css.map 2 years ago collection-price-filter.js 2 years ago collection-price-filter.js.map 2 years ago collection-rating-filter-frontend.asset.php 2 years ago collection-rating-filter-frontend.js 2 years ago collection-rating-filter-frontend.js.map 2 years ago collection-rating-filter-rtl.css 2 years ago collection-rating-filter-style.asset.php 2 years ago collection-rating-filter-style.js.map 2 years ago collection-rating-filter.asset.php 2 years ago collection-rating-filter.css 2 years ago collection-rating-filter.css.map 2 years ago collection-rating-filter.js 2 years ago collection-rating-filter.js.map 2 years ago collection-stock-filter-frontend.asset.php 2 years ago collection-stock-filter-frontend.js 2 years ago collection-stock-filter-frontend.js.map 2 years ago collection-stock-filter-rtl.css 2 years ago collection-stock-filter-style.asset.php 2 years ago collection-stock-filter-style.js.map 2 years ago collection-stock-filter.asset.php 2 years ago collection-stock-filter.css 2 years ago collection-stock-filter.css.map 2 years ago collection-stock-filter.js 2 years ago collection-stock-filter.js.map 2 years ago customer-account-rtl.css 2 years ago customer-account-style.asset.php 2 years ago customer-account-style.js.map 2 years ago customer-account.asset.php 2 years ago customer-account.css 2 years ago customer-account.css.map 2 years ago customer-account.js 2 years ago customer-account.js.map 2 years ago featured-category-rtl.css 2 years ago featured-category-style.asset.php 2 years ago featured-category-style.js.map 2 years ago featured-category.asset.php 2 years ago featured-category.css 2 years ago featured-category.css.map 2 years ago featured-category.js 2 years ago featured-category.js.map 2 years ago featured-product-rtl.css 2 years ago featured-product-style.asset.php 2 years ago featured-product-style.js.map 2 years ago featured-product.asset.php 2 years ago featured-product.css 2 years ago featured-product.css.map 2 years ago featured-product.js 2 years ago featured-product.js.map 2 years ago filter-wrapper-frontend.asset.php 2 years ago filter-wrapper-frontend.js 2 years ago filter-wrapper-frontend.js.map 2 years ago filter-wrapper-rtl.css 2 years ago filter-wrapper-style.asset.php 2 years ago filter-wrapper-style.js.map 2 years ago filter-wrapper.asset.php 2 years ago filter-wrapper.css 2 years ago filter-wrapper.css.map 2 years ago filter-wrapper.js 2 years ago filter-wrapper.js.map 2 years ago handpicked-products-style.asset.php 2 years ago handpicked-products-style.js.map 2 years ago handpicked-products.asset.php 2 years ago handpicked-products.js 2 years ago handpicked-products.js.map 2 years ago legacy-template-rtl.css 2 years ago legacy-template-style.asset.php 2 years ago legacy-template-style.js.map 2 years ago legacy-template.asset.php 2 years ago legacy-template.css 2 years ago legacy-template.css.map 2 years ago legacy-template.js 2 years ago legacy-template.js.map 2 years ago mini-cart-component-frontend.asset.php 2 years ago mini-cart-component-frontend.js 2 years ago mini-cart-component-frontend.js.map 2 years ago mini-cart-contents-rtl.css 2 years ago mini-cart-contents-style.asset.php 2 years ago mini-cart-contents-style.js.map 2 years ago mini-cart-contents.asset.php 2 years ago mini-cart-contents.css 2 years ago mini-cart-contents.css.map 2 years ago mini-cart-contents.js 2 years ago mini-cart-contents.js.map 2 years ago mini-cart-frontend.asset.php 2 years ago mini-cart-frontend.js 2 years ago mini-cart-frontend.js.map 2 years ago mini-cart-rtl.css 2 years ago mini-cart-style.asset.php 2 years ago mini-cart-style.js.map 2 years ago mini-cart.asset.php 2 years ago mini-cart.css 2 years ago mini-cart.css.map 2 years ago mini-cart.js 2 years ago mini-cart.js.map 2 years ago order-confirmation-additional-information-rtl.css 2 years ago order-confirmation-additional-information-style.asset.php 2 years ago order-confirmation-additional-information-style.js.map 2 years ago order-confirmation-additional-information.asset.php 2 years ago order-confirmation-additional-information.css 2 years ago order-confirmation-additional-information.css.map 2 years ago order-confirmation-additional-information.js 2 years ago order-confirmation-additional-information.js.map 2 years ago order-confirmation-billing-address-rtl.css 2 years ago order-confirmation-billing-address-style.asset.php 2 years ago order-confirmation-billing-address-style.js.map 2 years ago order-confirmation-billing-address.asset.php 2 years ago order-confirmation-billing-address.css 2 years ago order-confirmation-billing-address.css.map 2 years ago order-confirmation-billing-address.js 2 years ago order-confirmation-billing-address.js.map 2 years ago order-confirmation-billing-wrapper-style.asset.php 2 years ago order-confirmation-billing-wrapper-style.js.map 2 years ago order-confirmation-billing-wrapper.asset.php 2 years ago order-confirmation-billing-wrapper.js 2 years ago order-confirmation-billing-wrapper.js.map 2 years ago order-confirmation-downloads-rtl.css 2 years ago order-confirmation-downloads-style.asset.php 2 years ago order-confirmation-downloads-style.js.map 2 years ago order-confirmation-downloads-wrapper-style.asset.php 2 years ago order-confirmation-downloads-wrapper-style.js.map 2 years ago order-confirmation-downloads-wrapper.asset.php 2 years ago order-confirmation-downloads-wrapper.js 2 years ago order-confirmation-downloads-wrapper.js.map 2 years ago order-confirmation-downloads.asset.php 2 years ago order-confirmation-downloads.css 2 years ago order-confirmation-downloads.css.map 2 years ago order-confirmation-downloads.js 2 years ago order-confirmation-downloads.js.map 2 years ago order-confirmation-shipping-address-rtl.css 2 years ago order-confirmation-shipping-address-style.asset.php 2 years ago order-confirmation-shipping-address-style.js.map 2 years ago order-confirmation-shipping-address.asset.php 2 years ago order-confirmation-shipping-address.css 2 years ago order-confirmation-shipping-address.css.map 2 years ago order-confirmation-shipping-address.js 2 years ago order-confirmation-shipping-address.js.map 2 years ago order-confirmation-shipping-wrapper-style.asset.php 2 years ago order-confirmation-shipping-wrapper-style.js.map 2 years ago order-confirmation-shipping-wrapper.asset.php 2 years ago order-confirmation-shipping-wrapper.js 2 years ago order-confirmation-shipping-wrapper.js.map 2 years ago order-confirmation-status-rtl.css 2 years ago order-confirmation-status-style.asset.php 2 years ago order-confirmation-status-style.js.map 2 years ago order-confirmation-status.asset.php 2 years ago order-confirmation-status.css 2 years ago order-confirmation-status.css.map 2 years ago order-confirmation-status.js 2 years ago order-confirmation-status.js.map 2 years ago order-confirmation-summary-rtl.css 2 years ago order-confirmation-summary-style.asset.php 2 years ago order-confirmation-summary-style.js.map 2 years ago order-confirmation-summary.asset.php 2 years ago order-confirmation-summary.css 2 years ago order-confirmation-summary.css.map 2 years ago order-confirmation-summary.js 2 years ago order-confirmation-summary.js.map 2 years ago order-confirmation-totals-rtl.css 2 years ago order-confirmation-totals-style.asset.php 2 years ago order-confirmation-totals-style.js.map 2 years ago order-confirmation-totals-wrapper-style.asset.php 2 years ago order-confirmation-totals-wrapper-style.js.map 2 years ago order-confirmation-totals-wrapper.asset.php 2 years ago order-confirmation-totals-wrapper.js 2 years ago order-confirmation-totals-wrapper.js.map 2 years ago order-confirmation-totals.asset.php 2 years ago order-confirmation-totals.css 2 years ago order-confirmation-totals.css.map 2 years ago order-confirmation-totals.js 2 years ago order-confirmation-totals.js.map 2 years ago packages-style-rtl.css 2 years ago packages-style-style.asset.php 2 years ago packages-style-style.js.map 2 years ago packages-style.css 2 years ago packages-style.css.map 2 years ago page-content-wrapper-style.asset.php 2 years ago page-content-wrapper-style.js.map 2 years ago page-content-wrapper.asset.php 2 years ago page-content-wrapper.js 2 years ago page-content-wrapper.js.map 2 years ago price-filter-frontend.asset.php 2 years ago price-filter-frontend.js 2 years ago price-filter-frontend.js.map 2 years ago price-filter-rtl.css 2 years ago price-filter-style.asset.php 2 years ago price-filter-style.js.map 2 years ago price-filter-wrapper-frontend.js 2 years ago price-filter-wrapper-frontend.js.map 2 years ago price-filter-wrapper-rtl.css 2 years ago price-filter-wrapper-style.js.map 2 years ago price-filter-wrapper.css 2 years ago price-filter-wrapper.css.map 2 years ago price-filter.asset.php 2 years ago price-filter.css 2 years ago price-filter.css.map 2 years ago price-filter.js 2 years ago price-filter.js.map 2 years ago price-format.asset.php 2 years ago price-format.js 2 years ago price-format.js.map 2 years ago product-add-to-cart-frontend.js 2 years ago product-add-to-cart-frontend.js.map 2 years ago product-add-to-cart-rtl.css 2 years ago product-add-to-cart-style.js.map 2 years ago product-add-to-cart.css 2 years ago product-add-to-cart.css.map 2 years ago product-add-to-cart.js 2 years ago product-add-to-cart.js.map 2 years ago product-average-rating-frontend.js 2 years ago product-average-rating-frontend.js.map 2 years ago product-average-rating-style.js.map 2 years ago product-average-rating.js 2 years ago product-average-rating.js.map 2 years ago product-best-sellers-style.asset.php 2 years ago product-best-sellers-style.js.map 2 years ago product-best-sellers.asset.php 2 years ago product-best-sellers.js 2 years ago product-best-sellers.js.map 2 years ago product-button-frontend.js 2 years ago product-button-frontend.js.map 2 years ago product-button-interactivity-frontend.asset.php 2 years ago product-button-interactivity-frontend.js 2 years ago product-button-interactivity-frontend.js.map 2 years ago product-button-rtl.css 2 years ago product-button-style.js.map 2 years ago product-button.css 2 years ago product-button.css.map 2 years ago product-button.js 2 years ago product-button.js.map 2 years ago product-categories-rtl.css 2 years ago product-categories-style.asset.php 2 years ago product-categories-style.js.map 2 years ago product-categories.asset.php 2 years ago product-categories.css 2 years ago product-categories.css.map 2 years ago product-categories.js 2 years ago product-categories.js.map 2 years ago product-category-style.asset.php 2 years ago product-category-style.js.map 2 years ago product-category.asset.php 2 years ago product-category.js 2 years ago product-category.js.map 2 years ago product-collection-no-results-style.asset.php 2 years ago product-collection-no-results-style.js.map 2 years ago product-collection-no-results.asset.php 2 years ago product-collection-no-results.js 2 years ago product-collection-no-results.js.map 2 years ago product-collection-style.asset.php 2 years ago product-collection-style.js.map 2 years ago product-collection.asset.php 2 years ago product-collection.js 2 years ago product-collection.js.map 2 years ago product-details-rtl.css 2 years ago product-details-style.asset.php 2 years ago product-details-style.js.map 2 years ago product-details.css 2 years ago product-details.css.map 2 years ago product-gallery-frontend.asset.php 2 years ago product-gallery-frontend.js 2 years ago product-gallery-frontend.js.map 2 years ago product-gallery-large-image-frontend.asset.php 2 years ago product-gallery-large-image-frontend.js 2 years ago product-gallery-large-image-frontend.js.map 2 years ago product-gallery-large-image-next-previous-style.asset.php 2 years ago product-gallery-large-image-next-previous-style.js.map 2 years ago product-gallery-large-image-next-previous.asset.php 2 years ago product-gallery-large-image-next-previous.js 2 years ago product-gallery-large-image-next-previous.js.map 2 years ago product-gallery-large-image-style.asset.php 2 years ago product-gallery-large-image-style.js.map 2 years ago product-gallery-large-image.asset.php 2 years ago product-gallery-large-image.js 2 years ago product-gallery-large-image.js.map 2 years ago product-gallery-pager-style.asset.php 2 years ago product-gallery-pager-style.js.map 2 years ago product-gallery-pager.asset.php 2 years ago product-gallery-pager.js 2 years ago product-gallery-pager.js.map 2 years ago product-gallery-rtl.css 2 years ago product-gallery-style.asset.php 2 years ago product-gallery-style.js.map 2 years ago product-gallery-thumbnails-style.asset.php 2 years ago product-gallery-thumbnails-style.js.map 2 years ago product-gallery-thumbnails.asset.php 2 years ago product-gallery-thumbnails.js 2 years ago product-gallery-thumbnails.js.map 2 years ago product-gallery.asset.php 2 years ago product-gallery.css 2 years ago product-gallery.css.map 2 years ago product-gallery.js 2 years ago product-gallery.js.map 2 years ago product-image-frontend.js 2 years ago product-image-frontend.js.map 2 years ago product-image-gallery-rtl.css 2 years ago product-image-gallery-style.asset.php 2 years ago product-image-gallery-style.js.map 2 years ago product-image-gallery.css 2 years ago product-image-gallery.css.map 2 years ago product-image-rtl.css 2 years ago product-image-style.js.map 2 years ago product-image.css 2 years ago product-image.css.map 2 years ago product-image.js 2 years ago product-image.js.map 2 years ago product-new-style.asset.php 2 years ago product-new-style.js.map 2 years ago product-new.asset.php 2 years ago product-new.js 2 years ago product-new.js.map 2 years ago product-on-sale-style.asset.php 2 years ago product-on-sale-style.js.map 2 years ago product-on-sale.asset.php 2 years ago product-on-sale.js 2 years ago product-on-sale.js.map 2 years ago product-price-frontend.js 2 years ago product-price-frontend.js.map 2 years ago product-price-rtl.css 2 years ago product-price-style.js.map 2 years ago product-price.css 2 years ago product-price.css.map 2 years ago product-price.js 2 years ago product-price.js.map 2 years ago product-query-rtl.css 2 years ago product-query-style.asset.php 2 years ago product-query-style.js.map 2 years ago product-query.asset.php 2 years ago product-query.css 2 years ago product-query.css.map 2 years ago product-query.js 2 years ago product-query.js.map 2 years ago product-rating-counter-frontend.js 2 years ago product-rating-counter-frontend.js.map 2 years ago product-rating-counter-style.js.map 2 years ago product-rating-counter.js 2 years ago product-rating-counter.js.map 2 years ago product-rating-frontend.js 2 years ago product-rating-frontend.js.map 2 years ago product-rating-rtl.css 2 years ago product-rating-stars-frontend.js 2 years ago product-rating-stars-frontend.js.map 2 years ago product-rating-stars-rtl.css 2 years ago product-rating-stars-style.js.map 2 years ago product-rating-stars.css 2 years ago product-rating-stars.css.map 2 years ago product-rating-stars.js 2 years ago product-rating-stars.js.map 2 years ago product-rating-style.js.map 2 years ago product-rating.css 2 years ago product-rating.css.map 2 years ago product-rating.js 2 years ago product-rating.js.map 2 years ago product-results-count-rtl.css 2 years ago product-results-count-style.asset.php 2 years ago product-results-count-style.js.map 2 years ago product-results-count.asset.php 2 years ago product-results-count.css 2 years ago product-results-count.css.map 2 years ago product-results-count.js 2 years ago product-results-count.js.map 2 years ago product-reviews-rtl.css 2 years ago product-reviews-style.asset.php 2 years ago product-reviews-style.js.map 2 years ago product-reviews.css 2 years ago product-reviews.css.map 2 years ago product-sale-badge-frontend.js 2 years ago product-sale-badge-frontend.js.map 2 years ago product-sale-badge-rtl.css 2 years ago product-sale-badge-style.js.map 2 years ago product-sale-badge.css 2 years ago product-sale-badge.css.map 2 years ago product-sale-badge.js 2 years ago product-sale-badge.js.map 2 years ago product-search-rtl.css 2 years ago product-search-style.asset.php 2 years ago product-search-style.js.map 2 years ago product-search.asset.php 2 years ago product-search.css 2 years ago product-search.css.map 2 years ago product-search.js 2 years ago product-search.js.map 2 years ago product-sku-frontend.js 2 years ago product-sku-frontend.js.map 2 years ago product-sku-rtl.css 2 years ago product-sku-style.js.map 2 years ago product-sku.css 2 years ago product-sku.css.map 2 years ago product-sku.js 2 years ago product-sku.js.map 2 years ago product-stock-indicator-frontend.js 2 years ago product-stock-indicator-frontend.js.map 2 years ago product-stock-indicator-rtl.css 2 years ago product-stock-indicator-style.js.map 2 years ago product-stock-indicator.css 2 years ago product-stock-indicator.css.map 2 years ago product-stock-indicator.js 2 years ago product-stock-indicator.js.map 2 years ago product-summary-frontend.js 2 years ago product-summary-frontend.js.map 2 years ago product-summary-rtl.css 2 years ago product-summary-style.js.map 2 years ago product-summary.css 2 years ago product-summary.css.map 2 years ago product-summary.js 2 years ago product-summary.js.map 2 years ago product-tag-style.asset.php 2 years ago product-tag-style.js.map 2 years ago product-tag.asset.php 2 years ago product-tag.js 2 years ago product-tag.js.map 2 years ago product-template-rtl.css 2 years ago product-template-style.asset.php 2 years ago product-template-style.js.map 2 years ago product-template.asset.php 2 years ago product-template.css 2 years ago product-template.css.map 2 years ago product-template.js 2 years ago product-template.js.map 2 years ago product-title-frontend.js 2 years ago product-title-frontend.js.map 2 years ago product-title-rtl.css 2 years ago product-title-style.js.map 2 years ago product-title.css 2 years ago product-title.css.map 2 years ago product-title.js 2 years ago product-title.js.map 2 years ago product-top-rated-style.asset.php 2 years ago product-top-rated-style.js.map 2 years ago product-top-rated.asset.php 2 years ago product-top-rated.js 2 years ago product-top-rated.js.map 2 years ago products-by-attribute-style.asset.php 2 years ago products-by-attribute-style.js.map 2 years ago products-by-attribute.asset.php 2 years ago products-by-attribute.js 2 years ago products-by-attribute.js.map 2 years ago rating-filter-frontend.asset.php 2 years ago rating-filter-frontend.js 2 years ago rating-filter-frontend.js.map 2 years ago rating-filter-rtl.css 2 years ago rating-filter-style.asset.php 2 years ago rating-filter-style.js.map 2 years ago rating-filter-wrapper-frontend.js 2 years ago rating-filter-wrapper-frontend.js.map 2 years ago rating-filter-wrapper-rtl.css 2 years ago rating-filter-wrapper-style.js.map 2 years ago rating-filter-wrapper.css 2 years ago rating-filter-wrapper.css.map 2 years ago rating-filter.asset.php 2 years ago rating-filter.css 2 years ago rating-filter.css.map 2 years ago rating-filter.js 2 years ago rating-filter.js.map 2 years ago reviews-by-category-rtl.css 2 years ago reviews-by-category-style.asset.php 2 years ago reviews-by-category-style.js.map 2 years ago reviews-by-category.asset.php 2 years ago reviews-by-category.css 2 years ago reviews-by-category.css.map 2 years ago reviews-by-category.js 2 years ago reviews-by-category.js.map 2 years ago reviews-by-product-rtl.css 2 years ago reviews-by-product-style.asset.php 2 years ago reviews-by-product-style.js.map 2 years ago reviews-by-product.asset.php 2 years ago reviews-by-product.css 2 years ago reviews-by-product.css.map 2 years ago reviews-by-product.js 2 years ago reviews-by-product.js.map 2 years ago reviews-frontend.asset.php 2 years ago reviews-frontend.js 2 years ago reviews-frontend.js.map 2 years ago single-product-rtl.css 2 years ago single-product-style.asset.php 2 years ago single-product-style.js.map 2 years ago single-product.asset.php 2 years ago single-product.css 2 years ago single-product.css.map 2 years ago single-product.js 2 years ago single-product.js.map 2 years ago stock-filter-frontend.asset.php 2 years ago stock-filter-frontend.js 2 years ago stock-filter-frontend.js.map 2 years ago stock-filter-rtl.css 2 years ago stock-filter-style.asset.php 2 years ago stock-filter-style.js.map 2 years ago stock-filter-wrapper-frontend.js 2 years ago stock-filter-wrapper-frontend.js.map 2 years ago stock-filter-wrapper-rtl.css 2 years ago stock-filter-wrapper-style.js.map 2 years ago stock-filter-wrapper.css 2 years ago stock-filter-wrapper.css.map 2 years ago stock-filter.asset.php 2 years ago stock-filter.css 2 years ago stock-filter.css.map 2 years ago stock-filter.js 2 years ago stock-filter.js.map 2 years ago store-notices-rtl.css 2 years ago store-notices-style.asset.php 2 years ago store-notices-style.js.map 2 years ago store-notices.asset.php 2 years ago store-notices.css 2 years ago store-notices.css.map 2 years ago store-notices.js 2 years ago store-notices.js.map 2 years ago vendors-node_modules_pnpm_dinero_js_1_9_1_node_modules_dinero_js_build_esm_dinero_js-style.js.map 2 years ago vendors-node_modules_pnpm_param-case_3_0_4_node_modules_param-case_dist_es2015_index_js-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-019903-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e-frontend.js 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e-frontend.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-68c184-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f-frontend.js 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f-frontend.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-849324-frontend.js 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-849324-frontend.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-bab841-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-c6918e-style.js.map 2 years ago wc-blocks-classic-template-revert-button-style-rtl.css 2 years ago wc-blocks-classic-template-revert-button-style-style.asset.php 2 years ago wc-blocks-classic-template-revert-button-style-style.js.map 2 years ago wc-blocks-classic-template-revert-button-style.css 2 years ago wc-blocks-classic-template-revert-button-style.css.map 2 years ago wc-blocks-classic-template-revert-button.asset.php 2 years ago wc-blocks-classic-template-revert-button.js 2 years ago wc-blocks-classic-template-revert-button.js.map 2 years ago wc-blocks-data.asset.php 2 years ago wc-blocks-data.js 2 years ago wc-blocks-data.js.map 2 years ago wc-blocks-editor-style-rtl.css 2 years ago wc-blocks-editor-style.css 2 years ago wc-blocks-editor-style.css.map 2 years ago wc-blocks-google-analytics.asset.php 2 years ago wc-blocks-google-analytics.js 2 years ago wc-blocks-google-analytics.js.map 2 years ago wc-blocks-middleware.asset.php 2 years ago wc-blocks-middleware.js 2 years ago wc-blocks-middleware.js.map 2 years ago wc-blocks-registry.asset.php 2 years ago wc-blocks-registry.js 2 years ago wc-blocks-registry.js.map 2 years ago wc-blocks-rtl.css 2 years ago wc-blocks-shared-context.asset.php 2 years ago wc-blocks-shared-context.js 2 years ago wc-blocks-shared-context.js.map 2 years ago wc-blocks-shared-hocs.asset.php 2 years ago wc-blocks-shared-hocs.js 2 years ago wc-blocks-shared-hocs.js.map 2 years ago wc-blocks-style.asset.php 2 years ago wc-blocks-style.js.map 2 years ago wc-blocks-vendors.asset.php 2 years ago wc-blocks-vendors.js 2 years ago wc-blocks-vendors.js.map 2 years ago wc-blocks.asset.php 2 years ago wc-blocks.css 2 years ago wc-blocks.css.map 2 years ago wc-blocks.js 2 years ago wc-blocks.js.map 2 years ago wc-interactivity-checkbox-list-rtl.css 2 years ago wc-interactivity-checkbox-list-style.asset.php 2 years ago wc-interactivity-checkbox-list-style.js.map 2 years ago wc-interactivity-checkbox-list.asset.php 2 years ago wc-interactivity-checkbox-list.css 2 years ago wc-interactivity-checkbox-list.css.map 2 years ago wc-interactivity-checkbox-list.js 2 years ago wc-interactivity-checkbox-list.js.map 2 years ago wc-interactivity-dropdown-rtl.css 2 years ago wc-interactivity-dropdown-style.asset.php 2 years ago wc-interactivity-dropdown-style.js.map 2 years ago wc-interactivity-dropdown.asset.php 2 years ago wc-interactivity-dropdown.css 2 years ago wc-interactivity-dropdown.css.map 2 years ago wc-interactivity-dropdown.js 2 years ago wc-interactivity-dropdown.js.map 2 years ago wc-interactivity.asset.php 2 years ago wc-interactivity.js 2 years ago wc-interactivity.js.map 2 years ago wc-payment-method-bacs.asset.php 2 years ago wc-payment-method-bacs.js 2 years ago wc-payment-method-bacs.js.map 2 years ago wc-payment-method-cheque.asset.php 2 years ago wc-payment-method-cheque.js 2 years ago wc-payment-method-cheque.js.map 2 years ago wc-payment-method-cod.asset.php 2 years ago wc-payment-method-cod.js 2 years ago wc-payment-method-cod.js.map 2 years ago wc-payment-method-paypal.asset.php 2 years ago wc-payment-method-paypal.js 2 years ago wc-payment-method-paypal.js.map 2 years ago wc-settings.asset.php 2 years ago wc-settings.js 2 years ago wc-settings.js.map 2 years ago wc-shipping-method-pickup-location.asset.php 2 years ago wc-shipping-method-pickup-location.js 2 years ago wc-shipping-method-pickup-location.js.map 2 years ago
active-filters-wrapper-frontend.js
3099 lines
1 (self["webpackChunkwebpackWcBlocksJsonp"] = self["webpackChunkwebpackWcBlocksJsonp"] || []).push([["active-filters-wrapper"],{
2
3 /***/ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js":
4 /*!*****************************************************************************************************************!*\
5 !*** ../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js ***!
6 \*****************************************************************************************************************/
7 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
9 "use strict";
10 __webpack_require__.r(__webpack_exports__);
11 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
13 /* harmony export */ });
14 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
15 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
16 /**
17 * WordPress dependencies
18 */
19
20
21 /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
22
23 /**
24 * Return an SVG icon.
25 *
26 * @param {IconProps} props icon is the SVG component to render
27 * size is a number specifiying the icon size in pixels
28 * Other props will be passed to wrapped SVG component
29 * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element.
30 *
31 * @return {JSX.Element} Icon component
32 */
33 function Icon({
34 icon,
35 size = 24,
36 ...props
37 }, ref) {
38 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(icon, {
39 width: size,
40 height: size,
41 ...props,
42 ref
43 });
44 }
45 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(Icon));
46 //# sourceMappingURL=index.js.map
47
48 /***/ }),
49
50 /***/ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/close-small.js":
51 /*!**************************************************************************************************************************!*\
52 !*** ../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/close-small.js ***!
53 \**************************************************************************************************************************/
54 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
55
56 "use strict";
57 __webpack_require__.r(__webpack_exports__);
58 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
60 /* harmony export */ });
61 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
62 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
63 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
64 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
65
66 /**
67 * WordPress dependencies
68 */
69
70 const closeSmall = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
71 xmlns: "http://www.w3.org/2000/svg",
72 viewBox: "0 0 24 24"
73 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
74 d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
75 }));
76 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (closeSmall);
77 //# sourceMappingURL=close-small.js.map
78
79 /***/ }),
80
81 /***/ "./assets/js/base/components/filter-placeholder/index.tsx":
82 /*!****************************************************************!*\
83 !*** ./assets/js/base/components/filter-placeholder/index.tsx ***!
84 \****************************************************************/
85 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
86
87 "use strict";
88 __webpack_require__.r(__webpack_exports__);
89 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
90 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
91 /* harmony export */ });
92 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
93 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
94 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./assets/js/base/components/filter-placeholder/style.scss");
95 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_1__);
96
97 /**
98 * Internal dependencies
99 */
100
101 const FilterTitlePlaceholder = ({
102 children
103 }) => {
104 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
105 className: "wc-block-filter-title-placeholder"
106 }, children);
107 };
108 FilterTitlePlaceholder.__docgenInfo = {
109 "description": "",
110 "methods": [],
111 "displayName": "FilterTitlePlaceholder",
112 "props": {
113 "children": {
114 "required": false,
115 "tsType": {
116 "name": "ReactReactNode",
117 "raw": "React.ReactNode"
118 },
119 "description": ""
120 }
121 }
122 };
123 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FilterTitlePlaceholder);
124 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
125 STORYBOOK_REACT_CLASSES["assets/js/base/components/filter-placeholder/index.tsx"] = {
126 name: "FilterTitlePlaceholder",
127 docgenInfo: FilterTitlePlaceholder.__docgenInfo,
128 path: "assets/js/base/components/filter-placeholder/index.tsx"
129 };
130 }
131
132 /***/ }),
133
134 /***/ "./assets/js/base/context/hooks/collections/use-collection.ts":
135 /*!********************************************************************!*\
136 !*** ./assets/js/base/context/hooks/collections/use-collection.ts ***!
137 \********************************************************************/
138 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
139
140 "use strict";
141 __webpack_require__.r(__webpack_exports__);
142 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
143 /* harmony export */ useCollection: () => (/* binding */ useCollection)
144 /* harmony export */ });
145 /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/block-data */ "@woocommerce/block-data");
146 /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__);
147 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
148 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
149 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
150 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
151 /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-shallow-equal.ts");
152 /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-throw-error.ts");
153 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/error.ts");
154 /**
155 * External dependencies
156 */
157
158
159
160
161
162
163 /**
164 * This is a custom hook that is wired up to the `wc/store/collections` data
165 * store. Given a collections option object, this will ensure a component is
166 * kept up to date with the collection matching that query in the store state.
167 *
168 * @throws {Object} Throws an exception object if there was a problem with the
169 * API request, to be picked up by BlockErrorBoundry.
170 *
171 * @param {Object} options An object declaring the various
172 * collection arguments.
173 * @param {string} options.namespace The namespace for the collection.
174 * Example: `'/wc/blocks'`
175 * @param {string} options.resourceName The name of the resource for the
176 * collection. Example:
177 * `'products/attributes'`
178 * @param {Array} [options.resourceValues] An array of values (in correct order)
179 * that are substituted in the route
180 * placeholders for the collection route.
181 * Example: `[10, 20]`
182 * @param {Object} [options.query] An object of key value pairs for the
183 * query to execute on the collection
184 * Example:
185 * `{ order: 'ASC', order_by: 'price' }`
186 * @param {boolean} [options.shouldSelect] If false, the previous results will be
187 * returned and internal selects will not
188 * fire.
189 *
190 * @return {Object} This hook will return an object with two properties:
191 * - results An array of collection items returned.
192 * - isLoading A boolean indicating whether the collection is
193 * loading (true) or not.
194 */
195
196 const useCollection = options => {
197 const {
198 namespace,
199 resourceName,
200 resourceValues = [],
201 query = {},
202 shouldSelect = true
203 } = options;
204 if (!namespace || !resourceName) {
205 throw new Error('The options object must have valid values for the namespace and ' + 'the resource properties.');
206 }
207 const currentResults = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)({
208 results: [],
209 isLoading: true
210 });
211 // ensure we feed the previous reference if it's equivalent
212 const currentQuery = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_3__.useShallowEqual)(query);
213 const currentResourceValues = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_3__.useShallowEqual)(resourceValues);
214 const throwError = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_4__.useThrowError)();
215 const results = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => {
216 if (!shouldSelect) {
217 return null;
218 }
219 const store = select(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.COLLECTIONS_STORE_KEY);
220 const args = [namespace, resourceName, currentQuery, currentResourceValues];
221 const error = store.getCollectionError(...args);
222 if (error) {
223 if ((0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_5__.isError)(error)) {
224 throwError(error);
225 } else {
226 throw new Error('TypeError: `error` object is not an instance of Error constructor');
227 }
228 }
229 return {
230 results: store.getCollection(...args),
231 isLoading: !store.hasFinishedResolution('getCollection', args)
232 };
233 }, [namespace, resourceName, currentResourceValues, currentQuery, shouldSelect]);
234 // if selector was not bailed, then update current results. Otherwise return
235 // previous results
236 if (results !== null) {
237 currentResults.current = results;
238 }
239 return currentResults.current;
240 };
241
242 /***/ }),
243
244 /***/ "./assets/js/base/context/hooks/use-query-state.js":
245 /*!*********************************************************!*\
246 !*** ./assets/js/base/context/hooks/use-query-state.js ***!
247 \*********************************************************/
248 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
249
250 "use strict";
251 __webpack_require__.r(__webpack_exports__);
252 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
253 /* harmony export */ useQueryStateByContext: () => (/* binding */ useQueryStateByContext),
254 /* harmony export */ useQueryStateByKey: () => (/* binding */ useQueryStateByKey),
255 /* harmony export */ useSynchronizedQueryState: () => (/* binding */ useSynchronizedQueryState)
256 /* harmony export */ });
257 /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/block-data */ "@woocommerce/block-data");
258 /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__);
259 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
260 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
261 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
262 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
263 /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/is-shallow-equal */ "@wordpress/is-shallow-equal");
264 /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3__);
265 /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-shallow-equal.ts");
266 /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-previous.ts");
267 /* harmony import */ var _providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../providers/query-state-context */ "./assets/js/base/context/providers/query-state-context.js");
268 /**
269 * External dependencies
270 */
271
272
273
274
275
276
277 /**
278 * Internal dependencies
279 */
280
281
282
283 /**
284 * A custom hook that exposes the current query state and a setter for the query
285 * state store for the given context.
286 *
287 * "Query State" is a wp.data store that keeps track of an arbitrary object of
288 * query keys and their values.
289 *
290 * @param {string} [context] What context to retrieve the query state for. If not
291 * provided, this hook will attempt to get the context
292 * from the query state context provided by the
293 * QueryStateContextProvider
294 *
295 * @return {Array} An array that has two elements. The first element is the
296 * query state value for the given context. The second element
297 * is a dispatcher function for setting the query state.
298 */
299 const useQueryStateByContext = context => {
300 const queryStateContext = (0,_providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__.useQueryStateContext)();
301 context = context || queryStateContext;
302 const queryState = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => {
303 const store = select(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY);
304 return store.getValueForQueryContext(context, undefined);
305 }, [context]);
306 const {
307 setValueForQueryContext
308 } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY);
309 const setQueryState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(value => {
310 setValueForQueryContext(context, value);
311 }, [context, setValueForQueryContext]);
312 return [queryState, setQueryState];
313 };
314
315 /**
316 * A custom hook that exposes the current query state value and a setter for the
317 * given context and query key.
318 *
319 * "Query State" is a wp.data store that keeps track of an arbitrary object of
320 * query keys and their values.
321 *
322 * @param {*} queryKey The specific query key to retrieve the value for.
323 * @param {*} [defaultValue] Default value if query does not exist.
324 * @param {string} [context] What context to retrieve the query state for. If
325 * not provided will attempt to use what is provided
326 * by query state context.
327 *
328 * @return {*} Whatever value is set at the query state index using the
329 * provided context and query key.
330 */
331 const useQueryStateByKey = (queryKey, defaultValue, context) => {
332 const queryStateContext = (0,_providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__.useQueryStateContext)();
333 context = context || queryStateContext;
334 const queryValue = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => {
335 const store = select(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY);
336 return store.getValueForQueryKey(context, queryKey, defaultValue);
337 },
338 // eslint-disable-next-line react-hooks/exhaustive-deps
339 [context, queryKey]);
340 const {
341 setQueryValue
342 } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY);
343 const setQueryValueByKey = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(value => {
344 setQueryValue(context, queryKey, value);
345 }, [context, queryKey, setQueryValue]);
346 return [queryValue, setQueryValueByKey];
347 };
348
349 /**
350 * A custom hook that works similarly to useQueryStateByContext. However, this
351 * hook allows for synchronizing with a provided queryState object.
352 *
353 * This hook does the following things with the provided `synchronizedQuery`
354 * object:
355 *
356 * - whenever synchronizedQuery varies between renders, the queryState will be
357 * updated to a merged object of the internal queryState and the provided
358 * object. Note, any values from the same properties between objects will
359 * be set from synchronizedQuery.
360 * - if there are no changes between renders, then the existing internal
361 * queryState is always returned.
362 * - on initial render, the synchronizedQuery value is returned.
363 *
364 * Typically, this hook would be used in a scenario where there may be external
365 * triggers for updating the query state (i.e. initial population of query
366 * state by hydration or component attributes, or routing url changes that
367 * affect query state).
368 *
369 * @param {Object} synchronizedQuery A provided query state object to
370 * synchronize internal query state with.
371 * @param {string} [context] What context to retrieve the query state
372 * for. If not provided, will be pulled from
373 * the QueryStateContextProvider in the tree.
374 */
375 const useSynchronizedQueryState = (synchronizedQuery, context) => {
376 const queryStateContext = (0,_providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__.useQueryStateContext)();
377 context = context || queryStateContext;
378 const [queryState, setQueryState] = useQueryStateByContext(context);
379 const currentQueryState = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_5__.useShallowEqual)(queryState);
380 const currentSynchronizedQuery = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_5__.useShallowEqual)(synchronizedQuery);
381 const previousSynchronizedQuery = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_6__.usePrevious)(currentSynchronizedQuery);
382 // used to ensure we allow initial synchronization to occur before
383 // returning non-synced state.
384 const isInitialized = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)(false);
385 // update queryState anytime incoming synchronizedQuery changes
386 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {
387 if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3___default()(previousSynchronizedQuery, currentSynchronizedQuery)) {
388 setQueryState(Object.assign({}, currentQueryState, currentSynchronizedQuery));
389 isInitialized.current = true;
390 }
391 }, [currentQueryState, currentSynchronizedQuery, previousSynchronizedQuery, setQueryState]);
392 return isInitialized.current ? [queryState, setQueryState] : [synchronizedQuery, setQueryState];
393 };
394
395 /***/ }),
396
397 /***/ "./assets/js/base/context/providers/query-state-context.js":
398 /*!*****************************************************************!*\
399 !*** ./assets/js/base/context/providers/query-state-context.js ***!
400 \*****************************************************************/
401 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
402
403 "use strict";
404 __webpack_require__.r(__webpack_exports__);
405 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
406 /* harmony export */ QueryStateContextProvider: () => (/* binding */ QueryStateContextProvider),
407 /* harmony export */ useQueryStateContext: () => (/* binding */ useQueryStateContext)
408 /* harmony export */ });
409 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
410 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
411 /**
412 * External dependencies
413 */
414
415
416 /**
417 * Query state context is the index for used for a query state store. By
418 * exposing this via context, it allows for all children blocks to be
419 * synchronized to the same query state defined by the parent in the tree.
420 *
421 * Defaults to 'page' for general global query state shared among all blocks
422 * in a view.
423 *
424 * @member {Object} QueryStateContext A react context object
425 */
426 const QueryStateContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)('page');
427 const useQueryStateContext = () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(QueryStateContext);
428 const QueryStateContextProvider = QueryStateContext.Provider;
429
430 /***/ }),
431
432 /***/ "./assets/js/base/hooks/use-is-mounted.ts":
433 /*!************************************************!*\
434 !*** ./assets/js/base/hooks/use-is-mounted.ts ***!
435 \************************************************/
436 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
437
438 "use strict";
439 __webpack_require__.r(__webpack_exports__);
440 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
441 /* harmony export */ useIsMounted: () => (/* binding */ useIsMounted)
442 /* harmony export */ });
443 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
444 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
445 /**
446 * External dependencies
447 */
448
449
450 /**
451 * Returns a boolean value based on whether the current component has been mounted.
452 *
453 * @return {boolean} If the component has been mounted.
454 *
455 * @example
456 *
457 * ```js
458 * const App = () => {
459 * const isMounted = useIsMounted();
460 *
461 * if ( ! isMounted() ) {
462 * return null;
463 * }
464 *
465 * return </div>;
466 * };
467 * ```
468 */
469
470 function useIsMounted() {
471 const isMounted = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
472 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
473 isMounted.current = true;
474 return () => {
475 isMounted.current = false;
476 };
477 }, []);
478 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => isMounted.current, []);
479 }
480
481 /***/ }),
482
483 /***/ "./assets/js/base/hooks/use-previous.ts":
484 /*!**********************************************!*\
485 !*** ./assets/js/base/hooks/use-previous.ts ***!
486 \**********************************************/
487 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
488
489 "use strict";
490 __webpack_require__.r(__webpack_exports__);
491 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
492 /* harmony export */ usePrevious: () => (/* binding */ usePrevious)
493 /* harmony export */ });
494 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
495 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
496 /**
497 * External dependencies
498 */
499
500 /**
501 * Use Previous based on https://usehooks.com/useprevious/.
502 *
503 * @param {*} value
504 * @param {Function} [validation] Function that needs to validate for the value
505 * to be updated.
506 */
507 function usePrevious(value, validation) {
508 const ref = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)();
509 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
510 if (ref.current !== value && (!validation || validation(value, ref.current))) {
511 ref.current = value;
512 }
513 }, [value, validation]);
514 return ref.current;
515 }
516
517 /***/ }),
518
519 /***/ "./assets/js/base/hooks/use-shallow-equal.ts":
520 /*!***************************************************!*\
521 !*** ./assets/js/base/hooks/use-shallow-equal.ts ***!
522 \***************************************************/
523 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
524
525 "use strict";
526 __webpack_require__.r(__webpack_exports__);
527 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
528 /* harmony export */ useShallowEqual: () => (/* binding */ useShallowEqual)
529 /* harmony export */ });
530 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
531 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
532 /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/is-shallow-equal */ "@wordpress/is-shallow-equal");
533 /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1__);
534 /**
535 * External dependencies
536 */
537
538
539
540 /**
541 * A custom hook that compares the provided value across renders and returns the
542 * previous instance if shallow equality with previous instance exists.
543 *
544 * This is particularly useful when non-primitive types are used as
545 * dependencies for react hooks.
546 *
547 * @param {*} value Value to keep the same if satisfies shallow equality.
548 *
549 * @return {*} The previous cached instance of the value if the current has shallow equality with it.
550 */
551 function useShallowEqual(value) {
552 const ref = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);
553 if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1___default()(value, ref.current)) {
554 ref.current = value;
555 }
556 return ref.current;
557 }
558
559 /***/ }),
560
561 /***/ "./assets/js/base/hooks/use-style-props.ts":
562 /*!*************************************************!*\
563 !*** ./assets/js/base/hooks/use-style-props.ts ***!
564 \*************************************************/
565 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
566
567 "use strict";
568 __webpack_require__.r(__webpack_exports__);
569 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
570 /* harmony export */ useStyleProps: () => (/* binding */ useStyleProps)
571 /* harmony export */ });
572 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
573 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
574 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/object.ts");
575 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/string.ts");
576 /* harmony import */ var _use_typography_props__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./use-typography-props */ "./assets/js/base/hooks/use-typography-props.ts");
577 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./assets/js/base/utils/get-inline-styles.ts");
578 /**
579 * External dependencies
580 */
581
582
583 /**
584 * Internal dependencies
585 */
586
587
588 /**
589 * Parses incoming props.
590 *
591 * This may include style properties at the top level, or may include a nested `style` object. This ensures the expected
592 * values are present and converts any string based values to objects as required.
593 */
594 const parseStyleAttributes = rawProps => {
595 const props = (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_1__.isObject)(rawProps) ? rawProps : {
596 style: {}
597 };
598 let style = props.style;
599 if ((0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_2__.isString)(style)) {
600 style = JSON.parse(style) || {};
601 }
602 if (!(0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_1__.isObject)(style)) {
603 style = {};
604 }
605 return {
606 ...props,
607 style
608 };
609 };
610
611 /**
612 * Returns the CSS class names and inline styles for a block when provided with its props/attributes.
613 *
614 * This hook (and its utilities) borrow functionality from the Gutenberg Block Editor package--something we don't want
615 * to import on the frontend.
616 */
617 const useStyleProps = props => {
618 const styleAttributes = parseStyleAttributes(props);
619 const colorProps = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getColorClassesAndStyles)(styleAttributes);
620 const borderProps = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getBorderClassesAndStyles)(styleAttributes);
621 const spacingProps = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getSpacingClassesAndStyles)(styleAttributes);
622 const typographyProps = (0,_use_typography_props__WEBPACK_IMPORTED_MODULE_4__.useTypographyProps)(styleAttributes);
623 return {
624 className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(typographyProps.className, colorProps.className, borderProps.className, spacingProps.className),
625 style: {
626 ...typographyProps.style,
627 ...colorProps.style,
628 ...borderProps.style,
629 ...spacingProps.style
630 }
631 };
632 };
633
634 /***/ }),
635
636 /***/ "./assets/js/base/hooks/use-throw-error.ts":
637 /*!*************************************************!*\
638 !*** ./assets/js/base/hooks/use-throw-error.ts ***!
639 \*************************************************/
640 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
641
642 "use strict";
643 __webpack_require__.r(__webpack_exports__);
644 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
645 /* harmony export */ useThrowError: () => (/* binding */ useThrowError)
646 /* harmony export */ });
647 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
648 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
649 /**
650 * External dependencies
651 */
652
653
654 /**
655 * Helper method for throwing an error in a React Hook.
656 *
657 * @see https://github.com/facebook/react/issues/14981
658 */
659 const useThrowError = () => {
660 const [, setState] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)();
661 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(error => {
662 setState(() => {
663 throw error;
664 });
665 }, []);
666 };
667
668 /***/ }),
669
670 /***/ "./assets/js/base/hooks/use-typography-props.ts":
671 /*!******************************************************!*\
672 !*** ./assets/js/base/hooks/use-typography-props.ts ***!
673 \******************************************************/
674 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
675
676 "use strict";
677 __webpack_require__.r(__webpack_exports__);
678 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
679 /* harmony export */ useTypographyProps: () => (/* binding */ useTypographyProps)
680 /* harmony export */ });
681 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/object.ts");
682 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/string.ts");
683 /**
684 * External dependencies
685 */
686
687
688 /**
689 * Internal dependencies
690 */
691
692 const useTypographyProps = props => {
693 const typography = (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_0__.isObject)(props.style.typography) ? props.style.typography : {};
694 const classNameFallback = (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_1__.isString)(typography.fontFamily) ? typography.fontFamily : '';
695 const className = props.fontFamily ? `has-${props.fontFamily}-font-family` : classNameFallback;
696 return {
697 className,
698 style: {
699 fontSize: props.fontSize ? `var(--wp--preset--font-size--${props.fontSize})` : typography.fontSize,
700 fontStyle: typography.fontStyle,
701 fontWeight: typography.fontWeight,
702 letterSpacing: typography.letterSpacing,
703 lineHeight: typography.lineHeight,
704 textDecoration: typography.textDecoration,
705 textTransform: typography.textTransform
706 }
707 };
708 };
709
710 /***/ }),
711
712 /***/ "./assets/js/base/utils/get-inline-styles.ts":
713 /*!***************************************************!*\
714 !*** ./assets/js/base/utils/get-inline-styles.ts ***!
715 \***************************************************/
716 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
717
718 "use strict";
719 __webpack_require__.r(__webpack_exports__);
720 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
721 /* harmony export */ getBorderClassesAndStyles: () => (/* binding */ getBorderClassesAndStyles),
722 /* harmony export */ getColorClassesAndStyles: () => (/* binding */ getColorClassesAndStyles),
723 /* harmony export */ getSpacingClassesAndStyles: () => (/* binding */ getSpacingClassesAndStyles)
724 /* harmony export */ });
725 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
726 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
727 /* harmony import */ var change_case__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! change-case */ "../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist.es2015/index.js");
728 /* harmony import */ var _wordpress_style_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/style-engine */ "@wordpress/style-engine");
729 /* harmony import */ var _wordpress_style_engine__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_style_engine__WEBPACK_IMPORTED_MODULE_1__);
730 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/object.ts");
731 /**
732 * External dependencies
733 */
734
735
736
737
738 /**
739 * Returns the inline styles to add depending on the style object
740 *
741 * @param {Object} styles Styles configuration.
742 * @return {Object} Flattened CSS variables declaration.
743 */
744 function getInlineStyles(styles = {}) {
745 const output = {};
746 (0,_wordpress_style_engine__WEBPACK_IMPORTED_MODULE_1__.getCSSRules)(styles, {
747 selector: ''
748 }).forEach(rule => {
749 output[rule.key] = rule.value;
750 });
751 return output;
752 }
753
754 /**
755 * Get the classname for a given color.
756 */
757 function getColorClassName(colorContextName, colorSlug) {
758 if (!colorContextName || !colorSlug) {
759 return '';
760 }
761 return `has-${(0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(colorSlug)}-${colorContextName}`;
762 }
763
764 /**
765 * Generates a CSS class name consisting of all the applicable border color
766 * classes given the current block attributes.
767 */
768 function getBorderClassName(attributes) {
769 var _style$border;
770 const {
771 borderColor,
772 style
773 } = attributes;
774 const borderColorClass = borderColor ? getColorClassName('border-color', borderColor) : '';
775 return classnames__WEBPACK_IMPORTED_MODULE_0___default()({
776 'has-border-color': !!borderColor || !!(style !== null && style !== void 0 && (_style$border = style.border) !== null && _style$border !== void 0 && _style$border.color),
777 [borderColorClass]: !!borderColorClass
778 });
779 }
780 function getGradientClassName(gradientSlug) {
781 if (!gradientSlug) {
782 return undefined;
783 }
784 return `has-${gradientSlug}-gradient-background`;
785 }
786
787 /**
788 * Provides the CSS class names and inline styles for a block's color support
789 * attributes.
790 */
791 function getColorClassesAndStyles(props) {
792 var _style$color, _style$color2, _style$color3, _style$color4, _style$elements, _style$elements2, _style$elements2$link;
793 const {
794 backgroundColor,
795 textColor,
796 gradient,
797 style
798 } = props;
799
800 // Collect color CSS classes.
801 const backgroundClass = getColorClassName('background-color', backgroundColor);
802 const textClass = getColorClassName('color', textColor);
803 const gradientClass = getGradientClassName(gradient);
804 const hasGradient = gradientClass || (style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.gradient);
805
806 // Determine color CSS class name list.
807 const className = classnames__WEBPACK_IMPORTED_MODULE_0___default()(textClass, gradientClass, {
808 // Don't apply the background class if there's a gradient.
809 [backgroundClass]: !hasGradient && !!backgroundClass,
810 'has-text-color': textColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.text),
811 'has-background': backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.background) || gradient || (style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.gradient),
812 'has-link-color': (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_3__.isObject)(style === null || style === void 0 ? void 0 : (_style$elements = style.elements) === null || _style$elements === void 0 ? void 0 : _style$elements.link) ? style === null || style === void 0 ? void 0 : (_style$elements2 = style.elements) === null || _style$elements2 === void 0 ? void 0 : (_style$elements2$link = _style$elements2.link) === null || _style$elements2$link === void 0 ? void 0 : _style$elements2$link.color : undefined
813 });
814
815 // Collect inline styles for colors.
816 const colorStyles = (style === null || style === void 0 ? void 0 : style.color) || {};
817 return {
818 className,
819 style: getInlineStyles({
820 color: colorStyles
821 })
822 };
823 }
824
825 /**
826 * Provides the CSS class names and inline styles for a block's border support
827 * attributes.
828 */
829 function getBorderClassesAndStyles(props) {
830 var _props$style;
831 const border = ((_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.border) || {};
832 const className = getBorderClassName(props);
833 return {
834 className,
835 style: getInlineStyles({
836 border
837 })
838 };
839 }
840
841 /**
842 * Provides the CSS class names and inline styles for a block's spacing support
843 * attributes.
844 */
845 function getSpacingClassesAndStyles(props) {
846 var _props$style2;
847 const spacingStyles = ((_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.spacing) || {};
848 const styleProp = getInlineStyles({
849 spacing: spacingStyles
850 });
851 return {
852 className: undefined,
853 style: styleProp
854 };
855 }
856
857 /***/ }),
858
859 /***/ "./assets/js/blocks/active-filters/active-attribute-filters.tsx":
860 /*!**********************************************************************!*\
861 !*** ./assets/js/blocks/active-filters/active-attribute-filters.tsx ***!
862 \**********************************************************************/
863 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
864
865 "use strict";
866 __webpack_require__.r(__webpack_exports__);
867 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
868 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
869 /* harmony export */ });
870 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
871 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
872 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
873 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
874 /* harmony import */ var _woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/base-context/hooks */ "./assets/js/base/context/hooks/collections/use-collection.ts");
875 /* harmony import */ var _woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/base-context/hooks */ "./assets/js/base/context/hooks/use-query-state.js");
876 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities");
877 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_2__);
878 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
879 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
880 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
881 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__);
882 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/attributes.ts");
883 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/boolean.ts");
884 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils */ "./assets/js/blocks/active-filters/utils.tsx");
885 /* harmony import */ var _utils_attributes_query__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/attributes-query */ "./assets/js/utils/attributes-query.ts");
886
887 /**
888 * External dependencies
889 */
890
891
892
893
894
895
896
897 /**
898 * Internal dependencies
899 */
900
901
902 /**
903 * Component that renders active attribute (terms) filters.
904 *
905 * @param {Object} props Incoming props for the component.
906 * @param {Object} props.attributeObject The attribute object.
907 * @param {Array} props.slugs The slugs for attributes.
908 * @param {string} props.operator The operator for the filter.
909 * @param {string} props.displayStyle The style used for displaying the filters.
910 * @param {string} props.isLoadingCallback The callback to trigger the loading complete state.
911 */
912 const ActiveAttributeFilters = ({
913 attributeObject,
914 slugs = [],
915 operator = 'in',
916 displayStyle,
917 isLoadingCallback
918 }) => {
919 const {
920 results,
921 isLoading
922 } = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_5__.useCollection)({
923 namespace: '/wc/store/v1',
924 resourceName: 'products/attributes/terms',
925 resourceValues: [attributeObject.id]
926 });
927 const [productAttributes, setProductAttributes] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_6__.useQueryStateByKey)('attributes', []);
928 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
929 isLoadingCallback(isLoading);
930 }, [isLoading, isLoadingCallback]);
931 if (!Array.isArray(results) || !(0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_7__.isAttributeTermCollection)(results) || !(0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_7__.isAttributeQueryCollection)(productAttributes)) {
932 return null;
933 }
934 const attributeLabel = attributeObject.label;
935 const filteringForPhpTemplate = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__.getSettingWithCoercion)('isRenderingPhpTemplate', false, _woocommerce_types__WEBPACK_IMPORTED_MODULE_8__.isBoolean);
936 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
937 className: "wc-block-active-filters__list-item-type"
938 }, attributeLabel, ":"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, slugs.map((slug, index) => {
939 const termObject = results.find(term => {
940 return term.slug === slug;
941 });
942 if (!termObject) {
943 return null;
944 }
945 let prefix = '';
946 if (index > 0 && operator === 'and') {
947 prefix = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
948 className: "wc-block-active-filters__list-item-operator"
949 }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('All', 'woocommerce'));
950 }
951 return (0,_utils__WEBPACK_IMPORTED_MODULE_9__.renderRemovableListItem)({
952 type: attributeLabel,
953 name: (0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_2__.decodeEntities)(termObject.name || slug),
954 prefix,
955 isLoading,
956 removeCallback: () => {
957 const currentAttribute = productAttributes.find(({
958 attribute
959 }) => attribute === `pa_${attributeObject.name}`);
960
961 // If only one attribute was selected, we remove both filter and query type from the URL.
962 if ((currentAttribute === null || currentAttribute === void 0 ? void 0 : currentAttribute.slug.length) === 1) {
963 (0,_utils__WEBPACK_IMPORTED_MODULE_9__.removeArgsFromFilterUrl)(`query_type_${attributeObject.name}`, `filter_${attributeObject.name}`);
964 } else {
965 // Remove only the slug from the URL.
966 (0,_utils__WEBPACK_IMPORTED_MODULE_9__.removeArgsFromFilterUrl)({
967 [`filter_${attributeObject.name}`]: slug
968 });
969 }
970 if (!filteringForPhpTemplate) {
971 (0,_utils_attributes_query__WEBPACK_IMPORTED_MODULE_10__.removeAttributeFilterBySlug)(productAttributes, setProductAttributes, attributeObject, slug);
972 }
973 },
974 showLabel: false,
975 displayStyle
976 });
977 })));
978 };
979 ActiveAttributeFilters.__docgenInfo = {
980 "description": "Component that renders active attribute (terms) filters.\n\n@param {Object} props Incoming props for the component.\n@param {Object} props.attributeObject The attribute object.\n@param {Array} props.slugs The slugs for attributes.\n@param {string} props.operator The operator for the filter.\n@param {string} props.displayStyle The style used for displaying the filters.\n@param {string} props.isLoadingCallback The callback to trigger the loading complete state.",
981 "methods": [],
982 "displayName": "ActiveAttributeFilters",
983 "props": {
984 "slugs": {
985 "defaultValue": {
986 "value": "[]",
987 "computed": false
988 },
989 "required": false,
990 "tsType": {
991 "name": "Array",
992 "elements": [{
993 "name": "string"
994 }],
995 "raw": "string[]"
996 },
997 "description": ""
998 },
999 "operator": {
1000 "defaultValue": {
1001 "value": "'in'",
1002 "computed": false
1003 },
1004 "required": false,
1005 "tsType": {
1006 "name": "union",
1007 "raw": "'and' | 'in'",
1008 "elements": [{
1009 "name": "literal",
1010 "value": "'and'"
1011 }, {
1012 "name": "literal",
1013 "value": "'in'"
1014 }]
1015 },
1016 "description": ""
1017 },
1018 "displayStyle": {
1019 "required": true,
1020 "tsType": {
1021 "name": "string"
1022 },
1023 "description": ""
1024 },
1025 "attributeObject": {
1026 "required": true,
1027 "tsType": {
1028 "name": "AttributeObject"
1029 },
1030 "description": ""
1031 },
1032 "isLoadingCallback": {
1033 "required": true,
1034 "tsType": {
1035 "name": "signature",
1036 "type": "function",
1037 "raw": "( val: boolean ) => void",
1038 "signature": {
1039 "arguments": [{
1040 "name": "val",
1041 "type": {
1042 "name": "boolean"
1043 }
1044 }],
1045 "return": {
1046 "name": "void"
1047 }
1048 }
1049 },
1050 "description": ""
1051 }
1052 }
1053 };
1054 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ActiveAttributeFilters);
1055 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1056 STORYBOOK_REACT_CLASSES["assets/js/blocks/active-filters/active-attribute-filters.tsx"] = {
1057 name: "ActiveAttributeFilters",
1058 docgenInfo: ActiveAttributeFilters.__docgenInfo,
1059 path: "assets/js/blocks/active-filters/active-attribute-filters.tsx"
1060 };
1061 }
1062
1063 /***/ }),
1064
1065 /***/ "./assets/js/blocks/active-filters/block-wrapper.tsx":
1066 /*!***********************************************************!*\
1067 !*** ./assets/js/blocks/active-filters/block-wrapper.tsx ***!
1068 \***********************************************************/
1069 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1070
1071 "use strict";
1072 __webpack_require__.r(__webpack_exports__);
1073 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1074 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1075 /* harmony export */ });
1076 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1077 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1078 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1079 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
1080 /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-style-props.ts");
1081 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/string.ts");
1082 /* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block */ "./assets/js/blocks/active-filters/block.tsx");
1083 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./assets/js/blocks/active-filters/utils.tsx");
1084
1085 /**
1086 * External dependencies
1087 */
1088
1089
1090
1091
1092 /**
1093 * Internal dependencies
1094 */
1095
1096
1097 const BlockWrapper = props => {
1098 const styleProps = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_2__.useStyleProps)(props);
1099 const parsedBlockAttributes = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.parseAttributes)(props);
1100 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1101 className: classnames__WEBPACK_IMPORTED_MODULE_1___default()((0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_4__.isString)(props.className) ? props.className : '', styleProps.className),
1102 style: styleProps.style
1103 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_block__WEBPACK_IMPORTED_MODULE_5__["default"], {
1104 isEditor: false,
1105 attributes: parsedBlockAttributes
1106 }));
1107 };
1108 BlockWrapper.__docgenInfo = {
1109 "description": "",
1110 "methods": [],
1111 "displayName": "BlockWrapper"
1112 };
1113 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BlockWrapper);
1114 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1115 STORYBOOK_REACT_CLASSES["assets/js/blocks/active-filters/block-wrapper.tsx"] = {
1116 name: "BlockWrapper",
1117 docgenInfo: BlockWrapper.__docgenInfo,
1118 path: "assets/js/blocks/active-filters/block-wrapper.tsx"
1119 };
1120 }
1121
1122 /***/ }),
1123
1124 /***/ "./assets/js/blocks/active-filters/block.tsx":
1125 /*!***************************************************!*\
1126 !*** ./assets/js/blocks/active-filters/block.tsx ***!
1127 \***************************************************/
1128 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1129
1130 "use strict";
1131 __webpack_require__.r(__webpack_exports__);
1132 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1133 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1134 /* harmony export */ });
1135 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1136 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1137 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1138 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1139 /* harmony import */ var _woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @woocommerce/base-context/hooks */ "./assets/js/base/context/hooks/use-query-state.js");
1140 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
1141 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__);
1142 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1143 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
1144 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1145 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
1146 /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/blocks-components */ "@woocommerce/blocks-components");
1147 /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_5__);
1148 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/boolean.ts");
1149 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/stock-status.ts");
1150 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/attributes.ts");
1151 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/ratings.ts");
1152 /* harmony import */ var _woocommerce_utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @woocommerce/utils */ "./assets/js/utils/filters.ts");
1153 /* harmony import */ var _woocommerce_base_components_filter_placeholder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/base-components/filter-placeholder */ "./assets/js/base/components/filter-placeholder/index.tsx");
1154 /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-is-mounted.ts");
1155 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./style.scss */ "./assets/js/blocks/active-filters/style.scss");
1156 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_7__);
1157 /* harmony import */ var _utils_attributes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/attributes */ "./assets/js/utils/attributes.ts");
1158 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils */ "./assets/js/blocks/active-filters/utils.tsx");
1159 /* harmony import */ var _active_attribute_filters__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./active-attribute-filters */ "./assets/js/blocks/active-filters/active-attribute-filters.tsx");
1160 /* harmony import */ var _filter_placeholders__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./filter-placeholders */ "./assets/js/blocks/active-filters/filter-placeholders.tsx");
1161 /* harmony import */ var _filter_wrapper_context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../filter-wrapper/context */ "./assets/js/blocks/filter-wrapper/context.ts");
1162
1163 /**
1164 * External dependencies
1165 */
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176 /**
1177 * Internal dependencies
1178 */
1179
1180
1181
1182
1183
1184
1185 /**
1186 * Component displaying active filters.
1187 */
1188 const ActiveFiltersBlock = ({
1189 attributes: blockAttributes,
1190 isEditor = false
1191 }) => {
1192 const setWrapperVisibility = (0,_filter_wrapper_context__WEBPACK_IMPORTED_MODULE_8__.useSetWraperVisibility)();
1193 const isMounted = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_9__.useIsMounted)();
1194 const componentHasMounted = isMounted();
1195 const filteringForPhpTemplate = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSettingWithCoercion)('isRenderingPhpTemplate', false, _woocommerce_types__WEBPACK_IMPORTED_MODULE_10__.isBoolean);
1196 const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(true);
1197 /*
1198 activeAttributeFilters is the only async query in this block. Because of this the rest of the filters will render null
1199 when in a loading state and activeAttributeFilters renders the placeholders.
1200 */
1201 const shouldShowLoadingPlaceholders = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.maybeUrlContainsFilters)() && !isEditor && isLoading;
1202 const [productAttributes, setProductAttributes] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_12__.useQueryStateByKey)('attributes', []);
1203 const [productStockStatus, setProductStockStatus] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_12__.useQueryStateByKey)('stock_status', []);
1204 const [minPrice, setMinPrice] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_12__.useQueryStateByKey)('min_price');
1205 const [maxPrice, setMaxPrice] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_12__.useQueryStateByKey)('max_price');
1206 const [productRatings, setProductRatings] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_12__.useQueryStateByKey)('rating');
1207 const STOCK_STATUS_OPTIONS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('stockStatusOptions', []);
1208 const STORE_ATTRIBUTES = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('attributes', []);
1209 const activeStockStatusFilters = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
1210 if (shouldShowLoadingPlaceholders || productStockStatus.length === 0 || !(0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_13__.isStockStatusQueryCollection)(productStockStatus) || !(0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_13__.isStockStatusOptions)(STOCK_STATUS_OPTIONS)) {
1211 return null;
1212 }
1213 const stockStatusLabel = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Stock Status', 'woocommerce');
1214 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1215 className: "wc-block-active-filters__list-item-type"
1216 }, stockStatusLabel, ":"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, productStockStatus.map(slug => {
1217 return (0,_utils__WEBPACK_IMPORTED_MODULE_11__.renderRemovableListItem)({
1218 type: stockStatusLabel,
1219 name: STOCK_STATUS_OPTIONS[slug],
1220 removeCallback: () => {
1221 (0,_utils__WEBPACK_IMPORTED_MODULE_11__.removeArgsFromFilterUrl)({
1222 filter_stock_status: slug
1223 });
1224 if (!filteringForPhpTemplate) {
1225 const newStatuses = productStockStatus.filter(status => {
1226 return status !== slug;
1227 });
1228 setProductStockStatus(newStatuses);
1229 }
1230 },
1231 showLabel: false,
1232 displayStyle: blockAttributes.displayStyle
1233 });
1234 })));
1235 }, [shouldShowLoadingPlaceholders, STOCK_STATUS_OPTIONS, productStockStatus, setProductStockStatus, blockAttributes.displayStyle, filteringForPhpTemplate]);
1236 const activePriceFilters = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
1237 if (shouldShowLoadingPlaceholders || !Number.isFinite(minPrice) && !Number.isFinite(maxPrice)) {
1238 return null;
1239 }
1240 return (0,_utils__WEBPACK_IMPORTED_MODULE_11__.renderRemovableListItem)({
1241 type: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Price', 'woocommerce'),
1242 name: (0,_utils__WEBPACK_IMPORTED_MODULE_11__.formatPriceRange)(minPrice, maxPrice),
1243 removeCallback: () => {
1244 (0,_utils__WEBPACK_IMPORTED_MODULE_11__.removeArgsFromFilterUrl)('max_price', 'min_price');
1245 if (!filteringForPhpTemplate) {
1246 setMinPrice(undefined);
1247 setMaxPrice(undefined);
1248 }
1249 },
1250 displayStyle: blockAttributes.displayStyle
1251 });
1252 }, [shouldShowLoadingPlaceholders, minPrice, maxPrice, blockAttributes.displayStyle, setMinPrice, setMaxPrice, filteringForPhpTemplate]);
1253 const activeAttributeFilters = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
1254 if (!(0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_14__.isAttributeQueryCollection)(productAttributes) && componentHasMounted || !productAttributes.length && !(0,_utils__WEBPACK_IMPORTED_MODULE_11__.urlContainsAttributeFilter)(STORE_ATTRIBUTES)) {
1255 if (isLoading) {
1256 setIsLoading(false);
1257 }
1258 return null;
1259 }
1260 return productAttributes.map(attribute => {
1261 const attributeObject = (0,_utils_attributes__WEBPACK_IMPORTED_MODULE_15__.getAttributeFromTaxonomy)(attribute.attribute);
1262 if (!attributeObject) {
1263 if (isLoading) {
1264 setIsLoading(false);
1265 }
1266 return null;
1267 }
1268 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_active_attribute_filters__WEBPACK_IMPORTED_MODULE_16__["default"], {
1269 attributeObject: attributeObject,
1270 displayStyle: blockAttributes.displayStyle,
1271 slugs: attribute.slug,
1272 key: attribute.attribute,
1273 operator: attribute.operator,
1274 isLoadingCallback: setIsLoading
1275 });
1276 });
1277 }, [productAttributes, componentHasMounted, STORE_ATTRIBUTES, isLoading, blockAttributes.displayStyle]);
1278
1279 /**
1280 * Parse the filter URL to set the active rating fitlers.
1281 * This code should be moved to Rating Filter block once it's implemented.
1282 */
1283 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
1284 var _getUrlParameter;
1285 if (!filteringForPhpTemplate) {
1286 return;
1287 }
1288 if (productRatings.length && productRatings.length > 0) {
1289 return;
1290 }
1291 const currentRatings = (_getUrlParameter = (0,_woocommerce_utils__WEBPACK_IMPORTED_MODULE_17__.getUrlParameter)('rating_filter')) === null || _getUrlParameter === void 0 ? void 0 : _getUrlParameter.toString();
1292 if (!currentRatings) {
1293 return;
1294 }
1295 setProductRatings(currentRatings.split(','));
1296 }, [filteringForPhpTemplate, productRatings, setProductRatings]);
1297 const activeRatingFilters = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
1298 if (shouldShowLoadingPlaceholders || productRatings.length === 0 || !(0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_18__.isRatingQueryCollection)(productRatings)) {
1299 return null;
1300 }
1301 const ratingLabel = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Rating', 'woocommerce');
1302 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1303 className: "wc-block-active-filters__list-item-type"
1304 }, ratingLabel, ":"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, productRatings.map(slug => {
1305 return (0,_utils__WEBPACK_IMPORTED_MODULE_11__.renderRemovableListItem)({
1306 type: ratingLabel,
1307 name: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %s is referring to the average rating value */
1308 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Rated %s out of 5', 'woocommerce'), slug),
1309 removeCallback: () => {
1310 (0,_utils__WEBPACK_IMPORTED_MODULE_11__.removeArgsFromFilterUrl)({
1311 rating_filter: slug
1312 });
1313 if (!filteringForPhpTemplate) {
1314 const newRatings = productRatings.filter(rating => {
1315 return rating !== slug;
1316 });
1317 setProductRatings(newRatings);
1318 }
1319 },
1320 showLabel: false,
1321 displayStyle: blockAttributes.displayStyle
1322 });
1323 })));
1324 }, [shouldShowLoadingPlaceholders, productRatings, setProductRatings, blockAttributes.displayStyle, filteringForPhpTemplate]);
1325 const hasFilters = () => {
1326 return productAttributes.length > 0 || productStockStatus.length > 0 || productRatings.length > 0 || Number.isFinite(minPrice) || Number.isFinite(maxPrice);
1327 };
1328 if (!shouldShowLoadingPlaceholders && !hasFilters() && !isEditor) {
1329 setWrapperVisibility(false);
1330 return null;
1331 }
1332 const TagName = `h${blockAttributes.headingLevel}`;
1333 const heading = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(TagName, {
1334 className: "wc-block-active-filters__title"
1335 }, blockAttributes.heading);
1336 const filterHeading = shouldShowLoadingPlaceholders ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_base_components_filter_placeholder__WEBPACK_IMPORTED_MODULE_6__["default"], null, heading) : heading;
1337 const hasFilterableProducts = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSettingWithCoercion)('hasFilterableProducts', false, _woocommerce_types__WEBPACK_IMPORTED_MODULE_10__.isBoolean);
1338 if (!hasFilterableProducts) {
1339 setWrapperVisibility(false);
1340 return null;
1341 }
1342 setWrapperVisibility(true);
1343 const listClasses = classnames__WEBPACK_IMPORTED_MODULE_4___default()('wc-block-active-filters__list', {
1344 'wc-block-active-filters__list--chips': blockAttributes.displayStyle === 'chips',
1345 'wc-block-active-filters--loading': shouldShowLoadingPlaceholders
1346 });
1347 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !isEditor && blockAttributes.heading && filterHeading, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1348 className: "wc-block-active-filters"
1349 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
1350 className: listClasses
1351 }, isEditor ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_utils__WEBPACK_IMPORTED_MODULE_11__.renderRemovableListItem)({
1352 type: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Size', 'woocommerce'),
1353 name: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Small', 'woocommerce'),
1354 displayStyle: blockAttributes.displayStyle
1355 }), (0,_utils__WEBPACK_IMPORTED_MODULE_11__.renderRemovableListItem)({
1356 type: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Color', 'woocommerce'),
1357 name: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Blue', 'woocommerce'),
1358 displayStyle: blockAttributes.displayStyle
1359 })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_filter_placeholders__WEBPACK_IMPORTED_MODULE_19__["default"], {
1360 isLoading: shouldShowLoadingPlaceholders,
1361 displayStyle: blockAttributes.displayStyle
1362 }), activePriceFilters, activeStockStatusFilters, activeAttributeFilters, activeRatingFilters)), shouldShowLoadingPlaceholders ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1363 className: "wc-block-active-filters__clear-all-placeholder"
1364 }) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
1365 className: "wc-block-active-filters__clear-all",
1366 onClick: () => {
1367 (0,_utils__WEBPACK_IMPORTED_MODULE_11__.cleanFilterUrl)();
1368 if (!filteringForPhpTemplate) {
1369 setMinPrice(undefined);
1370 setMaxPrice(undefined);
1371 setProductAttributes([]);
1372 setProductStockStatus([]);
1373 setProductRatings([]);
1374 }
1375 }
1376 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_5__.Label, {
1377 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear All', 'woocommerce'),
1378 screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear All Filters', 'woocommerce')
1379 }))));
1380 };
1381 ActiveFiltersBlock.__docgenInfo = {
1382 "description": "Component displaying active filters.",
1383 "methods": [],
1384 "displayName": "ActiveFiltersBlock",
1385 "props": {
1386 "isEditor": {
1387 "defaultValue": {
1388 "value": "false",
1389 "computed": false
1390 },
1391 "required": false,
1392 "tsType": {
1393 "name": "boolean"
1394 },
1395 "description": "Whether it's in the editor or frontend display."
1396 },
1397 "attributes": {
1398 "required": true,
1399 "tsType": {
1400 "name": "BlockAttributes"
1401 },
1402 "description": "The attributes for this block."
1403 }
1404 }
1405 };
1406 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ActiveFiltersBlock);
1407 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1408 STORYBOOK_REACT_CLASSES["assets/js/blocks/active-filters/block.tsx"] = {
1409 name: "ActiveFiltersBlock",
1410 docgenInfo: ActiveFiltersBlock.__docgenInfo,
1411 path: "assets/js/blocks/active-filters/block.tsx"
1412 };
1413 }
1414
1415 /***/ }),
1416
1417 /***/ "./assets/js/blocks/active-filters/filter-placeholders.tsx":
1418 /*!*****************************************************************!*\
1419 !*** ./assets/js/blocks/active-filters/filter-placeholders.tsx ***!
1420 \*****************************************************************/
1421 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1422
1423 "use strict";
1424 __webpack_require__.r(__webpack_exports__);
1425 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1426 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1427 /* harmony export */ });
1428 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1429 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1430
1431 const FilterPlaceholders = ({
1432 displayStyle,
1433 isLoading
1434 }) => {
1435 if (!isLoading) {
1436 return null;
1437 }
1438 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [...Array(displayStyle === 'list' ? 2 : 3)].map((x, i) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
1439 className: displayStyle === 'list' ? 'show-loading-state-list' : 'show-loading-state-chips',
1440 key: i
1441 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1442 className: "show-loading-state__inner"
1443 }))));
1444 };
1445 FilterPlaceholders.__docgenInfo = {
1446 "description": "",
1447 "methods": [],
1448 "displayName": "FilterPlaceholders",
1449 "props": {
1450 "isLoading": {
1451 "required": true,
1452 "tsType": {
1453 "name": "boolean"
1454 },
1455 "description": ""
1456 },
1457 "displayStyle": {
1458 "required": true,
1459 "tsType": {
1460 "name": "string"
1461 },
1462 "description": ""
1463 }
1464 }
1465 };
1466 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FilterPlaceholders);
1467 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1468 STORYBOOK_REACT_CLASSES["assets/js/blocks/active-filters/filter-placeholders.tsx"] = {
1469 name: "FilterPlaceholders",
1470 docgenInfo: FilterPlaceholders.__docgenInfo,
1471 path: "assets/js/blocks/active-filters/filter-placeholders.tsx"
1472 };
1473 }
1474
1475 /***/ }),
1476
1477 /***/ "./assets/js/blocks/active-filters/utils.tsx":
1478 /*!***************************************************!*\
1479 !*** ./assets/js/blocks/active-filters/utils.tsx ***!
1480 \***************************************************/
1481 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1482
1483 "use strict";
1484 __webpack_require__.r(__webpack_exports__);
1485 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1486 /* harmony export */ cleanFilterUrl: () => (/* binding */ cleanFilterUrl),
1487 /* harmony export */ formatPriceRange: () => (/* binding */ formatPriceRange),
1488 /* harmony export */ maybeUrlContainsFilters: () => (/* binding */ maybeUrlContainsFilters),
1489 /* harmony export */ parseAttributes: () => (/* binding */ parseAttributes),
1490 /* harmony export */ removeArgsFromFilterUrl: () => (/* binding */ removeArgsFromFilterUrl),
1491 /* harmony export */ renderRemovableListItem: () => (/* binding */ renderRemovableListItem),
1492 /* harmony export */ urlContainsAttributeFilter: () => (/* binding */ urlContainsAttributeFilter)
1493 /* harmony export */ });
1494 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1495 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1496 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1497 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1498 /* harmony import */ var _woocommerce_price_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/price-format */ "@woocommerce/price-format");
1499 /* harmony import */ var _woocommerce_price_format__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_price_format__WEBPACK_IMPORTED_MODULE_2__);
1500 /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/blocks-components */ "@woocommerce/blocks-components");
1501 /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__);
1502 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
1503 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_4__);
1504 /* harmony import */ var _woocommerce_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @woocommerce/utils */ "./assets/js/utils/filters.ts");
1505 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js");
1506 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/close-small.js");
1507 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/string.ts");
1508 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./block.json */ "./assets/js/blocks/active-filters/block.json");
1509
1510 /**
1511 * External dependencies
1512 */
1513
1514
1515
1516
1517
1518
1519
1520
1521 /**
1522 * Internal dependencies
1523 */
1524
1525
1526 /**
1527 * Format a min/max price range to display.
1528 *
1529 * @param {number} minPrice The min price, if set.
1530 * @param {number} maxPrice The max price, if set.
1531 */
1532 const formatPriceRange = (minPrice, maxPrice) => {
1533 if (Number.isFinite(minPrice) && Number.isFinite(maxPrice)) {
1534 return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %1$s min price, %2$s max price */
1535 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Between %1$s and %2$s', 'woocommerce'), (0,_woocommerce_price_format__WEBPACK_IMPORTED_MODULE_2__.formatPrice)(minPrice), (0,_woocommerce_price_format__WEBPACK_IMPORTED_MODULE_2__.formatPrice)(maxPrice));
1536 }
1537 if (Number.isFinite(minPrice)) {
1538 return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %s min price */
1539 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('From %s', 'woocommerce'), (0,_woocommerce_price_format__WEBPACK_IMPORTED_MODULE_2__.formatPrice)(minPrice));
1540 }
1541 return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %s max price */
1542 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Up to %s', 'woocommerce'), (0,_woocommerce_price_format__WEBPACK_IMPORTED_MODULE_2__.formatPrice)(maxPrice));
1543 };
1544 /**
1545 * Render a removable item in the active filters block list.
1546 *
1547 * @param {Object} listItem The removable item to render.
1548 * @param {string} listItem.type Type string.
1549 * @param {string} listItem.name Name string.
1550 * @param {string} [listItem.prefix=''] Prefix shown before item name.
1551 * @param {Function} listItem.removeCallback Callback to remove item.
1552 * @param {string} listItem.displayStyle Whether it's a list or chips.
1553 * @param {boolean} [listItem.showLabel=true] Should the label be shown for
1554 * this item?
1555 */
1556 const renderRemovableListItem = ({
1557 type,
1558 name,
1559 prefix = '',
1560 removeCallback = () => null,
1561 showLabel = true,
1562 displayStyle
1563 }) => {
1564 const prefixedName = prefix ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, prefix, "\xA0", name) : name;
1565 const removeText = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
1566 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Remove %s filter', 'woocommerce'), name);
1567 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
1568 className: "wc-block-active-filters__list-item",
1569 key: type + ':' + name
1570 }, showLabel && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1571 className: "wc-block-active-filters__list-item-type"
1572 }, type + ': '), displayStyle === 'chips' ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.RemovableChip, {
1573 element: "span",
1574 text: prefixedName,
1575 onRemove: removeCallback,
1576 radius: "large",
1577 ariaLabel: removeText
1578 }) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1579 className: "wc-block-active-filters__list-item-name"
1580 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
1581 className: "wc-block-active-filters__list-item-remove",
1582 onClick: removeCallback
1583 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], {
1584 className: "wc-block-components-chip__remove-icon",
1585 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"],
1586 size: 16
1587 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.Label, {
1588 screenReaderLabel: removeText
1589 })), prefixedName));
1590 };
1591
1592 /**
1593 * Update the current URL to update or remove provided query arguments.
1594 *
1595 *
1596 * @param {Array<string|Record<string, string>>} args Args to remove
1597 */
1598 const removeArgsFromFilterUrl = (...args) => {
1599 if (!window) {
1600 return;
1601 }
1602 const url = window.location.href;
1603 const currentQuery = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.getQueryArgs)(url);
1604 const cleanUrl = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.removeQueryArgs)(url, ...Object.keys(currentQuery));
1605 args.forEach(item => {
1606 if (typeof item === 'string') {
1607 return delete currentQuery[item];
1608 }
1609 if (typeof item === 'object') {
1610 const key = Object.keys(item)[0];
1611 const currentQueryValue = currentQuery[key].toString().split(',');
1612 currentQuery[key] = currentQueryValue.filter(value => value !== item[key]).join(',');
1613 }
1614 });
1615 const filteredQuery = Object.fromEntries(Object.entries(currentQuery).filter(([, value]) => value));
1616 const newUrl = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.addQueryArgs)(cleanUrl, filteredQuery);
1617 (0,_woocommerce_utils__WEBPACK_IMPORTED_MODULE_7__.changeUrl)(newUrl);
1618 };
1619
1620 /**
1621 * Prefixes typically expected before filters in the URL.
1622 */
1623 const FILTER_QUERY_VALUES = ['min_price', 'max_price', 'rating_filter', 'filter_', 'query_type_'];
1624
1625 /**
1626 * Check if the URL contains arguments that could be Woo filter keys.
1627 */
1628 const keyIsAFilter = key => {
1629 let keyIsFilter = false;
1630 for (let i = 0; FILTER_QUERY_VALUES.length > i; i++) {
1631 const keyToMatch = FILTER_QUERY_VALUES[i];
1632 const trimmedKey = key.substring(0, keyToMatch.length);
1633 if (keyToMatch === trimmedKey) {
1634 keyIsFilter = true;
1635 break;
1636 }
1637 }
1638 return keyIsFilter;
1639 };
1640
1641 /**
1642 * Clean the filter URL.
1643 */
1644 const cleanFilterUrl = () => {
1645 if (!window) {
1646 return;
1647 }
1648 const url = window.location.href;
1649 const args = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.getQueryArgs)(url);
1650 const cleanUrl = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.removeQueryArgs)(url, ...Object.keys(args));
1651 const remainingArgs = Object.fromEntries(Object.keys(args).filter(arg => {
1652 if (keyIsAFilter(arg)) {
1653 return false;
1654 }
1655 return true;
1656 }).map(key => [key, args[key]]));
1657 const newUrl = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.addQueryArgs)(cleanUrl, remainingArgs);
1658 (0,_woocommerce_utils__WEBPACK_IMPORTED_MODULE_7__.changeUrl)(newUrl);
1659 };
1660 const maybeUrlContainsFilters = () => {
1661 if (!window) {
1662 return false;
1663 }
1664 const url = window.location.href;
1665 const args = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.getQueryArgs)(url);
1666 const filterKeys = Object.keys(args);
1667 let maybeHasFilter = false;
1668 for (let i = 0; filterKeys.length > i; i++) {
1669 const key = filterKeys[i];
1670 if (keyIsAFilter(key)) {
1671 maybeHasFilter = true;
1672 break;
1673 }
1674 }
1675 return maybeHasFilter;
1676 };
1677 const urlContainsAttributeFilter = attributes => {
1678 if (!window) {
1679 return false;
1680 }
1681 const storeAttributeKeys = attributes.map(attr => `filter_${attr.attribute_name}`);
1682 const url = window.location.href;
1683 const args = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_4__.getQueryArgs)(url);
1684 const urlFilterKeys = Object.keys(args);
1685 let filterIsInUrl = false;
1686 for (let i = 0; urlFilterKeys.length > i; i++) {
1687 const urlKey = urlFilterKeys[i];
1688 if (storeAttributeKeys.includes(urlKey)) {
1689 filterIsInUrl = true;
1690 break;
1691 }
1692 }
1693 return filterIsInUrl;
1694 };
1695 const parseAttributes = data => {
1696 return {
1697 heading: (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_8__.isString)(data === null || data === void 0 ? void 0 : data.heading) ? data.heading : '',
1698 headingLevel: (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_8__.isString)(data === null || data === void 0 ? void 0 : data.headingLevel) && parseInt(data.headingLevel, 10) || _block_json__WEBPACK_IMPORTED_MODULE_9__.attributes.headingLevel["default"],
1699 displayStyle: (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_8__.isString)(data === null || data === void 0 ? void 0 : data.displayStyle) && data.displayStyle || _block_json__WEBPACK_IMPORTED_MODULE_9__.attributes.displayStyle["default"]
1700 };
1701 };
1702 renderRemovableListItem.__docgenInfo = {
1703 "description": "Render a removable item in the active filters block list.\n\n@param {Object} listItem The removable item to render.\n@param {string} listItem.type Type string.\n@param {string} listItem.name Name string.\n@param {string} [listItem.prefix=''] Prefix shown before item name.\n@param {Function} listItem.removeCallback Callback to remove item.\n@param {string} listItem.displayStyle Whether it's a list or chips.\n@param {boolean} [listItem.showLabel=true] Should the label be shown for\n this item?",
1704 "methods": [],
1705 "displayName": "renderRemovableListItem",
1706 "props": {
1707 "prefix": {
1708 "defaultValue": {
1709 "value": "''",
1710 "computed": false
1711 },
1712 "required": false,
1713 "tsType": {
1714 "name": "union",
1715 "raw": "string | JSX.Element",
1716 "elements": [{
1717 "name": "string"
1718 }, {
1719 "name": "JSX.Element"
1720 }]
1721 },
1722 "description": ""
1723 },
1724 "removeCallback": {
1725 "defaultValue": {
1726 "value": "() => null",
1727 "computed": false
1728 },
1729 "required": false,
1730 "tsType": {
1731 "name": "signature",
1732 "type": "function",
1733 "raw": "() => void",
1734 "signature": {
1735 "arguments": [],
1736 "return": {
1737 "name": "void"
1738 }
1739 }
1740 },
1741 "description": ""
1742 },
1743 "showLabel": {
1744 "defaultValue": {
1745 "value": "true",
1746 "computed": false
1747 },
1748 "required": false,
1749 "tsType": {
1750 "name": "boolean"
1751 },
1752 "description": ""
1753 },
1754 "type": {
1755 "required": true,
1756 "tsType": {
1757 "name": "string"
1758 },
1759 "description": ""
1760 },
1761 "name": {
1762 "required": true,
1763 "tsType": {
1764 "name": "string"
1765 },
1766 "description": ""
1767 },
1768 "isLoading": {
1769 "required": false,
1770 "tsType": {
1771 "name": "boolean"
1772 },
1773 "description": ""
1774 },
1775 "displayStyle": {
1776 "required": true,
1777 "tsType": {
1778 "name": "string"
1779 },
1780 "description": ""
1781 }
1782 }
1783 };
1784 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1785 STORYBOOK_REACT_CLASSES["assets/js/blocks/active-filters/utils.tsx"] = {
1786 name: "renderRemovableListItem",
1787 docgenInfo: renderRemovableListItem.__docgenInfo,
1788 path: "assets/js/blocks/active-filters/utils.tsx"
1789 };
1790 }
1791
1792 /***/ }),
1793
1794 /***/ "./assets/js/types/type-guards/attributes.ts":
1795 /*!***************************************************!*\
1796 !*** ./assets/js/types/type-guards/attributes.ts ***!
1797 \***************************************************/
1798 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1799
1800 "use strict";
1801 __webpack_require__.r(__webpack_exports__);
1802 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1803 /* harmony export */ isAttributeQuery: () => (/* binding */ isAttributeQuery),
1804 /* harmony export */ isAttributeQueryCollection: () => (/* binding */ isAttributeQueryCollection),
1805 /* harmony export */ isAttributeTerm: () => (/* binding */ isAttributeTerm),
1806 /* harmony export */ isAttributeTermCollection: () => (/* binding */ isAttributeTermCollection)
1807 /* harmony export */ });
1808 /* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./object */ "./assets/js/types/type-guards/object.ts");
1809 /**
1810 * Internal dependencies
1811 */
1812
1813
1814 const isAttributeTerm = term => {
1815 return (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(term, 'count') && (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(term, 'description') && (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(term, 'id') && (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(term, 'name') && (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(term, 'parent') && (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(term, 'slug') && typeof term.count === 'number' && typeof term.description === 'string' && typeof term.id === 'number' && typeof term.name === 'string' && typeof term.parent === 'number' && typeof term.slug === 'string';
1816 };
1817 const isAttributeTermCollection = terms => {
1818 return Array.isArray(terms) && terms.every(isAttributeTerm);
1819 };
1820 const isAttributeQuery = query => {
1821 return (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(query, 'attribute') && (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(query, 'operator') && (0,_object__WEBPACK_IMPORTED_MODULE_0__.objectHasProp)(query, 'slug') && typeof query.attribute === 'string' && typeof query.operator === 'string' && Array.isArray(query.slug) && query.slug.every(slug => typeof slug === 'string');
1822 };
1823 const isAttributeQueryCollection = queries => {
1824 return Array.isArray(queries) && queries.every(isAttributeQuery);
1825 };
1826
1827 /***/ }),
1828
1829 /***/ "./assets/js/types/type-guards/boolean.ts":
1830 /*!************************************************!*\
1831 !*** ./assets/js/types/type-guards/boolean.ts ***!
1832 \************************************************/
1833 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1834
1835 "use strict";
1836 __webpack_require__.r(__webpack_exports__);
1837 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1838 /* harmony export */ isBoolean: () => (/* binding */ isBoolean)
1839 /* harmony export */ });
1840 const isBoolean = term => {
1841 return typeof term === 'boolean';
1842 };
1843
1844 /***/ }),
1845
1846 /***/ "./assets/js/types/type-guards/error.ts":
1847 /*!**********************************************!*\
1848 !*** ./assets/js/types/type-guards/error.ts ***!
1849 \**********************************************/
1850 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1851
1852 "use strict";
1853 __webpack_require__.r(__webpack_exports__);
1854 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1855 /* harmony export */ isError: () => (/* binding */ isError)
1856 /* harmony export */ });
1857 const isError = term => {
1858 return term instanceof Error;
1859 };
1860
1861 /***/ }),
1862
1863 /***/ "./assets/js/types/type-guards/null.ts":
1864 /*!*********************************************!*\
1865 !*** ./assets/js/types/type-guards/null.ts ***!
1866 \*********************************************/
1867 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1868
1869 "use strict";
1870 __webpack_require__.r(__webpack_exports__);
1871 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1872 /* harmony export */ isNull: () => (/* binding */ isNull)
1873 /* harmony export */ });
1874 const isNull = term => {
1875 return term === null;
1876 };
1877
1878 /***/ }),
1879
1880 /***/ "./assets/js/types/type-guards/object.ts":
1881 /*!***********************************************!*\
1882 !*** ./assets/js/types/type-guards/object.ts ***!
1883 \***********************************************/
1884 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1885
1886 "use strict";
1887 __webpack_require__.r(__webpack_exports__);
1888 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1889 /* harmony export */ isEmptyObject: () => (/* binding */ isEmptyObject),
1890 /* harmony export */ isObject: () => (/* binding */ isObject),
1891 /* harmony export */ objectHasProp: () => (/* binding */ objectHasProp)
1892 /* harmony export */ });
1893 /* harmony import */ var _null__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./null */ "./assets/js/types/type-guards/null.ts");
1894 /**
1895 * Internal dependencies
1896 */
1897
1898
1899 const isObject = term => {
1900 return !(0,_null__WEBPACK_IMPORTED_MODULE_0__.isNull)(term) && term instanceof Object && term.constructor === Object;
1901 };
1902 function objectHasProp(target, property) {
1903 // The `in` operator throws a `TypeError` for non-object values.
1904 return isObject(target) && property in target;
1905 }
1906 const isEmptyObject = object => {
1907 return Object.keys(object).length === 0;
1908 };
1909
1910 /***/ }),
1911
1912 /***/ "./assets/js/types/type-guards/ratings.ts":
1913 /*!************************************************!*\
1914 !*** ./assets/js/types/type-guards/ratings.ts ***!
1915 \************************************************/
1916 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1917
1918 "use strict";
1919 __webpack_require__.r(__webpack_exports__);
1920 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1921 /* harmony export */ isRatingQueryCollection: () => (/* binding */ isRatingQueryCollection)
1922 /* harmony export */ });
1923 const isRatingQueryCollection = value => {
1924 return Array.isArray(value) && value.every(v => ['1', '2', '3', '4', '5'].includes(v));
1925 };
1926
1927 /***/ }),
1928
1929 /***/ "./assets/js/types/type-guards/stock-status.ts":
1930 /*!*****************************************************!*\
1931 !*** ./assets/js/types/type-guards/stock-status.ts ***!
1932 \*****************************************************/
1933 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1934
1935 "use strict";
1936 __webpack_require__.r(__webpack_exports__);
1937 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1938 /* harmony export */ isStockStatusOptions: () => (/* binding */ isStockStatusOptions),
1939 /* harmony export */ isStockStatusQueryCollection: () => (/* binding */ isStockStatusQueryCollection)
1940 /* harmony export */ });
1941 /* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./object */ "./assets/js/types/type-guards/object.ts");
1942 /**
1943 * Internal dependencies
1944 */
1945
1946
1947 const isStockStatusQueryCollection = value => {
1948 return Array.isArray(value) && value.every(v => ['instock', 'outofstock', 'onbackorder'].includes(v));
1949 };
1950 const isStockStatusOptions = value => {
1951 return (0,_object__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) && Object.keys(value).every(v => ['instock', 'outofstock', 'onbackorder'].includes(v));
1952 };
1953
1954 /***/ }),
1955
1956 /***/ "./assets/js/types/type-guards/string.ts":
1957 /*!***********************************************!*\
1958 !*** ./assets/js/types/type-guards/string.ts ***!
1959 \***********************************************/
1960 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1961
1962 "use strict";
1963 __webpack_require__.r(__webpack_exports__);
1964 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1965 /* harmony export */ isString: () => (/* binding */ isString)
1966 /* harmony export */ });
1967 const isString = term => {
1968 return typeof term === 'string';
1969 };
1970
1971 /***/ }),
1972
1973 /***/ "./assets/js/utils/attributes-query.ts":
1974 /*!*********************************************!*\
1975 !*** ./assets/js/utils/attributes-query.ts ***!
1976 \*********************************************/
1977 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1978
1979 "use strict";
1980 __webpack_require__.r(__webpack_exports__);
1981 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1982 /* harmony export */ removeAttributeFilterBySlug: () => (/* binding */ removeAttributeFilterBySlug),
1983 /* harmony export */ updateAttributeFilter: () => (/* binding */ updateAttributeFilter)
1984 /* harmony export */ });
1985 /* harmony import */ var fast_sort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-sort */ "../../node_modules/.pnpm/fast-sort@3.4.0/node_modules/fast-sort/dist/sort.mjs");
1986 /**
1987 * External dependencies
1988 */
1989
1990
1991
1992 /**
1993 * Given a query object, removes an attribute filter by a single slug.
1994 *
1995 * @param {Array} query Current query object.
1996 * @param {Function} setQuery Callback to update the current query object.
1997 * @param {Object} attribute An attribute object.
1998 * @param {string} slug Term slug to remove.
1999 */
2000 const removeAttributeFilterBySlug = (query = [], setQuery, attribute, slug = '') => {
2001 // Get current filter for provided attribute.
2002 const foundQuery = query.filter(item => item.attribute === attribute.taxonomy);
2003 const currentQuery = foundQuery.length ? foundQuery[0] : null;
2004 if (!currentQuery || !currentQuery.slug || !Array.isArray(currentQuery.slug) || !currentQuery.slug.includes(slug)) {
2005 return;
2006 }
2007 const newSlugs = currentQuery.slug.filter(item => item !== slug);
2008
2009 // Remove current attribute filter from query.
2010 const returnQuery = query.filter(item => item.attribute !== attribute.taxonomy);
2011
2012 // Add a new query for selected terms, if provided.
2013 if (newSlugs.length > 0) {
2014 currentQuery.slug = newSlugs.sort();
2015 returnQuery.push(currentQuery);
2016 }
2017 setQuery((0,fast_sort__WEBPACK_IMPORTED_MODULE_0__.sort)(returnQuery).asc('attribute'));
2018 };
2019
2020 /**
2021 * Given a query object, sets the query up to filter by a given attribute and attribute terms.
2022 *
2023 * @param {Array} query Current query object.
2024 * @param {Function} setQuery Callback to update the current query object.
2025 * @param {Object} attribute An attribute object.
2026 * @param {Array} attributeTerms Array of term objects.
2027 * @param {string} operator Operator for the filter. Valid values: in, and.
2028 *
2029 * @return {Object} An attribute object.
2030 */
2031 const updateAttributeFilter = (query = [], setQuery, attribute, attributeTerms = [], operator = 'in') => {
2032 if (!attribute || !attribute.taxonomy) {
2033 return [];
2034 }
2035 const returnQuery = query.filter(item => item.attribute !== attribute.taxonomy);
2036 if (attributeTerms.length === 0) {
2037 setQuery(returnQuery);
2038 } else {
2039 returnQuery.push({
2040 attribute: attribute.taxonomy,
2041 operator,
2042 slug: attributeTerms.map(({
2043 slug
2044 }) => slug).sort()
2045 });
2046 setQuery((0,fast_sort__WEBPACK_IMPORTED_MODULE_0__.sort)(returnQuery).asc('attribute'));
2047 }
2048 return returnQuery;
2049 };
2050
2051 /***/ }),
2052
2053 /***/ "./assets/js/utils/attributes.ts":
2054 /*!***************************************!*\
2055 !*** ./assets/js/utils/attributes.ts ***!
2056 \***************************************/
2057 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2058
2059 "use strict";
2060 __webpack_require__.r(__webpack_exports__);
2061 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2062 /* harmony export */ convertAttributeObjectToSearchItem: () => (/* binding */ convertAttributeObjectToSearchItem),
2063 /* harmony export */ getAttributeFromID: () => (/* binding */ getAttributeFromID),
2064 /* harmony export */ getAttributeFromTaxonomy: () => (/* binding */ getAttributeFromTaxonomy),
2065 /* harmony export */ getTaxonomyFromAttributeId: () => (/* binding */ getTaxonomyFromAttributeId),
2066 /* harmony export */ updateAttributeInSiblingBlock: () => (/* binding */ updateAttributeInSiblingBlock)
2067 /* harmony export */ });
2068 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
2069 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__);
2070 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/attributes.ts");
2071 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
2072 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
2073 /**
2074 * External dependencies
2075 */
2076
2077
2078
2079
2080 const ATTRIBUTES = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('attributes', []);
2081
2082 /**
2083 * Format an attribute from the settings into an object with standardized keys.
2084 *
2085 * @param {Object} attribute The attribute object.
2086 */
2087 const attributeSettingToObject = attribute => {
2088 if (!attribute || !attribute.attribute_name) {
2089 return null;
2090 }
2091 return {
2092 id: parseInt(attribute.attribute_id, 10),
2093 name: attribute.attribute_name,
2094 taxonomy: 'pa_' + attribute.attribute_name,
2095 label: attribute.attribute_label
2096 };
2097 };
2098
2099 /**
2100 * Format all attribute settings into objects.
2101 */
2102 const attributeObjects = ATTRIBUTES.reduce((acc, current) => {
2103 const attributeObject = attributeSettingToObject(current);
2104 if (attributeObject && attributeObject.id) {
2105 acc.push(attributeObject);
2106 }
2107 return acc;
2108 }, []);
2109
2110 /**
2111 * Converts an Attribute object into a shape compatible with the `SearchListControl`
2112 */
2113 const convertAttributeObjectToSearchItem = attribute => {
2114 const {
2115 count,
2116 id,
2117 name,
2118 parent
2119 } = attribute;
2120 return {
2121 count,
2122 id,
2123 name,
2124 parent,
2125 breadcrumbs: [],
2126 children: [],
2127 value: (0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_2__.isAttributeTerm)(attribute) ? attribute.attr_slug : ''
2128 };
2129 };
2130
2131 /**
2132 * Get attribute data by taxonomy.
2133 *
2134 * @param {number} attributeId The attribute ID.
2135 * @return {Object|undefined} The attribute object if it exists.
2136 */
2137 const getAttributeFromID = attributeId => {
2138 if (!attributeId) {
2139 return;
2140 }
2141 return attributeObjects.find(attribute => {
2142 return attribute.id === attributeId;
2143 });
2144 };
2145
2146 /**
2147 * Get attribute data by taxonomy.
2148 *
2149 * @param {string} taxonomy The attribute taxonomy name e.g. pa_color.
2150 * @return {Object|undefined} The attribute object if it exists.
2151 */
2152 const getAttributeFromTaxonomy = taxonomy => {
2153 if (!taxonomy) {
2154 return;
2155 }
2156 return attributeObjects.find(attribute => {
2157 return attribute.taxonomy === taxonomy;
2158 });
2159 };
2160
2161 /**
2162 * Get the taxonomy of an attribute by Attribute ID.
2163 *
2164 * @param {number} attributeId The attribute ID.
2165 * @return {string} The taxonomy name.
2166 */
2167 const getTaxonomyFromAttributeId = attributeId => {
2168 if (!attributeId) {
2169 return null;
2170 }
2171 const attribute = getAttributeFromID(attributeId);
2172 return attribute ? attribute.taxonomy : null;
2173 };
2174
2175 /**
2176 * Updates an attribute in a sibling block. Useful if two settings control the same attribute, but you don't want to
2177 * have this attribute exist on a parent block.
2178 */
2179 const updateAttributeInSiblingBlock = (clientId, attribute, newValue, siblingBlockName) => {
2180 const store = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('core/block-editor');
2181 const actions = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor');
2182 const parentBlocks = store.getBlockParents(clientId);
2183 let shippingMethodsBlockClientId = '';
2184
2185 // Loop through parent block's children until we find woocommerce/checkout-shipping-methods-block.
2186 // Also set this attribute in the woocommerce/checkout-shipping-methods-block.
2187 parentBlocks.forEach(parent => {
2188 const childBlock = store.getBlock(parent).innerBlocks.find(child => child.name === siblingBlockName);
2189 if (!childBlock) {
2190 return;
2191 }
2192 shippingMethodsBlockClientId = childBlock.clientId;
2193 });
2194 actions.updateBlockAttributes(shippingMethodsBlockClientId, {
2195 [attribute]: newValue
2196 });
2197 };
2198
2199 /***/ }),
2200
2201 /***/ "./assets/js/utils/filters.ts":
2202 /*!************************************!*\
2203 !*** ./assets/js/utils/filters.ts ***!
2204 \************************************/
2205 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2206
2207 "use strict";
2208 __webpack_require__.r(__webpack_exports__);
2209 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2210 /* harmony export */ PREFIX_QUERY_ARG_FILTER_TYPE: () => (/* binding */ PREFIX_QUERY_ARG_FILTER_TYPE),
2211 /* harmony export */ PREFIX_QUERY_ARG_QUERY_TYPE: () => (/* binding */ PREFIX_QUERY_ARG_QUERY_TYPE),
2212 /* harmony export */ changeUrl: () => (/* binding */ changeUrl),
2213 /* harmony export */ getUrlParameter: () => (/* binding */ getUrlParameter),
2214 /* harmony export */ normalizeQueryParams: () => (/* binding */ normalizeQueryParams)
2215 /* harmony export */ });
2216 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
2217 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__);
2218 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
2219 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__);
2220 /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/boolean.ts");
2221 /**
2222 * External dependencies
2223 */
2224
2225
2226
2227 const filteringForPhpTemplate = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__.getSettingWithCoercion)('isRenderingPhpTemplate', false, _woocommerce_types__WEBPACK_IMPORTED_MODULE_2__.isBoolean);
2228
2229 /**
2230 * Returns specified parameter from URL
2231 *
2232 * @param {string} name Parameter you want the value of.
2233 */
2234
2235 const PREFIX_QUERY_ARG_QUERY_TYPE = 'query_type_';
2236 const PREFIX_QUERY_ARG_FILTER_TYPE = 'filter_';
2237 function getUrlParameter(name) {
2238 if (!window) {
2239 return null;
2240 }
2241 return (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.getQueryArg)(window.location.href, name);
2242 }
2243
2244 /**
2245 * Change the URL and reload the page if filtering for PHP templates.
2246 *
2247 * @param {string} newUrl New URL to be set.
2248 */
2249 function changeUrl(newUrl) {
2250 if (filteringForPhpTemplate) {
2251 /**
2252 * We want to remove page number from URL whenever filters are changed.
2253 * This will move the user to the first page of results.
2254 *
2255 * There are following page number formats:
2256 * 1. query-{number}-page={number} (ex. query-1-page=2)
2257 * - ref: https://github.com/WordPress/gutenberg/blob/5693a62214b6c76d3dc5f3f69d8aad187748af79/packages/block-library/src/query-pagination-numbers/index.php#L18
2258 * 2. query-page={number} (ex. query-page=2)
2259 * - ref: same as above
2260 * 3. page/{number} (ex. page/2) (Default WordPress pagination format)
2261 */
2262 newUrl = newUrl.replace(/(?:query-(?:\d+-)?page=(\d+))|(?:page\/(\d+))/g, '');
2263
2264 /**
2265 * If the URL ends with '?', we remove the trailing '?' from the URL.
2266 * The trailing '?' in a URL is unnecessary and can cause the page to
2267 * reload, which can negatively affect performance. By removing the '?',
2268 * we prevent this unnecessary reload. This is safe to do even if there
2269 * are query parameters, as they will not be affected by the removal
2270 * of a trailing '?'.
2271 */
2272 if (newUrl.endsWith('?')) {
2273 newUrl = newUrl.slice(0, -1);
2274 }
2275 window.location.href = newUrl;
2276 } else {
2277 window.history.replaceState({}, '', newUrl);
2278 }
2279 }
2280
2281 /**
2282 * Run the query params through buildQueryString to normalise the params.
2283 *
2284 * @param {string} url URL to encode the search param from.
2285 */
2286 const normalizeQueryParams = url => {
2287 const queryArgs = (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.getQueryArgs)(url);
2288 return (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(url, queryArgs);
2289 };
2290
2291 /***/ }),
2292
2293 /***/ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js":
2294 /*!**********************************************************************************!*\
2295 !*** ../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js ***!
2296 \**********************************************************************************/
2297 /***/ ((module, exports) => {
2298
2299 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
2300 Copyright (c) 2018 Jed Watson.
2301 Licensed under the MIT License (MIT), see
2302 http://jedwatson.github.io/classnames
2303 */
2304 /* global define */
2305
2306 (function () {
2307 'use strict';
2308
2309 var hasOwn = {}.hasOwnProperty;
2310
2311 function classNames() {
2312 var classes = [];
2313
2314 for (var i = 0; i < arguments.length; i++) {
2315 var arg = arguments[i];
2316 if (!arg) continue;
2317
2318 var argType = typeof arg;
2319
2320 if (argType === 'string' || argType === 'number') {
2321 classes.push(arg);
2322 } else if (Array.isArray(arg)) {
2323 if (arg.length) {
2324 var inner = classNames.apply(null, arg);
2325 if (inner) {
2326 classes.push(inner);
2327 }
2328 }
2329 } else if (argType === 'object') {
2330 if (arg.toString === Object.prototype.toString) {
2331 for (var key in arg) {
2332 if (hasOwn.call(arg, key) && arg[key]) {
2333 classes.push(key);
2334 }
2335 }
2336 } else {
2337 classes.push(arg.toString());
2338 }
2339 }
2340 }
2341
2342 return classes.join(' ');
2343 }
2344
2345 if ( true && module.exports) {
2346 classNames.default = classNames;
2347 module.exports = classNames;
2348 } else if (true) {
2349 // register as 'classnames', consistent with npm package name
2350 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
2351 return classNames;
2352 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
2353 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2354 } else {}
2355 }());
2356
2357
2358 /***/ }),
2359
2360 /***/ "../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist.es2015/index.js":
2361 /*!******************************************************************************************!*\
2362 !*** ../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist.es2015/index.js ***!
2363 \******************************************************************************************/
2364 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2365
2366 "use strict";
2367 __webpack_require__.r(__webpack_exports__);
2368 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2369 /* harmony export */ dotCase: () => (/* binding */ dotCase)
2370 /* harmony export */ });
2371 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs");
2372 /* harmony import */ var no_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! no-case */ "../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js");
2373
2374
2375 function dotCase(input, options) {
2376 if (options === void 0) { options = {}; }
2377 return (0,no_case__WEBPACK_IMPORTED_MODULE_0__.noCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ delimiter: "." }, options));
2378 }
2379 //# sourceMappingURL=index.js.map
2380
2381 /***/ }),
2382
2383 /***/ "./assets/js/base/components/filter-placeholder/style.scss":
2384 /*!*****************************************************************!*\
2385 !*** ./assets/js/base/components/filter-placeholder/style.scss ***!
2386 \*****************************************************************/
2387 /***/ (() => {
2388
2389
2390
2391 /***/ }),
2392
2393 /***/ "./assets/js/blocks/active-filters/style.scss":
2394 /*!****************************************************!*\
2395 !*** ./assets/js/blocks/active-filters/style.scss ***!
2396 \****************************************************/
2397 /***/ (() => {
2398
2399
2400
2401 /***/ }),
2402
2403 /***/ "../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js":
2404 /*!**********************************************************************************************!*\
2405 !*** ../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js ***!
2406 \**********************************************************************************************/
2407 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2408
2409 "use strict";
2410 __webpack_require__.r(__webpack_exports__);
2411 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2412 /* harmony export */ localeLowerCase: () => (/* binding */ localeLowerCase),
2413 /* harmony export */ lowerCase: () => (/* binding */ lowerCase)
2414 /* harmony export */ });
2415 /**
2416 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
2417 */
2418 var SUPPORTED_LOCALE = {
2419 tr: {
2420 regexp: /\u0130|\u0049|\u0049\u0307/g,
2421 map: {
2422 İ: "\u0069",
2423 I: "\u0131",
2424 : "\u0069",
2425 },
2426 },
2427 az: {
2428 regexp: /\u0130/g,
2429 map: {
2430 İ: "\u0069",
2431 I: "\u0131",
2432 : "\u0069",
2433 },
2434 },
2435 lt: {
2436 regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
2437 map: {
2438 I: "\u0069\u0307",
2439 J: "\u006A\u0307",
2440 Į: "\u012F\u0307",
2441 Ì: "\u0069\u0307\u0300",
2442 Í: "\u0069\u0307\u0301",
2443 Ĩ: "\u0069\u0307\u0303",
2444 },
2445 },
2446 };
2447 /**
2448 * Localized lower case.
2449 */
2450 function localeLowerCase(str, locale) {
2451 var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
2452 if (lang)
2453 return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
2454 return lowerCase(str);
2455 }
2456 /**
2457 * Lower case as a function.
2458 */
2459 function lowerCase(str) {
2460 return str.toLowerCase();
2461 }
2462 //# sourceMappingURL=index.js.map
2463
2464 /***/ }),
2465
2466 /***/ "../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js":
2467 /*!****************************************************************************************!*\
2468 !*** ../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js ***!
2469 \****************************************************************************************/
2470 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2471
2472 "use strict";
2473 __webpack_require__.r(__webpack_exports__);
2474 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2475 /* harmony export */ noCase: () => (/* binding */ noCase)
2476 /* harmony export */ });
2477 /* harmony import */ var lower_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lower-case */ "../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js");
2478
2479 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
2480 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
2481 // Remove all non-word characters.
2482 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
2483 /**
2484 * Normalize the string into something other libraries can manipulate easier.
2485 */
2486 function noCase(input, options) {
2487 if (options === void 0) { options = {}; }
2488 var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case__WEBPACK_IMPORTED_MODULE_0__.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
2489 var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
2490 var start = 0;
2491 var end = result.length;
2492 // Trim the delimiter from around the output string.
2493 while (result.charAt(start) === "\0")
2494 start++;
2495 while (result.charAt(end - 1) === "\0")
2496 end--;
2497 // Transform each token independently.
2498 return result.slice(start, end).split("\0").map(transform).join(delimiter);
2499 }
2500 /**
2501 * Replace `re` in the input string with the replacement value.
2502 */
2503 function replace(input, re, value) {
2504 if (re instanceof RegExp)
2505 return input.replace(re, value);
2506 return re.reduce(function (input, re) { return input.replace(re, value); }, input);
2507 }
2508 //# sourceMappingURL=index.js.map
2509
2510 /***/ }),
2511
2512 /***/ "../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist.es2015/index.js":
2513 /*!**********************************************************************************************!*\
2514 !*** ../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist.es2015/index.js ***!
2515 \**********************************************************************************************/
2516 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2517
2518 "use strict";
2519 __webpack_require__.r(__webpack_exports__);
2520 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2521 /* harmony export */ paramCase: () => (/* binding */ paramCase)
2522 /* harmony export */ });
2523 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs");
2524 /* harmony import */ var dot_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dot-case */ "../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist.es2015/index.js");
2525
2526
2527 function paramCase(input, options) {
2528 if (options === void 0) { options = {}; }
2529 return (0,dot_case__WEBPACK_IMPORTED_MODULE_0__.dotCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ delimiter: "-" }, options));
2530 }
2531 //# sourceMappingURL=index.js.map
2532
2533 /***/ }),
2534
2535 /***/ "../../node_modules/.pnpm/fast-sort@3.4.0/node_modules/fast-sort/dist/sort.mjs":
2536 /*!*************************************************************************************!*\
2537 !*** ../../node_modules/.pnpm/fast-sort@3.4.0/node_modules/fast-sort/dist/sort.mjs ***!
2538 \*************************************************************************************/
2539 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2540
2541 "use strict";
2542 __webpack_require__.r(__webpack_exports__);
2543 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2544 /* harmony export */ createNewSortInstance: () => (/* binding */ createNewSortInstance),
2545 /* harmony export */ defaultComparer: () => (/* binding */ defaultComparer),
2546 /* harmony export */ inPlaceSort: () => (/* binding */ inPlaceSort),
2547 /* harmony export */ sort: () => (/* binding */ sort)
2548 /* harmony export */ });
2549 // >>> INTERFACES <<<
2550 // >>> HELPERS <<<
2551 var castComparer = function (comparer) { return function (a, b, order) { return comparer(a, b, order) * order; }; };
2552 var throwInvalidConfigErrorIfTrue = function (condition, context) {
2553 if (condition)
2554 throw Error("Invalid sort config: " + context);
2555 };
2556 var unpackObjectSorter = function (sortByObj) {
2557 var _a = sortByObj || {}, asc = _a.asc, desc = _a.desc;
2558 var order = asc ? 1 : -1;
2559 var sortBy = (asc || desc);
2560 // Validate object config
2561 throwInvalidConfigErrorIfTrue(!sortBy, 'Expected `asc` or `desc` property');
2562 throwInvalidConfigErrorIfTrue(asc && desc, 'Ambiguous object with `asc` and `desc` config properties');
2563 var comparer = sortByObj.comparer && castComparer(sortByObj.comparer);
2564 return { order: order, sortBy: sortBy, comparer: comparer };
2565 };
2566 // >>> SORTERS <<<
2567 var multiPropertySorterProvider = function (defaultComparer) {
2568 return function multiPropertySorter(sortBy, sortByArr, depth, order, comparer, a, b) {
2569 var valA;
2570 var valB;
2571 if (typeof sortBy === 'string') {
2572 valA = a[sortBy];
2573 valB = b[sortBy];
2574 }
2575 else if (typeof sortBy === 'function') {
2576 valA = sortBy(a);
2577 valB = sortBy(b);
2578 }
2579 else {
2580 var objectSorterConfig = unpackObjectSorter(sortBy);
2581 return multiPropertySorter(objectSorterConfig.sortBy, sortByArr, depth, objectSorterConfig.order, objectSorterConfig.comparer || defaultComparer, a, b);
2582 }
2583 var equality = comparer(valA, valB, order);
2584 if ((equality === 0 || (valA == null && valB == null)) &&
2585 sortByArr.length > depth) {
2586 return multiPropertySorter(sortByArr[depth], sortByArr, depth + 1, order, comparer, a, b);
2587 }
2588 return equality;
2589 };
2590 };
2591 function getSortStrategy(sortBy, comparer, order) {
2592 // Flat array sorter
2593 if (sortBy === undefined || sortBy === true) {
2594 return function (a, b) { return comparer(a, b, order); };
2595 }
2596 // Sort list of objects by single object key
2597 if (typeof sortBy === 'string') {
2598 throwInvalidConfigErrorIfTrue(sortBy.includes('.'), 'String syntax not allowed for nested properties.');
2599 return function (a, b) { return comparer(a[sortBy], b[sortBy], order); };
2600 }
2601 // Sort list of objects by single function sorter
2602 if (typeof sortBy === 'function') {
2603 return function (a, b) { return comparer(sortBy(a), sortBy(b), order); };
2604 }
2605 // Sort by multiple properties
2606 if (Array.isArray(sortBy)) {
2607 var multiPropSorter_1 = multiPropertySorterProvider(comparer);
2608 return function (a, b) { return multiPropSorter_1(sortBy[0], sortBy, 1, order, comparer, a, b); };
2609 }
2610 // Unpack object config to get actual sorter strategy
2611 var objectSorterConfig = unpackObjectSorter(sortBy);
2612 return getSortStrategy(objectSorterConfig.sortBy, objectSorterConfig.comparer || comparer, objectSorterConfig.order);
2613 }
2614 var sortArray = function (order, ctx, sortBy, comparer) {
2615 var _a;
2616 if (!Array.isArray(ctx)) {
2617 return ctx;
2618 }
2619 // Unwrap sortBy if array with only 1 value to get faster sort strategy
2620 if (Array.isArray(sortBy) && sortBy.length < 2) {
2621 _a = sortBy, sortBy = _a[0];
2622 }
2623 return ctx.sort(getSortStrategy(sortBy, comparer, order));
2624 };
2625 function createNewSortInstance(opts) {
2626 var comparer = castComparer(opts.comparer);
2627 return function (arrayToSort) {
2628 var ctx = Array.isArray(arrayToSort) && !opts.inPlaceSorting
2629 ? arrayToSort.slice()
2630 : arrayToSort;
2631 return {
2632 asc: function (sortBy) {
2633 return sortArray(1, ctx, sortBy, comparer);
2634 },
2635 desc: function (sortBy) {
2636 return sortArray(-1, ctx, sortBy, comparer);
2637 },
2638 by: function (sortBy) {
2639 return sortArray(1, ctx, sortBy, comparer);
2640 },
2641 };
2642 };
2643 }
2644 var defaultComparer = function (a, b, order) {
2645 if (a == null)
2646 return order;
2647 if (b == null)
2648 return -order;
2649 if (typeof a !== typeof b) {
2650 return typeof a < typeof b ? -1 : 1;
2651 }
2652 if (a < b)
2653 return -1;
2654 if (a > b)
2655 return 1;
2656 return 0;
2657 };
2658 var sort = createNewSortInstance({
2659 comparer: defaultComparer,
2660 });
2661 var inPlaceSort = createNewSortInstance({
2662 comparer: defaultComparer,
2663 inPlaceSorting: true,
2664 });
2665
2666
2667
2668
2669 /***/ }),
2670
2671 /***/ "../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs":
2672 /*!*****************************************************************************!*\
2673 !*** ../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs ***!
2674 \*****************************************************************************/
2675 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2676
2677 "use strict";
2678 __webpack_require__.r(__webpack_exports__);
2679 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2680 /* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource),
2681 /* harmony export */ __assign: () => (/* binding */ __assign),
2682 /* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator),
2683 /* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator),
2684 /* harmony export */ __asyncValues: () => (/* binding */ __asyncValues),
2685 /* harmony export */ __await: () => (/* binding */ __await),
2686 /* harmony export */ __awaiter: () => (/* binding */ __awaiter),
2687 /* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet),
2688 /* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn),
2689 /* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet),
2690 /* harmony export */ __createBinding: () => (/* binding */ __createBinding),
2691 /* harmony export */ __decorate: () => (/* binding */ __decorate),
2692 /* harmony export */ __disposeResources: () => (/* binding */ __disposeResources),
2693 /* harmony export */ __esDecorate: () => (/* binding */ __esDecorate),
2694 /* harmony export */ __exportStar: () => (/* binding */ __exportStar),
2695 /* harmony export */ __extends: () => (/* binding */ __extends),
2696 /* harmony export */ __generator: () => (/* binding */ __generator),
2697 /* harmony export */ __importDefault: () => (/* binding */ __importDefault),
2698 /* harmony export */ __importStar: () => (/* binding */ __importStar),
2699 /* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject),
2700 /* harmony export */ __metadata: () => (/* binding */ __metadata),
2701 /* harmony export */ __param: () => (/* binding */ __param),
2702 /* harmony export */ __propKey: () => (/* binding */ __propKey),
2703 /* harmony export */ __read: () => (/* binding */ __read),
2704 /* harmony export */ __rest: () => (/* binding */ __rest),
2705 /* harmony export */ __runInitializers: () => (/* binding */ __runInitializers),
2706 /* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName),
2707 /* harmony export */ __spread: () => (/* binding */ __spread),
2708 /* harmony export */ __spreadArray: () => (/* binding */ __spreadArray),
2709 /* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays),
2710 /* harmony export */ __values: () => (/* binding */ __values),
2711 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2712 /* harmony export */ });
2713 /******************************************************************************
2714 Copyright (c) Microsoft Corporation.
2715
2716 Permission to use, copy, modify, and/or distribute this software for any
2717 purpose with or without fee is hereby granted.
2718
2719 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2720 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2721 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2722 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2723 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2724 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2725 PERFORMANCE OF THIS SOFTWARE.
2726 ***************************************************************************** */
2727 /* global Reflect, Promise, SuppressedError, Symbol */
2728
2729 var extendStatics = function(d, b) {
2730 extendStatics = Object.setPrototypeOf ||
2731 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2732 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2733 return extendStatics(d, b);
2734 };
2735
2736 function __extends(d, b) {
2737 if (typeof b !== "function" && b !== null)
2738 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2739 extendStatics(d, b);
2740 function __() { this.constructor = d; }
2741 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2742 }
2743
2744 var __assign = function() {
2745 __assign = Object.assign || function __assign(t) {
2746 for (var s, i = 1, n = arguments.length; i < n; i++) {
2747 s = arguments[i];
2748 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
2749 }
2750 return t;
2751 }
2752 return __assign.apply(this, arguments);
2753 }
2754
2755 function __rest(s, e) {
2756 var t = {};
2757 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2758 t[p] = s[p];
2759 if (s != null && typeof Object.getOwnPropertySymbols === "function")
2760 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2761 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2762 t[p[i]] = s[p[i]];
2763 }
2764 return t;
2765 }
2766
2767 function __decorate(decorators, target, key, desc) {
2768 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2769 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2770 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2771 return c > 3 && r && Object.defineProperty(target, key, r), r;
2772 }
2773
2774 function __param(paramIndex, decorator) {
2775 return function (target, key) { decorator(target, key, paramIndex); }
2776 }
2777
2778 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2779 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
2780 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
2781 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
2782 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
2783 var _, done = false;
2784 for (var i = decorators.length - 1; i >= 0; i--) {
2785 var context = {};
2786 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
2787 for (var p in contextIn.access) context.access[p] = contextIn.access[p];
2788 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
2789 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
2790 if (kind === "accessor") {
2791 if (result === void 0) continue;
2792 if (result === null || typeof result !== "object") throw new TypeError("Object expected");
2793 if (_ = accept(result.get)) descriptor.get = _;
2794 if (_ = accept(result.set)) descriptor.set = _;
2795 if (_ = accept(result.init)) initializers.unshift(_);
2796 }
2797 else if (_ = accept(result)) {
2798 if (kind === "field") initializers.unshift(_);
2799 else descriptor[key] = _;
2800 }
2801 }
2802 if (target) Object.defineProperty(target, contextIn.name, descriptor);
2803 done = true;
2804 };
2805
2806 function __runInitializers(thisArg, initializers, value) {
2807 var useValue = arguments.length > 2;
2808 for (var i = 0; i < initializers.length; i++) {
2809 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
2810 }
2811 return useValue ? value : void 0;
2812 };
2813
2814 function __propKey(x) {
2815 return typeof x === "symbol" ? x : "".concat(x);
2816 };
2817
2818 function __setFunctionName(f, name, prefix) {
2819 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
2820 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
2821 };
2822
2823 function __metadata(metadataKey, metadataValue) {
2824 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
2825 }
2826
2827 function __awaiter(thisArg, _arguments, P, generator) {
2828 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2829 return new (P || (P = Promise))(function (resolve, reject) {
2830 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2831 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2832 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2833 step((generator = generator.apply(thisArg, _arguments || [])).next());
2834 });
2835 }
2836
2837 function __generator(thisArg, body) {
2838 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
2839 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
2840 function verb(n) { return function (v) { return step([n, v]); }; }
2841 function step(op) {
2842 if (f) throw new TypeError("Generator is already executing.");
2843 while (g && (g = 0, op[0] && (_ = 0)), _) try {
2844 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2845 if (y = 0, t) op = [op[0] & 2, t.value];
2846 switch (op[0]) {
2847 case 0: case 1: t = op; break;
2848 case 4: _.label++; return { value: op[1], done: false };
2849 case 5: _.label++; y = op[1]; op = [0]; continue;
2850 case 7: op = _.ops.pop(); _.trys.pop(); continue;
2851 default:
2852 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
2853 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
2854 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
2855 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
2856 if (t[2]) _.ops.pop();
2857 _.trys.pop(); continue;
2858 }
2859 op = body.call(thisArg, _);
2860 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
2861 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
2862 }
2863 }
2864
2865 var __createBinding = Object.create ? (function(o, m, k, k2) {
2866 if (k2 === undefined) k2 = k;
2867 var desc = Object.getOwnPropertyDescriptor(m, k);
2868 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2869 desc = { enumerable: true, get: function() { return m[k]; } };
2870 }
2871 Object.defineProperty(o, k2, desc);
2872 }) : (function(o, m, k, k2) {
2873 if (k2 === undefined) k2 = k;
2874 o[k2] = m[k];
2875 });
2876
2877 function __exportStar(m, o) {
2878 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
2879 }
2880
2881 function __values(o) {
2882 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
2883 if (m) return m.call(o);
2884 if (o && typeof o.length === "number") return {
2885 next: function () {
2886 if (o && i >= o.length) o = void 0;
2887 return { value: o && o[i++], done: !o };
2888 }
2889 };
2890 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2891 }
2892
2893 function __read(o, n) {
2894 var m = typeof Symbol === "function" && o[Symbol.iterator];
2895 if (!m) return o;
2896 var i = m.call(o), r, ar = [], e;
2897 try {
2898 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
2899 }
2900 catch (error) { e = { error: error }; }
2901 finally {
2902 try {
2903 if (r && !r.done && (m = i["return"])) m.call(i);
2904 }
2905 finally { if (e) throw e.error; }
2906 }
2907 return ar;
2908 }
2909
2910 /** @deprecated */
2911 function __spread() {
2912 for (var ar = [], i = 0; i < arguments.length; i++)
2913 ar = ar.concat(__read(arguments[i]));
2914 return ar;
2915 }
2916
2917 /** @deprecated */
2918 function __spreadArrays() {
2919 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
2920 for (var r = Array(s), k = 0, i = 0; i < il; i++)
2921 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
2922 r[k] = a[j];
2923 return r;
2924 }
2925
2926 function __spreadArray(to, from, pack) {
2927 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
2928 if (ar || !(i in from)) {
2929 if (!ar) ar = Array.prototype.slice.call(from, 0, i);
2930 ar[i] = from[i];
2931 }
2932 }
2933 return to.concat(ar || Array.prototype.slice.call(from));
2934 }
2935
2936 function __await(v) {
2937 return this instanceof __await ? (this.v = v, this) : new __await(v);
2938 }
2939
2940 function __asyncGenerator(thisArg, _arguments, generator) {
2941 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2942 var g = generator.apply(thisArg, _arguments || []), i, q = [];
2943 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
2944 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
2945 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
2946 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
2947 function fulfill(value) { resume("next", value); }
2948 function reject(value) { resume("throw", value); }
2949 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
2950 }
2951
2952 function __asyncDelegator(o) {
2953 var i, p;
2954 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
2955 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
2956 }
2957
2958 function __asyncValues(o) {
2959 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2960 var m = o[Symbol.asyncIterator], i;
2961 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
2962 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
2963 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
2964 }
2965
2966 function __makeTemplateObject(cooked, raw) {
2967 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
2968 return cooked;
2969 };
2970
2971 var __setModuleDefault = Object.create ? (function(o, v) {
2972 Object.defineProperty(o, "default", { enumerable: true, value: v });
2973 }) : function(o, v) {
2974 o["default"] = v;
2975 };
2976
2977 function __importStar(mod) {
2978 if (mod && mod.__esModule) return mod;
2979 var result = {};
2980 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2981 __setModuleDefault(result, mod);
2982 return result;
2983 }
2984
2985 function __importDefault(mod) {
2986 return (mod && mod.__esModule) ? mod : { default: mod };
2987 }
2988
2989 function __classPrivateFieldGet(receiver, state, kind, f) {
2990 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2991 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2992 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2993 }
2994
2995 function __classPrivateFieldSet(receiver, state, value, kind, f) {
2996 if (kind === "m") throw new TypeError("Private method is not writable");
2997 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
2998 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2999 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
3000 }
3001
3002 function __classPrivateFieldIn(state, receiver) {
3003 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
3004 return typeof state === "function" ? receiver === state : state.has(receiver);
3005 }
3006
3007 function __addDisposableResource(env, value, async) {
3008 if (value !== null && value !== void 0) {
3009 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
3010 var dispose;
3011 if (async) {
3012 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
3013 dispose = value[Symbol.asyncDispose];
3014 }
3015 if (dispose === void 0) {
3016 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
3017 dispose = value[Symbol.dispose];
3018 }
3019 if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
3020 env.stack.push({ value: value, dispose: dispose, async: async });
3021 }
3022 else if (async) {
3023 env.stack.push({ async: true });
3024 }
3025 return value;
3026 }
3027
3028 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
3029 var e = new Error(message);
3030 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3031 };
3032
3033 function __disposeResources(env) {
3034 function fail(e) {
3035 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
3036 env.hasError = true;
3037 }
3038 function next() {
3039 while (env.stack.length) {
3040 var rec = env.stack.pop();
3041 try {
3042 var result = rec.dispose && rec.dispose.call(rec.value);
3043 if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
3044 }
3045 catch (e) {
3046 fail(e);
3047 }
3048 }
3049 if (env.hasError) throw env.error;
3050 }
3051 return next();
3052 }
3053
3054 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
3055 __extends,
3056 __assign,
3057 __rest,
3058 __decorate,
3059 __param,
3060 __metadata,
3061 __awaiter,
3062 __generator,
3063 __createBinding,
3064 __exportStar,
3065 __values,
3066 __read,
3067 __spread,
3068 __spreadArrays,
3069 __spreadArray,
3070 __await,
3071 __asyncGenerator,
3072 __asyncDelegator,
3073 __asyncValues,
3074 __makeTemplateObject,
3075 __importStar,
3076 __importDefault,
3077 __classPrivateFieldGet,
3078 __classPrivateFieldSet,
3079 __classPrivateFieldIn,
3080 __addDisposableResource,
3081 __disposeResources,
3082 });
3083
3084
3085 /***/ }),
3086
3087 /***/ "./assets/js/blocks/active-filters/block.json":
3088 /*!****************************************************!*\
3089 !*** ./assets/js/blocks/active-filters/block.json ***!
3090 \****************************************************/
3091 /***/ ((module) => {
3092
3093 "use strict";
3094 module.exports = JSON.parse('{"name":"woocommerce/active-filters","version":"1.0.0","title":"Active Filters Controls","description":"Display the currently active filters.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"multiple":false,"inserter":false,"color":{"text":true,"background":false},"lock":false},"attributes":{"displayStyle":{"type":"string","default":"list"},"headingLevel":{"type":"number","default":3}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}');
3095
3096 /***/ })
3097
3098 }]);
3099 //# sourceMappingURL=active-filters-wrapper-frontend.js.map?ver=1cceee195be953465e40