(()=>{"use strict";var e={1287:(e,t,r)=>{r.d(t,{c:()=>s});var o=r(5133);const n=window.wc.wcSettings,a=(0,n.getSetting)("isBlockTheme"),c=(0,n.getSetting)("isProductArchive"),i=(0,n.getSetting)("needsRefreshForInteractivityAPI",!1);function s(e,t={}){const r=new URL(e);return r.pathname=r.pathname.replace(/\/page\/[0-9]+/i,""),r.searchParams.delete("paged"),r.searchParams.forEach(((e,t)=>{t.match(/^query(?:-[0-9]+)?-page$/)&&r.searchParams.delete(t)})),e=r.href,i||!a&&c?window.location.href=e:(0,o.navigate)(e,t)}},5133:e=>{e.exports=window.wc.__experimentalInteractivity}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e=r(5133),t=r(1287);function o(e){e=e.filter(Boolean);const t=new URL(window.location.href);return e.length?t.searchParams.set("rating_filter",e.join(",")):t.searchParams.delete("rating_filter"),t.href}(0,e.store)("woocommerce/product-filter-rating",{actions:{onCheckboxChange:()=>{const r=(0,e.getContext)("woocommerce/interactivity-checkbox-list").items.filter((e=>e.checked)).map((e=>e.value));(0,t.c)(o(r))},onDropdownChange:()=>{const r=((0,e.getContext)("woocommerce/interactivity-dropdown").selectedItems||[]).map((e=>e.value));(0,t.c)(o(r))},removeFilter:()=>{const{value:r}=(0,e.getContext)(),n=new URL(window.location.href).searchParams.get("rating_filter")||"",a=""===n?[]:n.split(","),c=a.indexOf(r);c>-1&&a.splice(c,1),(0,t.c)(o(a))}}})})()})();