{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/kknPlTc6XYiqfKaERziA/LWVoQXAUSaLCuZzoRtIi/Skew_1.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{motion,useSpring}from\"framer-motion\";export function CursorTrackingHover(){const ref=React.useRef(null);// State for rotation angles\nconst[rotateX,setRotateX]=React.useState(0);const[rotateY,setRotateY]=React.useState(0);// Smooth spring transitions\nconst springConfig={type:\"spring\",stiffness:300,damping:20};const springRotateX=useSpring(0,springConfig);const springRotateY=useSpring(0,springConfig);React.useEffect(()=>{springRotateX.set(rotateX);springRotateY.set(rotateY);},[rotateX,rotateY,springRotateX,springRotateY]);const[isHovering,setIsHovering]=React.useState(false);const maxAngle=15// maximum tilt in degrees\n;const handleMouseMove=event=>{if(!isHovering||!ref.current)return;const rect=ref.current.getBoundingClientRect();const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;// Calculate offset from center\nconst offsetX=event.clientX-centerX;const offsetY=event.clientY-centerY;// Normalize to a range of -1 to +1\nconst normalizedX=offsetX/(rect.width/2);const normalizedY=offsetY/(rect.height/2);// For rotateX:\n//   - For bottom half (normalizedY >= 0): use -normalizedY * maxAngle\n//   - For top half (normalizedY < 0): invert it, using normalizedY * maxAngle\nconst newRotateX=normalizedY<0?normalizedY*maxAngle// invert top: e.g. normalizedY = -1 becomes -15\u00B0\n:-normalizedY*maxAngle// bottom: e.g. normalizedY = 1 becomes -15\u00B0\n;// For rotateY, keep it balanced: positive normalizedX yields -maxAngle, negative yields +maxAngle.\nconst newRotateY=-normalizedX*maxAngle;setRotateX(newRotateX);setRotateY(newRotateY);};const handleMouseEnter=()=>setIsHovering(true);const handleMouseLeave=()=>{setIsHovering(false);setRotateX(0);setRotateY(0);};return{ref,as:motion.div,style:{perspective:\"800px\",transformStyle:\"preserve-3d\",transformOrigin:\"50% 50%\",rotateX:springRotateX,rotateY:springRotateY},// Additional hover effects (scale, slight skew, downward shift)\nwhileHover:{scale:1.02,skewX:1,skewY:1,translateY:5},transition:springConfig,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onMouseMove:handleMouseMove};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withCursorTrackingHover(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...CursorTrackingHover(props)});};}withCursorTrackingHover.displayName=\"CursorTrackingHover\";\nexport const __FramerMetadata__ = {\"exports\":{\"withCursorTrackingHover\":{\"type\":\"reactHoc\",\"name\":\"withCursorTrackingHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CursorTrackingHover\":{\"type\":\"override\",\"name\":\"CursorTrackingHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Skew_1.map"],
  "mappings": "4HAA0H,SAASA,GAAqB,CAAC,IAAMC,EAAUC,EAAO,IAAI,EAC/K,CAACC,EAAQC,CAAU,EAAQC,EAAS,CAAC,EAAO,CAACC,EAAQC,CAAU,EAAQF,EAAS,CAAC,EAChFG,EAAa,CAAC,KAAK,SAAS,UAAU,IAAI,QAAQ,EAAE,EAAQC,EAAcC,EAAU,EAAEF,CAAY,EAAQG,EAAcD,EAAU,EAAEF,CAAY,EAAQI,EAAU,IAAI,CAACH,EAAc,IAAIN,CAAO,EAAEQ,EAAc,IAAIL,CAAO,CAAE,EAAE,CAACH,EAAQG,EAAQG,EAAcE,CAAa,CAAC,EAAE,GAAK,CAACE,EAAWC,CAAa,EAAQT,EAAS,EAAK,EAAQU,EAAS,GAClVC,EAAgBC,GAAO,CAAC,GAAG,CAACJ,GAAY,CAACZ,EAAI,QAAQ,OAAO,IAAMiB,EAAKjB,EAAI,QAAQ,sBAAsB,EAAQkB,EAAQD,EAAK,KAAKA,EAAK,MAAM,EAAQE,EAAQF,EAAK,IAAIA,EAAK,OAAO,EACpLG,EAAQJ,EAAM,QAAQE,EAAcG,EAAQL,EAAM,QAAQG,EAC1DG,EAAYF,GAASH,EAAK,MAAM,GAASM,EAAYF,GAASJ,EAAK,OAAO,GAG1EO,EAAWD,EAAY,EAAEA,EAAYT,EAC1C,CAACS,EAAYT,EAERW,EAAW,CAACH,EAAYR,EAASX,EAAWqB,CAAU,EAAElB,EAAWmB,CAAU,CAAE,EAAQC,EAAiB,IAAIb,EAAc,EAAI,EAAQc,EAAiB,IAAI,CAACd,EAAc,EAAK,EAAEV,EAAW,CAAC,EAAEG,EAAW,CAAC,CAAE,EAAE,MAAM,CAAC,IAAAN,EAAI,GAAG4B,EAAO,IAAI,MAAM,CAAC,YAAY,QAAQ,eAAe,cAAc,gBAAgB,UAAU,QAAQpB,EAAc,QAAQE,CAAa,EAC3W,WAAW,CAAC,MAAM,KAAK,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAWH,EAAa,aAAamB,EAAiB,aAAaC,EAAiB,YAAYZ,CAAe,CAAE,CAA2J,SAASc,EAAwBC,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASC,EAAKJ,EAAE,CAAC,GAAGC,EAAM,GAAGhC,EAAoBgC,CAAK,CAAC,CAAC,EAAI,CAACF,EAAwB,YAAY",
  "names": ["CursorTrackingHover", "ref", "pe", "rotateX", "setRotateX", "ye", "rotateY", "setRotateY", "springConfig", "springRotateX", "useSpring", "springRotateY", "ue", "isHovering", "setIsHovering", "maxAngle", "handleMouseMove", "event", "rect", "centerX", "centerY", "offsetX", "offsetY", "normalizedX", "normalizedY", "newRotateX", "newRotateY", "handleMouseEnter", "handleMouseLeave", "motion", "withCursorTrackingHover", "C", "props", "re", "DataObserverContext", "p"]
}
