agent-runtime-map 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +40 -40
- package/dist/viewer/assets/index-BYSUKIdb.js +3 -0
- package/dist/viewer/assets/index-oqi3ngbk.css +1 -0
- package/dist/viewer/assets/xyflow-CKwy9Fyu.js +7 -0
- package/dist/viewer/index.html +3 -3
- package/package.json +1 -1
- package/dist/viewer/assets/index-4tql6hvj.js +0 -3
- package/dist/viewer/assets/index-Dvsvzpjt.css +0 -1
- package/dist/viewer/assets/xyflow-NEmtYq4w.js +0 -7
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk-DSSKxAlM.js","./react-C8zC5XaP.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as l,j as t,d as ss}from"./react-C8zC5XaP.js";import{g as ns,B as is,E as as,H as fe,P as ge,R as rs,u as os,a as cs,i as ls,C as ds,M as us,b as hs}from"./xyflow-NEmtYq4w.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const ps="modulepreload",ms=function(e,s){return new URL(e,s).href},Je={},fs=function(s,n,r){let i=Promise.resolve();if(n&&n.length>0){let g=function(j){return Promise.all(j.map(C=>Promise.resolve(C).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const c=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),f=p?.nonce||p?.getAttribute("nonce");i=g(n.map(j=>{if(j=ms(j,r),j in Je)return;Je[j]=!0;const C=j.endsWith(".css"),w=C?'[rel="stylesheet"]':"";if(r)for(let _=c.length-1;_>=0;_--){const M=c[_];if(M.href===j&&(!C||M.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${j}"]${w}`))return;const E=document.createElement("link");if(E.rel=C?"stylesheet":ps,C||(E.as="script"),E.crossOrigin="",E.href=j,f&&E.setAttribute("nonce",f),document.head.appendChild(E),C)return new Promise((_,M)=>{E.addEventListener("load",_),E.addEventListener("error",()=>M(new Error(`Unable to preload CSS for ${j}`)))})}))}function o(c){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=c,window.dispatchEvent(p),!p.defaultPrevented)throw c}return i.then(c=>{for(const p of c||[])p.status==="rejected"&&o(p.reason);return s().catch(o)})};const gs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dt=(...e)=>e.filter((s,n,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===n).join(" ").trim();var ys={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const xs=l.forwardRef(({color:e="currentColor",size:s=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:c,...p},f)=>l.createElement("svg",{ref:f,...ys,width:s,height:s,stroke:e,strokeWidth:r?Number(n)*24/Number(s):n,className:dt("lucide",i),...p},[...c.map(([g,j])=>l.createElement(g,j)),...Array.isArray(o)?o:[o]]));const k=(e,s)=>{const n=l.forwardRef(({className:r,...i},o)=>l.createElement(xs,{ref:o,iconNode:s,className:dt(`lucide-${gs(e)}`,r),...i}));return n.displayName=`${e}`,n};const ws=k("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const ut=k("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const ht=k("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const vs=k("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);const bs=k("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const pt=k("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Qe=k("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const ze=k("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const js=k("CircleDotDashed",[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);const mt=k("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);const ft=k("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const gt=k("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const ks=k("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);const yt=k("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);const xt=k("GitFork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);const Ns=k("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);const Ss=k("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);const wt=k("PanelRightClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);const Es=k("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);const Cs=k("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);const vt=k("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const bt=k("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const jt=k("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);const _s=k("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);const Is=k("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Ms=k("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);const kt=k("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Ls=k("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);const Rs=k("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);const $s=k("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);const Nt=k("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);const St=k("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Pe=190,De=154,Ts={user_action:Ss,entrypoint:jt,process:vt,workflow:$s,ai_process:ut,tool:Nt,model:vs,human_gate:Rs,decision:yt,data:ft,external_system:gt,result:ze};function As({data:e,selected:s}){const n=e,r=Ts[n.nodeType],i=n.detailLevel?` blueprint-node--detail-${n.detailLevel}`:"";return t.jsxs("article",{className:`blueprint-node blueprint-node--${n.nodeType}${i}${s?" is-selected":""}`,"data-detail-level":n.detailLevel,children:[t.jsx(fe,{type:"target",position:ge.Left,className:"blueprint-handle"}),t.jsxs("div",{className:"blueprint-node__tile",children:[t.jsx("span",{className:"blueprint-node__type",children:n.typeLabel}),t.jsxs("span",{className:"blueprint-node__confidence",children:[Math.round(n.confidence*100),"%"]}),t.jsx("span",{className:"blueprint-node__icon",children:t.jsx(r,{size:35,strokeWidth:1.75})})]}),t.jsx("h3",{children:n.label}),t.jsx("p",{children:n.description}),t.jsx("small",{children:n.sourceText}),n.sourceDetail&&t.jsxs("div",{className:"blueprint-node__evidence",children:[t.jsx("code",{children:n.sourceDetail}),n.inferenceText&&t.jsx("span",{children:n.inferenceText})]}),n.onFocus&&t.jsx("button",{type:"button",className:"blueprint-node__focus","aria-label":n.focusLabel??`Focus ${n.label}`,title:n.focusLabel??`Focus ${n.label}`,onClick:o=>{o.stopPropagation(),n.onFocus?.()},children:t.jsx(_s,{size:13,strokeWidth:2})}),t.jsx(fe,{type:"source",position:ge.Right,className:"blueprint-handle"})]})}function zs({data:e}){const s=e;return t.jsx("section",{className:`blueprint-group blueprint-group--${s.tone}${s.dashed?" is-dashed":""}`,children:t.jsxs("div",{className:"blueprint-group__label",children:[t.jsx("i",{"aria-hidden":"true"}),t.jsx("strong",{children:s.label}),s.detail&&t.jsx("span",{children:s.detail})]})})}var Ps=176,Ds=88,Fs={agent:ut,database:ft,external_api:gt,function:ht,route:jt,tool:Nt,workflow:yt};function Os({data:e,selected:s}){const n=e,r=Fs[n.kind]??ks;return t.jsxs("article",{className:`blueprint-code-node${s?" is-selected":""}${n.depth===2?" is-deep":""}${n.expanded?" is-expanded":""}`,children:[t.jsx(fe,{type:"target",position:ge.Top,className:"blueprint-code-handle"}),t.jsx("span",{className:"blueprint-code-node__icon",children:t.jsx(r,{size:15,strokeWidth:1.8})}),t.jsxs("span",{className:"blueprint-code-node__body",children:[t.jsx("small",{children:n.kind.replaceAll("_"," ")}),t.jsx("strong",{title:n.label,children:n.label}),t.jsx("code",{title:n.source,children:n.source})]}),n.relation&&t.jsx("i",{children:n.relation}),n.expandable&&n.onToggle&&t.jsx("button",{type:"button",className:"blueprint-code-node__toggle","aria-expanded":n.expanded??!1,"aria-label":n.toggleLabel??(n.expanded?`Collapse ${n.label}`:`Expand ${n.label}`),onClick:i=>{i.stopPropagation(),n.onToggle?.()},children:t.jsx(bs,{size:12,strokeWidth:2})}),t.jsx(fe,{type:"source",position:ge.Bottom,className:"blueprint-code-handle"})]})}function Hs(e){const[s,n,r]=ns({sourceX:e.sourceX,sourceY:e.sourceY,sourcePosition:e.sourcePosition,targetX:e.targetX,targetY:e.targetY,targetPosition:e.targetPosition,borderRadius:10}),i=e.data??{},o=typeof e.markerEnd=="string"?e.markerEnd:void 0;return t.jsxs(t.Fragment,{children:[t.jsx(is,{id:e.id,path:s,markerEnd:o,style:e.style}),e.label&&t.jsx(as,{children:t.jsx("span",{className:"blueprint-playback-edge__label",style:{transform:`translate(-50%, -50%) translate(${n}px, ${r}px)`},children:String(e.label)})}),i.showToken&&t.jsx("circle",{className:"blueprint-playback-edge__token",r:"4",fill:i.tokenColor??"#1689cf",children:t.jsx("animateMotion",{dur:`${i.tokenDuration??.9}s`,repeatCount:"indefinite",path:s})})]})}var re={overviewMax:.55,evidenceMin:1.15,hysteresis:.06,logicFadeStart:.38,logicFadeEnd:.72,evidenceFadeStart:.94,evidenceFadeEnd:1.36};function Bs(e,s){if(!Number.isFinite(e))return"overview";const{overviewMax:n,evidenceMin:r,hysteresis:i}=re;return s==="overview"&&e<n+i?"overview":s==="evidence"&&e>=r-i?"evidence":s==="logic"?e<n-i?"overview":e<r+i?"logic":"evidence":e<n?"overview":e>=r?"evidence":"logic"}function qs(e){const s=Number.isFinite(e)?e:0,n=et(re.logicFadeStart,re.logicFadeEnd,s),r=et(re.evidenceFadeStart,re.evidenceFadeEnd,s);return{overview:1-n,logic:n,evidence:r}}function et(e,s,n){const r=Math.min(1,Math.max(0,(n-e)/(s-e)));return r*r*(3-2*r)}function Et(e,s=42){if(!e.length)return;const n=Math.min(...e.map(c=>c.position.x)),r=Math.min(...e.map(c=>c.position.y)),i=Math.max(...e.map(c=>c.position.x+(c.width??Pe))),o=Math.max(...e.map(c=>c.position.y+(c.height??De)));return{x:n-s,y:r-s,width:i-n+s*2,height:o-r+s*2}}var Ct={runtime:"AGENT RUNTIME",workflows:"AGENT WORKFLOWS",systems:"DATA & SERVICES",nodeCount:e=>`${e} ${e===1?"node":"nodes"}`},Us=[{id:"runtime",types:["entrypoint","process","workflow","ai_process","tool","model","human_gate","decision","data","external_system","result"],labelKey:"runtime",tone:"amber",padding:62,minimumNodes:1},{id:"workflows",types:["process","workflow","ai_process","tool","human_gate","decision"],labelKey:"workflows",tone:"violet",dashed:!0,padding:34,minimumNodes:2},{id:"systems",types:["data","model","external_system"],labelKey:"systems",tone:"cyan",padding:30,minimumNodes:2}];function Vs(e,s,n,r=Ct){const i=new Map(s.nodes.map(c=>[c.id,c.type])),o=n?e.filter(c=>n.has(c.id)):e;return Us.flatMap(c=>{const p=o.filter(g=>c.types.includes(i.get(g.id)??"user_action"));if(p.length<c.minimumNodes)return[];const f=Et(p,c.padding);return f?[{id:`blueprint_group_${c.id}`,type:"blueprintGroup",position:{x:f.x,y:f.y},data:{label:r[c.labelKey],detail:r.nodeCount(p.length),tone:c.tone,dashed:c.dashed},style:{width:f.width,height:f.height,zIndex:-2},width:f.width,height:f.height,draggable:!1,selectable:!1,connectable:!1,focusable:!1,zIndex:-2}]:[]})}async function Gs(e,s){const{default:n}=await fs(async()=>{const{default:c}=await import("./elk-DSSKxAlM.js").then(p=>p.e);return{default:c}},__vite__mapDeps([0,1]),import.meta.url),i=await new n().layout({id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"RIGHT","elk.spacing.nodeNode":"70","elk.layered.spacing.nodeNodeBetweenLayers":"118","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.padding":"[top=90,left=90,bottom=90,right=90]"},children:e.map(c=>({id:c.id,width:Pe,height:De})),edges:s.map(c=>({id:c.id,sources:[c.source],targets:[c.target]}))}),o=new Map((i.children??[]).map(c=>[c.id,{x:c.x??0,y:c.y??0}]));return e.map(c=>({...c,position:o.get(c.id)??c.position}))}function tt(e,s,n){if(!e||!s||!s.steps.length)return Ks();const r=Math.max(-1,Math.min(n,s.steps.length-1)),i=r>0?s.steps.slice(0,r):[],o=r>=0?s.steps.slice(0,r+1):[],c=r>=0?s.steps[r]:void 0,p=e.diagnostics.filter(y=>y.severity==="error"),f=e.diagnostics.filter(y=>y.severity==="warning"),g=new Set(o.flatMap(y=>y.nodeIds)),j=new Set(o.flatMap(y=>y.incomingEdgeIds)),C=new Set(c?.nodeIds??[]),w=new Set(c?.incomingEdgeIds??[]),E=he(p,"nodeId",g),_=he(p,"edgeId",j),M=he(f,"nodeId",g),b=he(f,"edgeId",j),q=E.size>0||_.size>0,B=r===s.steps.length-1;return{stepIndex:r,completedNodeIds:new Set(i.flatMap(y=>y.nodeIds)),currentNodeIds:C,reachedNodeIds:g,reachedEdgeIds:j,currentEdgeIds:w,errorNodeIds:E,errorEdgeIds:_,warningNodeIds:M,warningEdgeIds:b,halted:q,outcome:r<0?"idle":q?"error":B?"complete":"running"}}function Ws(e,s){return e?.steps.length?s>=e.steps.length-1?0:s+1:-1}function he(e,s,n){return new Set(e.flatMap(r=>{const i=r[s];return i&&n.has(i)?[i]:[]}))}function Ks(){return{stepIndex:-1,completedNodeIds:new Set,currentNodeIds:new Set,reachedNodeIds:new Set,reachedEdgeIds:new Set,currentEdgeIds:new Set,errorNodeIds:new Set,errorEdgeIds:new Set,warningNodeIds:new Set,warningEdgeIds:new Set,halted:!1,outcome:"idle"}}function Zs(e,s=!1){return e==="error"?{color:"#e5484d",width:3,opacity:1,animated:!1}:e==="warning"?{color:"#d99a24",width:2.7,opacity:1,dash:s?"7 5":void 0,animated:!1}:e==="current"?{color:"#147fc1",width:3,opacity:1,animated:!0}:e==="reached"?{color:"#1f9d72",width:2.4,opacity:1,animated:!1}:e==="outside"?{color:"#a8b0ba",width:1.25,opacity:.16,dash:s?"6 7":void 0,animated:!1}:e==="path"?{color:"#1689cf",width:2,opacity:.72,dash:s?"7 6":void 0,animated:!1}:s?{color:"#626a73",width:1.55,opacity:.72,dash:"6 7",animated:!1}:{color:"#1689cf",width:1.9,opacity:.88,animated:!1}}const Xs=2;function Ys(e,s,n,r={}){const i=r.limit??9,o=r.secondLevelLimit??5,c=new Map(n.nodes.map(m=>[m.id,m])),p=e.rawNodeIds.filter(m=>c.has(m)),f=nt(p,n,c),g=it([...p,...f]).sort((m,F)=>me(c.get(m))-me(c.get(F))).slice(0,i),j=new Set(g),C=[...r.expandedRawIds??[]].filter(m=>j.has(m)),w=it(nt(C,n,c)).filter(m=>!j.has(m)&&c.has(m)).sort((m,F)=>me(c.get(m))-me(c.get(F))).slice(0,o),E=[...g,...w],_=new Set(E),M=m=>j.has(m)?1:2,b=Math.min(3,Math.max(1,E.length)),q=(b-1)*196/2,B=new Map;for(const m of n.edges)!_.has(m.source)||!_.has(m.target)||B.has(m.target)||B.set(m.target,m.label??m.kind);const y=E.flatMap((m,F)=>{const z=c.get(m);if(!z)return[];const V=F%b,J=Math.floor(F/b),P=M(m);return[{id:Re(e.id,m),type:"codeDetail",position:{x:s.position.x+7+V*196-q,y:s.position.y+220+J*112},data:{label:z.name,kind:z.kind,source:an(z),relation:B.get(m),depth:P,expandable:P<Xs,expanded:r.expandedRawIds?.has(m)??!1},width:Ps,height:Ds,draggable:!1,connectable:!1,className:`detail-node-enter detail-node--depth-${P}`,zIndex:3}]}),A=n.edges.flatMap(m=>!_.has(m.source)||!_.has(m.target)?[]:[{id:`detail-edge:${e.id}:${m.id}`,source:Re(e.id,m.source),target:Re(e.id,m.target),type:"smoothstep",label:m.label??m.kind,className:"detail-edge detail-edge-enter",style:{stroke:"#8293a2",strokeWidth:1.15,strokeDasharray:"4 5",opacity:.72},labelStyle:{fill:"#7b8794",fontSize:7}}]),$=new Set(A.map(m=>m.target)),D=y.filter(m=>p.includes(nn(m.id))&&!$.has(m.id)),oe=(D.length?D:y.slice(0,1)).map((m,F)=>({id:`detail-anchor:${e.id}:${F}`,source:e.id,target:m.id,type:"smoothstep",className:"detail-edge detail-edge-enter",style:{stroke:"#4b9dcc",strokeWidth:1.45,strokeDasharray:"3 4",opacity:.78}}));return{nodes:y,edges:[...oe,...A]}}function Js(e,s){const n=new Map;for(const o of e){const c=n.get(o.source);c?c.push(o.target):n.set(o.source,[o.target])}const r=new Set([s]),i=[s];for(;i.length;){const o=i.shift();for(const c of n.get(o)??[])r.has(c)||(r.add(c),i.push(c))}return r}function Qs(e,s){return e.some(n=>n.source===s)}function en(e,s,n){const r=s.trim().toLowerCase();return r?new Set(e.filter(i=>{const o=n(i);return[o.label,o.description,i.label,...i.sources.map(p=>p.file)].join(" ").toLowerCase().includes(r)}).map(i=>i.id)):new Set(e.map(i=>i.id))}function tn(e,s){return{...st(e?.nodeIds??[],s?.nodeIds??[],"NodeIds"),...st(e?.edgeIds??[],s?.edgeIds??[],"EdgeIds")}}function pe(e){return Object.fromEntries(e.map(s=>[s.id,{x:s.position.x,y:s.position.y}]))}function Le(e,s){return s?e.map(n=>s[n.id]?{...n,position:s[n.id]}:n):e}function sn(e){if(e)try{const s=JSON.parse(e);if(!s||typeof s!="object"||Array.isArray(s))return;const n=Object.entries(s).filter(r=>{const i=r[1];return Number.isFinite(i?.x)&&Number.isFinite(i?.y)});return Object.fromEntries(n)}catch{return}}function st(e,s,n){const r=new Set(e),i=new Set(s);return{[`entering${n}`]:new Set(s.filter(o=>!r.has(o))),[`exiting${n}`]:new Set(e.filter(o=>!i.has(o))),[`shared${n}`]:new Set(s.filter(o=>r.has(o)))}}function nt(e,s,n){const r=new Set(e);return s.edges.flatMap(i=>{if(!r.has(i.source))return[];const o=n.get(i.target);return o&&o.kind!=="file"&&o.kind!=="entrypoint"?[i.target]:[]})}function Re(e,s){return`detail:${e}:${s}`}function $e(e){const s=e.split(":");if(!(s[0]!=="detail"||s.length<3))return{logicId:s[1],rawId:s.slice(2).join(":")}}function nn(e){return e.split(":").slice(2).join(":")}function an(e){const s=e.evidence[0]?.source;return s?`${s.file}:${s.startLine}`:e.qualifiedName??e.name}function me(e){return e?{agent:0,workflow:1,function:2,tool:3,route:4,service:5,model:6,database:7,external_api:8,prompt:9,class:10,entrypoint:11,file:12}[e.kind]??20:30}function it(e){return[...new Set(e)]}const _t="agent-runtime-map.locale",rn={runtimeLogic:"Runtime logic",productLogic:"Product logic",generated:"Generated",projectMap:"PROJECT MAP",logicNodes:"logic nodes",flows:"flows",files:"files",search:"Find logic or source…",clearSearch:"Clear search",nodeTypes:"NODE TYPES",staticAnalysis:"Evidence-backed static analysis",logicGraph:"Logic graph",selectedLogic:"SELECTED LOGIC",closeEvidence:"Close evidence",confidence:"Confidence",sourceEvidence:"SOURCE EVIDENCE",selectedCode:"SELECTED CODE",focusStep:"Focus",focusHint:"Showing this step and everything below it.",exitFocus:"Back to the whole system",detailTerminal:"Deepest level shown. Use the breadcrumb to step back.",expandDetail:"Expand",collapseDetail:"Collapse",productContext:"PRODUCT CONTEXT",productMatch:"Match",productCodeOnly:"Read from code only. Nothing the project writes about itself was matched to this step.",productMatchedOn:"Matched on",lines:"Lines",rawReferences:"Raw references",loadingTitle:"Compiling the view",loadingDescription:"Loading the evidence-backed logic graph…",errorTitle:"Graph unavailable",errorHint:"Run agent-runtime-map analyze . and restart the viewer.",loadError:"Could not load graph.json",switchLanguage:"切换到中文",featureCircuits:"FEATURE CIRCUITS",featureHint:"Choose a feature to simulate its code-backed route on the full Agent graph.",wholeSystem:"Whole system",features:"features",healthy:"Healthy",warning:"Needs review",chainError:"Chain error",choosePath:"EXECUTION PATH",chainCheck:"CHAIN CHECK",play:"Play",pause:"Pause",nextStep:"Next step",replay:"Replay",speed:"Speed",ready:"Ready to inspect",running:"Checking chain",completed:"Chain verified",stopped:"Stopped at error",step:"Step",diagnostics:"DIAGNOSTICS",noDiagnostics:"No deterministic chain problems found.",recommendation:"Suggested fix",selectFeature:"Select a feature to inspect its execution route.",globalView:"All nodes and dependencies",zoomLevel:"VIEW LEVEL",semanticZoomHint:"Scroll to move between overview, logic, and source evidence.",expandDetails:"Expand code details",collapseDetails:"Collapse code details",detailHint:"Double-click a logic node to inspect its code-backed internals.",cameraFollow:"Follow execution",cameraFollowing:"Following",resumeFollow:"Resume follow",layout:"LAYOUT",undoLayout:"Undo move",resetLayout:"Reset layout",pinnedNodes:"pinned",sourceCode:"SOURCE CODE",sourceUnavailable:"Source preview is unavailable for this map.",loadingSource:"Loading source…",openSource:"Open source",searchResults:"SEARCH RESULTS",noSearchResults:"No matching logic or source found.",result:"result"},on={runtimeLogic:"运行逻辑",productLogic:"产品逻辑",generated:"生成于",projectMap:"项目逻辑图",logicNodes:"逻辑节点",flows:"逻辑流",files:"代码文件",search:"搜索逻辑或源文件…",clearSearch:"清除搜索",nodeTypes:"节点类型",staticAnalysis:"基于代码证据的静态分析",logicGraph:"逻辑图",selectedLogic:"当前逻辑节点",closeEvidence:"关闭证据面板",confidence:"置信度",sourceEvidence:"源码证据",selectedCode:"选中的代码",focusStep:"聚焦",focusHint:"只显示这一步及其下游。",exitFocus:"返回全局系统",detailTerminal:"已到最深一层,可用面包屑返回。",expandDetail:"展开",collapseDetail:"收起",productContext:"产品语境",productMatch:"匹配度",productCodeOnly:"仅来自代码。项目自述中没有内容与这一步匹配。",productMatchedOn:"匹配依据",lines:"代码行",rawReferences:"原始节点引用",loadingTitle:"正在编译逻辑图",loadingDescription:"正在加载基于代码证据的逻辑图…",errorTitle:"无法加载逻辑图",errorHint:"请运行 agent-runtime-map analyze . 后重新启动 Viewer。",loadError:"无法加载 graph.json",switchLanguage:"Switch to English",featureCircuits:"功能电路",featureHint:"选择一个功能,在完整 Agent 图上模拟它的代码执行路线。",wholeSystem:"全局系统",features:"个功能",healthy:"链路正常",warning:"需要确认",chainError:"链路错误",choosePath:"执行路径",chainCheck:"链路检查",play:"播放",pause:"暂停",nextStep:"下一步",replay:"重新检查",speed:"速度",ready:"等待检查",running:"正在检查链路",completed:"链路检查通过",stopped:"已在错误处停止",step:"步骤",diagnostics:"诊断结果",noDiagnostics:"未发现确定性的链路问题。",recommendation:"修复建议",selectFeature:"请选择一个功能,检查它的执行路线。",globalView:"显示全部节点与依赖",zoomLevel:"查看层级",semanticZoomHint:"滚轮缩放可切换全局、逻辑与源码证据。",expandDetails:"展开代码细节",collapseDetails:"收起代码细节",detailHint:"双击逻辑节点,查看有源码证据支撑的内部调用。",cameraFollow:"跟随执行",cameraFollowing:"正在跟随",resumeFollow:"继续跟随",layout:"布局",undoLayout:"撤销移动",resetLayout:"重置布局",pinnedNodes:"已固定",sourceCode:"源代码",sourceUnavailable:"此逻辑图暂时无法读取源码预览。",loadingSource:"正在读取源码…",openSource:"打开源码",searchResults:"搜索结果",noSearchResults:"未找到匹配的逻辑或源码。",result:"条结果"},cn={en:{user_action:"USER ACTION",entrypoint:"ENTRYPOINT",process:"PROCESS",workflow:"WORKFLOW",ai_process:"AI PROCESS",tool:"TOOL",model:"MODEL",human_gate:"HUMAN GATE",decision:"DECISION",data:"DATA",external_system:"EXTERNAL",result:"RESULT"},"zh-CN":{user_action:"用户操作",entrypoint:"系统入口",process:"处理过程",workflow:"工作流",ai_process:"AI 处理",tool:"工具",model:"模型",human_gate:"人工审批",decision:"逻辑判断",data:"数据",external_system:"外部系统",result:"运行结果"}},at={agent:"智能体",approve:"批准",apply:"应用",analyze:"分析",billing:"计费",build:"构建",canonical:"标准",compile:"编译",content:"内容",create:"创建",data:"数据",decision:"决策",document:"文档",draft:"草稿",enqueue:"加入队列",execute:"执行",final:"最终",fast:"快速",generate:"生成",generation:"生成",handle:"处理",idea:"灵感",ideas:"灵感",import:"导入",index:"建立索引",knowledge:"知识",lock:"锁定",logic:"逻辑",map:"图",model:"模型",order:"订单",parse:"解析",plan:"计划",process:"处理",publish:"发布",publishing:"发布",quality:"高质量",production:"生产",prompt:"提示词",prompts:"提示词",protected:"受保护",provider:"供应商",record:"记录",refund:"退款",request:"请求",result:"结果",revise:"修改",review:"审核",run:"运行",save:"保存",scene:"场景",score:"评分",script:"脚本",service:"服务",specs:"规格",story:"故事",submission:"提交",submit:"提交",sync:"同步",tool:"工具",version:"版本",video:"视频",workflow:"工作流"};function ln(){if(typeof window<"u"){const s=new URLSearchParams(window.location.search).get("locale"),n=ot(s);if(n)return n;const r=ot(window.localStorage.getItem(_t));if(r)return r}return(typeof navigator>"u"?[]:navigator.languages).some(s=>s.toLowerCase().startsWith("zh"))?"zh-CN":"en"}function dn(e){typeof window<"u"&&window.localStorage.setItem(_t,e)}function U(e){return e==="zh-CN"?on:rn}function It(e,s){return cn[s][e]}function un(e,s){return s==="zh-CN"?`${e} 处源码证据`:`${e} source${e===1?"":"s"}`}function hn(e,s){return s==="en"?e.title:`${e.project.name} ${e.graphType==="runtime_logic"?"运行逻辑":"产品逻辑"}`}function pn(e,s){return s==="en"?e.description:e.description==="A static, evidence-backed view of how work flows through the codebase."?"基于静态代码证据,展示任务如何在项目中流转。":e.description==="A code-informed view of how user actions become product value."?"基于代码结构,展示用户操作如何形成最终产品价值。":e.description}function H(e,s,n){if(s==="en")return{label:e.label,description:e.description};const r=typeof e.metadata?.rawName=="string"?e.metadata.rawName:e.label,i=e.metadata?.rawKind,o=i==="route"||i==="external_api"?e.label:Ae(r)??e.label;if(!(e.metadata?.generatedDescription===!0))return{label:o,description:e.description};const p=gn(e.behavior,g=>{const j=n?.get(g);return j?H(j,s).label:g});if(p)return{label:o,description:p};const f={user_action:`用户发起“${o}”。`,entrypoint:`系统通过 ${o} 接收任务。`,process:`系统执行“${o}”。`,workflow:`工作流编排“${o}”。`,ai_process:`AI 工作流执行“${o}”。`,tool:`智能体调用工具“${o}”。`,model:`智能体使用模型 ${o}。`,human_gate:`人工审核或批准“${o}”。`,decision:`系统判断“${o}”。`,data:`系统读取或更新“${o}”。`,external_system:`系统与 ${o} 通信。`,result:`流程产出“${o}”。`};return{label:o,description:f[e.type]}}function mn(e){return e==="en"?Ct:{runtime:"智能体运行时",workflows:"AGENT 工作流",systems:"数据与外部服务",nodeCount:s=>`${s} 个节点`}}const fn=4;function gn(e,s){if(!e)return;const n=i=>yn(i.map(s)),r=[e.calls.length?`调用${n(e.calls)}`:void 0,e.branches.length?`按条件分支到${n(e.branches)}`:void 0,e.requests.length?`请求${n(e.requests)}`:void 0,e.data.length?`读写${n(e.data)}`:void 0,e.feeds.length?`结果流向${n(e.feeds)}`:void 0].filter(i=>!!i);return r.length?`${r.join(",")}。`:void 0}function yn(e){const s=e.slice(0,fn).map(r=>`“${r}”`),n=e.length-s.length;return s.join("、")+(n>0?`等 ${e.length} 项`:"")}function Mt(e,s){return s==="en"?e:{deterministic:"确定性分析",heuristic:"启发式分析",llm:"LLM 语义分析",mixed:"混合分析"}[e]}function xn(e,s){const n=e.matchedTerms.map(i=>`“${i}”`).join("、"),r=e.matchedTerms.map(i=>`"${i}"`).join(", ");return s==="en"?{documented_name:`the documented name ${r}`,documented_terms:`the documented terms ${r}`,entry_terms:`terms shared with this feature's entry point${r?`: ${r}`:""}`,step_terms:`terms shared with steps in this feature${r?`: ${r}`:""}`}[e.matchedOn]:{documented_name:`文档中的名称 ${n}`,documented_terms:`文档中的术语 ${n}`,entry_terms:`与该功能入口共有的术语${n?`:${n}`:""}`,step_terms:`与该功能步骤共有的术语${n?`:${n}`:""}`}[e.matchedOn]}function wn(e,s){const n={readme:"From the README",prd:"From the product spec",docs:"From project documentation",prompt:"From an Agent prompt",config:"From the project config",user:"Provided by you"};return s==="en"?n[e]:{readme:"来自 README",prd:"来自产品文档",docs:"来自项目文档",prompt:"来自 Agent 提示词",config:"来自项目配置",user:"由你提供"}[e]}function vn(e,s){const n=U(s);return e==="healthy"?n.healthy:e==="warning"?n.warning:n.chainError}function rt(e,s,n){if(n==="en")return e.label;const r=e.label.match(/^(?:GET|POST|PUT|PATCH|DELETE)\s+(.+)$/i);if(r){const o=r[1].split("/").filter(Boolean).at(-1),c=o&&Ae(o);if(c)return c}const i=s.nodes.find(o=>o.label===e.label);return i?H(i,n).label:Ae(e.label)??e.label}function Lt(e,s,n){if(n==="en")return e.label;if(e.label==="All paths")return"全部路径";if(e.label==="Default path")return"默认路径";const r=e.label.match(/^Path (\d+)(?: · (.+))?$/);if(!r)return e.label;const i=s.nodes.find(c=>c.label===r[2]),o=i?H(i,n).label:r[2];return`路径 ${r[1]}${o?` · ${o}`:""}`}function bn(e,s,n){if(n==="en")return{message:e.message,suggestion:e.suggestion};const r=e.nodeId?s.nodes.find(c=>c.id===e.nodeId):void 0,i=r?H(r,n).label:"当前步骤";return{CHAIN_BROKEN_REFERENCE:{message:`${i} 引用了逻辑图中不存在的节点。`,suggestion:"检查此处无法解析的调用、导入关系或生成的连线。"},CHAIN_CYCLE:{message:`${i} 所在链路形成循环,无法确认是否能正常退出。`,suggestion:"检查循环退出条件,或增加一个明确的结束路径。"},CHAIN_LOW_CONFIDENCE:{message:`${i} 的识别置信度为 ${Math.round(e.confidence*100)}%。`,suggestion:"确认调用关系,或使用更清晰的 workflow、agent、tool、service 命名。"},CHAIN_NO_DOWNSTREAM:{message:`${i} 没有可解析的下游执行步骤。`,suggestion:"检查入口是否调用了工作流、Agent、服务或工具。"},CHAIN_NO_RESULT:{message:"分析器没有找到这个功能的结束结果。",suggestion:"补充或暴露 return、持久化、响应或交接节点。"},CHAIN_PATH_LIMIT:{message:"功能链路超过当前可模拟的节点、分支或深度上限。",suggestion:"增强逻辑压缩,或把功能拆分成明确的工作流。"},CHAIN_EXTERNAL_NO_FALLBACK:{message:`${i} 调用了外部系统,但没有识别到 fallback。`,suggestion:"为外部调用增加异常处理、重试上限或降级路径。"},CHAIN_RETRY_WITHOUT_LIMIT:{message:`${i} 包含重试链路,但没有识别到明确上限。`,suggestion:"配置最大重试次数、退避策略和失败出口。"},CHAIN_AGENT_NO_OUTPUT:{message:`${i} 没有可识别的结构化输出或下游交接。`,suggestion:"声明返回类型、输出 Schema、持久化或下一个工作流步骤。"}}[e.code]}function ot(e){if(!e)return;const s=e.toLowerCase();if(s==="en"||s.startsWith("en-"))return"en";if(s==="zh"||s.startsWith("zh-"))return"zh-CN"}function Ae(e){const s=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").trim().toLowerCase().split(/\s+/).filter(n=>n&&!["agent","controller","handler","service"].includes(n));if(!(!s.length||s.some(n=>!at[n])))return s.map(n=>at[n]).join("")}const jn={logic:As,blueprintGroup:zs,codeDetail:Os},kn={playback:Hs},Nn="agent-runtime-map.layout.v1";function Sn(){return t.jsx(rs,{children:t.jsx(En,{})})}function En(){const[e,s]=l.useState(),[n,r]=l.useState(),[i,o]=l.useState([]),[c,p]=l.useState(),[f,g]=l.useState(),[j,C]=l.useState(),[w,E]=l.useState(),[_,M]=l.useState(!1),[b,q]=l.useState(new Set),[B,y]=l.useState(new Set),[A,$]=l.useState(),[D,oe]=l.useState(),m=l.useRef(null),F=l.useCallback(a=>{y(d=>{const u=new Set(d);return u.has(a)?u.delete(a):u.add(a),u})},[]),[z,V]=l.useState(-1),[J,P]=l.useState(!1),[Q,$t]=l.useState(1),[ye,X]=l.useState(!0),[ee,Fe]=l.useState(""),[Oe,He]=l.useState(),[Be,Tt]=l.useState(),[N,At]=l.useState(ln),[xe,zt]=l.useState("logic"),[Pt,qe]=l.useState(!1),[we,ve]=l.useState(new Set),[Ue,be]=l.useState([]),[Dt,Ft]=l.useState(0),je=l.useRef(null),ke=l.useRef("logic"),K=l.useRef(i),Ne=l.useRef(void 0),Ve=l.useRef(void 0),te=l.useRef(void 0),se=l.useRef(void 0),L=l.useMemo(()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),{fitView:Y,getNode:Ge,setCenter:ce}=os(),x=U(N),Se=e?.features??[],I=Se.find(a=>a.id===f),S=I?.variants.find(a=>a.id===j)??I?.variants[0],We=I?.variants.find(a=>a.id===w),R=l.useMemo(()=>tt(I,S,z),[I,S,z]),Z=l.useMemo(()=>_?tn(We,S):void 0,[_,We,S]),G=e?`${Nn}:${e.project.root}:${e.graphType}`:void 0;l.useEffect(()=>{K.current=i},[i]),l.useEffect(()=>()=>{te.current&&window.clearTimeout(te.current),se.current&&window.clearTimeout(se.current)},[]),l.useEffect(()=>{document.documentElement.lang=N,document.title=N==="zh-CN"?"Agent Runtime Map · 智能体运行逻辑图":"Agent Runtime Map"},[N]);const le=l.useCallback(()=>{fetch("./graph.json",{cache:"no-store"}).then(async a=>{if(!a.ok)throw new Error(`graph.json (${a.status})`);return await a.json()}).then(a=>{s(a),fetch("./raw-graph.json",{cache:"no-store"}).then(d=>d.ok?d.json():void 0).then(d=>d&&r(d)).catch(()=>{})}).catch(a=>Tt(a instanceof Error?a.message:String(a)))},[]);l.useEffect(()=>{const a=window;if(a.__ARM_GRAPH__){s(a.__ARM_GRAPH__),a.__ARM_RAW_GRAPH__&&r(a.__ARM_RAW_GRAPH__);return}le()},[le]),l.useEffect(()=>{let a=!1,d;const u=window.setInterval(()=>{fetch("./manifest.json",{cache:"no-store"}).then(async h=>{if(a)return;if(!h.ok)throw new Error("no manifest");const v=await h.json();if(v.buildId){if(d===void 0){d=v.buildId;return}v.buildId!==d&&(d=v.buildId,le())}}).catch(()=>{window.clearInterval(u)})},2e3);return()=>{a=!0,window.clearInterval(u)}},[le]),l.useEffect(()=>{if(!e)return;const a=new Map(e.nodes.map(h=>[h.id,h])),d=e.nodes.map(h=>Mn(h,N,a)),u=e.edges.map(h=>ct(h,"global",e,N));Gs(d,u).then(h=>{const v=pe(h),O=typeof window>"u"||!G?void 0:sn(window.localStorage.getItem(G)),W=Le(h,O);Ne.current=v,o(W),ve(new Set(W.filter(ae=>lt(ae,v)).map(ae=>ae.id))),Ft(ae=>ae+1),window.setTimeout(()=>Y({padding:.14,duration:L?0:500}),20)})},[Y,e,G,N,L]),l.useEffect(()=>{!e||f!==void 0||g(e.features.find(a=>a.health==="healthy")?.id??e.features[0]?.id??null)},[e,f]),l.useEffect(()=>{C(I?.variants[0]?.id),E(void 0),M(!1),V(-1),P(!1)},[I?.id]),l.useEffect(()=>{if(!i.length||!S)return;const a=S.steps.slice(0,5).flatMap(u=>{const h=i.find(v=>v.id===u.nodeIds[0]);return h?[h]:[]});if(!a.length)return;const d=window.setTimeout(()=>Y({nodes:a,padding:.22,duration:L?0:620,minZoom:.63,maxZoom:1.08}),30);return()=>window.clearTimeout(d)},[Y,D,Dt,L,I?.id,S?.id]);const Ee=l.useCallback((a,d=1.12)=>{const u=Ge(a);if(!u)return;const h=u.measured?.width??u.width??Pe,v=u.measured?.height??u.height??De;ce(u.position.x+h/2,u.position.y+v/2,{zoom:d,duration:L?0:420})},[Ge,L,ce]);l.useEffect(()=>{if(!ye||z<0)return;const a=[...R.currentNodeIds][0];if(!a)return;const d=window.setTimeout(()=>Ee(a,1.06),40);return()=>window.clearTimeout(d)},[ye,Ee,R.currentNodeIds,z]),l.useEffect(()=>{if(!J||!I||!S)return;const a=window.setTimeout(()=>{const d=z+1;if(d>=S.steps.length){P(!1);return}V(d),(tt(I,S,d).halted||d===S.steps.length-1)&&P(!1)},850/Q);return()=>window.clearTimeout(a)},[J,I,S,Q,z]);const de=l.useMemo(()=>new Map((e?.nodes??[]).map(a=>[a.id,a])),[e]),ue=l.useMemo(()=>en(e?.nodes??[],ee,a=>H(a,N,de)),[e,N,de,ee]),ne=l.useMemo(()=>e?.nodes.filter(a=>ue.has(a.id)).slice(0,7)??[],[e,ue]),ie=l.useMemo(()=>!n||!e||!b.size?{nodes:[],edges:[]}:e.nodes.flatMap(a=>{if(!b.has(a.id))return[];const d=i.find(h=>h.id===a.id);if(!d)return[];const u=Ys(a,d,n,{expandedRawIds:B});return[{...u,nodes:u.nodes.map(h=>{const v=$e(h.id);return v?{...h,data:{...h.data,onToggle:()=>F(v.rawId),toggleLabel:`${h.data.expanded?x.collapseDetail:x.expandDetail} ${h.data.label}`}}:h})}]}).reduce((a,d)=>({nodes:[...a.nodes,...d.nodes],edges:[...a.edges,...d.edges]}),{nodes:[],edges:[]}),[b,B,e,i,n,x,F]),Ke=l.useCallback(a=>{m.current=f??null,g(null),q(new Set),y(new Set),$(void 0),oe(a)},[f]),Ot=l.useCallback(()=>{const a=m.current;oe(void 0),g(a),m.current=null,a||window.setTimeout(()=>Y({padding:.2,duration:L?0:620}),60)},[Y,L]),T=l.useMemo(()=>D&&e?Js(e.edges,D):void 0,[D,e]),Ce=l.useMemo(()=>i.map(a=>({...a,className:_n(a.id,ue,I,S,R,Z,Oe,we,b),data:{...a.data,onFocus:!D&&e&&Qs(e.edges,a.id)?()=>Ke(a.id):void 0,focusLabel:x.focusStep}})),[Ke,b,D,R,e,ue,i,we,I,S,Oe,x.focusStep,Z]),Ht=l.useMemo(()=>{if(!e)return[...Ce,...ie.nodes];const a=T??(S?new Set(S.nodeIds):void 0),d=T?i.filter(v=>T.has(v.id)):i,u=Vs(d,e,a,mn(N)),h=Ce.map(v=>T&&!T.has(v.id)?{...v,hidden:!0}:v);return[...u,...h,...ie.nodes]},[ie.nodes,T,e,N,i,S,Ce]),Bt=l.useMemo(()=>{const a=e?.edges.map(u=>{let h="global";S&&(h=S.edgeIds.includes(u.id)?"path":"outside",R.reachedEdgeIds.has(u.id)&&(h="reached"),R.currentEdgeIds.has(u.id)&&(h="current"),R.warningEdgeIds.has(u.id)&&(h="warning"),(R.errorEdgeIds.has(u.id)||R.errorNodeIds.has(u.target)&&R.reachedEdgeIds.has(u.id))&&(h="error"));const v=Z?Z.enteringEdgeIds.has(u.id)?"is-branch-entering":Z.exitingEdgeIds.has(u.id)?"is-branch-exiting":Z.sharedEdgeIds.has(u.id)?"is-branch-shared":void 0:void 0;return ct(u,h,e,N,v,!L&&h==="current",Q)})??[];return[...T?a.map(u=>T.has(u.source)&&T.has(u.target)?u:{...u,hidden:!0}):a,...ie.edges]},[ie.edges,T,R,e,N,L,S,Q,Z]);l.useEffect(()=>{if(!T||!i.length)return;const a=i.filter(O=>T.has(O.id));if(!a.length)return;const d=Et(a,90),u=je.current?.getBoundingClientRect();if(!d||!u?.width||!u.height)return;const h=Math.min(1.05,Math.max(.32,Math.min(u.width/d.width,u.height/d.height))),v=window.setTimeout(()=>ce(d.x+d.width/2,d.y+d.height/2,{zoom:h,duration:L?0:620}),80);return()=>window.clearTimeout(v)},[T,i,L,ce]);const _e=l.useCallback(a=>{typeof window<"u"&&G&&window.localStorage.setItem(G,JSON.stringify(a))},[G]),Ie=l.useCallback(a=>{const d=Ne.current;d&&ve(new Set(a.filter(u=>lt(u,d)).map(u=>u.id)))},[]),qt=l.useCallback(a=>{o(d=>cs(a.filter(u=>"id"in u&&d.some(h=>h.id===u.id)),d))},[]),Ut=l.useCallback((a,d)=>{K.current.some(u=>u.id===d.id)&&(Ve.current=pe(K.current))},[]),Vt=l.useCallback((a,d)=>{if(!K.current.some(h=>h.id===d.id))return;const u=Ve.current;o(h=>{const v=h.map(W=>W.id===d.id?{...W,position:d.position}:W),O=pe(v);return u&&JSON.stringify(u)!==JSON.stringify(O)&&be(W=>[...W.slice(-19),u]),_e(O),Ie(v),v})},[_e,Ie]),Me=e?.nodes.find(a=>a.id===c),Ze=l.useMemo(()=>A?n?.nodes.find(a=>a.id===A.rawId):void 0,[n,A]),Gt=l.useCallback((a,d)=>{const u=d.type==="codeDetail"?$e(d.id):void 0;if(u){$(u),p(u.logicId);return}$(void 0),p(d.id)},[]),Wt=l.useCallback((a,d)=>{if(!n)return;const u=d.type==="codeDetail"?$e(d.id):void 0;if(u){if(!d.data.expandable)return;y(v=>{const O=new Set(v);return O.has(u.rawId)?O.delete(u.rawId):O.add(u.rawId),O});return}d.type==="logic"&&q(h=>{const v=new Set(h);return v.has(d.id)?(v.delete(d.id),y(new Set),$(void 0)):v.add(d.id),v})},[n]),Xe=a=>{g(a),X(!0)},Kt=a=>{j!==a&&(te.current&&window.clearTimeout(te.current),E(j),M(!0),C(a),V(-1),P(!1),te.current=window.setTimeout(()=>{M(!1),E(void 0)},L?0:420))},Ye=a=>{p(a),X(!1),He(a),Ee(a,1.18),se.current&&window.clearTimeout(se.current),se.current=window.setTimeout(()=>He(void 0),L?0:1500)},Zt=()=>{S?.steps.length&&((R.outcome==="complete"||R.outcome==="error")&&V(-1),X(!0),P(!0))},Xt=()=>{P(!1),X(!0),S&&V(Ws(S,z))},Yt=()=>{P(!1),V(-1)},Jt=()=>{const a=Ue.at(-1);if(!a)return;const d=Le(K.current,a);o(d),be(u=>u.slice(0,-1)),_e(a),Ie(d)},Qt=()=>{const a=Ne.current;if(!a)return;const d=pe(K.current),u=Le(K.current,a);be(h=>[...h.slice(-19),d]),o(u),ve(new Set),typeof window<"u"&&G&&window.localStorage.removeItem(G)},es=()=>{const a=N==="zh-CN"?"en":"zh-CN";dn(a),At(a)},ts=l.useCallback(a=>{const d=qs(a),u=je.current;u?.style.setProperty("--semantic-logic-progress",d.logic.toFixed(4)),u?.style.setProperty("--semantic-evidence-progress",d.evidence.toFixed(4));const h=Bs(a,ke.current);h!==ke.current&&(ke.current=h,zt(h))},[]);return Be?t.jsx(Pn,{message:`${x.loadError}: ${Be}`,locale:N}):e?t.jsxs("main",{className:"app-shell",children:[t.jsxs("header",{className:"topbar",children:[t.jsxs("div",{className:"brand",children:[t.jsx("span",{className:"brand__mark",children:t.jsx(xt,{size:18})}),t.jsx("span",{children:"Agent Runtime Map"})]}),t.jsxs("div",{className:"breadcrumb",children:[t.jsx("span",{children:e.project.name}),t.jsx(Qe,{size:14}),t.jsx("strong",{children:e.graphType==="runtime_logic"?x.runtimeLogic:x.productLogic})]}),t.jsxs("div",{className:"topbar__actions",children:[t.jsxs("span",{className:"topbar__meta",children:[x.generated," ",new Date(e.generatedAt).toLocaleString(N)]}),t.jsx("button",{className:"locale-switch",onClick:es,title:x.switchLanguage,children:N==="zh-CN"?"EN":"中文"})]})]}),t.jsxs("aside",{className:"sidebar",children:[t.jsxs("div",{className:"sidebar__intro",children:[t.jsx("span",{className:"eyebrow",children:x.projectMap}),t.jsx("h1",{children:hn(e,N)}),t.jsx("p",{children:pn(e,N)})]}),t.jsxs("div",{className:"stats",children:[t.jsx(Te,{value:Se.length,label:x.features}),t.jsx(Te,{value:e.nodes.length,label:x.logicNodes}),t.jsx(Te,{value:e.project.filesScanned,label:x.files})]}),t.jsxs("section",{className:"feature-circuits","aria-label":x.featureCircuits,children:[t.jsxs("div",{className:"section-heading",children:[t.jsx("span",{className:"eyebrow",children:x.featureCircuits}),t.jsx(Ns,{size:14})]}),t.jsx("p",{className:"section-hint",children:x.featureHint}),t.jsxs("button",{className:`feature-card feature-card--global ${f===null?"is-active":""}`,onClick:()=>Xe(null),children:[t.jsx("span",{className:"feature-card__icon",children:t.jsx(ws,{size:14})}),t.jsxs("span",{children:[t.jsx("strong",{children:x.wholeSystem}),t.jsx("small",{children:x.globalView})]})]}),t.jsx("div",{className:"feature-list",children:Se.map(a=>t.jsxs("button",{className:`feature-card feature-card--${a.health} ${a.id===f?"is-active":""}`,"data-feature-id":a.id,"data-health":a.health,onClick:()=>Xe(a.id),children:[t.jsx("span",{className:"feature-card__icon",children:t.jsx($n,{health:a.health})}),t.jsxs("span",{children:[t.jsx("strong",{children:rt(a,e,N)}),t.jsxs("small",{children:[vn(a.health,N)," · ",Math.round(a.confidence*100),"%"]})]}),t.jsx(Qe,{size:13})]},a.id))})]}),I&&S?t.jsx(Cn,{feature:I,variant:S,graph:e,locale:N,playing:J,speed:Q,frame:R,cameraFollow:ye,onVariant:Kt,onPlay:Zt,onPause:()=>P(!1),onNext:Xt,onReset:Yt,onSpeed:$t,onSelectNode:p,onResumeFollow:()=>X(!0)}):t.jsxs("div",{className:"feature-empty",children:[t.jsx(js,{size:16}),t.jsx("span",{children:x.selectFeature})]}),t.jsxs("div",{className:"search-wrap",children:[t.jsxs("label",{className:"search-box",children:[t.jsx(Is,{size:15}),t.jsx("input",{value:ee,onChange:a=>Fe(a.target.value),onKeyDown:a=>{a.key==="Enter"&&ne[0]&&Ye(ne[0].id)},placeholder:x.search}),ee&&t.jsx("button",{onClick:()=>Fe(""),"aria-label":x.clearSearch,children:t.jsx(St,{size:14})})]}),ee&&t.jsxs("div",{className:"search-results",children:[t.jsxs("span",{className:"eyebrow",children:[x.searchResults," · ",ne.length]}),ne.length?ne.map(a=>t.jsxs("button",{onClick:()=>Ye(a.id),children:[t.jsx("strong",{children:H(a,N).label}),t.jsx("small",{children:a.sources[0]?.file??It(a.type,N)})]},a.id)):t.jsx("p",{children:x.noSearchResults})]})]}),t.jsxs("div",{className:"sidebar__footer",children:[t.jsx(ht,{size:14})," ",x.staticAnalysis]})]}),t.jsxs("section",{className:"canvas","aria-label":x.logicGraph,"data-detail-level":xe,"data-navigating":Pt?"true":"false",ref:je,children:[D?t.jsxs("div",{className:"canvas-caption canvas-caption--focus",children:[t.jsxs("button",{onClick:Ot,title:x.exitFocus,children:[t.jsx(pt,{size:12}),x.wholeSystem]}),t.jsx("strong",{children:H(e.nodes.find(a=>a.id===D),N,de).label}),t.jsx("small",{children:x.focusHint})]}):t.jsxs("div",{className:"canvas-caption",children:[t.jsx("span",{className:"canvas-caption__mark"}),t.jsx("strong",{children:I?rt(I,e,N):x.wholeSystem}),t.jsx("small",{children:S?Lt(S,e,N):x.globalView})]}),t.jsxs("div",{className:"semantic-zoom","aria-live":"polite",children:[t.jsx("span",{children:x.zoomLevel}),t.jsx("strong",{children:Ln(xe,N)}),t.jsx("div",{className:"semantic-zoom__levels","aria-hidden":"true",children:["overview","logic","evidence"].map(a=>t.jsx("i",{className:a===xe?"is-active":""},a))}),t.jsx("small",{children:x.semanticZoomHint})]}),t.jsxs("div",{className:"canvas-help",children:[t.jsx(mt,{size:13}),t.jsx("span",{children:x.detailHint})]}),t.jsxs("div",{className:"layout-toolbar","aria-label":x.layout,children:[t.jsxs("span",{children:[t.jsx(Cs,{size:12})," ",we.size," ",x.pinnedNodes]}),t.jsx("button",{onClick:Jt,disabled:!Ue.length,title:x.undoLayout,children:t.jsx(Ls,{size:13})}),t.jsx("button",{onClick:Qt,title:x.resetLayout,children:t.jsx(bt,{size:13})})]}),t.jsxs(ls,{nodes:Ht,edges:Bt,nodeTypes:jn,edgeTypes:kn,onNodesChange:qt,onNodeDragStart:Ut,onNodeDragStop:Vt,onNodeClick:Gt,onNodeDoubleClick:Wt,onPaneClick:()=>{p(void 0),$(void 0)},onMoveStart:a=>{qe(!0),a&&X(!1)},onMove:(a,d)=>ts(d.zoom),onMoveEnd:()=>qe(!1),nodesDraggable:!0,nodesConnectable:!1,elementsSelectable:!0,minZoom:.2,maxZoom:2.2,fitView:!0,proOptions:{hideAttribution:!0},children:[t.jsx(ds,{showInteractive:!1,position:"bottom-left"}),t.jsx(us,{position:"bottom-right",pannable:!0,zoomable:!0,nodeStrokeWidth:2,maskColor:"rgba(240, 244, 248, 0.7)"})]})]}),Ze?t.jsx(An,{rawNode:Ze,parent:Me,locale:N,onParent:()=>$(void 0),onClose:()=>{$(void 0),p(void 0)}}):Me&&t.jsx(Tn,{node:Me,locale:N,nodesById:de,onClose:()=>p(void 0)})]}):t.jsx(zn,{locale:N})}function Cn({feature:e,variant:s,graph:n,locale:r,playing:i,speed:o,frame:c,cameraFollow:p,onVariant:f,onPlay:g,onPause:j,onNext:C,onReset:w,onSpeed:E,onSelectNode:_,onResumeFollow:M}){const b=U(r),q=[...c.currentNodeIds].flatMap(y=>{const A=n.nodes.find($=>$.id===y);return A?[H(A,r).label]:[]}),B=c.outcome==="idle"?b.ready:c.outcome==="error"?b.stopped:c.outcome==="complete"?b.completed:b.running;return t.jsxs("section",{className:"chain-inspector","data-outcome":c.outcome,children:[t.jsxs("div",{className:"section-heading",children:[t.jsx("span",{className:"eyebrow",children:b.choosePath}),t.jsx("span",{children:e.variants.length})]}),t.jsx("select",{value:s.id,onChange:y=>f(y.target.value),"aria-label":b.choosePath,children:e.variants.map(y=>t.jsx("option",{value:y.id,children:Lt(y,n,r)},y.id))}),t.jsxs("div",{className:`player-status player-status--${c.outcome}`,children:[t.jsx("span",{className:"player-status__pulse"}),t.jsxs("span",{children:[t.jsx("strong",{children:B}),t.jsx("small",{children:q.join(" · ")||`${b.step} 0 / ${s.steps.length}`})]}),t.jsxs("b",{children:[Math.max(0,c.stepIndex+1),"/",s.steps.length]})]}),t.jsxs("div",{className:"player-controls","aria-label":b.chainCheck,children:[t.jsx("button",{onClick:i?j:g,title:i?b.pause:b.play,"aria-label":i?b.pause:b.play,children:i?t.jsx(Es,{size:14}):t.jsx(vt,{size:14})}),t.jsx("button",{onClick:C,title:b.nextStep,"aria-label":b.nextStep,children:t.jsx(Ms,{size:14})}),t.jsx("button",{onClick:w,title:b.replay,"aria-label":b.replay,children:t.jsx(bt,{size:14})}),t.jsxs("div",{className:"speed-control",children:[t.jsx("span",{children:b.speed}),[.5,1,2].map(y=>t.jsxs("button",{className:o===y?"is-active":"",onClick:()=>E(y),children:[y,"×"]},y))]})]}),t.jsxs("button",{className:`camera-follow ${p?"is-active":""}`,onClick:M,children:[t.jsx(mt,{size:12}),t.jsx("span",{children:p?b.cameraFollowing:b.resumeFollow})]}),t.jsxs("div",{className:"diagnostics",children:[t.jsxs("div",{className:"section-heading",children:[t.jsx("span",{className:"eyebrow",children:b.diagnostics}),t.jsx("span",{children:e.diagnostics.length})]}),!e.diagnostics.length&&t.jsxs("div",{className:"diagnostics__clear",children:[t.jsx(ze,{size:13}),b.noDiagnostics]}),e.diagnostics.map(y=>{const A=bn(y,n,r);return t.jsxs("button",{className:`diagnostic diagnostic--${y.severity}`,"data-diagnostic-code":y.code,onClick:()=>y.nodeId&&n.nodes.some($=>$.id===y.nodeId)&&_(y.nodeId),children:[t.jsx(kt,{size:13}),t.jsxs("span",{children:[t.jsx("strong",{children:A.message}),t.jsxs("small",{children:[b.recommendation,":",A.suggestion]})]})]},y.id)})]})]})}function _n(e,s,n,r,i,o,c,p,f){const g=[];return s.has(e)||g.push("is-dimmed"),c===e&&g.push("is-search-spotlight"),p.has(e)&&g.push("is-pinned"),f.has(e)&&g.push("is-expanded"),o?.enteringNodeIds.has(e)&&g.push("is-branch-entering"),o?.exitingNodeIds.has(e)&&g.push("is-branch-exiting"),o?.sharedNodeIds.has(e)&&g.push("is-branch-shared"),!n||!r||(r.nodeIds.includes(e)?i.errorNodeIds.has(e)?g.push("is-chain-error"):i.warningNodeIds.has(e)?g.push("is-chain-warning"):i.currentNodeIds.has(e)?g.push("is-current"):i.completedNodeIds.has(e)?g.push("is-chain-complete"):g.push("is-path-pending"):g.push("is-outside-path")),g.join(" ")}function In({product:e,locale:s}){const n=U(s);return t.jsxs("div",{className:"product-card",children:[t.jsx("span",{className:"eyebrow",children:n.productContext}),e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"product-card__claim",children:[t.jsx("strong",{children:e.label}),t.jsx("em",{children:wn(e.origin,s)})]}),t.jsxs("div",{className:"product-card__match",children:[t.jsx("span",{children:n.productMatch}),t.jsx("div",{className:"confidence-track",children:t.jsx("i",{style:{width:`${e.match*100}%`}})}),t.jsxs("strong",{children:[Math.round(e.match*100),"%"]})]}),t.jsxs("small",{children:[n.productMatchedOn,": ",xn(e,s)]}),e.sources.map(r=>t.jsxs("code",{className:"product-card__source",children:[r.file,":",r.startLine]},`${r.file}:${r.startLine}`))]}):t.jsx("p",{className:"product-card__empty",children:n.productCodeOnly})]})}function Mn(e,s,n){const r=H(e,s,n),i=e.sources[0];return{id:e.id,type:"logic",position:{x:0,y:0},data:{label:r.label,description:r.description,nodeType:e.type,typeLabel:It(e.type,s),confidence:e.confidence,sourceText:un(e.sources.length,s),sourceDetail:i?`${i.file}:${i.startLine}${i.symbol?` · ${i.symbol}`:""}`:void 0,inferenceText:Mt(e.inference.method,s)}}}function Ln(e,s){return s==="zh-CN"?{overview:"全局层",logic:"逻辑层",evidence:"证据层"}[e]:{overview:"Overview",logic:"Logic",evidence:"Evidence"}[e]}function ct(e,s,n,r,i,o=!1,c=1){const p=e.type==="data_flow",f=Zs(s,p);return{id:e.id,source:e.source,target:e.target,type:"playback",animated:!1,label:e.label??Rn(e,n,r),className:`chain-edge chain-edge--${s}${i?` ${i}`:""}`,markerEnd:{type:hs.ArrowClosed,width:17,height:17,color:f.color},style:{stroke:f.color,strokeWidth:f.width,opacity:f.opacity,strokeDasharray:f.dash},data:{showToken:o,tokenColor:f.color,tokenDuration:.9/c}}}function Rn(e,s,n){const r=s.nodes.find(o=>o.id===e.source),i=s.nodes.find(o=>o.id===e.target);return r?.type==="user_action"&&i?.type==="entrypoint"?"HTTPS":e.type==="data_flow"&&i?.type==="data"?n==="zh-CN"?"读 / 写":"read / write":i?.type==="external_system"?"API":i?.type==="model"?n==="zh-CN"?"模型":"model":i?.type==="tool"?n==="zh-CN"?"工具":"tool":i?.type==="human_gate"?n==="zh-CN"?"人工确认":"approve":i?.type==="workflow"||i?.type==="ai_process"?n==="zh-CN"?"调用":"invoke":i?.type==="result"?n==="zh-CN"?"返回":"return":n==="zh-CN"?"执行":"flow"}function $n({health:e}){return e==="healthy"?t.jsx(ze,{size:14}):t.jsx(kt,{size:14})}function Rt({sources:e,locale:s,heading:n}){const r=U(s),[i,o]=l.useState(0),[c,p]=l.useState(),[f,g]=l.useState(!1),j=e.map(w=>`${w.file}:${w.startLine}`).join("|"),C=e[i];return l.useEffect(()=>{o(0)},[j]),l.useEffect(()=>{if(!C)return;let w=!0;p(void 0),g(!1);const E=new URLSearchParams({file:C.file,start:String(C.startLine),end:String(C.endLine??C.startLine)});return fetch(`./source.json?${E.toString()}`,{cache:"no-store"}).then(async _=>{if(!_.ok)throw new Error(String(_.status));return await _.json()}).then(_=>w&&p(_)).catch(()=>w&&g(!0)),()=>{w=!1}},[C]),t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"evidence-list",children:[t.jsx("span",{className:"eyebrow",children:n}),e.map((w,E)=>t.jsxs("button",{className:i===E?"is-active":"",onClick:()=>o(E),children:[t.jsx("code",{children:w.file}),t.jsxs("span",{children:[r.lines," ",w.startLine,w.endLine&&w.endLine!==w.startLine?`–${w.endLine}`:""]}),w.symbol&&t.jsx("small",{children:w.symbol})]},`${w.file}:${w.startLine}`))]}),t.jsxs("section",{className:"source-preview",children:[t.jsx("span",{className:"eyebrow",children:r.sourceCode}),!C||f?t.jsx("p",{children:r.sourceUnavailable}):c?t.jsx("pre",{children:c.lines.map(w=>t.jsxs("code",{className:w.number>=c.highlightStart&&w.number<=c.highlightEnd?"is-highlighted":"",children:[t.jsx("i",{children:w.number}),t.jsx("span",{children:w.text||" "})]},w.number))}):t.jsx("p",{children:r.loadingSource})]})]})}function Tn({node:e,locale:s,nodesById:n,onClose:r}){const i=U(s),o=H(e,s,n);return t.jsxs("aside",{className:"evidence-panel",children:[t.jsxs("div",{className:"evidence-panel__header",children:[t.jsxs("div",{children:[t.jsx("span",{className:"eyebrow",children:i.selectedLogic}),t.jsx("h2",{children:o.label})]}),t.jsx("button",{onClick:r,"aria-label":i.closeEvidence,children:t.jsx(wt,{size:19})})]}),t.jsx("p",{className:"evidence-panel__description",children:o.description}),t.jsxs("div",{className:"confidence-card",children:[t.jsxs("div",{children:[t.jsx("span",{children:i.confidence}),t.jsxs("strong",{children:[Math.round(e.confidence*100),"%"]})]}),t.jsx("div",{className:"confidence-track",children:t.jsx("i",{style:{width:`${e.confidence*100}%`}})}),t.jsxs("small",{children:[Mt(e.inference.method,s)," · ",e.inference.explanation]})]}),t.jsx(In,{product:e.product,locale:s}),t.jsx(Rt,{sources:e.sources,locale:s,heading:i.sourceEvidence}),t.jsxs("div",{className:"raw-reference",children:[t.jsx("span",{children:i.rawReferences}),t.jsx("code",{children:e.rawNodeIds.join(`
|
|
3
|
-
`)})]})]})}function An({rawNode:e,parent:s,locale:n,onParent:r,onClose:i}){const o=U(n),c=e.evidence.map(f=>f.source),p=e.evidence.reduce((f,g)=>f&&f.confidence>=g.confidence?f:g,void 0);return t.jsxs("aside",{className:"evidence-panel",children:[t.jsxs("div",{className:"evidence-panel__header",children:[t.jsxs("div",{children:[t.jsx("span",{className:"eyebrow",children:o.selectedCode}),t.jsxs("nav",{className:"evidence-breadcrumb",children:[s&&t.jsxs("button",{onClick:r,children:[t.jsx(pt,{size:12}),H(s,n).label]}),t.jsx("span",{children:e.name})]})]}),t.jsx("button",{onClick:i,"aria-label":o.closeEvidence,children:t.jsx(wt,{size:19})})]}),t.jsx("p",{className:"evidence-panel__description",children:e.description??e.qualifiedName??e.kind.replaceAll("_"," ")}),t.jsxs("div",{className:"confidence-card",children:[t.jsxs("div",{children:[t.jsx("span",{children:o.confidence}),t.jsxs("strong",{children:[Math.round((p?.confidence??0)*100),"%"]})]}),t.jsx("div",{className:"confidence-track",children:t.jsx("i",{style:{width:`${(p?.confidence??0)*100}%`}})}),t.jsxs("small",{children:[p?.method," · ",p?.detail]})]}),t.jsx(Rt,{sources:c,locale:n,heading:o.sourceEvidence}),t.jsxs("div",{className:"raw-reference",children:[t.jsx("span",{children:o.rawReferences}),t.jsx("code",{children:e.id})]})]})}function lt(e,s){const n=s[e.id];return!!(n&&(Math.abs(n.x-e.position.x)>1||Math.abs(n.y-e.position.y)>1))}function Te({value:e,label:s}){return t.jsxs("div",{children:[t.jsx("strong",{children:e}),t.jsx("span",{children:s})]})}function zn({locale:e}){const s=U(e);return t.jsxs("main",{className:"state-screen",children:[t.jsx("span",{className:"state-logo",children:t.jsx(xt,{})}),t.jsx("h1",{children:s.loadingTitle}),t.jsx("p",{children:s.loadingDescription}),t.jsx("i",{className:"loader"})]})}function Pn({message:e,locale:s}){const n=U(s);return t.jsxs("main",{className:"state-screen state-screen--error",children:[t.jsx("span",{className:"state-logo",children:t.jsx(St,{})}),t.jsx("h1",{children:n.errorTitle}),t.jsx("p",{children:e}),t.jsx("code",{children:n.errorHint})]})}ss.createRoot(document.getElementById("root")).render(t.jsx(l.StrictMode,{children:t.jsx(Sn,{})}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.logic-map{position:relative;width:100%;height:100%;min-height:320px;background:#f8fafc}.logic-map .react-flow__attribution{display:none}.is-observed .blueprint-node__tile{box-shadow:0 0 0 2px #5a6e8480}.is-observed-completed .blueprint-node__tile{box-shadow:0 0 0 2px #1f9d72b8}.is-observed-failed .blueprint-node__tile{box-shadow:0 0 0 2px #e5484dc7}.is-observed-started .blueprint-node__tile{box-shadow:0 0 0 2px #147fc1b3}.is-observed-skipped .blueprint-node__tile{box-shadow:0 0 0 2px #8c96a273;opacity:.78}.blueprint-node{--node-accent: #596474;position:relative;display:grid;justify-items:center;width:190px;height:154px;color:#20242a;text-align:center;transition:opacity .18s ease,filter .18s ease,transform .18s ease}.blueprint-node__tile{position:relative;display:grid;place-items:center;width:88px;height:88px;border:1px solid #c8cdd3;border-radius:11px;background:#fffffff5;box-shadow:0 2px 4px #1b21290f,0 10px 26px #36414e0f,inset 0 0 0 1px #ffffffb3}.blueprint-node__tile:after{content:"";position:absolute;inset:6px;border:1px solid color-mix(in srgb,var(--node-accent) 13%,transparent);border-radius:7px;pointer-events:none}.blueprint-node__icon{display:grid;place-items:center;color:var(--node-accent)}.blueprint-node__type{position:absolute;top:7px;left:9px;color:#7c8490;font:700 6.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.11em;text-transform:uppercase;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node__confidence{position:absolute;top:7px;right:8px;color:#9299a2;font:7px/1 ui-monospace,SFMono-Regular,Menlo,monospace;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node h3{width:100%;margin:7px 0 2px;overflow:hidden;color:#202328;font-size:14px;line-height:1.18;font-weight:650;letter-spacing:-.015em;text-overflow:ellipsis;white-space:nowrap}.blueprint-node p{width:100%;margin:0;overflow:hidden;color:#707782;font:9px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node small{margin-top:3px;color:#9aa1aa;font:7px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node__evidence{position:absolute;top:158px;display:grid;width:184px;gap:3px;padding:6px 8px;border:1px solid color-mix(in srgb,var(--node-accent) 20%,#dfe4e9);border-radius:6px;background:#fffffff0;box-shadow:0 5px 14px #26303c0f;opacity:var(--semantic-evidence-progress, 0);pointer-events:none;transition:opacity .12s linear,box-shadow .18s ease}.blueprint-node__evidence code{overflow:hidden;color:color-mix(in srgb,var(--node-accent) 76%,#596474);font:7px/1.25 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.blueprint-node__evidence span{color:#929aa4;font:6.5px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.blueprint-node--detail-overview{--semantic-logic-progress: 0;--semantic-evidence-progress: 0}.blueprint-node--detail-logic{--semantic-logic-progress: 1;--semantic-evidence-progress: 0}.blueprint-node--detail-evidence{--semantic-logic-progress: 1;--semantic-evidence-progress: 1}.blueprint-node:hover .blueprint-node__tile,.blueprint-node.is-selected .blueprint-node__tile{border-color:var(--node-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--node-accent) 12%,transparent),0 12px 30px #1f2a371a}.blueprint-node--user_action{--node-accent: #3f4a5c}.blueprint-node--entrypoint{--node-accent: #148acb}.blueprint-node--process{--node-accent: #e0802e}.blueprint-node--workflow{--node-accent: #5d5bd4}.blueprint-node--ai_process{--node-accent: #7651c8}.blueprint-node--tool{--node-accent: #167c8c}.blueprint-node--model{--node-accent: #b04f9e}.blueprint-node--human_gate{--node-accent: #cf6f2f}.blueprint-node--decision{--node-accent: #d79818}.blueprint-node--data{--node-accent: #188764}.blueprint-node--external_system{--node-accent: #20272f}.blueprint-node--result{--node-accent: #258d5f}.blueprint-handle{top:44px!important;width:6px!important;height:6px!important;border:1px solid #7b8795!important;background:#fff!important;opacity:0}.blueprint-node:hover .blueprint-handle{opacity:1}.blueprint-code-node{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:8px;width:176px;height:88px;padding:10px;border:1px solid #cfd8e2;border-radius:9px;color:#52606d;background:#fffffff7;box-shadow:0 7px 22px #27344117,inset 0 0 0 1px #ffffffb3;transition:border-color .2s ease,box-shadow .2s ease,opacity .25s ease,transform .25s cubic-bezier(.2,.8,.2,1)}.blueprint-code-node:hover,.blueprint-code-node.is-selected{border-color:#4b9dcc;box-shadow:0 0 0 3px #1689cf17,0 10px 28px #2734411f}.blueprint-code-node__icon{display:grid;place-items:center;width:28px;height:28px;border:1px solid #d9e3eb;border-radius:7px;color:#247fae;background:#f2f8fb}.blueprint-code-node__body{display:grid;min-width:0;gap:4px;text-align:left}.blueprint-code-node small{color:#87939f;font:700 6.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em;text-transform:uppercase}.blueprint-code-node strong{overflow:hidden;color:#34404c;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.blueprint-code-node code{overflow:hidden;color:#7b8794;font:7px/1.25 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.blueprint-code-node>i{position:absolute;top:-8px;right:8px;padding:2px 5px;border:1px solid #d9e2ea;border-radius:4px;color:#7f8b97;background:#fff;font: 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.blueprint-code-handle{width:6px!important;height:6px!important;border:1px solid #6e8293!important;background:#fff!important;opacity:0}.blueprint-code-node:hover .blueprint-code-handle{opacity:1}.blueprint-node__focus{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid #dbe3ea;border-radius:6px;color:#6b7a88;background:#ffffffeb;opacity:0;cursor:pointer;transition:.15s ease}.blueprint-node:hover .blueprint-node__focus,.blueprint-node__focus:focus-visible{opacity:1}.blueprint-node__focus:hover{border-color:#8ec3e2;color:#1f7fb4;background:#f1f9fd}.blueprint-code-node__toggle{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;width:18px;height:18px;padding:0;border:1px solid #d9e3eb;border-radius:5px;color:#5b7185;background:#fbfdfe;cursor:pointer;transition:.15s ease}.blueprint-code-node__toggle:hover{border-color:#8ec3e2;color:#1f7fb4;background:#f1f9fd}.blueprint-code-node__toggle[aria-expanded=true] svg{transform:rotate(180deg)}.blueprint-playback-edge__label{position:absolute;z-index:2;padding:2px 5px;border-radius:3px;color:#66727f;background:#f8fafceb;font:8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;pointer-events:none}.blueprint-playback-edge__token{filter:drop-shadow(0 0 4px currentColor);pointer-events:none}.blueprint-group{width:100%;height:100%;border:1.4px solid var(--group-color, #9ba5b1);border-radius:12px;background:color-mix(in srgb,var(--group-color) 2.5%,rgba(255,255,255,.2));pointer-events:none}.blueprint-group.is-dashed{border-style:dashed}.blueprint-group--amber{--group-color: #c48a35}.blueprint-group--cyan{--group-color: #3aa5bd}.blueprint-group--violet{--group-color: #8b6ac3}.blueprint-group--slate{--group-color: #87919d}.blueprint-group__label{position:absolute;top:-10px;left:25px;display:flex;align-items:center;gap:8px;min-height:20px;padding:0 9px;color:color-mix(in srgb,var(--group-color) 82%,#1f2933);background:#f8fafc;font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.12em;text-transform:uppercase}.blueprint-group__label i{width:8px;height:8px;border-radius:2px;background:var(--group-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--group-color) 14%,transparent)}.blueprint-group__label span{color:#9aa1aa;font-size:7px;letter-spacing:.06em}@media(prefers-reduced-motion:reduce){.blueprint-node,.blueprint-node__type,.blueprint-node__confidence,.blueprint-node p,.blueprint-node small,.blueprint-node__evidence,.blueprint-code-node{transition-duration:.01ms!important}.blueprint-playback-edge__token{display:none}}:root{color-scheme:light;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#20242a;background:#f8fafc;font-synthesis:none;--border: #dfe4ea;--muted: #737c88;--panel: rgba(250, 251, 252, .96);--blue: #1689cf;--healthy: #1f9d72;--warning: #d99a24;--danger: #e5484d}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;overflow:hidden}button,input,select{font:inherit}button{color:inherit}.app-shell{display:grid;grid-template:58px minmax(0,1fr) / 330px minmax(0,1fr);height:100vh;background:#f8fafc}.topbar{grid-column:1 / -1;display:grid;grid-template-columns:330px 1fr auto;align-items:center;border-bottom:1px solid var(--border);background:#ffffffeb;box-shadow:0 1px #ffffffe6;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);z-index:8}.brand{height:100%;display:flex;align-items:center;gap:10px;padding:0 19px;border-right:1px solid var(--border);color:#171b21;font-weight:760;letter-spacing:-.025em}.brand__mark{display:grid;place-items:center;width:30px;height:30px;border:1px solid #202934;border-radius:8px;color:#d9f5ff;background:#202934;box-shadow:0 4px 13px #20293429;transform:rotate(-2deg)}.breadcrumb{display:flex;align-items:center;gap:8px;min-width:0;padding-left:22px;color:#8a929d;font-size:11px}.breadcrumb span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.breadcrumb strong{color:#3d4651;font-weight:620}.topbar__actions{display:flex;align-items:center;gap:12px;padding-right:16px}.topbar__meta{color:#9aa2ac;font:9px ui-monospace,SFMono-Regular,Menlo,monospace}.locale-switch{min-width:42px;padding:5px 8px;border:1px solid #d7dde4;border-radius:7px;color:#596473;background:#fff;font-size:9px;cursor:pointer;box-shadow:0 2px 5px #262d370a}.locale-switch:hover{border-color:#87bede;color:#0d76b5;background:#f4fbff}.sidebar{grid-row:2;display:flex;flex-direction:column;border-right:1px solid var(--border);background:#f8fafcf7;padding:17px 16px 13px;overflow:auto;z-index:6}.sidebar__intro h1{margin:8px 0 9px;color:#252a31;font-size:18px;line-height:1.22;letter-spacing:-.035em}.sidebar__intro p{margin:0;color:var(--muted);font-size:10px;line-height:1.55}.eyebrow{color:#87919d;font:700 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;text-transform:uppercase}.stats{display:grid;grid-template-columns:repeat(3,1fr);margin:15px 0;border:1px solid var(--border);border-radius:10px;background:#fffc;box-shadow:0 3px 10px #2a333d06}.stats div{display:flex;flex-direction:column;align-items:center;padding:10px 3px 8px;border-right:1px solid var(--border)}.stats div:last-child{border:0}.stats strong{color:#2d343d;font-size:15px}.stats span{margin-top:3px;color:#969ea8;font-size:8px}.section-heading{display:flex;align-items:center;justify-content:space-between;color:#8b95a0}.section-heading>span:last-child{font:8px ui-monospace,SFMono-Regular,Menlo,monospace}.section-hint{margin:8px 0 10px;color:#848d98;font-size:9px;line-height:1.45}.feature-circuits{flex:0 0 auto}.feature-list{display:grid;gap:6px;max-height:214px;margin-top:6px;padding-right:2px;overflow:auto}.feature-card{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;min-height:45px;padding:7px 9px;border:1px solid #dfe4ea;border-radius:9px;color:#7d8793;background:#ffffffd1;text-align:left;cursor:pointer;box-shadow:0 2px 8px #27303a06;transition:.16s ease}.feature-card:hover{border-color:#b7c5d1;background:#fff;transform:translate(1px)}.feature-card.is-active{border-color:#5da9d5;background:linear-gradient(105deg,#e2f4fde6,#fff);box-shadow:inset 2px 0 var(--blue),0 5px 14px #1a79b014}.feature-card>span:nth-child(2){display:grid;min-width:0;gap:4px}.feature-card strong{overflow:hidden;color:#37404a;font-size:10px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.feature-card small{overflow:hidden;color:#929aa4;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.feature-card__icon{display:grid;place-items:center;width:28px;height:28px;border:1px solid #e0e5ea;border-radius:7px;color:#587184;background:#f5f8fa}.feature-card--healthy .feature-card__icon{color:var(--healthy);border-color:#1f9d722e;background:#1f9d720f}.feature-card--warning .feature-card__icon{color:var(--warning);border-color:#d99a2433;background:#d99a2412}.feature-card--error .feature-card__icon{color:var(--danger);border-color:#e5484d33;background:#e5484d0f}.feature-card--error.is-active{border-color:#e57c80;background:linear-gradient(105deg,#ffedeee0,#fff);box-shadow:inset 2px 0 var(--danger),0 5px 14px #cd313712}.feature-card--global{min-height:43px}.feature-empty{display:flex;align-items:center;gap:9px;min-height:58px;margin-top:12px;padding:11px;border:1px dashed #d4dae1;border-radius:9px;color:#8a939e;font-size:9px;line-height:1.4;background:#ffffff6b}.chain-inspector{flex:0 0 auto;margin-top:14px;padding-top:13px;border-top:1px solid #e1e6eb}.chain-inspector select{width:100%;height:32px;margin-top:7px;padding:0 9px;border:1px solid #d8dee5;border-radius:7px;outline:none;color:#4f5a67;background:#fff;font-size:9px}.chain-inspector select:focus{border-color:#6eb3da;box-shadow:0 0 0 2px #1689cf14}.player-status{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:9px;margin-top:8px;padding:9px 10px;border:1px solid #dfe4ea;border-radius:8px;background:#ffffffb8}.player-status__pulse{width:7px;height:7px;border-radius:50%;background:#98a1ab;box-shadow:0 0 0 3px #7f899a14}.player-status>span:nth-child(2){display:grid;gap:3px;min-width:0}.player-status strong{color:#4c5662;font-size:9px}.player-status small{overflow:hidden;color:#929aa4;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.player-status b{color:#89929d;font:8px ui-monospace,SFMono-Regular,Menlo,monospace}.player-status--running{border-color:#1689cf4d;background:#edf8fed1}.player-status--running .player-status__pulse{background:var(--blue);box-shadow:0 0 0 3px #1689cf1f,0 0 10px #1689cf4d;animation:statusPulse 1s infinite}.player-status--complete .player-status__pulse{background:var(--healthy);box-shadow:0 0 0 3px #1f9d721a}.player-status--error{border-color:#e5484d5c;background:#fff0f1e6}.player-status--error .player-status__pulse{background:var(--danger);box-shadow:0 0 0 3px #e5484d1f,0 0 10px #e5484d47}.player-status--error strong{color:#be383d}.player-controls{display:flex;align-items:center;gap:5px;margin-top:7px}.player-controls>button{display:grid;place-items:center;width:29px;height:29px;padding:0;border:1px solid #d8dee5;border-radius:7px;color:#697583;background:#fff;cursor:pointer}.player-controls>button:first-child{border-color:#61add7;color:#0d78b5;background:#edf8fe}.player-controls>button:hover{border-color:#79b8da;color:#0e79b7}.speed-control{display:flex;align-items:center;gap:3px;margin-left:auto}.speed-control span{margin-right:2px;color:#969ea8;font-size:8px}.speed-control button{min-width:25px;height:24px;padding:0 4px;border:0;border-radius:5px;color:#8b949f;background:transparent;font-size:8px;cursor:pointer}.speed-control button.is-active{color:#0e79b7;background:#e5f4fc}.camera-follow{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:27px;margin-top:7px;border:1px dashed #d3dbe3;border-radius:7px;color:#87929e;background:#ffffffa3;font-size:8px;cursor:pointer;transition:.18s ease}.camera-follow:hover{border-color:#78b8dc;color:#197eb8;background:#f3faff}.camera-follow.is-active{border-style:solid;border-color:#2091cd52;color:#197eb8;background:#ebf8fecc}.diagnostics{margin-top:11px}.diagnostics__clear{display:flex;align-items:center;gap:7px;margin-top:7px;padding:8px 9px;border:1px solid rgba(31,157,114,.1);border-radius:7px;color:#318b6c;background:#1f9d720e;font-size:8px;line-height:1.35}.diagnostic{display:grid;grid-template-columns:14px 1fr;align-items:start;gap:7px;width:100%;margin-top:6px;padding:8px;border:1px solid rgba(217,154,36,.26);border-radius:7px;color:var(--warning);background:#fff8e8db;text-align:left;cursor:pointer}.diagnostic--error{border-color:#e5484d47;color:var(--danger);background:#ffeff0e6}.diagnostic span{display:grid;gap:5px}.diagnostic strong{color:#4c535c;font-size:8px;line-height:1.35}.diagnostic small{color:#858e99;font-size:7px;line-height:1.35}@keyframes statusPulse{50%{opacity:.45;transform:scale(.78)}}.search-box{display:flex;flex:0 0 auto;align-items:center;gap:8px;height:36px;margin-top:13px;padding:0 10px;border:1px solid #dbe1e7;border-radius:8px;color:#8a949f;background:#fff}.search-box:focus-within{border-color:#6eb3da;box-shadow:0 0 0 2px #1689cf12}.search-box input{width:100%;border:0;outline:0;color:#4a5562;background:transparent;font-size:10px}.search-box input::placeholder{color:#a0a7b0}.search-box button{display:grid;place-items:center;padding:0;border:0;background:none;cursor:pointer}.search-wrap{position:relative;flex:0 0 auto;margin-top:13px}.search-wrap .search-box{margin-top:0}.search-results{position:absolute;right:0;bottom:42px;left:0;z-index:12;display:grid;gap:4px;padding:8px;border:1px solid #d6dfe7;border-radius:9px;background:#fffffff7;box-shadow:0 12px 30px #28354324;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);animation:searchResultsIn .18s cubic-bezier(.2,.8,.2,1)}.search-results>.eyebrow{padding:1px 3px 5px}.search-results button{display:grid;gap:3px;width:100%;padding:7px 8px;border:0;border-radius:6px;color:#4a5662;background:transparent;text-align:left;cursor:pointer}.search-results button:hover{background:#eff8fc}.search-results strong{overflow:hidden;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.search-results small{overflow:hidden;color:#8b96a1;font:7px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.search-results p{margin:4px 2px;color:#939ca6;font-size:8px}.sidebar__footer{display:flex;align-items:center;gap:7px;margin-top:auto;padding-top:13px;border-top:1px solid #e3e7ec;color:#9ba3ac;font-size:8px}.canvas{--semantic-logic-progress: 1;--semantic-evidence-progress: 0;position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;overflow:hidden;background-color:#f8fafc;background-image:linear-gradient(rgba(118,132,148,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(118,132,148,.12) 1px,transparent 1px),linear-gradient(rgba(118,132,148,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(118,132,148,.045) 1px,transparent 1px);background-size:40px 40px,40px 40px,8px 8px,8px 8px}.canvas:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at center,transparent 45%,rgba(236,240,244,.28) 100%);z-index:1}.canvas-caption{position:absolute;top:16px;left:18px;z-index:7;display:flex;align-items:center;gap:8px;min-height:32px;padding:0 11px;border:1px solid rgba(206,214,222,.9);border-radius:8px;color:#46515d;background:#ffffffe0;box-shadow:0 6px 18px #2f3b480f;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.canvas-caption__mark{width:8px;height:8px;border:2px solid #1c95d6;border-radius:50%;box-shadow:0 0 0 3px #1c95d61a}.canvas-caption strong{font-size:9px;letter-spacing:.03em}.canvas-caption small{padding-left:8px;border-left:1px solid #e0e5ea;color:#9099a3;font:7px ui-monospace,SFMono-Regular,Menlo,monospace}.canvas-help{position:absolute;bottom:18px;left:67px;z-index:7;display:flex;align-items:center;gap:6px;max-width:260px;padding:7px 9px;border:1px solid rgba(210,218,226,.9);border-radius:7px;color:#89949f;background:#ffffffdb;box-shadow:0 6px 18px #2f3b480d;font-size:8px;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.canvas-help svg{color:#258dbe;flex:0 0 auto}.layout-toolbar{position:absolute;right:18px;bottom:16px;z-index:7;display:flex;align-items:center;gap:5px;padding:5px;border:1px solid rgba(210,218,226,.9);border-radius:8px;color:#85909c;background:#ffffffe6;box-shadow:0 6px 18px #2f3b480d;font:7px ui-monospace,SFMono-Regular,Menlo,monospace;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.layout-toolbar>span{display:flex;align-items:center;gap:4px;padding:0 4px}.layout-toolbar button{display:grid;place-items:center;width:25px;height:25px;padding:0;border:1px solid #dce3e9;border-radius:5px;color:#6e7a87;background:#fff;cursor:pointer}.layout-toolbar button:hover:not(:disabled){border-color:#7fb9d9;color:#137fb9;background:#f1f9fd}.layout-toolbar button:disabled{opacity:.38;cursor:default}.semantic-zoom{position:absolute;top:16px;right:18px;z-index:7;display:grid;grid-template-columns:auto auto;align-items:center;gap:3px 8px;min-width:190px;padding:8px 11px;border:1px solid rgba(206,214,222,.9);border-radius:8px;color:#7d8792;background:#ffffffe0;box-shadow:0 6px 18px #2f3b480f;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);transition:border-color .2s ease,box-shadow .2s ease,transform .2s cubic-bezier(.2,.8,.2,1)}.semantic-zoom>span{font:700 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em}.semantic-zoom strong{justify-self:end;color:#157db8;font-size:9px;transition:color .22s ease,opacity .22s ease}.semantic-zoom__levels{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:2px 0 1px}.semantic-zoom__levels i{height:2px;border-radius:4px;background:#dfe5eb;transition:background .22s ease,box-shadow .22s ease,transform .22s cubic-bezier(.2,.8,.2,1)}.semantic-zoom__levels i.is-active{background:#2694cf;box-shadow:0 0 0 2px #2694cf14;transform:scaleY(1.4)}.semantic-zoom small{grid-column:1 / -1;color:#9aa2ab;font-size:7px;line-height:1.3}.canvas[data-detail-level=overview] .semantic-zoom strong{color:#667383}.canvas[data-detail-level=evidence] .semantic-zoom strong{color:#7651c8}.canvas[data-navigating=true] .semantic-zoom{border-color:#57a4cf8c;box-shadow:0 8px 22px #2f65861a;transform:translateY(1px)}.canvas .react-flow__edge-text,.canvas .react-flow__edge-textbg,.canvas .blueprint-group__label span{opacity:var(--semantic-logic-progress);transition:opacity .12s linear}.react-flow{z-index:2}.react-flow__pane{cursor:grab}.react-flow__controls{overflow:hidden;border:1px solid #d7dde4;border-radius:8px;box-shadow:0 8px 22px #2e38441a}.react-flow__controls button{border:0;border-bottom:1px solid #e1e6eb;color:#64707d;background:#fffffff2}.react-flow__controls button:hover{color:#137ebc;background:#f1f9fd}.react-flow__controls button svg{fill:currentColor}.react-flow__minimap{border:1px solid #d8dee5;border-radius:8px;background:#ffffffeb;box-shadow:0 8px 22px #2e384414}.react-flow__node-blueprintGroup{z-index:-2!important;pointer-events:none!important}.react-flow__node.is-dimmed{opacity:.12;filter:grayscale(.7)}.react-flow__node.is-outside-path{opacity:.09;filter:grayscale(.8)}.react-flow__node.is-path-pending .blueprint-node__tile{border-color:#91c6e3;box-shadow:0 0 0 3px #1689cf0e,0 9px 25px #2c40520f}.react-flow__node.is-current{z-index:5!important}.react-flow__node.is-current .blueprint-node__tile{border-color:#1689cf;background:#f2faff;box-shadow:0 0 0 4px #1689cf1f,0 0 28px #1689cf38,0 14px 30px #3243521f;transform:translateY(-2px) scale(1.035);animation:nodeScan 1.1s ease-in-out infinite}.react-flow__node.is-current .blueprint-node__tile:before{content:"";position:absolute;z-index:2;top:8px;bottom:8px;width:2px;border-radius:2px;background:#1689cfb8;box-shadow:0 0 10px #1689cf99;animation:scanLine 1.1s ease-in-out infinite}.react-flow__node.is-chain-complete .blueprint-node__tile{border-color:var(--healthy);background:#f3fbf8;box-shadow:0 0 0 3px #1f9d7217,0 10px 24px #1f5f4914}.react-flow__node.is-chain-warning .blueprint-node__tile{border-color:var(--warning);background:#fffbf1;box-shadow:0 0 0 3px #d99a241a,0 0 24px #d99a2429}.react-flow__node.is-chain-error{z-index:6!important}.react-flow__node.is-chain-error .blueprint-node__tile{border-color:var(--danger);background:#fff3f4;box-shadow:0 0 0 4px #e5484d1f,0 0 30px #e5484d38,0 14px 30px #5426281a;animation:errorFlash .72s ease-in-out 2}.react-flow__node.is-chain-error .blueprint-node h3{color:#bd353a}.react-flow__node.is-search-spotlight{z-index:7!important}.react-flow__node.is-search-spotlight .blueprint-node__tile{border-color:#2d9ed8;box-shadow:0 0 0 5px #2391cf21,0 0 28px #1e8dcc40,0 12px 30px #3243521c;animation:searchSpotlight 1.45s ease-out}.react-flow__node.is-pinned .blueprint-node__tile:after{border-color:#6061ca5c}.react-flow__node.is-pinned .blueprint-node__tile{box-shadow:0 0 0 2px #5e5bd41a,0 9px 25px #2c40520f}.react-flow__node.is-expanded .blueprint-node__tile{border-color:#4b9dcc;box-shadow:0 0 0 4px #348fc81a,0 12px 29px #2c40521c}.react-flow__node.is-branch-entering{animation:branchEnter .42s cubic-bezier(.2,.8,.2,1)}.react-flow__node.is-branch-exiting{animation:branchExit .42s ease both}.react-flow__node.is-branch-shared{transition:opacity .18s ease,filter .18s ease,transform .18s ease}.react-flow__node.detail-node-enter{animation:detailEnter .28s cubic-bezier(.2,.8,.2,1) both}.chain-edge--current path{filter:drop-shadow(0 0 4px rgba(22,137,207,.55))}.chain-edge--warning path{filter:drop-shadow(0 0 4px rgba(217,154,36,.46))}.chain-edge--error path{filter:drop-shadow(0 0 5px rgba(229,72,77,.62))}.react-flow__edge.detail-edge{pointer-events:none}.react-flow__edge.is-branch-entering{animation:edgeEnter .42s ease both}.react-flow__edge.is-branch-exiting{animation:edgeExit .42s ease both}@keyframes nodeScan{50%{box-shadow:0 0 0 5px #1689cf14,0 0 36px #1689cf4d,0 14px 30px #3243521f}}@keyframes scanLine{0%,to{left:12px;opacity:.35}50%{left:72px;opacity:.95}}@keyframes errorFlash{50%{filter:brightness(1.03);transform:translateY(-1px) scale(1.035)}}@keyframes detailEnter{0%{opacity:0;transform:translateY(-10px) scale(.96)}}@keyframes branchEnter{0%{opacity:.15;transform:scale(.97)}}@keyframes branchExit{to{opacity:.11;filter:grayscale(.6)}}@keyframes edgeEnter{0%{opacity:.1}}@keyframes edgeExit{to{opacity:.1}}@keyframes searchSpotlight{0%{transform:scale(.97)}40%{transform:scale(1.035)}to{transform:scale(1)}}@keyframes searchResultsIn{0%{opacity:0;transform:translateY(5px)}}.evidence-panel{position:fixed;top:58px;right:0;bottom:0;z-index:12;width:344px;padding:23px 20px;border-left:1px solid #d9dfe5;background:#fbfcfdf7;box-shadow:-18px 0 40px #2d37421f;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);overflow:auto;animation:evidencePanelIn .24s cubic-bezier(.2,.8,.2,1)}.evidence-panel__header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.evidence-panel__header h2{margin:7px 0 0;color:#2b3139;font-size:19px;letter-spacing:-.035em}.evidence-panel__header button{display:grid;place-items:center;padding:6px;border:0;border-radius:6px;color:#7f8995;background:transparent;cursor:pointer}.evidence-panel__header button:hover{color:#287da9;background:#edf6fb}.evidence-panel__description{margin:12px 0 20px;color:#757f8b;font-size:11px;line-height:1.6}.confidence-card{padding:14px;border:1px solid #dfe4ea;border-radius:10px;background:#fffc}.confidence-card>div:first-child{display:flex;justify-content:space-between;color:#78828e;font-size:10px}.confidence-card strong{color:#167fb9;font-size:13px}.confidence-track{height:4px;margin:10px 0;border-radius:8px;background:#e4e8ed;overflow:hidden}.confidence-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#1689cf,#5bb8df)}.confidence-card small{display:block;color:#858f9a;font-size:9px;line-height:1.45}.canvas-caption--focus{display:flex;align-items:baseline;gap:9px}.canvas-caption--focus button{display:inline-flex;align-items:center;gap:2px;padding:0;border:0;color:#3d8fc4;background:none;font:inherit;font-size:10px;cursor:pointer}.canvas-caption--focus button:hover{text-decoration:underline}.canvas-caption--focus button:after{content:"›";margin-left:5px;color:#a7b1bb}.evidence-breadcrumb{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.evidence-breadcrumb button{display:inline-flex;align-items:center;gap:2px;padding:0;border:0;color:#3d8fc4;background:none;font:inherit;font-size:11px;cursor:pointer}.evidence-breadcrumb button:hover{text-decoration:underline}.evidence-breadcrumb button:after{content:"›";margin-left:4px;color:#a7b1bb}.evidence-breadcrumb>span{color:#33404c;font-size:14px;font-weight:600;overflow-wrap:anywhere}.detail-node--depth-2 .blueprint-code-node{border-style:dashed;opacity:.92}.blueprint-code-node.is-expanded{border-color:#7fb6d8;box-shadow:0 3px 10px #207ab117}.product-card{display:grid;gap:8px;margin-top:14px;padding:13px;border:1px dashed #d8e0e6;border-radius:10px;background:#f7fafcd9}.product-card .eyebrow{margin:0}.product-card__empty{margin:0;color:#8b96a1;font-size:9px;line-height:1.5}.product-card__claim{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.product-card__claim strong{color:#4a5560;font-size:11px}.product-card__claim em{flex:none;color:#7c8792;font-size:9px;font-style:normal}.product-card__match{display:flex;align-items:center;gap:9px}.product-card__match span{color:#8b959f;font-size:9px}.product-card__match .confidence-track{flex:1;margin:0}.product-card__match strong{color:#5f83a0;font-size:10px}.product-card small{color:#8b959f;font-size:9px;line-height:1.45}.product-card__source{color:#7d8994;font:8px ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere}.evidence-list{display:flex;flex-direction:column;gap:9px;margin-top:23px}.evidence-list .eyebrow{margin-bottom:2px}.evidence-list article,.evidence-list button{display:grid;gap:5px;width:100%;padding:11px;border:1px solid #dfe4e9;border-radius:8px;color:inherit;background:#ffffffbf;text-align:left;cursor:pointer;transition:.16s ease}.evidence-list button:hover,.evidence-list button.is-active{border-color:#86bddd;background:#f4fbfe;box-shadow:0 4px 12px #207ab10f}.evidence-list code{overflow:hidden;color:#247ca9;font:9px ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.evidence-list span,.evidence-list small{color:#8a949f;font-size:8px}.source-preview{display:grid;gap:8px;margin-top:22px}.source-preview>p{margin:0;padding:10px;border:1px dashed #d7dfe6;border-radius:7px;color:#8b96a1;font-size:8px}.source-preview pre{max-height:330px;margin:0;overflow:auto;border:1px solid #dfe5eb;border-radius:8px;color:#4e5965;background:#f7f9fb}.source-preview pre code{display:grid;grid-template-columns:34px minmax(0,1fr);min-width:max-content;padding:2px 7px 2px 0;font:8px/1.52 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre}.source-preview pre code i{padding-right:7px;color:#a2abb4;font-style:normal;text-align:right;-webkit-user-select:none;user-select:none}.source-preview pre code span{color:#58636f}.source-preview pre code.is-highlighted{border-left:2px solid #3c9ed4;padding-left:0;background:#eaf7fd}.raw-reference{display:grid;gap:7px;margin-top:22px;padding-top:17px;border-top:1px solid #e0e5ea}.raw-reference span{color:#8d96a1;font-size:9px}.raw-reference code{color:#77818d;font:8px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap}.state-screen{display:grid;place-items:center;align-content:center;min-height:100vh;padding:30px;text-align:center;background-color:#f8fafc;background-image:linear-gradient(rgba(118,132,148,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(118,132,148,.1) 1px,transparent 1px);background-size:40px 40px}.state-logo{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;color:#e7f8ff;background:#26313e;box-shadow:0 10px 30px #26313e2e}.state-screen h1{margin:17px 0 5px;color:#2c333b;font-size:22px}.state-screen p{color:#7f8995;font-size:12px}.state-screen code{margin-top:15px;color:#237eac;font-size:10px}.state-screen--error .state-logo{background:var(--danger)}.loader{width:96px;height:2px;margin-top:20px;background:linear-gradient(90deg,transparent,#1689cf,transparent);animation:pulse 1.1s infinite}@keyframes pulse{50%{opacity:.3;transform:scaleX(.7)}}@keyframes evidencePanelIn{0%{opacity:0;transform:translate(18px)}}@media(prefers-reduced-motion:reduce){.semantic-zoom,.semantic-zoom strong,.semantic-zoom__levels i,.canvas .react-flow__edge-text,.canvas .react-flow__edge-textbg,.canvas .blueprint-group__label span{transition-duration:.01ms!important}.evidence-panel,.react-flow__node.is-current .blueprint-node__tile,.react-flow__node.is-current .blueprint-node__tile:before,.react-flow__node.is-chain-error .blueprint-node__tile,.react-flow__node.is-branch-entering,.react-flow__node.is-branch-exiting,.react-flow__node.detail-node-enter,.react-flow__node.is-search-spotlight,.react-flow__edge.is-branch-entering,.react-flow__edge.is-branch-exiting,.search-results{animation:none!important}}@media(max-width:820px){.app-shell{grid-template:52px minmax(0,1fr) / 1fr}.topbar{grid-template-columns:auto 1fr}.brand{border:0}.breadcrumb,.topbar__meta,.sidebar{display:none}.topbar__actions{margin-left:auto}.canvas{grid-column:1}.canvas-caption{top:12px;left:12px}.semantic-zoom{top:12px;right:12px;min-width:0}.semantic-zoom small,.canvas-help{display:none}.layout-toolbar{right:12px;bottom:58px}.evidence-panel{top:52px;width:min(344px,90vw)}}
|