{"version":3,"file":"FlowLines.Do7dU4NF.mjs","names":["useRef","useState","useMemo","__esmMin","pe","te","init_npm_react_18_3_1","_e","p","ce","de","useInView","useReducedMotion","init_framer_motion_DhsWWWsN","init_framer_CKT6jEEQ","addPropertyControls","useIsStaticRenderer","ControlType","resolve","m","token","v","y","anchor","width","FlowLines","props","isStatic","reduceMotion","rootRef","size","setSize","uid","el","observer","box","entries","height","prev","curves","paths","a","b","pair","p1","p2","dx","d","inView","animate","baseOpacity","color","duration","i","init_FlowLines","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/U2BMLxjk9wEg4wn4Lncj/kpshQJkpGp8AsEoz6BAw/FlowLines.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useInView,useReducedMotion}from\"framer-motion\";import{useEffect,useMemo,useRef,useState,startTransition}from\"react\";// \"L240,80\" sol kenardan, \"R240,80\" sağ kenardan, \"C-150,160\" merkezden uzaklık\nfunction resolve(token,width){const m=token.trim().match(/^([LCR])\\s*(-?[\\d.]+)\\s*,\\s*(-?[\\d.]+)$/i);if(!m)return null;const v=parseFloat(m[2]);const y=parseFloat(m[3]);const anchor=m[1].toUpperCase();const x=anchor===\"L\"?v:anchor===\"R\"?width-v:width/2+v;return{x,y};}/**\n * Flow Lines\n *\n * Kartları birbirine bağlayan kavisli çizgiler; üzerlerinde ışık akar.\n * Noktalar sol (L), merkez (C) veya sağ (R) kenara göre verilir, böylece\n * genişlik değişince çizgiler kartlara bağlı kalır.\n *\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 500\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function FlowLines(props){const{paths=\"L290,90 C-150,160; L330,300 C-150,300; R290,80 C150,140; R330,290 C150,300\",color=\"#C2F700\",baseOpacity=.16,duration=2.4}=props;const isStatic=useIsStaticRenderer();const reduceMotion=useReducedMotion();const rootRef=useRef(null);const[size,setSize]=useState({width:1200,height:500});const uid=useRef(`fl-${Math.random().toString(36).slice(2,8)}`).current;useEffect(()=>{const el=rootRef.current;if(!el||typeof ResizeObserver===\"undefined\")return;const observer=new ResizeObserver(entries=>{const box=entries[0]?.contentRect;if(!box)return;const width=Math.round(box.width);const height=Math.round(box.height);startTransition(()=>setSize(prev=>prev.width===width&&prev.height===height?prev:{width,height}));});observer.observe(el);return()=>observer.disconnect();},[]);const curves=useMemo(()=>paths.split(\";\").map(pair=>{const[a,b]=pair.trim().split(/\\s+(?=[LCR])/i);if(!a||!b)return null;const p1=resolve(a,size.width);const p2=resolve(b,size.width);if(!p1||!p2)return null;const dx=(p2.x-p1.x)*.55;return`M ${p1.x} ${p1.y} C ${p1.x+dx} ${p1.y}, ${p2.x-dx} ${p2.y}, ${p2.x} ${p2.y}`;}).filter(d=>Boolean(d)),[paths,size.width]);// Ekran dışındayken akış animasyonunu durdurur.\nconst inView=useInView(rootRef,{margin:\"200px 0px\"});const animate=!isStatic&&!reduceMotion&&inView;return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,\"aria-hidden\":\"true\",style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",pointerEvents:\"none\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`@keyframes ${uid}-flow { to { stroke-dashoffset: -40; } }`}),/*#__PURE__*/_jsxs(\"svg\",{width:size.width,height:size.height,style:{position:\"absolute\",inset:0,overflow:\"visible\"},children:[/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsx(\"filter\",{id:`${uid}-glow`,x:\"-10%\",y:\"-50%\",width:\"120%\",height:\"200%\",children:/*#__PURE__*/_jsx(\"feGaussianBlur\",{stdDeviation:\"3\"})})}),curves.map((d,i)=>/*#__PURE__*/_jsxs(\"g\",{children:[/*#__PURE__*/_jsx(\"path\",{d:d,fill:\"none\",stroke:`rgba(255,255,255,${baseOpacity})`,strokeWidth:1.5}),/*#__PURE__*/_jsx(\"path\",{d:d,fill:\"none\",stroke:color,strokeWidth:1.8,strokeLinecap:\"round\",strokeDasharray:\"4 16\",opacity:.85,style:animate?{animation:`${uid}-flow ${duration}s linear infinite`}:undefined}),animate&&/*#__PURE__*/_jsx(\"circle\",{r:3.5,fill:color,filter:`url(#${uid}-glow)`,children:/*#__PURE__*/_jsx(\"animateMotion\",{dur:`${duration*1.6}s`,begin:`${i*.45}s`,repeatCount:\"indefinite\",path:d})}),animate&&/*#__PURE__*/_jsx(\"circle\",{r:2,fill:\"#fff\",children:/*#__PURE__*/_jsx(\"animateMotion\",{dur:`${duration*1.6}s`,begin:`${i*.45}s`,repeatCount:\"indefinite\",path:d})})]},i))]})]});}addPropertyControls(FlowLines,{paths:{type:ControlType.String,title:\"\\xc7izgiler\",defaultValue:\"L290,90 C-150,160; L330,300 C-150,300; R290,80 C150,140; R330,290 C150,300\",displayTextArea:true},color:{type:ControlType.Color,title:\"Renk\",defaultValue:\"#C2F700\"},baseOpacity:{type:ControlType.Number,title:\"Zemin \\xe7izgi\",defaultValue:.16,min:0,max:1,step:.01},duration:{type:ControlType.Number,title:\"Akış s\\xfcresi\",defaultValue:2.4,min:.5,max:10,step:.1,unit:\"sn\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FlowLines\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"1200\",\"framerIntrinsicHeight\":\"500\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FlowLines.map"],"mappings":"A,mQACA,SAASkB,EAAQ,EAAM,EAAM,CAAC,IAAMC,EAAEC,EAAM,KAAK,CAAC,CAAC,MAAM,0CAA0C,EAAE,GAAG,CAACD,EAAE,OAAO,KAAK,IAAME,EAAE,WAAWF,EAAE,EAAE,EAAQG,EAAE,WAAWH,EAAE,EAAE,EAAQI,EAAOJ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