var wc;(()=>{"use strict";var t={};(t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(t);const e=window.wc.__experimentalInteractivity,n=t=>{const e=(t=>{var e;return null===(e=t.target.parentElement)||void 0===e?void 0:e.querySelector(".input-text.qty.text")})(t);if(!e)return;const n=parseInt(e.value,10),r=parseInt(e.min,10),a=parseInt(e.max,10),o=parseInt(e.step,10);return{currentValue:isNaN(n)?0:n,minValue:isNaN(r)?1:r,maxValue:isNaN(a)?void 0:a,step:isNaN(o)?1:o,inputElement:e}},r=t=>{const e=new Event("change");t.dispatchEvent(e)};(0,e.store)("woocommerce/add-to-cart-form",{state:{},actions:{addQuantity:t=>{const e=n(t);if(!e)return;const{currentValue:a,maxValue:o,step:i,inputElement:u}=e,c=a+i;(void 0===o||c<=o)&&(u.value=c.toString(),r(u))},removeQuantity:t=>{const e=n(t);if(!e)return;const{currentValue:a,minValue:o,step:i,inputElement:u}=e,c=a-i;c>=o&&(u.value=c.toString(),r(u))}}}),(wc=void 0===wc?{}:wc)["add-to-cart-form"]=t})();