{"version":3,"file":"StickyToCenter.DdAQdAVW.mjs","names":["useRef","useState","__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","oe","c","_e","de","init_framer_DDfsYcI0","StickyToCenter","ref","offset","setOffset","withStickyToCenter","DataObserverContext","C","props","init_StickyToCenter"],"sources":["https:/framerusercontent.com/modules/deF8FvQJf1wsjHeKj3hy/znZyYUhxwDJjXDNXmaDc/StickyToCenter.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useState,useEffect}from\"react\";export function StickyToCenter(){const ref=useRef(null);const[offset,setOffset]=useState(200);useEffect(()=>{if(ref.current){setOffset(ref.current.offsetHeight/2);}},[]);return{ref,style:{position:\"sticky\",top:`calc(50% - ${offset}px)`}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withStickyToCenter(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...StickyToCenter(props)});};}withStickyToCenter.displayName=\"StickyToCenter\";\nexport const __FramerMetadata__ = {\"exports\":{\"withStickyToCenter\":{\"type\":\"reactHoc\",\"name\":\"withStickyToCenter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StickyToCenter\":{\"type\":\"override\",\"name\":\"StickyToCenter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickyToCenter.map"],"mappings":"A,mLAAwF,SAAgBa,GAAgB,CAAC,IAAMC,EAAId,EAAO,IAAI,EAAO,CAACe,EAAOC,GAAWf,EAAS,GAAG,EAA8E,OAA5EK,MAAc,CAAIQ,EAAI,SAASE,EAAUF,EAAI,QAAQ,aAAa,CAAC,CAAG,EAAE,CAAC,CAAC,EAAQ,CAAC,MAAI,MAAM,CAAC,SAAS,SAAS,IAAI,cAAcC,EAAO,IAAI,CAAC,CAAE,CAAoJ,SAAgBE,EAAmB,EAAE,CAAC,MAAO,KAAQT,EAA+BN,CAAuC,EAASC,EAAKgB,EAAE,CAAC,GAAGC,EAAM,GAAGP,EAAeO,CAAK,CAAC,CAAC,EAAI,C,0CAAC,EAAmB,YAAY,gB"}