PageSourceSearch

https://onconex.ai/_next/static/chunks/5949.279485f521ce2260.js

js onconex.ai collected 2026-10-05 12:21:23 UTC 29,518 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5949],{45949:(e,t,o)=>{o.r(t),o.d(t,{GalaxyClient:()=>P});var r,a,l,n,s,i,c,d=o(95155),u=o(12115);let p=[{group:"org",color:"#64748b"},{group:"scope",color:"#6366f1"},{group:"service",color:"#3b82f6"},{group:"content",color:"#6b7280"},{group:"user",color:"#f59e0b"},{group:"vertical",color:"#f97316"},{group:"axiom",color:"#9B7EDB"},{group:"persona",color:"#ec4899"},{group:"artifact",color:"#94a3b8"},{group:"asset",color:"#94a3b8"},{group:"compiler",color:"#60a5fa"},{group:"component",color:"#818cf8"},{group:"handler",color:"#60a5fa"},{group:"healer",color:"#34d399"},{group:"http_route",color:"#818cf8"},{group:"ledger_type",color:"#94a3b8"},{group:"route",color:"#818cf8"},{group:"task_contract",color:"#f87171"},{group:"verifier",color:"#34d399"},{group:"worker",color:"#60a5fa"}];var x=o(61968),g=o(34968),h=o(19074),b=o(22389),m=o(62900);let f=JSON.parse('{"org": "#64748b", "scope": "#6366f1", "service": "#3b82f6", "content": "#6b7280", "user": "#f59e0b", "vertical": "#f97316", "axiom": "#9B7EDB", "persona": "#ec4899", "artifact": "#94a3b8", "asset": "#94a3b8", "compiler": "#60a5fa", "component": "#818cf8", "handler": "#60a5fa", "healer": "#34d399", "http_route": "#818cf8", "ledger_type": "#94a3b8", "route": "#818cf8", "task_contract": "#f87171", "verifier": "#34d399", "worker": "#60a5fa"}'),k=JSON.parse('{"org": {"color": {"background": "#64748b", "border": "#506077", "highlight": {"background": "#96a6bd", "border": "#64748b"}}, "shape": "dot", "size": 16, "font": {"size": 12}}, "scope": {"color": {"background": "#6366f1", "border": "#4f52dd", "highlight": {"background": "#9598ff", "border": "#6366f1"}}, "shape": "dot", "size": 12, "font": {"size": 11}}, "service": {"color": {"background": "#3b82f6", "border": "#276ee2", "highlight": {"background": "#6db4ff", "border": "#3b82f6"}}, "shape": "dot", "size": 11, "font": {"size": 11}}, "content": {"color": {"background": "#6b7280", "border": "#575e6c", "highlight": {"background": "#9da4b2", "border": "#6b7280"}}, "shape": "dot", "size": 8, "font": {"size": 10}}, "user": {"color": {"background": "#f59e0b", "border": "#e18a00", "highlight": {"background": "#ffd03d", "border": "#f59e0b"}}, "shape": "dot", "size": 11, "font": {"size": 11}}, "vertical": {"color": {"background": "#f97316", "border": "#e55f02", "highlight": {"background": "#ffa548", "border": "#f97316"}}, "shape": "dot", "size": 11, "font": {"size": 11}}, "axiom": {"color": {"background": "#9B7EDB", "border": "#876ac7", "highlight": {"background": "#cdb0ff", "border": "#9B7EDB"}}, "shape": "dot", "size": 9, "font": {"size": 10}}, "persona": {"color": {"background": "#ec4899", "border": "#d83485", "highlight": {"background": "#ff7acb", "border": "#ec4899"}}, "shape": "dot", "size": 11, "font": {"size": 11}}, "artifact": {"color": {"background": "#94a3b8", "border": "#808fa4", "highlight": {"background": "#c6d5ea", "border": "#94a3b8"}}, "shape": "dot", "size": 7, "font": {"size": 10}}, "asset": {"color": {"background": "#94a3b8", "border": "#808fa4", "highlight": {"background": "#c6d5ea", "border": "#94a3b8"}}, "shape": "dot", "size": 7, "font": {"size": 10}}, "compiler": {"color": {"background": "#60a5fa", "border": "#4c91e6", "highlight": {"background": "#92d7ff", "border": "#60a5fa"}}, "shape": "dot", "size": 8, "font": {"size": 10}}, "component": {"color": {"background": "#818cf8", "border": "#6d78e4", "highlight": {"background": "#b3beff", "border": "#818cf8"}}, "shape": "dot", "size": 8, "font": {"size": 10}}, "handler": {"color": {"background": "#60a5fa", "border": "#4c91e6", "highlight": {"background": "#92d7ff", "border": "#60a5fa"}}, "shape": "dot", "size": 8, "font": {"size": 10}}, "healer": {"color": {"background": "#34d399", "border": "#20bf85", "highlight": {"background": "#66ffcb", "border": "#34d399"}}, "shape": "dot", "size": 8, "font": {"size": 10}}, "http_route": {"color": {"background": "#818cf8", "border": "#6d78e4", "highlight": {"background": "#b3beff", "border": "#818cf8"}}, "shape": "dot", "size": 7, "font": {"size": 10}}, "ledger_type": {"color": {"background": "#94a3b8", "border": "#808fa4", "highlight": {"background": "#c6d5ea", "border": "#94a3b8"}}, "shape": "dot", "size": 7, "font": {"size": 10}}, "route": {"color": {"background": "#818cf8", "border": "#6d78e4", "highlight": {"background": "#b3beff", "border": "#818cf8"}}, "shape": "dot", "size": 7, "font": {"size": 10}}, "task_contract": {"color": {"background": "#f87171", "border": "#e45d5d", "highlight": {"background": "#ffa3a3", "border": "#f87171"}}, "shape": "dot", "size": 8, "font": {"size": 10}}, "verifier": {"color": {"background": "#34d399", "border": "#20bf85", "highlight": {"background": "#66ffcb", "border": "#34d399"}}, "shape": "dot", "size": 8, "font": {"size": 10}}, "worker": {"color": {"background": "#60a5fa", "border": "#4c91e6", "highlight": {"background": "#92d7ff", "border": "#60a5fa"}}, "shape": "dot", "size": 9, "font": {"size": 10}}}'),v=b.FD.bits_saturation.params,y=b.FD.orphan_dimming.params,j=b.FD.federation_badge.params,w=b.FD.leaf_deweight.params,N=new Set(null!=(r=b.FD.leaf_deweight.kind_set)?r:[]),_=String(null!=(a=j.badge_color)?a:"#10b981"),S=new Map((null!=(l=m.by_scope)?l:[]).map(e=>[e.scope,e.total])),C="#ef4444",E=Object.fromEntries(Object.entries(null!=(n=m.capp_encoding)?n:{}).map(e=>{let[t,o]=e;return[t,o.color]})),z=null!=(s=m.capp_encoding)?s:{},D=Object.fromEntries((null!=(i=m.families)?i:[]).map(e=>[e.gate,e.capp])),B=new Map((null!=(c=m.by_scope)?c:[]).map(e=>{var t,o;let r=-1,a=null;for(let l of null!=(t=e.defects)?t:[])l.count>r&&(r=l.count,a=null!=(o=D[l.gate])?o:null);return[e.scope,a]}
1)),A=new Map(Array.from(B.entries()).map(e=>{let[t,o]=e;return[t,o&&E[o]||C]}));function T(e,t){let o=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return"rgba(".concat(o,",").concat(r,",").concat(a,",").concat(t.toFixed(2),")")}let O="/api",L="var(--scope-accent, #9B7EDB)";function M(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/[*][*](.+?)[*][*]/g,"<strong>$1</strong>").replace(/[*](.+?)[*]/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code style="'.concat("background:rgba(128,128,128,0.15);border-radius:3px;padding:1px 4px;font-family:var(--mono,SF Mono,monospace);font-size:11px",'">$1</code>')).replace(/\n/g,"<br>")}function P(){var e,t,o;let r=(0,u.useRef)(null),[a,l]=(0,u.useState)(null),[n,s]=(0,u.useState)(null),[i,c]=(0,u.useState)({kind:"loading",message:"Loading your governed scope graph…"}),[b,m]=(0,u.useState)(null),[E,D]=(0,u.useState)("GOV galaxy"),[P,U]=(0,u.useState)(""),[G,F]=(0,u.useState)(null),[R,I]=(0,u.useState)(!1),[H,V]=(0,u.useState)(""),[J,W]=(0,u.useState)(!1),[Y,K]=(0,u.useState)(10),[$,q]=(0,u.useState)(10),[X,Q]=(0,u.useState)(()=>new Set(Object.keys(f).filter(e=>!N.has(e)))),[Z,ee]=(0,u.useState)({}),[et,eo]=(0,u.useState)(0),[er,ea]=(0,u.useState)(!1),[el,en]=(0,u.useState)(null),[es,ei]=(0,u.useState)([]),[ec,ed]=(0,u.useState)(""),[eu,ep]=(0,u.useState)(!1),[ex,eg]=(0,u.useState)(null),[eh,eb]=(0,u.useState)(!1),[em,ef]=(0,u.useState)(!1),ek=(0,u.useRef)(null),ev=(0,u.useRef)(1),ey=(0,u.useMemo)(()=>p,[]),ej=(0,u.useCallback)(e=>{r.current=e,l(e)},[]),ew=(0,u.useMemo)(()=>"undefined"==typeof document||document.documentElement.classList.contains("light")||window.matchMedia("(prefers-color-scheme: light)").matches?"#1d1d1f":"#f5f5f7",[]),eN=(0,u.useMemo)(()=>(function(e){var t,o;let r=Number(null!=(t=y.unreachable_alpha)?t:.28),a=Number(null!=(o=w.size_scale)?o:.7);return[(t,o)=>{var r,l,n;let s=t.meta,i=null!=(r=k[t.kind])?r:k.scope,c=null!=(l=s.size)?l:i.size,d=N.has(t.kind)?Math.max(4,Math.round(c*a)):c;return{...o,...i,size:d,font:{...null!=(n=i.font)?n:{},color:e},hidden:!1}},(e,t)=>{var o,a;let l=e.meta,n=null!=(o=k[e.kind])?o:k.scope,s=!1===l.reachable,i={...t};if("string"==typeof n.color&&n.color.startsWith("#")&&(s||null!=e.bits&&e.bits<255)){let t=null!=e.bits&&e.bits<255?function(e){var t,o,r;let a=Number(null!=(t=v.alpha_floor)?t:.2),l=Number(null!=(o=v.alpha_span)?o:.8),n=Number(null!=(r=v.bits_max)?r:255);return null==e?1:a+e/n*l}(e.bits):1,o=s?Math.min(t,r):t;i.color={background:T(n.color,o),border:T(n.color,Math.min(o+.1,1))}}return s&&(i.shapeProperties={...null!=(a=n.shapeProperties)?a:{},borderDashes:[4,3]}),i},(e,t)=>{var o,r,a;
1if((null!=(o=e.meta.federation_count)?o:0)<Number(null!=(r=j.min_count)?r:1))return t;let l=null!=(a=k[e.kind])?a:k.scope,n=t.color&&"object"==typeof t.color&&t.color.background||("string"==typeof l.color?l.color:"#6366f1");return{...t,borderWidth:3,color:{background:n,border:_,highlight:{background:n,border:_}}}},(e,t)=>{var o,r,a;let l=S.get(e.id);if(!l||l<=0)return t;let n=null!=(o=k[e.kind])?o:k.scope,s=t.color&&"object"==typeof t.color&&t.color.background||("string"==typeof n.color?n.color:"#6366f1"),i=null!=(r=A.get(e.id))?r:C;return{...t,borderWidth:Math.min(2+l,8),color:{background:s,border:i,highlight:{background:s,border:i},hover:{background:s,border:i}},title:"".concat(null!=(a=e.label)?a:e.id," \xb7 ").concat(l," defect").concat(1===l?"":"s"," (auto-debug)")}}]})(ew),[ew]),e_=(0,u.useCallback)(()=>({color:{color:"rgba(150,120,220,0.2)",highlight:"rgba(155,126,219,0.6)"},width:1,smooth:{type:"cubicBezier",roundness:.3}}),[]),eS=(0,u.useCallback)(()=>{let e=r.current;if(!e||!n)return;let t=H.toLowerCase(),o=0;e.forEachNode((r,a)=>{let l=a.meta,n=(!t||a.label.toLowerCase().includes(t))&&X.has(a.kind)&&(!J||l.has_intel||"axiom"===a.kind)&&(null==a.level||a.level<=Y);e.updateNode(r,{hidden:!n}),n&&o++}),eo(o)},[n,H,X,J,Y]);(0,u.useEffect)(()=>{eS()},[eS,a]);let eC=(0,u.useCallback)((e,t)=>{let o={id:ev.current++,role:e,text:t,html:"assistant"===e?M(t):void 0};return ei(e=>[...e,o]),setTimeout(()=>{ek.current&&(ek.current.scrollTop=ek.current.scrollHeight)},0),o},[]),eE=(0,u.useCallback)((e,t,o)=>{ei(r=>r.map(r=>r.id===e?{...r,text:t,html:null!=o?o:r.html}:r)),setTimeout(()=>{ek.current&&(ek.current.scrollTop=ek.current.scrollHeight)},0)},[]),ez=(0,u.useCallback)(e=>{let t={id:ev.current++,role:"tool",text:e,toolName:e,toolStatus:"running"};return ei(e=>[...e,t]),setTimeout(()=>{ek.current&&(ek.current.scrollTop=ek.current.scrollHeight)},0),t},[]),eD=(0,u.useCallback)(async e=>{var t,o;let r=null!=(o=null!=(t=e.path)?t:String(e.id))?o:"";en({...e,path:r}),ei([]),eg(null),ea(!0),m(null);try{let e=await fetch("".concat(O,"/talk/laude/threads"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:"LAUDE",context_scope_path:r||void 0})});if(401===e.status)return void eC("system-note","Sign in to use LAUDE — open the menu to sign in.");if(403===e.status){let t=await e.json().catch(()=>({}));eC("system-note","LAUDE is invitation-only. "+(t.error||"Contact ".concat(x.sg.CANONIC_ORG," to request access.")));return}if(!e.ok)return void eC("system-note","Could not start LAUDE session (".concat(e.status,")."));let t=await e.json();t.id&&eg(t.id),r&&eC("system-note","Scope: ".concat(r))}catch(e){eC("system-note","Could not start LAUDE session: "+(e instanceof Error?e.message:String(e)))}},[eC]),eB=(0,u.useCallback)(e=>{if(e){let t=e.meta;m(t),eD(t)}else m(null),ea(!1)},[eD]),eA=(0,u.useCallback)(e=>{let t=e.meta;(null==t?void 0:t.laude_url)&&window.open(t.laude_url,"_blank","noopener,noreferrer")},[]),eT=(0,u.useCallback)(async()=>{var e,t,o,a,l;let n;c({kind:"loading",message:"Loading your governed scope graph…"});try{let e=await fetch("/api/talk/laude/galaxy-graph",{credentials:"include"});if(401===e.status)return void c({kind:"sign-in",returnUrl:window.location.href});if(404===e.status){let t=await e.json().catch(()=>({}));"github_login_required"===t.error||"galaxy_not_provisioned"===t.error?c({kind:"sign-in",returnUrl:window.location.href}):"fleet_not_provisioned"===t.error?c({kind:"fleet-not-provisioned",fleet:t.fleet}):c({kind:"error",message:t.detail||"Your galaxy is unavailable — it may still be compiling."});return}if(!e.ok)throw Error("HTTP "+e.status);n=await e.json()}catch(e){c({kind:"error",message:"Could not load galaxy: "+(e instanceof Error?e.message:String(e))});return}c({kind:"hidden"});let i=null!=(e=n.gov_node_count)?e:0,d=null!=(t=n.axiom_count)?t:0,u=null!=(o=n.fleet_context)?o:null;if(F(u),u?D("".concat(u.fleet," fleet \xb7 ").concat(i," scopes \xb7 read-only")):n.github_login?D("".concat(n.github_login,"/canonic-galaxy \xb7 ").concat(i," scopes \xb7 ").concat(d," axioms")):D("GOV galaxy"),U("".concat(i+d," nodes")),0===n.nodes.length)return void c({kind:"empty"});let p={};for(let e of n.nodes)p[e.group]=(p[e.group]||0)+1;ee(p),s({normalized:(a=n.nodes,l=n.edges,{nodes:a.map(e=>({id:String(e.id),label:e.label,kind:e.group,level:e.level,bits:e.bits,meta:e})),edges:l.map(e=>({from:String(e.from),to:String(e.to)}))}),byId:new Map(n.nodes.map(e=>[String(e.id),e]))});let x=n.nodes.map(e=>{var t;return null!=(t=e.level)?t:0}).filter(e=>null!=e),g=Math.min(x.length?Math.max(...x):10,15);q(g),K(g);let h=new URLSearchParams(window.location.search).get("scope");h&&setTimeout(()=>{let e=r.current;if(!e)return;let t=null;for(let e of n.nodes)if(e.path===h){t=e;break}if(!t){for(let e of n.nodes)if(e.label===h){t=e;break}}t&&(e.selectNodes([String(t.id)]),e.focus(String(t.id),1.2),m(t),eD(t))},1800)},[eD]);(0,u.useEffect)(()=>{eT()},[]);let eO=(0,u.useCallback)(async()=>{var e,t,o;let r=ec.trim();if(!r||eu)return;if(!ex)return void eC("system-note","No active session.");ed(""),eC("user",r),ep(!0);let a=eC("assistant",""),l=null!=(e=null==el?void 0:el.path)?e:"";try{let e=await fetch("".concat(O,"/talk/laude/threads/").concat(ex,"/messages"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:r,client_context:{surface:"Galaxy",...l?{active_item_id:l}:{}}})});if(!e.ok)return void eE(a.id,"Error: HTTP "+e.status,"Error: HTTP "+e.status);let n=null==(t=e.body)?void 0:t.getReader();if(!n)return void eE(a.id,"Error: no response stream","Error: no response stream");let s=new TextDecoder,i="",c="",d="delta",u=a.id,p=new Map;for(;;){let{done:e,value:t}=await n.read();if(e)break;let r=(i+=s.decode(t,{stream:!0})).split("\n");for(let e of(i=null!=(o=r.pop())?o:"",r)){let t;if(e.startsWith("event: ")){d=e.slice(7).trim();continue}if(e.startsWith("data: ")){try{t=JSON.parse(e.slice(6))}catch(e){continue}if("error"===d){let e="string"==typeof t.message?t.message:JSON.stringify(t);if(null!=u){let t="⚠️ ".concat(e);eE(u,t,t),u=null}else eC("system-note","⚠️ ".concat(e))}else if("tool_call"===d&&t.name){u=null,c="";let e=ez(t.name);
1t.tool_use_id&&p.set(t.tool_use_id,e.id)}else if("tool_result"===d){let e=t.tool_use_id?p.get(t.tool_use_id):void 0;null!=e&&ei(o=>o.map(o=>o.id===e?{...o,toolStatus:!1===t.ok?"failed":"done"}:o))}else t.text&&(null==u&&(u=eC("assistant","").id,c=""),c+=t.text,eE(u,c,M(c)))}}}}catch(t){let e="Stream error: "+(t instanceof Error?t.message:String(t));eE(a.id,e,e)}finally{ep(!1)}},[ec,eu,ex,el,eC,ez,eE]),eL=(0,u.useCallback)(async()=>{if(!ex||eu)return;eb(!0);let e=eC("system-note","Closing session and opening PR…");try{let t=await fetch("".concat(O,"/talk/laude/threads/").concat(ex,"/close"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:"{}"}),o=await t.json();o.ok&&o.pr_url?(eE(e.id,"Session closed. PR: ".concat(o.pr_url),'Session closed. <a href="'.concat(o.pr_url,'" target="_blank" rel="noreferrer" style="color:').concat(L,'">Open PR →</a>')),eb(!1),eg(null)):o.ok?(eE(e.id,"Session closed (no axioms — no PR created)."),eb(!1),eg(null)):(eE(e.id,"Close failed: "+(o.error||t.status)),eb(!1))}catch(t){eE(e.id,"Close error: "+(t instanceof Error?t.message:String(t))),eb(!1)}},[ex,eu,eC,eE]),eM=(0,u.useMemo)(()=>{if(!b||"axiom"===b.group)return"";let e=[];return b.tier&&e.push("tier: ".concat(b.tier)),null!=b.bits&&e.push("bits: ".concat(b.bits)),b.has_intel&&e.push("has INTEL"),b.children&&e.push("".concat(b.children," children")),e.join(" \xb7 ")},[b]);return(0,d.jsxs)("div",{className:"relative h-[calc(100dvh-3rem)] w-full overflow-hidden bg-black text-white",children:[n&&(0,d.jsx)(g.x,{data:n.normalized,layout:"force",overlays:eN,edgeProps:e_,onSelect:eB,onDoubleClick:eA,onReady:ej}),(0,d.jsxs)("div",{className:"pointer-events-none absolute left-14 top-3 z-10",children:[(0,d.jsx)("h1",{className:"font-mono text-[9px] font-semibold uppercase tracking-[6px] text-[color:var(--scope-accent,#9B7EDB)]",children:"GALAXY"}),(0,d.jsx)("div",{className:"mt-1 font-mono text-[9px] uppercase tracking-[2px] text-gx-dim",children:E})]}),(0,d.jsx)("button",{onClick:()=>I(e=>!e),className:"absolute left-3 top-14 z-30 rounded border border-white/10 bg-black/40 px-2 py-1 font-mono text-xs text-gx-dim backdrop-blur hover:text-[color:var(--scope-accent,#9B7EDB)]",title:"Toggle finder",children:"⌘ Find"}),R&&(0,d.jsxs)("div",{className:"absolute left-0 top-0 z-20 h-full w-[264px] overflow-y-auto border-r border-white/10 bg-black/95 px-4 py-12 backdrop-blur","aria-label":"Finder",children:[(0,d.jsx)("h2",{className:"mb-3 font-mono text-[9px] uppercase tracking-[4px] text-gx-dim",children:"Find"}),(0,d.jsx)("input",{type:"search",value:H,onChange:e=>V(e.target.value),placeholder:"Search scopes…",autoComplete:"off",className:"mb-3 w-full rounded border border-white/10 bg-white/5 px-2 py-2 font-mono text-xs text-white placeholder:text-muted-foreground focus:outline-none"}),(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsx)("span",{className:"mb-2 block font-mono text-[9px] uppercase tracking-[3px] text-gx-dim",children:"Kind"}),Object.entries(f).map(e=>{var t;let[o,r]=e;return(0,d.jsxs)("label",{className:"mb-1.5 flex cursor-pointer items-center gap-2",children:[(0,d.jsx)("input",{type:"checkbox",checked:X.has(o),onChange:e=>{Q(t=>{let r=new Set(t);return e.target.checked?r.add(o):r.delete(o),r})},style:{accentColor:L}}),(0,d.jsx)("div",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{background:r}}),(0,d.jsx)("span",{className:"font-mono text-[11px] text-gx-dim",children:o}),(0,d.jsx)("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground",children:null!=(t=Z[o])?t:0})]},o)})]}),(0,d.jsx)("div",{className:"mb-3",children:(0,d.jsxs)("label",{className:"mb-3 flex cursor-pointer items-center gap-2",children:[(0,d.jsx)("input",{type:"checkbox",checked:J,onChange:e=>W(e.target.checked),style:{accentColor:L}}),(0,d.jsx)("span",{className:"font-mono text-[11px] text-gx-dim",children:"INTEL only"})]})}),(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("span",{className:"mb-2 block font-mono text-[9px] uppercase tracking-[3px] text-gx-dim",children:["Depth"," ",(0,d.jsx)("span",{className:"ml-2 text-muted-foreground",children:Y>=$?"all":Y})]}),(0,d.jsx)("input",{type:"range","aria-label":"Maximum scope depth",min:1,max:$,value:Y,onChange:e=>K(parseInt(e.target.value)),className:"w-full",style:{accentColor:"#6366f1"}})]}),(0,d.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground",children:[et," visible"]})]}),(0,d.jsxs)("div",{className:"pointer-events-none absolute bottom-6 left-14 z-10 flex max-w-[60vw] flex-wrap gap-x-3 gap-y-1.5",children:[ey.filter(e=>!N.has(e.group)).map(e=>(0,d.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[9px] text-[color:var(--scope-accent,theme(colors.neutral.400))] opacity-90",children:[(0,d.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:e.color}}),(0,d.jsx)("span",{className:"text-gx-dim",children:e.group})]},e.group)),(0,d.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[9px] text-gx-dim",children:[(0,d.jsx)("span",{className:"h-2 w-8 rounded-full",style:{background:"linear-gradient(90deg, rgba(99,102,241,0.2), rgba(99,102,241,1))"},"aria-hidden":"true"}
1),(0,d.jsx)("span",{children:"dim → 255 MAGIC"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[9px] text-gx-dim",children:[(0,d.jsx)("span",{className:"h-2 w-2 rounded-full border-2",style:{borderColor:_,background:"transparent"},"aria-hidden":"true"}),(0,d.jsx)("span",{children:"federated"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[9px] text-muted-foreground",children:[(0,d.jsx)("span",{className:"h-2 w-2 rounded-full border border-dashed border-muted-foreground",style:{background:"rgba(99,102,241,".concat(null!=(e=y.unreachable_alpha)?e:.28,")")},"aria-hidden":"true"}),(0,d.jsx)("span",{children:"orphan (drifting)"})]})]}),P&&(0,d.jsx)("div",{className:"pointer-events-none absolute bottom-6 right-5 z-10 font-mono text-[9px] uppercase tracking-[2px] text-gx-dim",children:P}),G&&(0,d.jsx)("div",{className:"absolute bottom-4 left-1/2 z-[60] flex -translate-x-1/2 items-center gap-3 rounded-md bg-black/90 px-4 py-2 text-xs text-white",children:(0,d.jsxs)("span",{children:["You’re viewing the ",G.fleet," fleet galaxy in read-only mode."]})}),b&&(0,d.jsxs)("div",{className:"absolute right-0 top-0 z-20 h-full w-[320px] overflow-y-auto border-l border-white/10 bg-black/95 px-5 py-6 backdrop-blur","aria-label":"Node detail",children:[(0,d.jsx)("button",{onClick:()=>{var e;m(null),null==(e=r.current)||e.unselectAll()},"aria-label":"Close detail",className:"absolute right-4 top-3 text-lg text-gx-dim hover:text-white",children:"\xd7"}),(0,d.jsxs)("div",{className:"mb-2 font-mono text-[9px] uppercase tracking-[4px] text-gx-dim",children:[b.group.toUpperCase(),b.pending?" \xb7 PENDING":""]}),(0,d.jsx)("div",{className:"mb-2.5 break-all text-sm font-semibold leading-snug",children:b.label}),"axiom"===b.group&&b.title&&(0,d.jsx)("div",{className:"mb-3 text-xs leading-relaxed text-gx-dim",children:b.title}),eM&&(0,d.jsx)("div",{className:"mb-3 font-mono text-[10px] leading-relaxed text-gx-dim",children:eM}),b.path&&b.path!==b.label&&(0,d.jsx)("div",{className:"mb-4 break-all font-mono text-[10px] text-muted-foreground",children:b.path}),"axiom"!==b.group&&!b.children&&(0,d.jsx)("div",{className:"mb-3 inline-flex items-center gap-1.5 rounded border border-white/15 px-2 py-1 font-mono text-[10px] text-gx-dim",children:"◧ SURFACE \xb7 leaf of the GOV→SURFACE DAG"}),(()=>{var e,t;let o=S.get(String(b.id));if(!o)return null;let r=B.get(String(b.id)),a=null!=(t=r&&(null==(e=z[r])?void 0:e.color))?t:C;return(0,d.jsxs)("div",{className:"mb-4 rounded-md border border-white/10 bg-white/5 px-3 py-2",children:[(0,d.jsxs)("div",{className:"mb-1 flex items-center gap-2 text-[11px] font-semibold",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"inline-block h-2.5 w-2.5 rounded-full",style:{backgroundColor:a}}),o," non-compliance",1===o?"":"s"]}),(0,d.jsxs)("div",{className:"font-mono text-[10px] leading-relaxed text-gx-dim",children:["CAPP move: ",null!=r?r:"unclassified"," \xb7 drains live on Auto-debug"]})]})})(),(0,d.jsx)("button",{onClick:()=>void eD(b),className:"block w-full rounded-lg bg-[var(--scope-accent,#9B7EDB)] py-2.5 text-center text-xs font-medium text-white hover:opacity-90",children:"Open in LAUDE"})]}),"loading"!==i.kind&&(0,d.jsx)(h.k,{lens:"galaxy",handle:a,selectedId:(null==b?void 0:b.id)!=null?String(b.id):null,kinds:["overlay","score","panel","coloring"]}),er&&(0,d.jsxs)("div",{className:"absolute top-0 z-30 flex h-full flex-col bg-black/95 backdrop-blur "+(em?"left-0 right-0 w-full":"right-0 w-[360px] border-l border-white/10"),"aria-label":"LAUDE rail",style:{overscrollBehavior:"contain",touchAction:"pan-y"},onTouchStartCapture:e=>e.stopPropagation(),onTouchMoveCapture:e=>e.stopPropagation(),onPointerDownCapture:e=>e.stopPropagation(),onWheelCapture:e=>e.stopPropagation(),children:[(0,d.jsxs)("div",{className:"relative border-b border-white/10 px-5 pb-3 pt-4",children:[(0,d.jsx)("div",{className:"mb-1 font-mono text-[9px] uppercase tracking-[3px] text-[color:var(--scope-accent,#9B7EDB)]",children:(null==el?void 0:el.path)||"LAUDE"}),(0,d.jsx)("div",{className:"break-all pr-14 text-sm font-semibold leading-snug "+(em?"mx-auto w-full max-w-[760px]":""),children:null!=(o=null!=(t=null==el?void 0:el.label)?t:null==el?void 0:el.path)?o:"Select a scope to begin"}),(0,d.jsx)("button",{onClick:()=>ef(e=>!e),"aria-label":em?"Collapse LAUDE":"Expand LAUDE",title:em?"Collapse LAUDE":"Expand LAUDE",className:"absolute right-11 top-3 text-base text-gx-dim hover:text-white",children:em?"⤡":"⤢"}),(0,d.jsx)("button",{onClick:()=>{var e;ea(!1),ef(!1),eg(null),m(null),null==(e=r.current)||e.unselectAll()},"aria-label":"Close rail",className:"absolute right-4 top-3 text-lg text-gx-dim hover:text-white",children:"\xd7"})]}),(0,d.jsx)("div",{ref:ek,className:"flex-1 overflow-y-auto px-5 py-4 "+(em?"mx-auto w-full max-w-[760px]":""),style:{overscrollBehavior:"contain",touchAction:"pan-y"},children:(0,d.jsx)("div",{className:"flex flex-col gap-2.5",children:es.map(e=>{var t,o;return"user"===e.role?(0,d.jsx)("div",{className:"self-end max-w-[92%] rounded-lg bg-white/10 px-3 py-2 text-sm leading-relaxed text-white",children:e.text},e.id):"assistant"===e.role?(0,d.jsx)("div",{className:"text-sm leading-relaxed text-gx-fg",dangerouslySetInnerHTML:{__html:null!=(t=e.html)?t:M(e.text)}},e.id):"tool"===e.role?(0,d.jsxs)("div",{className:"flex max-w-[92%] items-center gap-2 self
1-start rounded-md border border-white/10 bg-[var(--scope-accent,#9B7EDB)]/10 px-2.5 py-1.5 font-mono text-[11px] text-gx-dim",children:["done"===e.toolStatus?(0,d.jsx)("span",{className:"font-bold text-gx-ok",children:"✓"}):"failed"===e.toolStatus?(0,d.jsx)("span",{className:"font-bold text-gx-warn",children:"✕"}):(0,d.jsx)("span",{className:"inline-block h-2.5 w-2.5 shrink-0 animate-spin rounded-full border-[1.5px] border-[color:var(--scope-accent,#9B7EDB)] border-t-transparent","aria-hidden":"true"}),(0,d.jsx)("span",{className:"font-semibold text-[color:var(--scope-accent,#9B7EDB)]",children:e.toolName})]},e.id):(0,d.jsx)("div",{className:"font-mono text-[10px] text-muted-foreground opacity-70",dangerouslySetInnerHTML:{__html:null!=(o=e.html)?o:e.text}},e.id)})})}),(0,d.jsxs)("div",{"data-role":"chat-input",className:"flex flex-shrink-0 items-end gap-2 border-t border-white/10 px-3 py-3 "+(em?"mx-auto w-full max-w-[760px]":""),children:[(0,d.jsx)("textarea",{value:ec,onChange:e=>ed(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),eO())},rows:1,placeholder:"Ask LAUDE about this scope…",className:"flex-1 resize-none rounded border border-white/10 bg-white/5 px-2.5 py-2 text-sm leading-snug text-white placeholder:text-muted-foreground focus:outline-none",style:{minHeight:"36px",maxHeight:"120px"}}),(0,d.jsx)("button",{onClick:()=>void eO(),disabled:eu,"aria-label":"Send",className:"flex-shrink-0 rounded bg-[var(--scope-accent,#9B7EDB)] px-3 py-2 text-base text-white disabled:opacity-50",children:"↑"})]}),(0,d.jsx)("div",{className:"flex-shrink-0 border-t border-white/10 px-3 py-2 text-right",children:(0,d.jsx)("button",{onClick:()=>void eL(),disabled:!ex||eh||eu,className:"rounded border border-white/10 px-3 py-1 text-xs text-gx-dim hover:border-[color:var(--scope-accent,#9B7EDB)] hover:text-[color:var(--scope-accent,#9B7EDB)] disabled:cursor-not-allowed disabled:opacity-50",children:eh?"Closing…":"Close session"})})]}),"hidden"!==i.kind&&(0,d.jsxs)("div",{className:"absolute inset-0 z-[40] flex flex-col items-center justify-center gap-4 bg-black text-center",children:["loading"===i.kind&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"GOV Galaxy"}),(0,d.jsx)("p",{className:"max-w-xs text-sm text-gx-dim",children:i.message})]}),"sign-in"===i.kind&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"GOV Galaxy"}),(0,d.jsx)("p",{className:"max-w-xs text-sm text-gx-dim",children:"Sign in to view and govern your governance galaxy."}),(0,d.jsx)("a",{href:"/auth/sign-in?return=".concat(encodeURIComponent(i.returnUrl)),className:"rounded-lg bg-[var(--scope-accent,#9B7EDB)] px-6 py-2 text-sm font-medium text-white hover:opacity-90",children:"Sign in"})]}),"fleet-not-provisioned"===i.kind&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"GOV Galaxy"}),(0,d.jsxs)("p",{className:"max-w-xs text-sm text-gx-dim",children:["Your fleet isn’t set up yet — ask your operator to register it before your galaxy can load.",i.fleet?" (fleet: ".concat(i.fleet,")"):""]}),(0,d.jsx)("button",{onClick:()=>void eT(),className:"rounded-lg border border-[color:var(--scope-accent,#9B7EDB)]/30 bg-transparent px-6 py-2 text-sm text-laude-violet",children:"Retry"})]}),"error"===i.kind&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"GOV Galaxy"}),(0,d.jsx)("p",{className:"max-w-xs text-sm text-gx-dim",children:i.message}),(0,d.jsx)("button",{onClick:()=>void eT(),className:"rounded-lg bg-[var(--scope-accent,#9B7EDB)] px-6 py-2 text-sm font-medium text-white",children:"Retry"})]}),"empty"===i.kind&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"GOV Galaxy"}),(0,d.jsx)("p",{className:"max-w-xs text-sm text-gx-dim",children:"No governance nodes found. The galaxy may still be compiling."}),(0,d.jsxs)("p",{className:"max-w-xs text-xs text-muted-foreground",children:["Open LAUDE via the"," ",(0,d.jsx)("span",{className:"font-mono text-[color:var(--scope-accent,#9B7EDB)]",children:"λ"})," ","trigger above to capture your first axiom."]})]})]})]})}}}]);

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.