{"version":3,"file":"RedThreadLine.tEb6ZfJj.mjs","names":["useRef","useState","__esmMin","init_ssg_sandbox_shims","te","window","_e","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","init_framer_motion_DhsWWWsN","useReducedMotion","init_framer_BisrWwwE","addPropertyControls","useIsStaticRenderer","ControlType","RedThreadLine","props","rootRef","isStatic","reduceMotion","revealed","setRevealed","isHorizontal","orientation","root","firstFrame","secondFrame","observer","revealAfterInitialPaint","entries","entry","baseColor","color","duration","init_RedThreadLine"],"sources":["https:/framerusercontent.com/modules/FsqgP4FJ7t3DmQjTRWpG/AW4BPUMBSEzJn7xj8fIK/RedThreadLine.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{startTransition,useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useReducedMotion}from\"framer-motion\";/**\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 2\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function RedThreadLine(props){const{orientation=\"horizontal\",color=\"#AF3213\",baseColor=\"rgba(175, 50, 19, 0.16)\",duration=.9}=props;const rootRef=useRef(null);const isStatic=useIsStaticRenderer();const reduceMotion=useReducedMotion();const[revealed,setRevealed]=useState(isStatic||Boolean(reduceMotion));const isHorizontal=orientation===\"horizontal\";useEffect(()=>{if(isStatic||reduceMotion){startTransition(()=>setRevealed(true));return;}const root=rootRef.current;if(!root||typeof window===\"undefined\")return;let firstFrame=0;let secondFrame=0;let observer=null;const revealAfterInitialPaint=()=>{firstFrame=window.requestAnimationFrame(()=>{secondFrame=window.requestAnimationFrame(()=>{startTransition(()=>setRevealed(true));});});};if(\"IntersectionObserver\"in window){observer=new IntersectionObserver(entries=>{if(!entries.some(entry=>entry.isIntersecting))return;observer?.disconnect();revealAfterInitialPaint();},{threshold:.12,rootMargin:\"0px 0px -8% 0px\"});observer.observe(root);}else{revealAfterInitialPaint();}return()=>{observer?.disconnect();window.cancelAnimationFrame(firstFrame);window.cancelAnimationFrame(secondFrame);};},[isStatic,reduceMotion]);return /*#__PURE__*/_jsx(\"div\",{ref:rootRef,\"aria-hidden\":\"true\",style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",background:baseColor},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",background:color,transformOrigin:isHorizontal?\"left center\":\"center top\",transform:isHorizontal?`scaleX(${revealed?1:0})`:`scaleY(${revealed?1:0})`,transition:reduceMotion?\"none\":`transform ${duration}s cubic-bezier(0.22, 1, 0.36, 1)`,willChange:\"transform\"}})});}addPropertyControls(RedThreadLine,{orientation:{type:ControlType.Enum,title:\"Ausrichtung\",options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertikal\"],defaultValue:\"horizontal\",displaySegmentedControl:true},color:{type:ControlType.Color,title:\"Linie\",defaultValue:\"#AF3213\"},baseColor:{type:ControlType.Color,title:\"Grundlinie\",defaultValue:\"rgba(175, 50, 19, 0.16)\"},duration:{type:ControlType.Number,title:\"Dauer\",defaultValue:.9,min:.2,max:3,step:.1,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RedThreadLine\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"2\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RedThreadLine.map"],"mappings":"A,sQAKG,SAAwBkB,EAAc,EAAM,CAAC,GAAK,CAAC,cAAY,aAAa,QAAM,UAAU,YAAU,0BAA0B,WAAS,IAAIC,EAAYC,EAAQpB,EAAO,IAAI,EAAQqB,EAASL,EAAoB,EAAQM,EAAaT,EAAiB,EAAO,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