{"version":3,"file":"CustomCursor.D-ZWHFPb.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/viK2QuGelZJHws80ELz0/roSpsggooh9KCgvgdS3n/CustomCursor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{Data}from\"framer\";const state=Data({x:0,y:0,visible:false});export function TrackMouse(){return{onMouseMove(event){state.x=event.clientX;state.y=event.clientY;state.visible=true;},onMouseLeave(){state.visible=false;}};}export function CustomCursor(){return{style:{position:\"fixed\",left:state.x,top:state.y,transform:\"translate(-50%, -50%)\",pointerEvents:\"none\",opacity:state.visible?1:0}};}export function SmartBack(){return{onTap(){if(window.history.length>1){window.history.back();}else{window.location.href=\"/\"// fallback para home\n;}}};}import{useRef,useState,useEffect}from\"react\";export function withCursorFollow(Component){return props=>{const ref=useRef(null);const[isHovering,setIsHovering]=useState(false);const[position,setPosition]=useState({left:0,top:0});useEffect(()=>{const handleMouseMove=e=>{if(!ref.current)return;const isHovered=e.target instanceof Element&&(e.target===ref.current.parentElement||ref.current.parentElement.contains(e.target)||e.target===ref.current||ref.current.contains(e.target));setIsHovering(isHovered);if(isHovered){const parentRect=ref.current.parentElement.getBoundingClientRect();const elementRect=ref.current.getBoundingClientRect();setPosition({left:e.clientX-parentRect.left-elementRect.width/2,top:e.clientY-parentRect.top-elementRect.height/2});}else{setIsHovering(false);}};window.addEventListener(\"mousemove\",handleMouseMove);return()=>{window.removeEventListener(\"mousemove\",handleMouseMove);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{position:\"fixed\",left:`calc(${position.left}px - 0.1%)`,top:`calc(${position.top}px - 0.1%)`,pointerEvents:\"none\",transform:\"translate(-0.1%, -0.1%)\"},children:isHovering&&/*#__PURE__*/_jsx(Component,{...props})});};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withTrackMouse(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...TrackMouse(props)});};}withTrackMouse.displayName=\"TrackMouse\";export function withCustomCursor(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...CustomCursor(props)});};}withCustomCursor.displayName=\"CustomCursor\";export function withSmartBack(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...SmartBack(props)});};}withSmartBack.displayName=\"SmartBack\";\nexport const __FramerMetadata__ = {\"exports\":{\"withSmartBack\":{\"type\":\"reactHoc\",\"name\":\"withSmartBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCursorFollow\":{\"type\":\"reactHoc\",\"name\":\"withCursorFollow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CustomCursor\":{\"type\":\"override\",\"name\":\"CustomCursor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTrackMouse\":{\"type\":\"reactHoc\",\"name\":\"withTrackMouse\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"TrackMouse\":{\"type\":\"override\",\"name\":\"TrackMouse\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SmartBack\":{\"type\":\"override\",\"name\":\"SmartBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCustomCursor\":{\"type\":\"reactHoc\",\"name\":\"withCustomCursor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomCursor.map"],"mappings":"mSAA8G,SAAgB,GAAY,CAAC,MAAM,CAAC,YAAY,EAAM,CAAC,EAAM,EAAE,EAAM,QAAQ,EAAM,EAAE,EAAM,QAAQ,EAAM,QAAQ,IAAO,cAAc,CAAC,EAAM,QAAQ,IAAQ,CAAE,SAAgB,GAAc,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,QAAQ,KAAK,EAAM,EAAE,IAAI,EAAM,EAAE,UAAU,wBAAwB,cAAc,OAAO,QAAQ,EAAM,QAAQ,EAAE,EAAE,CAAC,CAAE,SAAgB,GAAW,CAAC,MAAM,CAAC,OAAO,CAAI,EAAO,QAAQ,OAAO,EAAG,EAAO,QAAQ,MAAM,CAAO,EAAO,SAAS,KAAK,KAC5iB,CAA6yC,SAAgB,EAAe,EAAE,CAAC,MAAO,KAAQ,EAA+BA,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAW,EAAM,CAAC,CAAC,EAA4C,SAAgB,EAAiB,EAAE,CAAC,MAAO,KAAQ,EAA+BD,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAa,EAAM,CAAC,CAAC,EAAgD,SAAgB,EAAc,EAAE,CAAC,MAAO,KAAQ,EAA+BD,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAU,EAAM,CAAC,CAAC,yBADz1D,IAAyB,IACjB,CADuB,EAAM,EAAK,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,GAAM,CAAC,CAC+2C,EAAe,YAAY,aAA4L,EAAiB,YAAY,eAAwL,EAAc,YAAY"}