import{r as n,bz as c,j as a}from"./index-09tpYl64.js";function d(r,o,s=500){const[e,t]=n.useState(0);return n.useEffect(()=>{const u=setTimeout(()=>{e===1&&r(),t(0)},s);return e===2&&o(),()=>clearTimeout(u)},[e]),()=>t(u=>u+1)}const l=()=>{const[r,o]=n.useState({x:0,y:0});return n.useEffect(()=>{const s=t=>{o({x:t.pageX,y:t.pageY})},e=t=>{o({x:t.touches[0].pageX,y:t.touches[0].pageY})};return window.addEventListener("mousemove",s),window.addEventListener("touchmove",e),()=>{window.removeEventListener("mousemove",s),window.removeEventListener("touchmove",e)}},[]),r},i=document.getElementById("roots-absolute"),v=({children:r,newX:o,newY:s})=>{const e=n.useRef(document.createElement("div"));return n.useEffect(()=>(i.appendChild(e.current),()=>{i.removeChild(e.current)}),[]),c.createPortal(a("div",{style:{position:"absolute",left:o-23.047,top:s-23.047,height:60,width:60,zIndex:9999},children:r}),e.current)};export{v as R,l as a,d as u};
//# sourceMappingURL=index-jLlCP3Qn.js.map
