{"version":3,"file":"Masking.CA5YpxLE.mjs","names":["useState","useMousePosition"],"sources":["https:/framerusercontent.com/modules/tR7NPFQFeDhTtrDNZmlJ/TMGxBhjLpPA6Gchir94W/useMousePosition.js","https:/framerusercontent.com/modules/BCU5BCYiDaMI6suQ3EQV/wNiAc82fiDNDSSbxM54m/Masking.js"],"sourcesContent":["import{useState,useEffect}from\"react\";function useMousePosition(){const[mousePosition,setMousePosition]=useState({x:null,y:null});const updateMousePosition=e=>{setMousePosition({x:e.pageX,y:e.pageY});};useEffect(()=>{window.addEventListener(\"mousemove\",updateMousePosition);return()=>window.removeEventListener(\"mousemove\",updateMousePosition);},[]);return mousePosition;}export default useMousePosition;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./useMousePosition.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import useMousePosition from\"https://framerusercontent.com/modules/tR7NPFQFeDhTtrDNZmlJ/TMGxBhjLpPA6Gchir94W/useMousePosition.js\";import{useEffect}from\"react\";// Learn more: https://www.framer.com/docs/guides/overrides/\nconst MASKSIZE={initial:0,onHover:40};const MASK_IMAGEURL=\"https://framerusercontent.com/images/De0CMakQwO0HOVWPyQnVeTw.svg\";const useStore=createStore({mousePos:{x:0,y:0},size:MASKSIZE.initial});export function withMaskHover(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,onMouseEnter:()=>{setStore({...store,size:MASKSIZE.onHover});},onMouseLeave:()=>{setStore({...store,size:MASKSIZE.initial});}});};}export function withMaskFrame(Component){return props=>{const[store,setStore]=useStore();const{x,y}=useMousePosition();useEffect(()=>{setStore({...store,mousePos:{x:x,y:y}});},[]);return /*#__PURE__*/_jsx(Component,{...props,animate:{WebkitMaskPosition:`${x-store.size/2}px ${y-store.size/2}px`,WebkitMaskSize:`${store.size}px`},transition:{type:\"tween\",ease:\"backOut\",duration:.5},style:{WebkitMaskSize:`${store.size}px`,WebkitMaskImage:`url(${MASK_IMAGEURL})`,WebkitMaskRepeat:\"no-repeat\",WebkitMaskPosition:`${x-store.size/2}px ${y-store.size/2}px`}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withMaskHover\":{\"type\":\"reactHoc\",\"name\":\"withMaskHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMaskFrame\":{\"type\":\"reactHoc\",\"name\":\"withMaskFrame\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Masking.map"],"mappings":"8RAAsC,SAAS,GAAkB,CAAC,GAAK,CAAC,EAAc,GAAkBA,EAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAO,EAAoB,GAAG,CAAC,EAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAuJ,OAApJ,OAAe,EAAO,iBAAiB,YAAY,EAAoB,KAAW,EAAO,oBAAoB,YAAY,EAAoB,EAAG,EAAE,CAAC,CAAQ,yBAA/T,GAA6V,KCC/L,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAU,GAAU,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,iBAAiB,CAAC,EAAS,CAAC,GAAG,EAAM,KAAK,EAAS,QAAQ,CAAC,EAAG,iBAAiB,CAAC,EAAS,CAAC,GAAG,EAAM,KAAK,EAAS,QAAQ,CAAC,EAAG,CAAC,EAAI,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAU,GAAU,CAAM,CAAC,IAAE,KAAGC,GAAkB,CAA8D,OAA7D,MAAc,CAAC,EAAS,CAAC,GAAG,EAAM,SAAS,CAAG,IAAI,IAAE,CAAC,CAAC,EAAG,EAAE,CAAC,CAAqB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