{"version":3,"file":"ScrollTimeline.f7txwrtt.mjs","names":["React.useRef","React.useMemo","React.useState","__esmMin","window","init_npm_react_18_3_1","pe","init_ssg_sandbox_shims","ce","init_jsx_runtime","_e","de","motion","useScroll","useTransform","init_framer_motion_DhsWWWsN","useSpring","withTimelineFill","ref","smooth","scrollYProgress","scaleY","Motion","Component","props","withTimelineNode","on","setOn","el","check","r","init_ScrollTimeline"],"sources":["https:/framerusercontent.com/modules/7XYKlsxHLcjSlgP7GL4o/WQpJSv5XLd9MGgli5BxV/ScrollTimeline.js"],"sourcesContent":["// Gridline Scroll Timeline overrides.\n// withTimelineFill: put on the \"Progress\" layer inside the line track (height 100%, absolute).\n//   It grows from the top as the track scrolls past the middle of the screen.\n// withTimelineNode: put on each step marker. It lights up once its centre passes the middle\n//   of the screen and turns off again when you scroll back up.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{motion,useScroll,useSpring,useTransform}from\"framer-motion\";export function withTimelineFill(Component){return props=>{const ref=React.useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[\"start 50%\",\"end 50%\"]});const smooth=useSpring(scrollYProgress,{stiffness:220,damping:40,mass:.6});const scaleY=useTransform(smooth,[0,1],[0,1]);const Motion=React.useMemo(()=>motion(Component),[]);return /*#__PURE__*/_jsx(Motion,{...props,ref:ref,style:{...props.style,scaleY,transformOrigin:\"50% 0%\"}});};}export function withTimelineNode(Component){return props=>{const ref=React.useRef(null);const[on,setOn]=React.useState(false);React.useEffect(()=>{const el=ref.current;if(!el||typeof window===\"undefined\")return;const check=()=>{const r=el.getBoundingClientRect();setOn(r.top+r.height/2<=window.innerHeight/2);};check();window.addEventListener(\"scroll\",check,{passive:true});window.addEventListener(\"resize\",check);return()=>{window.removeEventListener(\"scroll\",check);window.removeEventListener(\"resize\",check);};},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,\"data-active\":on?\"true\":\"false\",style:{...props.style,transition:\"box-shadow 0.35s cubic-bezier(0.23, 1, 0.32, 1), transform 0.35s cubic-bezier(0.23, 1, 0.32, 1)\",boxShadow:on?\"inset 0px 0px 0px 1.5px var(--token-XodlNCNeE, #0a72ef), 0px 0px 0px 4px rgba(10, 114, 239, 0.12)\":props.style?.boxShadow,transform:on?\"scale(1.06)\":\"scale(1)\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTimelineNode\":{\"type\":\"reactHoc\",\"name\":\"withTimelineNode\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTimelineFill\":{\"type\":\"reactHoc\",\"name\":\"withTimelineFill\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollTimeline.map"],"mappings":"A,yNAK0I,SAAgBiB,EAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMC,EAAIlB,EAAa,IAAI,EAAO,CAAC,mBAAiBa,EAAU,CAAC,OAAOK,EAAI,OAAO,CAAC,YAAY,SAAS,CAAC,CAAC,EAAQC,EAAOH,EAAUI,EAAgB,CAAC,UAAU,IAAI,QAAQ,GAAG,KAAK,EAAE,CAAC,EAAQC,EAAOP,EAAaK,EAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAQG,EAAOrB,MAAkBW,EAAOW,CAAS,EAAE,CAAC,CAAC,EAAE,MAAoB,gBAAKD,EAAO,CAAC,GAAGE,EAAU,MAAI,MAAM,CAAC,GAAGA,EAAM,MAAM,SAAO,gBAAgB,QAAQ,CAAC,CAAC,CAAE,CAAE,CAAC,SAAgBC,EAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMP,EAAIlB,EAAa,IAAI,EAAO,CAAC0B,EAAGC,GAAOzB,EAAe,EAAK,EAA2Y,OAAzYM,MAAoB,CAAC,IAAMoB,EAAGV,EAAI,QAAQ,GAAG,CAACU,GAAWxB,IAAS,OAAY,OAAO,IAAMyB,MAAU,CAAC,IAAMC,EAAEF,EAAG,sBAAsB,EAA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