{"version":3,"file":"StickySidebar.v0r_Ro6D.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","_e","c","J","ce","withDesktopSticky","Wrapped","isDesktop","setIsDesktop","mq","update","style","props","Component","init_StickySidebar","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/6r14dwHzzIlL0B9FuxSX/mRV2Tr507Uwnf22fqUMT/StickySidebar.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useState}from\"react\";/**\n * Hace que el lateral de las cartas sea \"sticky\" solo en escritorio (>= 1200px).\n * En móvil y tablet queda como un bloque normal que se desplaza con la página.\n */export function withDesktopSticky(Component){const Wrapped=/*#__PURE__*/forwardRef((props,ref)=>{const[isDesktop,setIsDesktop]=useState(false);useEffect(()=>{if(typeof window===\"undefined\"||!window.matchMedia)return;const mq=window.matchMedia(\"(min-width: 1200px)\");const update=()=>setIsDesktop(mq.matches);update();if(mq.addEventListener){mq.addEventListener(\"change\",update);return()=>mq.removeEventListener(\"change\",update);}mq.addListener(update);return()=>mq.removeListener(update);},[]);const style=isDesktop?{...props.style,position:\"sticky\",top:0}:props.style;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:style});});Wrapped.displayName=\"withDesktopSticky\";return Wrapped;}\nexport const __FramerMetadata__ = {\"exports\":{\"withDesktopSticky\":{\"type\":\"reactHoc\",\"name\":\"withDesktopSticky\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickySidebar.map"],"mappings":"A,yIAGG,SAAgBS,EAAkB,EAAU,CAAC,IAAMC,EAAqB,iBAAY,EAAM,IAAM,CAAC,GAAK,CAACC,EAAUC,GAAcZ,EAAS,EAAK,EAAEQ,MAAc,CAAC,GAAUJ,IAAS,QAAa,CAACA,EAAO,WAAW,OAAO,IAAMS,EAAGT,EAAO,WAAW,qBAAqB,EAAQU,MAAWF,EAAaC,EAAG,OAAO,EAAkJ,OAAhJC,EAAO,EAAKD,EAAG,kBAAkBA,EAAG,iBAAiB,SAASC,CAAM,MAAYD,EAAG,oBAAoB,SAASC,CAAM,IAAGD,EAAG,YAAYC,CAAM,MAAYD,EAAG,eAAeC,CAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAMC,EAAMJ,EAAU,CAAC,GAAGK,EAAM,MAAM,SAAS,SAAS,IAAI,CAAC,EAAEA,EAAM,MAAM,MAAoB,gBAAKC,EAAU,CAAK,MAAI,GAAGD,EAAY,OAAK,CAAC,CAAE,CAAC,EAA0C,MAAxC,GAAQ,YAAY,oBAA2BN,CAAQ,C"}