import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const o=(a={getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store},c={},t.d(c,a),c),r=e=>(0,o.getContext)(e),s={state:{get styles(){const{styles:e}=r(),{isSelected:t}=n;return t?Object.entries(null!=e?e:[]).reduce(((e,[t,o])=>{const r=`${t}:${o};`;return e.length>0?`${e} ${r}`:r}),""):""}},actions:{startZoom:e=>{if(!e.target.classList.contains("wc-block-woocommerce-product-gallery-large-image__image"))return l.resetZoom();const t=e.target,o=e.offsetX/t.clientWidth*100,s=e.offsetY/t.clientHeight*100,{styles:n}=r();n&&(n.transform="scale(1.3)",n["transform-origin"]=`${o}% ${s}%`)},resetZoom:()=>{const e=r();e.styles&&(e.styles.transform="scale(1.0)",e.styles["transform-origin"]="")}},callbacks:{scrollInto:()=>{if(!n.isSelected)return;const{ref:e}=(0,o.getElement)();e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}}},{state:n,actions:l}=(0,o.store)("woocommerce/product-gallery",s,{lock:"I acknowledge that using a private store means my plugin will inevitably break on the next store release."});var a,c;