{"version":3,"file":"HandUnderline.EdADTQWx.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","window","init_ssg_sandbox_shims","ce","init_jsx_runtime","c","_e","de","init_framer_motion_DhsWWWsN","useInView","init_framer_D1IzEvwH","addPropertyControls","ControlType","useIsStaticRenderer","HandUnderline","props","isStatic","ref","inView","replay","settled","setSettled","cancelled","quietTimer","ro","markSettled","waitForStableWidth","el","bump","fonts","failsafe","drawn","style","PATH","LENGTH","color","thickness","duration","delay","init_HandUnderline"],"sources":["https:/framerusercontent.com/modules/V0AeceAna2d2KDM01Tfn/2Zax9w3y8y785H5AJvCy/HandUnderline.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useInView}from\"framer-motion\";import{useEffect,useRef,useState}from\"react\";const PATH=\"M4 13 C 130 4, 280 4, 400 9 S 550 16, 596 7\";const LENGTH=100;/**\n * Hand-drawn underline that draws in when scrolled into view.\n *\n * The line is sized by the text it sits under, so it must not draw until the\n * webfont has loaded and the text has stopped reflowing — otherwise it draws\n * against the fallback-font measurement, then jumps when the real font lands.\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 20\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function HandUnderline(props){const{color=\"#7B61D9\",thickness=5,duration=1,delay=.35,replay=false,style}=props;const isStatic=useIsStaticRenderer();const ref=useRef(null);const inView=useInView(ref,{once:!replay,amount:.6});// wait for fonts, then for the element's own width to stop changing\nconst[settled,setSettled]=useState(false);useEffect(()=>{if(isStatic||typeof window===\"undefined\"){setSettled(true);return;}let cancelled=false;let quietTimer=0;let ro=null;const markSettled=()=>{if(!cancelled)setSettled(true);};const waitForStableWidth=()=>{const el=ref.current;if(!el||typeof ResizeObserver===\"undefined\"){markSettled();return;}// settle once the width has held steady for 120ms\nconst bump=()=>{window.clearTimeout(quietTimer);quietTimer=window.setTimeout(markSettled,120);};ro=new ResizeObserver(bump);ro.observe(el);bump();};const fonts=document.fonts;if(fonts?.ready){fonts.ready.then(()=>{if(!cancelled)waitForStableWidth();});}else{waitForStableWidth();}// never hang: draw anyway after 2.5s\nconst failsafe=window.setTimeout(markSettled,2500);return()=>{cancelled=true;window.clearTimeout(quietTimer);window.clearTimeout(failsafe);ro?.disconnect();};},[isStatic]);const drawn=isStatic||inView&&settled;return /*#__PURE__*/_jsx(\"svg\",{ref:ref,viewBox:\"0 0 600 20\",preserveAspectRatio:\"none\",\"aria-hidden\":\"true\",style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"visible\",display:\"block\",// hidden until the text has stopped moving, so it never flashes\n// in the wrong place\nopacity:isStatic||settled?1:0,...style},children:/*#__PURE__*/_jsx(\"path\",{d:PATH,pathLength:LENGTH,fill:\"none\",stroke:color,strokeWidth:thickness,strokeLinecap:\"round\",style:{strokeDasharray:`${LENGTH} ${LENGTH*2}`,strokeDashoffset:drawn?0:LENGTH,transition:isStatic?\"none\":`stroke-dashoffset ${duration}s cubic-bezier(.6,.1,.2,1) ${drawn?delay:0}s`}})});}addPropertyControls(HandUnderline,{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#7B61D9\"},thickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:5,min:1,max:12,step:.5,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:1,min:.2,max:3,step:.1,unit:\"s\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:.35,min:0,max:3,step:.05,unit:\"s\"},replay:{type:ControlType.Boolean,title:\"Replay on scroll\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HandUnderline\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"600\",\"framerIntrinsicHeight\":\"20\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-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