{"version":3,"file":"Underline.CwkUX7o7.mjs","names":["useRef","useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/A3sdQvpIZqJ5eAKWGMHg/bZW4bM4iUbY5nYC89dM8/Underline.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useScroll,useTransform}from\"framer\";import{useEffect,useRef,useState}from\"react\";export function StickyOnCollision(){const ref=useRef(null);const[top,setTop]=useState(0);useEffect(()=>{if(!ref.current)return;const el=ref.current;const update=()=>{const rect=el.getBoundingClientRect();const vh=window.innerHeight;// Desired visual center\nconst centerOffset=vh/2-rect.height/2;setTop(centerOffset);};update();window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[]);return{ref,style:{position:\"sticky\",top,willChange:\"transform\"}};}export function withFixedVideo(Component){return props=>{const{scrollY}=useScroll();// This keeps the video centered by offsetting the scroll\n// Adjust the multiplier if you want a subtle parallax instead of a 1:1 pin\nconst y=useTransform(scrollY,value=>value);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100vh\",objectFit:\"cover\",zIndex:-1,y:y}});};}export function VisibilityParent(){const ref=useRef(null);return{ref,style:{overflow:\"hidden\"}};}export function SlideFromTopByParentVisibility(){const ref=useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[\"start end\",\"end start\"]});const y=useTransform(scrollYProgress,[0,1],[\"-100%\",\"0%\"]);return{ref,style:{y,willChange:\"transform\"}};}export function withVariantSwitch(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{// Target the specific container by its Framer-generated class\nconst targetElement=document.querySelector(\".framer-1bm1ep-container\");if(targetElement){// Framer components respond to the 'variant' attribute\n// when manipulated via the DOM in this specific way\ntargetElement.setAttribute(\"data-framer-component-variant\",\"Desktop White Contact us\");// Note: Some Framer versions require a direct state trigger.\n// If the attribute change doesn't visually update,\n// the component might need a standard Link or State trigger instead.\n}else{console.warn(\"Target variant container not found\");}}});};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withStickyOnCollision(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...StickyOnCollision(props)});};}withStickyOnCollision.displayName=\"StickyOnCollision\";export function withVisibilityParent(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...VisibilityParent(props)});};}withVisibilityParent.displayName=\"VisibilityParent\";export function withSlideFromTopByParentVisibility(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...SlideFromTopByParentVisibility(props)});};}withSlideFromTopByParentVisibility.displayName=\"SlideFromTopByParentVisibility\";\nexport const __FramerMetadata__ = {\"exports\":{\"withSlideFromTopByParentVisibility\":{\"type\":\"reactHoc\",\"name\":\"withSlideFromTopByParentVisibility\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVisibilityParent\":{\"type\":\"reactHoc\",\"name\":\"withVisibilityParent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SlideFromTopByParentVisibility\":{\"type\":\"override\",\"name\":\"SlideFromTopByParentVisibility\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"VisibilityParent\":{\"type\":\"override\",\"name\":\"VisibilityParent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StickyOnCollision\":{\"type\":\"override\",\"name\":\"StickyOnCollision\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStickyOnCollision\":{\"type\":\"reactHoc\",\"name\":\"withStickyOnCollision\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFixedVideo\":{\"type\":\"reactHoc\",\"name\":\"withFixedVideo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariantSwitch\":{\"type\":\"reactHoc\",\"name\":\"withVariantSwitch\",\"annotations\":{\"framerContractVersion\":\"1\"}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