PageSourceSearch

https://www.smartalecks.ai/assets/DiagramBlock-CgwRyJRw.js

js smartalecks.ai collected 2026-10-05 15:05:30 UTC 1,620 bytes, 1 lines download raw bytes

1import{a as f,j as t}from"./dnd-CNQ8BvKU.js";import{i as g,c as u,d as l,P as a}from"./xyflow-C0vxhnBz.js";/* empty css              */const i=140,d=40;function b(o){const r=new l.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:"TB",ranksep:50,nodesep:30});for(const e of o.nodes)r.setNode(e.id,{width:i,height:d});for(const e of o.edges)r.setEdge(e.from,e.to);l.layout(r);const n=o.nodes.map(e=>{const s=r.node(e.id);return{id:e.id,data:{label:e.label},position:{x:s.x-i/2,y:s.y-d/2},sourcePosition:a.Bottom,targetPosition:a.Top,style:{width:i,height:d,display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:500,borderRadius:8,border:"1px solid var(--border)",background:"var(--card)",color:"var(--foreground)"}}}),c=o.edges.map((e,s)=>({id:`e-${s}`,source:e.from,target:e.to,label:e.label,animated:!0,style:{stroke:"#6366f1",strokeWidth:1.5},labelStyle:{fontSize:9,fill:"var(--muted-foreground)"}}));return{nodes:n,edges:c}}function x({data:o}){const{nodes:r,edges:n}=f.useMemo(()=>b(o),[o]);return t.jsxs("div",{className:"rounded-lg border border-border bg-card overflow-hidden mt-2",children:[o.title&&t.jsx("div",{className:"px-3 py-1.5 border-b border-border",children:t.jsx("h4",{className:"text-xs font-semibold text-foreground",children:o.title})}),t.jsx("div",{style:{height:300,width:"100%"},children:t.jsx(g,{nodes:r,edges:n,fitView:!0,proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,children:t.jsx(u,{gap:16,size:1})})})]})}export{x as DiagramBlock};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.