(()=>{"use strict";var e={1287:(e,t,o)=>{o.d(t,{c:()=>a});var r=o(5133);const n=window.wc.wcSettings,c=(0,n.getSetting)("isBlockTheme"),i=(0,n.getSetting)("isProductArchive"),s=(0,n.getSetting)("needsRefreshForInteractivityAPI",!1);function a(e,t={}){return s||!c&&i?window.location.href=e:(0,r.navigate)(e,t)}},5133:e=>{e.exports=window.wc.__experimentalInteractivity}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var c=t[r]={exports:{}};return e[r](c,c.exports,o),c.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e=o(5133),t=o(1287);const r=e=>{const t=new URL(window.location.href),{searchParams:o}=t;return""!==e?o.set("filter_stock_status",e):o.delete("filter_stock_status"),t.href};(0,e.store)("woocommerce/product-filter-stock-status",{actions:{onCheckboxChange:()=>{const o=(0,e.getContext)("woocommerce/interactivity-checkbox-list").items.filter((e=>e.checked)).map((e=>e.value));(0,t.c)(r(o.join(",")))},onDropdownChange:()=>{const o=((0,e.getContext)("woocommerce/interactivity-dropdown").selectedItems||[]).map((e=>e.value));(0,t.c)(r(o.join(",")))},updateProducts:e=>{const o=new URL(window.location.href).searchParams.get("filter_stock_status")||"",n=""===o?[]:o.split(",");if(e.target.checked)o.includes(e.target.value)||n.push(e.target.value);else{const t=n.indexOf(e.target.value);t>-1&&n.splice(t,1)}(0,t.c)(r(n.join(",")))},removeFilter:()=>{const{value:o}=(0,e.getContext)(),n=new URL(window.location.href).searchParams.get("filter_stock_status")||"",c=""===n?[]:n.split(","),i=c.indexOf(o);i>-1&&c.splice(i,1),(0,t.c)(r(c.join(",")))}}})})()})();