From 0b639870ffd9ac9ee8d418a7c18e89dfd6372734 Mon Sep 17 00:00:00 2001 From: Hitonabi Date: Sun, 23 Aug 2026 21:28:41 +0200 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20mem0=5Fms=20nach=20memory=5Fms?= =?UTF-8?q?=20umbenannt,=20Mem0-Texte=20zu=20Ged=C3=A4chtnis,=20dist=20neu?= =?UTF-8?q?=20gebaut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{AgentView-C-rUOPjn.js => AgentView-D4zN2MPP.js} | 2 +- ...sbuchView-BdYOUdf1.js => AuftragsbuchView-DqhMB1_4.js} | 2 +- .../{ChronikView-BBdQX2_R.js => ChronikView-DeYQ77we.js} | 2 +- .../{ConnectView-5DXpNBft.js => ConnectView-CV4093im.js} | 2 +- .../{GuideView-D6hHVfTx.js => GuideView-DUanjnT4.js} | 6 +++--- .../{IdeenView-DcsN5ZLB.js => IdeenView-DGY-eQxb.js} | 2 +- .../assets/{JobsBar-Ckecoyqy.js => JobsBar-JgL4-cSI.js} | 2 +- .../{KonsoleView-Bdk_kJ2m.js => KonsoleView-DeJwkqSp.js} | 2 +- .../{ModelsView-aEV2pe9C.js => ModelsView-BEx7Kj-e.js} | 2 +- ...{SectionLabel-BfFwUeZU.js => SectionLabel-CLJNaK00.js} | 2 +- .../{SkillsView-C5D9xEVH.js => SkillsView-CYYp19Ox.js} | 2 +- .../{WissenView-DpReQzIY.js => WissenView-IXZy1TUN.js} | 2 +- ...{chevron-down-SPeGIim5.js => chevron-down-Bak281TY.js} | 2 +- .../assets/{code-xml-AZtn6xxf.js => code-xml-BeQlEZLv.js} | 2 +- .../{folder-open-FZLk16T9.js => folder-open-DbWikJy5.js} | 2 +- .../dist/assets/{index-CCbyojll.js => index-0Xcu6PnS.js} | 6 +++--- .../assets/{layers-Dpl2QlP2.js => layers-D3tFEnOl.js} | 2 +- .../{rotate-ccw-DuKtbjZS.js => rotate-ccw-CBM-YWkV.js} | 2 +- frontend/dist/assets/{zap-CRNNnxfs.js => zap-BHzSmHiL.js} | 2 +- frontend/dist/index.html | 2 +- frontend/src/components/dashboard/LatencyCard.tsx | 8 ++++---- frontend/src/lib/api.ts | 6 +++--- frontend/src/views/GuideView.tsx | 7 ++----- 23 files changed, 33 insertions(+), 36 deletions(-) rename frontend/dist/assets/{AgentView-C-rUOPjn.js => AgentView-D4zN2MPP.js} (99%) rename frontend/dist/assets/{AuftragsbuchView-BdYOUdf1.js => AuftragsbuchView-DqhMB1_4.js} (99%) rename frontend/dist/assets/{ChronikView-BBdQX2_R.js => ChronikView-DeYQ77we.js} (99%) rename frontend/dist/assets/{ConnectView-5DXpNBft.js => ConnectView-CV4093im.js} (98%) rename frontend/dist/assets/{GuideView-D6hHVfTx.js => GuideView-DUanjnT4.js} (64%) rename frontend/dist/assets/{IdeenView-DcsN5ZLB.js => IdeenView-DGY-eQxb.js} (99%) rename frontend/dist/assets/{JobsBar-Ckecoyqy.js => JobsBar-JgL4-cSI.js} (96%) rename frontend/dist/assets/{KonsoleView-Bdk_kJ2m.js => KonsoleView-DeJwkqSp.js} (98%) rename frontend/dist/assets/{ModelsView-aEV2pe9C.js => ModelsView-BEx7Kj-e.js} (99%) rename frontend/dist/assets/{SectionLabel-BfFwUeZU.js => SectionLabel-CLJNaK00.js} (93%) rename frontend/dist/assets/{SkillsView-C5D9xEVH.js => SkillsView-CYYp19Ox.js} (98%) rename frontend/dist/assets/{WissenView-DpReQzIY.js => WissenView-IXZy1TUN.js} (99%) rename frontend/dist/assets/{chevron-down-SPeGIim5.js => chevron-down-Bak281TY.js} (85%) rename frontend/dist/assets/{code-xml-AZtn6xxf.js => code-xml-BeQlEZLv.js} (88%) rename frontend/dist/assets/{folder-open-FZLk16T9.js => folder-open-DbWikJy5.js} (90%) rename frontend/dist/assets/{index-CCbyojll.js => index-0Xcu6PnS.js} (98%) rename frontend/dist/assets/{layers-Dpl2QlP2.js => layers-D3tFEnOl.js} (91%) rename frontend/dist/assets/{rotate-ccw-DuKtbjZS.js => rotate-ccw-CBM-YWkV.js} (88%) rename frontend/dist/assets/{zap-CRNNnxfs.js => zap-BHzSmHiL.js} (96%) diff --git a/frontend/dist/assets/AgentView-C-rUOPjn.js b/frontend/dist/assets/AgentView-D4zN2MPP.js similarity index 99% rename from frontend/dist/assets/AgentView-C-rUOPjn.js rename to frontend/dist/assets/AgentView-D4zN2MPP.js index 250d2ac..a9740e5 100644 --- a/frontend/dist/assets/AgentView-C-rUOPjn.js +++ b/frontend/dist/assets/AgentView-D4zN2MPP.js @@ -1,4 +1,4 @@ -import{c as A,I as P,f as M,k as B,u as D,r as z,j as e,J as T,b as a,K as g,M as b,N as W,t as f,W as j,O as G,X as I,C as N,n as y,q as i}from"./index-CCbyojll.js";/** +import{c as A,I as P,f as M,k as B,u as D,r as z,j as e,J as T,b as a,K as g,M as b,N as W,t as f,W as j,O as G,X as I,C as N,n as y,q as i}from"./index-0Xcu6PnS.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/AuftragsbuchView-BdYOUdf1.js b/frontend/dist/assets/AuftragsbuchView-DqhMB1_4.js similarity index 99% rename from frontend/dist/assets/AuftragsbuchView-BdYOUdf1.js rename to frontend/dist/assets/AuftragsbuchView-DqhMB1_4.js index 67ce208..9554f6b 100644 --- a/frontend/dist/assets/AuftragsbuchView-BdYOUdf1.js +++ b/frontend/dist/assets/AuftragsbuchView-DqhMB1_4.js @@ -1,4 +1,4 @@ -import{c as W,a1 as H,a2 as F,u as G,k as T,r as b,j as e,R as _,b as y,L as m,C as E,_ as O,D as P,a0 as z,a3 as R,a4 as V,X as D,T as C,F as K,n as $,a5 as q,q as U}from"./index-CCbyojll.js";import{S,H as Q}from"./SectionLabel-BfFwUeZU.js";import{C as M}from"./chevron-down-SPeGIim5.js";/** +import{c as W,a1 as H,a2 as F,u as G,k as T,r as b,j as e,R as _,b as y,L as m,C as E,_ as O,D as P,a0 as z,a3 as R,a4 as V,X as D,T as C,F as K,n as $,a5 as q,q as U}from"./index-0Xcu6PnS.js";import{S,H as Q}from"./SectionLabel-CLJNaK00.js";import{C as M}from"./chevron-down-Bak281TY.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/ChronikView-BBdQX2_R.js b/frontend/dist/assets/ChronikView-DeYQ77we.js similarity index 99% rename from frontend/dist/assets/ChronikView-BBdQX2_R.js rename to frontend/dist/assets/ChronikView-DeYQ77we.js index fc8f99c..5a95343 100644 --- a/frontend/dist/assets/ChronikView-BBdQX2_R.js +++ b/frontend/dist/assets/ChronikView-DeYQ77we.js @@ -1,4 +1,4 @@ -import{c as d,aj as S,r as h,j as e,ak as M,L as p,a0 as z,a5 as C,al as D,am as A,b as B,an as Z,u as E,k as L,n as k,q}from"./index-CCbyojll.js";import{R as j}from"./rotate-ccw-DuKtbjZS.js";/** +import{c as d,aj as S,r as h,j as e,ak as M,L as p,a0 as z,a5 as C,al as D,am as A,b as B,an as Z,u as E,k as L,n as k,q}from"./index-0Xcu6PnS.js";import{R as j}from"./rotate-ccw-CBM-YWkV.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/ConnectView-5DXpNBft.js b/frontend/dist/assets/ConnectView-CV4093im.js similarity index 98% rename from frontend/dist/assets/ConnectView-5DXpNBft.js rename to frontend/dist/assets/ConnectView-CV4093im.js index 9281b71..a8a583d 100644 --- a/frontend/dist/assets/ConnectView-5DXpNBft.js +++ b/frontend/dist/assets/ConnectView-CV4093im.js @@ -1,4 +1,4 @@ -import{c as x,r as c,z as D,A as I,j as e,D as f,t as z,B,F as H,b as M,L as E,G as T,C as F}from"./index-CCbyojll.js";import{C as K}from"./chevron-down-SPeGIim5.js";import{F as O}from"./folder-open-FZLk16T9.js";/** +import{c as x,r as c,z as D,A as I,j as e,D as f,t as z,B,F as H,b as M,L as E,G as T,C as F}from"./index-0Xcu6PnS.js";import{C as K}from"./chevron-down-Bak281TY.js";import{F as O}from"./folder-open-DbWikJy5.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/GuideView-D6hHVfTx.js b/frontend/dist/assets/GuideView-DUanjnT4.js similarity index 64% rename from frontend/dist/assets/GuideView-D6hHVfTx.js rename to frontend/dist/assets/GuideView-DUanjnT4.js index 0a433da..4312529 100644 --- a/frontend/dist/assets/GuideView-D6hHVfTx.js +++ b/frontend/dist/assets/GuideView-DUanjnT4.js @@ -1,4 +1,4 @@ -import{c as u,j as e,r as M,t as C,V as z,Y as k,Z as y,M as v,_ as L,O as G,$ as T,W as D,b as f,a0 as B}from"./index-CCbyojll.js";import{a as w,L as P,C as E,Z as R}from"./zap-CRNNnxfs.js";import{L as I}from"./layers-Dpl2QlP2.js";/** +import{c as u,j as e,r as M,t as C,V as z,Y as k,Z as y,M as v,_ as L,O as G,$ as D,W as B,b as f,a0 as T}from"./index-0Xcu6PnS.js";import{a as w,L as P,C as E,Z as R}from"./zap-BHzSmHiL.js";import{L as I}from"./layers-D3tFEnOl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -28,9 +28,9 @@ import{c as u,j as e,r as M,t as C,V as z,Y as k,Z as y,M as v,_ as L,O as G,$ a * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const H=u("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]),i={text:"hsl(var(--foreground))",mut:"hsl(var(--muted-foreground))",border:"hsl(var(--border))",card:"hsl(var(--card) / 0.9)",bg:"hsl(var(--background) / 0.4)",primary:"hsl(var(--primary))",teal:"#2dd4bf",sky:"#38bdf8",violet:"#a78bfa",rose:"#fb7185",amber:"#fbbf24",emerald:"#34d399",indigo:"#818cf8"};function o({x:n,y:r,w:t,h:c,color:h,title:g,sub:d,sub2:x,strong:p}){const b=n+t/2;return e.jsxs("g",{children:[e.jsx("rect",{x:n,y:r,width:t,height:c,rx:12,fill:i.card,stroke:h,strokeOpacity:p?.9:.45,strokeWidth:p?2:1.25}),e.jsx("rect",{x:n,y:r,width:t,height:3,rx:1.5,fill:h,opacity:.8}),e.jsx("text",{x:b,y:r+(d?24:c/2+4),textAnchor:"middle",fill:i.text,fontSize:12.5,fontWeight:700,children:g}),d&&e.jsx("text",{x:b,y:r+40,textAnchor:"middle",fill:i.mut,fontSize:10,children:d}),x&&e.jsx("text",{x:b,y:r+53,textAnchor:"middle",fill:i.mut,fontSize:10,children:x})]})}function j({from:n,to:r,color:t=i.border,dash:c}){const[h,g]=n,[d,x]=r,p=(h+d)/2;return e.jsxs("g",{stroke:t,strokeOpacity:.7,fill:"none",strokeWidth:1.5,strokeDasharray:c?"5 4":void 0,children:[e.jsx("path",{d:`M ${h} ${g} C ${p} ${g}, ${p} ${x}, ${d} ${x}`}),e.jsx("path",{d:`M ${d-6} ${x-4} L ${d} ${x} L ${d-6} ${x+4}`,fill:t,fillOpacity:.7,stroke:"none"})]})}function F(){const n=[{y:34,title:"Diese Oberfläche",sub:"Browser · Cockpit & Klick-Gates",color:i.teal},{y:128,title:"Lucy",sub:"Stimme & Begleiterin am PC",color:i.rose},{y:222,title:"Hermes Desktop",sub:"IDE für Projekte (PC + remote)",color:i.violet},{y:316,title:"Telegram",sub:"unterwegs, gleiche Erinnerung",color:i.sky}];return e.jsxs("svg",{viewBox:"0 0 880 432",role:"img","aria-label":"Landkarte: Du erreichst die Box über vier Türen; in der Box arbeiten Mission Control, der Hermes-Agent, der Modell-Stall, das Gedächtnis und der Wissens-Vault.",style:{width:"100%",height:"auto",fontFamily:"var(--font-sans)"},children:[e.jsx(o,{x:16,y:150,w:120,h:92,color:i.primary,strong:!0,title:"Du",sub:"entscheidest —",sub2:"die Box arbeitet"}),e.jsx(o,{x:16,y:330,w:150,h:68,color:i.emerald,title:"PC-Executor",sub:"baut & startet Lucy",sub2:"nach deiner Annahme"}),n.map(r=>e.jsx(o,{x:196,y:r.y,w:186,h:64,color:r.color,title:r.title,sub:r.sub},r.title)),n.map(r=>e.jsx(j,{from:[136,196],to:[196,r.y+32]},r.title)),e.jsx("rect",{x:420,y:14,width:444,height:404,rx:16,fill:i.bg,stroke:i.border,strokeOpacity:.7}),e.jsx("text",{x:642,y:38,textAnchor:"middle",fill:i.text,fontSize:13,fontWeight:800,letterSpacing:.5,children:"DIE BOX · 192.168.178.151"}),e.jsx(o,{x:444,y:54,w:396,h:62,color:i.teal,title:"Mission Control (:9001)",sub:"Cockpit · Auftragsbuch (Klick-Gate) · Chronik · Wissen"}),e.jsx(o,{x:444,y:126,w:396,h:62,color:i.rose,title:"Hermes-Agent",sub:"denkt, nutzt Werkzeuge, betreibt die Werkstatt & Nacht-Crons"}),e.jsx(o,{x:444,y:198,w:396,h:78,color:i.sky,title:"Modell-Stall (llama-swap)",sub:"Hirn · Groß · Coder · Augen · Späher · Kritiker",sub2:"+ Embedding & Sortierer fürs Gedächtnis"}),e.jsx(o,{x:444,y:286,w:190,h:56,color:i.indigo,title:"Natives Gedächtnis",sub:"Hermes v0.20 SQLite & Embed"}),e.jsx(o,{x:650,y:286,w:190,h:56,color:i.amber,title:"Wissens-Vault",sub:"Träume & Notizen (git)"}),e.jsx(o,{x:444,y:352,w:396,h:52,color:i.emerald,title:"Selbstheilung & Backups",sub:"Health-Checks · Auto-Revert bei Rot · PBS-Sicherung"}),n.map(r=>e.jsx(j,{from:[382,r.y+32],to:[420,r.y+46]},r.title)),e.jsx(j,{from:[420,396],to:[166,364],color:i.emerald,dash:!0}),e.jsx("text",{x:272,y:412,textAnchor:"middle",fill:i.mut,fontSize:9.5,fontStyle:"italic",children:"Lucy-Karte angenommen → PC baut neu"})]})}function O(){const n=[{x:14,color:i.amber,title:"Idee",sub:"von dir oder vom",sub2:"Nacht-Radar"},{x:158,color:i.violet,title:"Ideen-Queue",sub:"Kanban sammelt,",sub2:"Specifier plant"},{x:302,color:i.rose,title:"Werkstatt",sub:"Agent baut den",sub2:"Vorschlag (Branch)"},{x:446,color:i.sky,title:"Auftragsbuch",sub:"Karte + Stempel",sub2:"vom Gutachter"},{x:590,color:i.primary,title:"DEIN Klick",sub:"annehmen oder",sub2:"ablehnen (mit Grund)",strong:!0},{x:734,color:i.emerald,title:"Live",sub:"Merge + Deploy,",sub2:"Rot = Auto-Rückbau"}];return e.jsxs("svg",{viewBox:"0 0 880 246",role:"img","aria-label":"Kreislauf: Idee, Ideen-Queue, Werkstatt, Auftragsbuch, dein Klick, live — Chronik und Morgenlage berichten zurück.",style:{width:"100%",height:"auto",fontFamily:"var(--font-sans)"},children:[n.map(r=>e.jsx(o,{x:r.x,y:38,w:132,h:66,color:r.color,title:r.title,sub:r.sub,sub2:r.sub2,strong:r.strong},r.title)),n.slice(0,-1).map((r,t)=>e.jsx(j,{from:[r.x+132,71],to:[n[t+1].x,71]},r.title)),e.jsxs("g",{stroke:i.border,strokeOpacity:.7,fill:"none",strokeWidth:1.5,strokeDasharray:"5 4",children:[e.jsx("path",{d:"M 800 104 C 800 150, 720 150, 440 150 C 160 150, 80 150, 80 112"}),e.jsx("path",{d:"M 76 118 L 80 108 L 84 118",fill:i.border,fillOpacity:.7,stroke:"none"})]}),e.jsx("text",{x:440,y:144,textAnchor:"middle",fill:i.mut,fontSize:10,fontStyle:"italic",children:"Chronik & Morgenlage berichten · Ablehnungs-Gründe werden Lern-Futter"}),e.jsx("rect",{x:14,y:176,width:852,height:54,rx:12,fill:i.bg,stroke:i.border,strokeOpacity:.5}),e.jsx("text",{x:440,y:198,textAnchor:"middle",fill:i.text,fontSize:11,fontWeight:700,children:"Nachts, ganz allein:"}),e.jsx("text",{x:440,y:216,textAnchor:"middle",fill:i.mut,fontSize:10,children:"03:15 Traum · 03:35 Selbst-Inventur · 03:45 Idle-Radar · 04:00 Karten-Gutachter · 04:10 Bagatellen · 04:30 Morgenlage · Mo 05:15 Release-Radar"})]})}function U(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsx("div",{className:"min-w-[680px]",children:e.jsx(F,{})})}),e.jsx("div",{className:"border-t border-border/20 pt-4 overflow-x-auto",children:e.jsx("div",{className:"min-w-[680px]",children:e.jsx(O,{})})})]})}const S=[{id:"system",label:"Dein System"},{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function Q(n){var r;(r=document.getElementById(n))==null||r.scrollIntoView({behavior:"smooth",block:"start"})}function a({id:n,icon:r,color:t,title:c,kicker:h,children:g,wide:d}){return e.jsxs("section",{id:n,className:f("scroll-mt-20 mc-card p-6 space-y-3",d&&"md:col-span-2"),children:[e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[e.jsx(r,{className:f("h-5 w-5 shrink-0",t)}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:c}),h&&e.jsx("span",{className:f("text-[9px] font-mono",t),children:h})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:g})]})}function m({children:n}){return e.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[e.jsx(B,{className:"h-3 w-3"})," Bei dir konkret"]}),e.jsx("div",{className:"text-muted-foreground space-y-1",children:n})]})}function s({children:n}){return e.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:n})}function l({href:n,name:r,note:t}){return e.jsxs("li",{className:"leading-relaxed",children:[e.jsxs("a",{href:n,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[r,e.jsx(K,{className:"h-3 w-3 opacity-60"})]}),e.jsxs("span",{className:"text-muted-foreground",children:[" — ",t]})]})}function q(){const[n,r]=M.useState(!1);return e.jsxs("div",{className:"space-y-7",children:[e.jsxs("div",{className:"mc-card p-6 flex items-start gap-4",children:[e.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:e.jsx(N,{className:"h-6 w-6 text-primary"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Die AI-Bibel"}),e.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Erst ",e.jsx("span",{className:"font-semibold text-foreground",children:"dein System auf einen Blick"}),", dann das allgemeine Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",e.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juli 2026."})," ",e.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),e.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:e.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(w,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(n?S:S.slice(0,9)).map(t=>e.jsx("button",{onClick:()=>Q(t.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:t.label},t.id)),e.jsx("button",{onClick:()=>r(t=>!t),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:n?"weniger":"+ mehr"})]})})}),e.jsxs("section",{id:"system",className:"scroll-mt-20 mc-card p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[e.jsx(A,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"So funktioniert dein System"}),e.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Landkarte & Kreislauf — das große Bild"})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed max-w-3xl",children:["Vier Türen führen zur selben Box: ",e.jsx("strong",{className:"text-foreground",children:"diese Oberfläche"})," zum Steuern und Abnicken, ",e.jsx("strong",{className:"text-foreground",children:"Lucy"})," für Zurufe per Stimme,",e.jsx("strong",{className:"text-foreground",children:" Hermes Desktop"})," für richtige Projekte und",e.jsx("strong",{className:"text-foreground",children:" Telegram"})," für unterwegs. In der Box denken die Modelle, das Gedächtnis lernt automatisch mit — und nachts arbeitet sie allein: Sie träumt, inventarisiert sich selbst, entwickelt Ideen zu fertigen Vorschlägen und legt sie dir als Karten ins Auftragsbuch.",e.jsx("strong",{className:"text-primary",children:" Nichts geht live ohne deinen Klick"})," — und wenn nach einer Annahme etwas rot wird, baut die Box es selbst zurück."]}),e.jsx(U,{})]}),e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsxs(a,{id:"grundlagen",icon:C,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[e.jsxs("p",{children:["Ein LLM ist im Kern ein ",e.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),e.jsxs("li",{children:[e.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",e.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),e.jsxs(a,{id:"moe",icon:I,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",e.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",e.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),e.jsxs("p",{children:[e.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx(s,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),e.jsxs("li",{children:[e.jsx(s,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),e.jsxs("li",{children:[e.jsx(s,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),e.jsxs(m,{children:["VRAM/RAM ist die harte Grenze — ",e.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",e.jsx(s,{children:"Q4_K_M"}),"/",e.jsx(s,{children:"Q6_K"}),"."]})]}),e.jsxs(a,{id:"lokal",icon:z,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"llama-swap"})," — Proxy, der ",e.jsx("em",{children:"mehrere"})," Modelle hinter ",e.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),e.jsx("ul",{className:"list-disc pl-4 space-y-1",children:e.jsxs("li",{children:[e.jsx(s,{children:"CUDA"})," NVIDIA · ",e.jsx(s,{children:"ROCm"})," AMD · ",e.jsx(s,{children:"Vulkan"})," herstellerübergreifend · ",e.jsx(s,{children:"Metal"})," Apple"]})}),e.jsxs("p",{className:"pt-1",children:[e.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",e.jsx(s,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",e.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),e.jsxs(m,{children:["Deine Box hat eine AMD-APU (gfx1151). ",e.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",e.jsx(s,{children:"Vulkan/RADV"})," das offizielle ",e.jsx(s,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",e.jsx(s,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",e.jsx(s,{children:"coder"})," nutzt Spec-Decoding."]})]}),e.jsxs(a,{id:"modelle",icon:k,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{children:e.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Llama"})," (Meta), ",e.jsx("strong",{children:"Gemma"})," (Google), ",e.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DeepSeek"}),", ",e.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{children:e.jsx("strong",{children:"Frontier (Cloud-API):"})}),e.jsx("ul",{className:"list-disc pl-4 space-y-1",children:e.jsxs("li",{children:[e.jsx("strong",{children:"Claude"})," (Anthropic), ",e.jsx("strong",{children:"GPT"})," (OpenAI), ",e.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),e.jsxs("p",{className:"pt-1",children:[e.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),e.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),e.jsxs(m,{children:["Dein Line-up via llama-swap (Klartext-Rollen): ",e.jsx(s,{children:"Hirn"})," (Agent, dauerwarm) · ",e.jsx(s,{children:"Groß"})," (schwere Logik) · ",e.jsx(s,{children:"Coder"})," · ",e.jsx(s,{children:"Augen"})," (Bilder) · ",e.jsx(s,{children:"Späher"})," (schnelle Recherche) ·",e.jsx(s,{children:"Kritiker"})," (Fremdblick/Review) · ",e.jsx(s,{children:"Gedächtnis"})," + ",e.jsx(s,{children:"Sortierer"})," (Embedding & Reranking). Verwalten/tauschen im ",e.jsx("strong",{children:"Modelle"}),"-Tab."]})]}),e.jsxs(a,{id:"gateway",icon:A,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[e.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",e.jsx("strong",{children:"OpenAI-Format"})," (",e.jsx(s,{children:"/v1/chat/completions"}),"). Ein",e.jsx("strong",{children:" Gateway"})," davor gibt dir ",e.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",e.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),e.jsxs("p",{children:["Die Lane-Idee: du wählst ",e.jsx(s,{children:"chat"})," (Alltag, ",e.jsx(s,{children:"auto"})," geht als Alias weiter) oder"," ",e.jsx(s,{children:"coding"})," (agentisch), das Gateway pickt das passende echte Modell und lädt es bei Bedarf."]}),e.jsxs(m,{children:["Dein Gateway: ",e.jsx(s,{children:"http://192.168.178.151:9001/v1"}),", Model ",e.jsx(s,{children:"chat"})," oder ",e.jsx(s,{children:"coding"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",e.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),e.jsxs(a,{id:"mcp",icon:y,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[e.jsxs("p",{children:["Das ",e.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",e.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),e.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),e.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[e.jsx(P,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),e.jsxs(a,{id:"skills",icon:H,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[e.jsxs("p",{children:["Ein ",e.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",e.jsx(s,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),e.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- + */const H=u("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]),i={text:"hsl(var(--foreground))",mut:"hsl(var(--muted-foreground))",border:"hsl(var(--border))",card:"hsl(var(--card) / 0.9)",bg:"hsl(var(--background) / 0.4)",primary:"hsl(var(--primary))",teal:"#2dd4bf",sky:"#38bdf8",violet:"#a78bfa",rose:"#fb7185",amber:"#fbbf24",emerald:"#34d399",indigo:"#818cf8"};function o({x:n,y:r,w:t,h:c,color:h,title:g,sub:d,sub2:x,strong:p}){const b=n+t/2;return e.jsxs("g",{children:[e.jsx("rect",{x:n,y:r,width:t,height:c,rx:12,fill:i.card,stroke:h,strokeOpacity:p?.9:.45,strokeWidth:p?2:1.25}),e.jsx("rect",{x:n,y:r,width:t,height:3,rx:1.5,fill:h,opacity:.8}),e.jsx("text",{x:b,y:r+(d?24:c/2+4),textAnchor:"middle",fill:i.text,fontSize:12.5,fontWeight:700,children:g}),d&&e.jsx("text",{x:b,y:r+40,textAnchor:"middle",fill:i.mut,fontSize:10,children:d}),x&&e.jsx("text",{x:b,y:r+53,textAnchor:"middle",fill:i.mut,fontSize:10,children:x})]})}function j({from:n,to:r,color:t=i.border,dash:c}){const[h,g]=n,[d,x]=r,p=(h+d)/2;return e.jsxs("g",{stroke:t,strokeOpacity:.7,fill:"none",strokeWidth:1.5,strokeDasharray:c?"5 4":void 0,children:[e.jsx("path",{d:`M ${h} ${g} C ${p} ${g}, ${p} ${x}, ${d} ${x}`}),e.jsx("path",{d:`M ${d-6} ${x-4} L ${d} ${x} L ${d-6} ${x+4}`,fill:t,fillOpacity:.7,stroke:"none"})]})}function F(){const n=[{y:34,title:"Diese Oberfläche",sub:"Browser · Cockpit & Klick-Gates",color:i.teal},{y:128,title:"Lucy",sub:"Stimme & Begleiterin am PC",color:i.rose},{y:222,title:"Hermes Desktop",sub:"IDE für Projekte (PC + remote)",color:i.violet},{y:316,title:"Telegram",sub:"unterwegs, gleiche Erinnerung",color:i.sky}];return e.jsxs("svg",{viewBox:"0 0 880 432",role:"img","aria-label":"Landkarte: Du erreichst die Box über vier Türen; in der Box arbeiten Mission Control, der Hermes-Agent, der Modell-Stall, das Gedächtnis und der Wissens-Vault.",style:{width:"100%",height:"auto",fontFamily:"var(--font-sans)"},children:[e.jsx(o,{x:16,y:150,w:120,h:92,color:i.primary,strong:!0,title:"Du",sub:"entscheidest —",sub2:"die Box arbeitet"}),e.jsx(o,{x:16,y:330,w:150,h:68,color:i.emerald,title:"PC-Executor",sub:"baut & startet Lucy",sub2:"nach deiner Annahme"}),n.map(r=>e.jsx(o,{x:196,y:r.y,w:186,h:64,color:r.color,title:r.title,sub:r.sub},r.title)),n.map(r=>e.jsx(j,{from:[136,196],to:[196,r.y+32]},r.title)),e.jsx("rect",{x:420,y:14,width:444,height:404,rx:16,fill:i.bg,stroke:i.border,strokeOpacity:.7}),e.jsx("text",{x:642,y:38,textAnchor:"middle",fill:i.text,fontSize:13,fontWeight:800,letterSpacing:.5,children:"DIE BOX · 192.168.178.151"}),e.jsx(o,{x:444,y:54,w:396,h:62,color:i.teal,title:"Mission Control (:9001)",sub:"Cockpit · Auftragsbuch (Klick-Gate) · Chronik · Wissen"}),e.jsx(o,{x:444,y:126,w:396,h:62,color:i.rose,title:"Hermes-Agent",sub:"denkt, nutzt Werkzeuge, betreibt die Werkstatt & Nacht-Crons"}),e.jsx(o,{x:444,y:198,w:396,h:78,color:i.sky,title:"Modell-Stall (llama-swap)",sub:"Hirn · Groß · Coder · Augen · Späher · Kritiker",sub2:"+ Embedding & Sortierer fürs Gedächtnis"}),e.jsx(o,{x:444,y:286,w:190,h:56,color:i.indigo,title:"Natives Gedächtnis",sub:"Hermes v0.20 SQLite & Embed"}),e.jsx(o,{x:650,y:286,w:190,h:56,color:i.amber,title:"Wissens-Vault",sub:"Träume & Notizen (git)"}),e.jsx(o,{x:444,y:352,w:396,h:52,color:i.emerald,title:"Selbstheilung & Backups",sub:"Health-Checks · Auto-Revert bei Rot · PBS-Sicherung"}),n.map(r=>e.jsx(j,{from:[382,r.y+32],to:[420,r.y+46]},r.title)),e.jsx(j,{from:[420,396],to:[166,364],color:i.emerald,dash:!0}),e.jsx("text",{x:272,y:412,textAnchor:"middle",fill:i.mut,fontSize:9.5,fontStyle:"italic",children:"Lucy-Karte angenommen → PC baut neu"})]})}function O(){const n=[{x:14,color:i.amber,title:"Idee",sub:"von dir oder vom",sub2:"Nacht-Radar"},{x:158,color:i.violet,title:"Ideen-Queue",sub:"Kanban sammelt,",sub2:"Specifier plant"},{x:302,color:i.rose,title:"Werkstatt",sub:"Agent baut den",sub2:"Vorschlag (Branch)"},{x:446,color:i.sky,title:"Auftragsbuch",sub:"Karte + Stempel",sub2:"vom Gutachter"},{x:590,color:i.primary,title:"DEIN Klick",sub:"annehmen oder",sub2:"ablehnen (mit Grund)",strong:!0},{x:734,color:i.emerald,title:"Live",sub:"Merge + Deploy,",sub2:"Rot = Auto-Rückbau"}];return e.jsxs("svg",{viewBox:"0 0 880 246",role:"img","aria-label":"Kreislauf: Idee, Ideen-Queue, Werkstatt, Auftragsbuch, dein Klick, live — Chronik und Morgenlage berichten zurück.",style:{width:"100%",height:"auto",fontFamily:"var(--font-sans)"},children:[n.map(r=>e.jsx(o,{x:r.x,y:38,w:132,h:66,color:r.color,title:r.title,sub:r.sub,sub2:r.sub2,strong:r.strong},r.title)),n.slice(0,-1).map((r,t)=>e.jsx(j,{from:[r.x+132,71],to:[n[t+1].x,71]},r.title)),e.jsxs("g",{stroke:i.border,strokeOpacity:.7,fill:"none",strokeWidth:1.5,strokeDasharray:"5 4",children:[e.jsx("path",{d:"M 800 104 C 800 150, 720 150, 440 150 C 160 150, 80 150, 80 112"}),e.jsx("path",{d:"M 76 118 L 80 108 L 84 118",fill:i.border,fillOpacity:.7,stroke:"none"})]}),e.jsx("text",{x:440,y:144,textAnchor:"middle",fill:i.mut,fontSize:10,fontStyle:"italic",children:"Chronik & Morgenlage berichten · Ablehnungs-Gründe werden Lern-Futter"}),e.jsx("rect",{x:14,y:176,width:852,height:54,rx:12,fill:i.bg,stroke:i.border,strokeOpacity:.5}),e.jsx("text",{x:440,y:198,textAnchor:"middle",fill:i.text,fontSize:11,fontWeight:700,children:"Nachts, ganz allein:"}),e.jsx("text",{x:440,y:216,textAnchor:"middle",fill:i.mut,fontSize:10,children:"03:15 Traum · 03:35 Selbst-Inventur · 03:45 Idle-Radar · 04:00 Karten-Gutachter · 04:10 Bagatellen · 04:30 Morgenlage · Mo 05:15 Release-Radar"})]})}function U(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsx("div",{className:"min-w-[680px]",children:e.jsx(F,{})})}),e.jsx("div",{className:"border-t border-border/20 pt-4 overflow-x-auto",children:e.jsx("div",{className:"min-w-[680px]",children:e.jsx(O,{})})})]})}const S=[{id:"system",label:"Dein System"},{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function Q(n){var r;(r=document.getElementById(n))==null||r.scrollIntoView({behavior:"smooth",block:"start"})}function a({id:n,icon:r,color:t,title:c,kicker:h,children:g,wide:d}){return e.jsxs("section",{id:n,className:f("scroll-mt-20 mc-card p-6 space-y-3",d&&"md:col-span-2"),children:[e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[e.jsx(r,{className:f("h-5 w-5 shrink-0",t)}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:c}),h&&e.jsx("span",{className:f("text-[9px] font-mono",t),children:h})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:g})]})}function m({children:n}){return e.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[e.jsx(T,{className:"h-3 w-3"})," Bei dir konkret"]}),e.jsx("div",{className:"text-muted-foreground space-y-1",children:n})]})}function s({children:n}){return e.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:n})}function l({href:n,name:r,note:t}){return e.jsxs("li",{className:"leading-relaxed",children:[e.jsxs("a",{href:n,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[r,e.jsx(K,{className:"h-3 w-3 opacity-60"})]}),e.jsxs("span",{className:"text-muted-foreground",children:[" — ",t]})]})}function q(){const[n,r]=M.useState(!1);return e.jsxs("div",{className:"space-y-7",children:[e.jsxs("div",{className:"mc-card p-6 flex items-start gap-4",children:[e.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:e.jsx(N,{className:"h-6 w-6 text-primary"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Die AI-Bibel"}),e.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Erst ",e.jsx("span",{className:"font-semibold text-foreground",children:"dein System auf einen Blick"}),", dann das allgemeine Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",e.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juli 2026."})," ",e.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),e.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:e.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(w,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(n?S:S.slice(0,9)).map(t=>e.jsx("button",{onClick:()=>Q(t.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:t.label},t.id)),e.jsx("button",{onClick:()=>r(t=>!t),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:n?"weniger":"+ mehr"})]})})}),e.jsxs("section",{id:"system",className:"scroll-mt-20 mc-card p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[e.jsx(A,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"So funktioniert dein System"}),e.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Landkarte & Kreislauf — das große Bild"})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed max-w-3xl",children:["Vier Türen führen zur selben Box: ",e.jsx("strong",{className:"text-foreground",children:"diese Oberfläche"})," zum Steuern und Abnicken, ",e.jsx("strong",{className:"text-foreground",children:"Lucy"})," für Zurufe per Stimme,",e.jsx("strong",{className:"text-foreground",children:" Hermes Desktop"})," für richtige Projekte und",e.jsx("strong",{className:"text-foreground",children:" Telegram"})," für unterwegs. In der Box denken die Modelle, das Gedächtnis lernt automatisch mit — und nachts arbeitet sie allein: Sie träumt, inventarisiert sich selbst, entwickelt Ideen zu fertigen Vorschlägen und legt sie dir als Karten ins Auftragsbuch.",e.jsx("strong",{className:"text-primary",children:" Nichts geht live ohne deinen Klick"})," — und wenn nach einer Annahme etwas rot wird, baut die Box es selbst zurück."]}),e.jsx(U,{})]}),e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsxs(a,{id:"grundlagen",icon:C,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[e.jsxs("p",{children:["Ein LLM ist im Kern ein ",e.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),e.jsxs("li",{children:[e.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",e.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),e.jsxs(a,{id:"moe",icon:I,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",e.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",e.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),e.jsxs("p",{children:[e.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx(s,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),e.jsxs("li",{children:[e.jsx(s,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),e.jsxs("li",{children:[e.jsx(s,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),e.jsxs(m,{children:["VRAM/RAM ist die harte Grenze — ",e.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",e.jsx(s,{children:"Q4_K_M"}),"/",e.jsx(s,{children:"Q6_K"}),"."]})]}),e.jsxs(a,{id:"lokal",icon:z,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"llama-swap"})," — Proxy, der ",e.jsx("em",{children:"mehrere"})," Modelle hinter ",e.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),e.jsx("ul",{className:"list-disc pl-4 space-y-1",children:e.jsxs("li",{children:[e.jsx(s,{children:"CUDA"})," NVIDIA · ",e.jsx(s,{children:"ROCm"})," AMD · ",e.jsx(s,{children:"Vulkan"})," herstellerübergreifend · ",e.jsx(s,{children:"Metal"})," Apple"]})}),e.jsxs("p",{className:"pt-1",children:[e.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",e.jsx(s,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",e.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),e.jsxs(m,{children:["Deine Box hat eine AMD-APU (gfx1151). ",e.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",e.jsx(s,{children:"Vulkan/RADV"})," das offizielle ",e.jsx(s,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",e.jsx(s,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",e.jsx(s,{children:"coder"})," nutzt Spec-Decoding."]})]}),e.jsxs(a,{id:"modelle",icon:k,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{children:e.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Llama"})," (Meta), ",e.jsx("strong",{children:"Gemma"})," (Google), ",e.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DeepSeek"}),", ",e.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{children:e.jsx("strong",{children:"Frontier (Cloud-API):"})}),e.jsx("ul",{className:"list-disc pl-4 space-y-1",children:e.jsxs("li",{children:[e.jsx("strong",{children:"Claude"})," (Anthropic), ",e.jsx("strong",{children:"GPT"})," (OpenAI), ",e.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),e.jsxs("p",{className:"pt-1",children:[e.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),e.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),e.jsxs(m,{children:["Dein Line-up via llama-swap (Klartext-Rollen): ",e.jsx(s,{children:"Hirn"})," (Agent, dauerwarm) · ",e.jsx(s,{children:"Groß"})," (schwere Logik) · ",e.jsx(s,{children:"Coder"})," · ",e.jsx(s,{children:"Augen"})," (Bilder) · ",e.jsx(s,{children:"Späher"})," (schnelle Recherche) ·",e.jsx(s,{children:"Kritiker"})," (Fremdblick/Review) · ",e.jsx(s,{children:"Gedächtnis"})," + ",e.jsx(s,{children:"Sortierer"})," (Embedding & Reranking). Verwalten/tauschen im ",e.jsx("strong",{children:"Modelle"}),"-Tab."]})]}),e.jsxs(a,{id:"gateway",icon:A,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[e.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",e.jsx("strong",{children:"OpenAI-Format"})," (",e.jsx(s,{children:"/v1/chat/completions"}),"). Ein",e.jsx("strong",{children:" Gateway"})," davor gibt dir ",e.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",e.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),e.jsxs("p",{children:["Die Lane-Idee: du wählst ",e.jsx(s,{children:"chat"})," (Alltag, ",e.jsx(s,{children:"auto"})," geht als Alias weiter) oder"," ",e.jsx(s,{children:"coding"})," (agentisch), das Gateway pickt das passende echte Modell und lädt es bei Bedarf."]}),e.jsxs(m,{children:["Dein Gateway: ",e.jsx(s,{children:"http://192.168.178.151:9001/v1"}),", Model ",e.jsx(s,{children:"chat"})," oder ",e.jsx(s,{children:"coding"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",e.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),e.jsxs(a,{id:"mcp",icon:y,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[e.jsxs("p",{children:["Das ",e.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",e.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),e.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),e.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[e.jsx(P,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),e.jsxs(a,{id:"skills",icon:H,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[e.jsxs("p",{children:["Ein ",e.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",e.jsx(s,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),e.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- name: tdd-pro description: Treibt Entwicklung mit strikter TDD-Praxis --- # Instructions -...`}),e.jsxs("p",{children:["Suchen & installieren über die ",e.jsx("strong",{children:"skills.sh"}),"-Registry: ",e.jsx(s,{children:"npx skills find"})," /",e.jsx(s,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),e.jsxs(a,{id:"memory",icon:V,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:["LLMs sind ",e.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",e.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:["extrahiert Fakten ",e.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),e.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),e.jsxs("li",{children:[e.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",e.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),e.jsxs(m,{children:["Dein Gedächtnis (Tab ",e.jsx("strong",{children:"Gedächtnis"}),") ist ",e.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",e.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",e.jsx(s,{children:"Identität"})," · ",e.jsx(s,{children:"Wissen"})," · ",e.jsx(s,{children:"Regeln"})," · ",e.jsx(s,{children:"Ereignisse"}),"). Der Agent lernt im Hintergrund nach jedem Turn — egal ob du per Desktop, Konsole, Telegram oder Lucy mit ihm sprichst.",e.jsx("br",{}),e.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),e.jsxs(a,{id:"agents",icon:v,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:["Ein ",e.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",e.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",e.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),e.jsxs(m,{children:[e.jsx("strong",{children:"Hermes"})," ist dein Box-Agent mit eigenem Agent-Hirn (Rolle ",e.jsx(s,{children:"Hirn"}),", dauerwarm). Reden tust du mit ihm über ",e.jsx("strong",{children:"Hermes Desktop"})," (am PC, remote via ",e.jsx(s,{children:"/hermes-ui"}),"), die ",e.jsx("strong",{children:"Konsole"})," (Box-Shell im Browser), ",e.jsx("strong",{children:"Telegram"})," — oder per Stimme über",e.jsx("strong",{children:" Lucy"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und",e.jsx("strong",{children:" PC-Steuerung"})," (Executor auf deinem Windows-PC). Nachts betreibt er Werkstatt & Radar-Crons — alles Gebaute landet als Karte im ",e.jsx("strong",{children:"Auftragsbuch"}),". Status & Verdrahtung im ",e.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),e.jsxs(a,{id:"ide",icon:E,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[e.jsxs("p",{children:["Jede ",e.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Cline"})," & ",e.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Continue"}),", ",e.jsx("strong",{children:"aider"})," (CLI), ",e.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),e.jsxs(m,{children:["Deine Haupt-IDE ist inzwischen ",e.jsx("strong",{children:"Hermes Desktop"})," — sie ist ab Werk mit Box, Gedächtnis und Skills verdrahtet, da ist nichts zu konfigurieren. Für alles andere gilt: Tipp den Kram nicht ab — der",e.jsx("strong",{children:" Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",e.jsx(s,{children:"…:9001/v1"}),", Model ",e.jsx(s,{children:"coder"})," (bauen) / ",e.jsx(s,{children:"heavy"})," (denken) /"," ",e.jsx(s,{children:"vision"})," (Bilder); für simple Chat-Tools tut es die Lane ",e.jsx(s,{children:"chat"}),". Key beliebig."]})]}),e.jsx(a,{id:"tricks",icon:L,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:e.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([t,c])=>e.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[e.jsx(R,{className:"h-3 w-3 text-amber-400"})," ",t]}),e.jsx("p",{className:"text-[11px]",children:c})]},t))})}),e.jsx(a,{id:"wartung",icon:G,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[e.jsx(T,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[e.jsx(D,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Backup:"})," PBS-Backup-Zentrum (Sicherung auf den Proxmox-Server) + tägliche Tarball-Sicherung; Restore echt durchgespielt (",e.jsx(s,{children:"restore.sh"}),", Doku in ",e.jsx(s,{children:"docs/BACKUP.md"}),")."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",e.jsx("strong",{children:"Update-Buttons"})," mit anschließendem ",e.jsx("strong",{children:"Gehirn-Check"})," (rot, falls ein Update das Gedächtnis zerschießt)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Annahme-Sicherheit:"})," jede Auftragsbuch-Annahme läuft mit Health-Check — wird's rot, baut die Box automatisch zurück (Auto-Revert)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),e.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),e.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 mc-card p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[e.jsx(w,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),e.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(k,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),e.jsx(l,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),e.jsx(l,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),e.jsx(l,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),e.jsx(l,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),e.jsx(l,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(y,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),e.jsx(l,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),e.jsx(l,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),e.jsx(l,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),e.jsx(l,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(v,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),e.jsx(l,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),e.jsx(l,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),e.jsx(l,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),e.jsx(l,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(N,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),e.jsx(l,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),e.jsx(l,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),e.jsx(l,{href:"https://hermes-agent.nousresearch.com",name:"Hermes Agent",note:"die autonome Open-Source Agenten-Plattform unserer Box."}),e.jsx(l,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),e.jsx(a,{id:"troubleshooting",icon:W,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:e.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",e.jsx(s,{children:":9001"}),")? Backend-Status im ",e.jsx("strong",{children:"Cockpit"})," prüfen."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," Im ",e.jsx("strong",{children:"Cockpit → Dienste"})," schauen, ob ",e.jsx(s,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session starten (Hermes Desktop oder ",e.jsx("strong",{children:"Konsole"}),") — meist ist es vollgemüllter Kontext."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Angenommene Karte hat etwas zerschossen?"})," Meist fängt es der Auto-Revert; sonst ",e.jsx("strong",{children:"Chronik → Zeitmaschine"})," (Stand von gestern) oder Backup & ",e.jsx(s,{children:"restore.sh"}),"."]})]})})]}),e.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juli 2026 — lebendes Dokument, wächst mit dem Stack."})]})}export{q as GuideView}; +...`}),e.jsxs("p",{children:["Suchen & installieren über die ",e.jsx("strong",{children:"skills.sh"}),"-Registry: ",e.jsx(s,{children:"npx skills find"})," /",e.jsx(s,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),e.jsxs(a,{id:"memory",icon:V,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:["LLMs sind ",e.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",e.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:["extrahiert Fakten ",e.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),e.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),e.jsxs("li",{children:[e.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",e.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),e.jsx(m,{children:"Dein Gedächtnis ist auto-lernend & semantisch: Der Agent lernt im Hintergrund nach jedem Turn — egal ob du per Desktop, Konsole, Telegram oder Lucy mit ihm sprichst."})]}),e.jsxs(a,{id:"agents",icon:v,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:["Ein ",e.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",e.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",e.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),e.jsxs(m,{children:[e.jsx("strong",{children:"Hermes"})," ist dein Box-Agent mit eigenem Agent-Hirn (Rolle ",e.jsx(s,{children:"Hirn"}),", dauerwarm). Reden tust du mit ihm über ",e.jsx("strong",{children:"Hermes Desktop"})," (am PC, remote via ",e.jsx(s,{children:"/hermes-ui"}),"), die ",e.jsx("strong",{children:"Konsole"})," (Box-Shell im Browser), ",e.jsx("strong",{children:"Telegram"})," — oder per Stimme über",e.jsx("strong",{children:" Lucy"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und",e.jsx("strong",{children:" PC-Steuerung"})," (Executor auf deinem Windows-PC). Nachts betreibt er Werkstatt & Radar-Crons — alles Gebaute landet als Karte im ",e.jsx("strong",{children:"Auftragsbuch"}),". Status & Verdrahtung im ",e.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),e.jsxs(a,{id:"ide",icon:E,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[e.jsxs("p",{children:["Jede ",e.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Cline"})," & ",e.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Continue"}),", ",e.jsx("strong",{children:"aider"})," (CLI), ",e.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),e.jsxs(m,{children:["Deine Haupt-IDE ist inzwischen ",e.jsx("strong",{children:"Hermes Desktop"})," — sie ist ab Werk mit Box, Gedächtnis und Skills verdrahtet, da ist nichts zu konfigurieren. Für alles andere gilt: Tipp den Kram nicht ab — der",e.jsx("strong",{children:" Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",e.jsx(s,{children:"…:9001/v1"}),", Model ",e.jsx(s,{children:"coder"})," (bauen) / ",e.jsx(s,{children:"heavy"})," (denken) /"," ",e.jsx(s,{children:"vision"})," (Bilder); für simple Chat-Tools tut es die Lane ",e.jsx(s,{children:"chat"}),". Key beliebig."]})]}),e.jsx(a,{id:"tricks",icon:L,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:e.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([t,c])=>e.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[e.jsx(R,{className:"h-3 w-3 text-amber-400"})," ",t]}),e.jsx("p",{className:"text-[11px]",children:c})]},t))})}),e.jsx(a,{id:"wartung",icon:G,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[e.jsx(D,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[e.jsx(B,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Backup:"})," PBS-Backup-Zentrum (Sicherung auf den Proxmox-Server) + tägliche Tarball-Sicherung; Restore echt durchgespielt (",e.jsx(s,{children:"restore.sh"}),", Doku in ",e.jsx(s,{children:"docs/BACKUP.md"}),")."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",e.jsx("strong",{children:"Update-Buttons"})," mit anschließendem ",e.jsx("strong",{children:"Gehirn-Check"})," (rot, falls ein Update das Gedächtnis zerschießt)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Annahme-Sicherheit:"})," jede Auftragsbuch-Annahme läuft mit Health-Check — wird's rot, baut die Box automatisch zurück (Auto-Revert)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),e.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),e.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 mc-card p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[e.jsx(w,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),e.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(k,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),e.jsx(l,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),e.jsx(l,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),e.jsx(l,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),e.jsx(l,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),e.jsx(l,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(y,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),e.jsx(l,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),e.jsx(l,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),e.jsx(l,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),e.jsx(l,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(v,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),e.jsx(l,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),e.jsx(l,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),e.jsx(l,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),e.jsx(l,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[e.jsx(N,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),e.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[e.jsx(l,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),e.jsx(l,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),e.jsx(l,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),e.jsx(l,{href:"https://hermes-agent.nousresearch.com",name:"Hermes Agent",note:"die autonome Open-Source Agenten-Plattform unserer Box."}),e.jsx(l,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),e.jsx(a,{id:"troubleshooting",icon:W,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:e.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",e.jsx(s,{children:":9001"}),")? Backend-Status im ",e.jsx("strong",{children:"Cockpit"})," prüfen."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," Im ",e.jsx("strong",{children:"Cockpit → Dienste"})," schauen, ob ",e.jsx(s,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session starten (Hermes Desktop oder ",e.jsx("strong",{children:"Konsole"}),") — meist ist es vollgemüllter Kontext."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Angenommene Karte hat etwas zerschossen?"})," Meist fängt es der Auto-Revert; sonst ",e.jsx("strong",{children:"Chronik → Zeitmaschine"})," (Stand von gestern) oder Backup & ",e.jsx(s,{children:"restore.sh"}),"."]})]})})]}),e.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juli 2026 — lebendes Dokument, wächst mit dem Stack."})]})}export{q as GuideView}; diff --git a/frontend/dist/assets/IdeenView-DcsN5ZLB.js b/frontend/dist/assets/IdeenView-DGY-eQxb.js similarity index 99% rename from frontend/dist/assets/IdeenView-DcsN5ZLB.js rename to frontend/dist/assets/IdeenView-DGY-eQxb.js index cdf2d46..4a8c156 100644 --- a/frontend/dist/assets/IdeenView-DcsN5ZLB.js +++ b/frontend/dist/assets/IdeenView-DGY-eQxb.js @@ -1,4 +1,4 @@ -import{c as $,j as e,b as S,a2 as ve,u as Se,k as De,r as d,n as z,a6 as Ke,_ as O,L as D,X as Q,a7 as xe,F as T,a3 as he,C as Ce,T as ze,a4 as Ee,a8 as pe,q as Ae,R as fe}from"./index-CCbyojll.js";import{S as Le,H as X}from"./SectionLabel-BfFwUeZU.js";import{C as ee}from"./code-xml-AZtn6xxf.js";import{L as Pe}from"./layers-Dpl2QlP2.js";import{C as U}from"./chevron-down-SPeGIim5.js";import{R as We}from"./rotate-ccw-DuKtbjZS.js";/** +import{c as $,j as e,b as S,a2 as ve,u as Se,k as De,r as d,n as z,a6 as Ke,_ as O,L as D,X as Q,a7 as xe,F as T,a3 as he,C as Ce,T as ze,a4 as Ee,a8 as pe,q as Ae,R as fe}from"./index-0Xcu6PnS.js";import{S as Le,H as X}from"./SectionLabel-CLJNaK00.js";import{C as ee}from"./code-xml-BeQlEZLv.js";import{L as Pe}from"./layers-D3tFEnOl.js";import{C as U}from"./chevron-down-Bak281TY.js";import{R as We}from"./rotate-ccw-CBM-YWkV.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/JobsBar-Ckecoyqy.js b/frontend/dist/assets/JobsBar-JgL4-cSI.js similarity index 96% rename from frontend/dist/assets/JobsBar-Ckecoyqy.js rename to frontend/dist/assets/JobsBar-JgL4-cSI.js index a6bc3c4..5bb7bab 100644 --- a/frontend/dist/assets/JobsBar-Ckecoyqy.js +++ b/frontend/dist/assets/JobsBar-JgL4-cSI.js @@ -1 +1 @@ -import{u,ah as m,k as x,j as s,y as n,ai as b,b as p,n as f,q as h}from"./index-CCbyojll.js";function y(){const d=u(),{data:t=[]}=m(),{showAlert:l,dialogElement:o}=x();async function i(e){try{await f(`/api/jobs/${e}/cancel`,{method:"POST"}),d.invalidateQueries({queryKey:h.jobs})}catch(c){l("Fehler",c.message)}}const a=t.filter(e=>e.state==="running"||e.state==="queued"),r=t.filter(e=>e.state!=="running"&&e.state!=="queued").slice(-3);return a.length===0&&r.length===0?null:s.jsxs("div",{className:"space-y-3 mc-card p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),a.map(e=>s.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[s.jsxs("div",{className:"flex justify-between items-center text-xs",children:[s.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:e.label}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-muted-foreground font-mono",children:[e.progress??0,"% • ",n(e.done_bytes),"/",n(e.total_bytes),e.eta_s?` • ETA ${b(e.eta_s)}`:""]}),s.jsx("button",{onClick:()=>i(e.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${e.progress??0}%`}})})]},e.id)),r.map(e=>s.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[s.jsx("span",{className:"truncate",children:e.label}),s.jsx("span",{className:p("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",e.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:e.state})]},e.id)),o]})}export{y as J}; +import{u,ah as m,k as x,j as s,y as n,ai as b,b as p,n as f,q as h}from"./index-0Xcu6PnS.js";function y(){const d=u(),{data:t=[]}=m(),{showAlert:l,dialogElement:o}=x();async function i(e){try{await f(`/api/jobs/${e}/cancel`,{method:"POST"}),d.invalidateQueries({queryKey:h.jobs})}catch(c){l("Fehler",c.message)}}const a=t.filter(e=>e.state==="running"||e.state==="queued"),r=t.filter(e=>e.state!=="running"&&e.state!=="queued").slice(-3);return a.length===0&&r.length===0?null:s.jsxs("div",{className:"space-y-3 mc-card p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),a.map(e=>s.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[s.jsxs("div",{className:"flex justify-between items-center text-xs",children:[s.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:e.label}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-muted-foreground font-mono",children:[e.progress??0,"% • ",n(e.done_bytes),"/",n(e.total_bytes),e.eta_s?` • ETA ${b(e.eta_s)}`:""]}),s.jsx("button",{onClick:()=>i(e.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${e.progress??0}%`}})})]},e.id)),r.map(e=>s.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[s.jsx("span",{className:"truncate",children:e.label}),s.jsx("span",{className:p("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",e.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:e.state})]},e.id)),o]})}export{y as J}; diff --git a/frontend/dist/assets/KonsoleView-Bdk_kJ2m.js b/frontend/dist/assets/KonsoleView-DeJwkqSp.js similarity index 98% rename from frontend/dist/assets/KonsoleView-Bdk_kJ2m.js rename to frontend/dist/assets/KonsoleView-DeJwkqSp.js index 81de75f..b14d0c7 100644 --- a/frontend/dist/assets/KonsoleView-Bdk_kJ2m.js +++ b/frontend/dist/assets/KonsoleView-DeJwkqSp.js @@ -1 +1 @@ -import{I as b,u as f,K as h,r as d,j as e,b as c,J as g,T as p,R as j,Q as N,n as v,U as w,q as x}from"./index-CCbyojll.js";function y(){const{data:s}=b(),m=f(),r=s!=null&&s.box_console_url?h(s.box_console_url):void 0,a=s==null?void 0:s.box_console_reachable,[l,o]=d.useState(!1),[i,n]=d.useState("");async function u(){o(!0),n("");try{const t=await v("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:"box-console"})});n(t.ok?"Neu gestartet — einen Moment, dann lädt das Terminal.":`Fehlgeschlagen: ${t.err||"Unbekannter Fehler"}`),w(m,x.agentStatus,x.services)}catch(t){n(`Fehlgeschlagen: ${(t==null?void 0:t.message)||t}`)}finally{o(!1)}}return e.jsxs("div",{className:"flex h-full flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Konsole"}),e.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[e.jsx("span",{className:c("h-2 w-2 rounded-full",a?"bg-emerald-500 animate-pulse":"bg-amber-500")}),a?"online":"offline"]}),r&&e.jsxs("a",{href:r,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[e.jsx(g,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),r?e.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[a===!1&&e.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[e.jsx(p,{className:"h-8 w-8 text-amber-400"}),e.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),e.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der Terminal-Dienst (",e.jsx("code",{className:"font-mono text-primary",children:"box-console"}),") läuft gerade nicht."]}),e.jsxs("button",{onClick:u,disabled:l,className:"flex h-9 items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 text-[11px] font-bold uppercase tracking-wide text-amber-300 transition-all hover:bg-amber-500/20 cursor-pointer disabled:opacity-50",children:[e.jsx(j,{className:c("h-3.5 w-3.5",l&&"animate-spin")})," Dienst neu starten"]}),i&&e.jsx("p",{className:"max-w-sm text-[11px] text-muted-foreground",children:i})]}),e.jsx("iframe",{src:r,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):e.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[e.jsx(N,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}export{y as KonsoleView}; +import{I as b,u as f,K as h,r as d,j as e,b as c,J as g,T as p,R as j,Q as N,n as v,U as w,q as x}from"./index-0Xcu6PnS.js";function y(){const{data:s}=b(),m=f(),r=s!=null&&s.box_console_url?h(s.box_console_url):void 0,a=s==null?void 0:s.box_console_reachable,[l,o]=d.useState(!1),[i,n]=d.useState("");async function u(){o(!0),n("");try{const t=await v("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:"box-console"})});n(t.ok?"Neu gestartet — einen Moment, dann lädt das Terminal.":`Fehlgeschlagen: ${t.err||"Unbekannter Fehler"}`),w(m,x.agentStatus,x.services)}catch(t){n(`Fehlgeschlagen: ${(t==null?void 0:t.message)||t}`)}finally{o(!1)}}return e.jsxs("div",{className:"flex h-full flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Konsole"}),e.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[e.jsx("span",{className:c("h-2 w-2 rounded-full",a?"bg-emerald-500 animate-pulse":"bg-amber-500")}),a?"online":"offline"]}),r&&e.jsxs("a",{href:r,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[e.jsx(g,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),r?e.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[a===!1&&e.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[e.jsx(p,{className:"h-8 w-8 text-amber-400"}),e.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),e.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der Terminal-Dienst (",e.jsx("code",{className:"font-mono text-primary",children:"box-console"}),") läuft gerade nicht."]}),e.jsxs("button",{onClick:u,disabled:l,className:"flex h-9 items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 text-[11px] font-bold uppercase tracking-wide text-amber-300 transition-all hover:bg-amber-500/20 cursor-pointer disabled:opacity-50",children:[e.jsx(j,{className:c("h-3.5 w-3.5",l&&"animate-spin")})," Dienst neu starten"]}),i&&e.jsx("p",{className:"max-w-sm text-[11px] text-muted-foreground",children:i})]}),e.jsx("iframe",{src:r,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):e.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[e.jsx(N,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}export{y as KonsoleView}; diff --git a/frontend/dist/assets/ModelsView-aEV2pe9C.js b/frontend/dist/assets/ModelsView-BEx7Kj-e.js similarity index 99% rename from frontend/dist/assets/ModelsView-aEV2pe9C.js rename to frontend/dist/assets/ModelsView-BEx7Kj-e.js index 520063f..e4d18b9 100644 --- a/frontend/dist/assets/ModelsView-aEV2pe9C.js +++ b/frontend/dist/assets/ModelsView-BEx7Kj-e.js @@ -1,4 +1,4 @@ -import{c as E,u as he,a as qe,r as j,j as e,C as Y,L as Fe,b as k,d as Re,q as V,B as re,e as Ie,E as ze,f as le,g as Be,h as Ae,i as Pe,k as Ge,l as ee,X as me,H as be,T as se,s as Oe,m as Te,n as q,o as U,p as He,S as ge,t as Qe,P as Ue,v as Ve,w as We,x as Ze,y as Je}from"./index-CCbyojll.js";import{J as Xe}from"./JobsBar-Ckecoyqy.js";import{C as Ye}from"./code-xml-AZtn6xxf.js";import{R as et}from"./rotate-ccw-DuKtbjZS.js";import{C as ue,Z as ie,L as tt,a as rt}from"./zap-CRNNnxfs.js";import{C as De}from"./chevron-down-SPeGIim5.js";import{L as st}from"./layers-Dpl2QlP2.js";/** +import{c as E,u as he,a as qe,r as j,j as e,C as Y,L as Fe,b as k,d as Re,q as V,B as re,e as Ie,E as ze,f as le,g as Be,h as Ae,i as Pe,k as Ge,l as ee,X as me,H as be,T as se,s as Oe,m as Te,n as q,o as U,p as He,S as ge,t as Qe,P as Ue,v as Ve,w as We,x as Ze,y as Je}from"./index-0Xcu6PnS.js";import{J as Xe}from"./JobsBar-JgL4-cSI.js";import{C as Ye}from"./code-xml-BeQlEZLv.js";import{R as et}from"./rotate-ccw-CBM-YWkV.js";import{C as ue,Z as ie,L as tt,a as rt}from"./zap-BHzSmHiL.js";import{C as De}from"./chevron-down-Bak281TY.js";import{L as st}from"./layers-D3tFEnOl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/SectionLabel-BfFwUeZU.js b/frontend/dist/assets/SectionLabel-CLJNaK00.js similarity index 93% rename from frontend/dist/assets/SectionLabel-BfFwUeZU.js rename to frontend/dist/assets/SectionLabel-CLJNaK00.js index 7de42bc..3768c51 100644 --- a/frontend/dist/assets/SectionLabel-BfFwUeZU.js +++ b/frontend/dist/assets/SectionLabel-CLJNaK00.js @@ -1,4 +1,4 @@ -import{c as s,j as e}from"./index-CCbyojll.js";/** +import{c as s,j as e}from"./index-0Xcu6PnS.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/SkillsView-C5D9xEVH.js b/frontend/dist/assets/SkillsView-CYYp19Ox.js similarity index 98% rename from frontend/dist/assets/SkillsView-C5D9xEVH.js rename to frontend/dist/assets/SkillsView-CYYp19Ox.js index ccf7c7e..875c1ef 100644 --- a/frontend/dist/assets/SkillsView-C5D9xEVH.js +++ b/frontend/dist/assets/SkillsView-CYYp19Ox.js @@ -1,4 +1,4 @@ -var M=r=>{throw TypeError(r)};var O=(r,e,t)=>e.has(r)||M("Cannot "+t);var a=(r,e,t)=>(O(r,e,"read from private field"),t?t.call(r):e.get(r)),y=(r,e,t)=>e.has(r)?M("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),v=(r,e,t,n)=>(O(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),j=(r,e,t)=>(O(r,e,"access private method"),t);import{a9 as B,aa as F,ab as E,ac as I,ad as P,u as A,r as f,ae as J,af as Q,c as T,ag as U,j as s,G as D,T as H,b as K,L,M as G,q as V,n as R}from"./index-CCbyojll.js";import{J as _}from"./JobsBar-Ckecoyqy.js";var c,g,o,h,m,w,C,q,z=(q=class extends B{constructor(e,t){super();y(this,m);y(this,c);y(this,g);y(this,o);y(this,h);v(this,c,e),this.setOptions(t),this.bindMethods(),j(this,m,w).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var n;const t=this.options;this.options=a(this,c).defaultMutationOptions(e),F(this.options,t)||a(this,c).getMutationCache().notify({type:"observerOptionsUpdated",mutation:a(this,o),observer:this}),t!=null&&t.mutationKey&&this.options.mutationKey&&E(t.mutationKey)!==E(this.options.mutationKey)?this.reset():((n=a(this,o))==null?void 0:n.state.status)==="pending"&&a(this,o).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=a(this,o))==null||e.removeObserver(this)}onMutationUpdate(e){j(this,m,w).call(this),j(this,m,C).call(this,e)}getCurrentResult(){return a(this,g)}reset(){var e;(e=a(this,o))==null||e.removeObserver(this),v(this,o,void 0),j(this,m,w).call(this),j(this,m,C).call(this)}mutate(e,t){var n;return v(this,h,t),(n=a(this,o))==null||n.removeObserver(this),v(this,o,a(this,c).getMutationCache().build(a(this,c),this.options)),a(this,o).addObserver(this),a(this,o).execute(e)}},c=new WeakMap,g=new WeakMap,o=new WeakMap,h=new WeakMap,m=new WeakSet,w=function(){var t;const e=((t=a(this,o))==null?void 0:t.state)??I();v(this,g,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},C=function(e){P.batch(()=>{var t,n,l,x,d,p,k,i;if(a(this,h)&&this.hasListeners()){const u=a(this,g).variables,N=a(this,g).context,S={client:a(this,c),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(n=(t=a(this,h)).onSuccess)==null||n.call(t,e.data,u,N,S)}catch(b){Promise.reject(b)}try{(x=(l=a(this,h)).onSettled)==null||x.call(l,e.data,null,u,N,S)}catch(b){Promise.reject(b)}}else if((e==null?void 0:e.type)==="error"){try{(p=(d=a(this,h)).onError)==null||p.call(d,e.error,u,N,S)}catch(b){Promise.reject(b)}try{(i=(k=a(this,h)).onSettled)==null||i.call(k,void 0,e.error,u,N,S)}catch(b){Promise.reject(b)}}}this.listeners.forEach(u=>{u(a(this,g))})})},q);function W(r,e){const t=A(),[n]=f.useState(()=>new z(t,r));f.useEffect(()=>{n.setOptions(r)},[n,r]);const l=f.useSyncExternalStore(f.useCallback(d=>n.subscribe(P.batchCalls(d)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),x=f.useCallback((d,p)=>{n.mutate(d,p).catch(J)},[n]);if(l.error&&Q(n.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:x,mutateAsync:l.mutate}}/** +var M=r=>{throw TypeError(r)};var O=(r,e,t)=>e.has(r)||M("Cannot "+t);var a=(r,e,t)=>(O(r,e,"read from private field"),t?t.call(r):e.get(r)),y=(r,e,t)=>e.has(r)?M("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),v=(r,e,t,n)=>(O(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),j=(r,e,t)=>(O(r,e,"access private method"),t);import{a9 as B,aa as F,ab as E,ac as I,ad as P,u as A,r as f,ae as J,af as Q,c as T,ag as U,j as s,G as D,T as H,b as K,L,M as G,q as V,n as R}from"./index-0Xcu6PnS.js";import{J as _}from"./JobsBar-JgL4-cSI.js";var c,g,o,h,m,w,C,q,z=(q=class extends B{constructor(e,t){super();y(this,m);y(this,c);y(this,g);y(this,o);y(this,h);v(this,c,e),this.setOptions(t),this.bindMethods(),j(this,m,w).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var n;const t=this.options;this.options=a(this,c).defaultMutationOptions(e),F(this.options,t)||a(this,c).getMutationCache().notify({type:"observerOptionsUpdated",mutation:a(this,o),observer:this}),t!=null&&t.mutationKey&&this.options.mutationKey&&E(t.mutationKey)!==E(this.options.mutationKey)?this.reset():((n=a(this,o))==null?void 0:n.state.status)==="pending"&&a(this,o).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=a(this,o))==null||e.removeObserver(this)}onMutationUpdate(e){j(this,m,w).call(this),j(this,m,C).call(this,e)}getCurrentResult(){return a(this,g)}reset(){var e;(e=a(this,o))==null||e.removeObserver(this),v(this,o,void 0),j(this,m,w).call(this),j(this,m,C).call(this)}mutate(e,t){var n;return v(this,h,t),(n=a(this,o))==null||n.removeObserver(this),v(this,o,a(this,c).getMutationCache().build(a(this,c),this.options)),a(this,o).addObserver(this),a(this,o).execute(e)}},c=new WeakMap,g=new WeakMap,o=new WeakMap,h=new WeakMap,m=new WeakSet,w=function(){var t;const e=((t=a(this,o))==null?void 0:t.state)??I();v(this,g,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},C=function(e){P.batch(()=>{var t,n,l,x,d,p,k,i;if(a(this,h)&&this.hasListeners()){const u=a(this,g).variables,N=a(this,g).context,S={client:a(this,c),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(n=(t=a(this,h)).onSuccess)==null||n.call(t,e.data,u,N,S)}catch(b){Promise.reject(b)}try{(x=(l=a(this,h)).onSettled)==null||x.call(l,e.data,null,u,N,S)}catch(b){Promise.reject(b)}}else if((e==null?void 0:e.type)==="error"){try{(p=(d=a(this,h)).onError)==null||p.call(d,e.error,u,N,S)}catch(b){Promise.reject(b)}try{(i=(k=a(this,h)).onSettled)==null||i.call(k,void 0,e.error,u,N,S)}catch(b){Promise.reject(b)}}}this.listeners.forEach(u=>{u(a(this,g))})})},q);function W(r,e){const t=A(),[n]=f.useState(()=>new z(t,r));f.useEffect(()=>{n.setOptions(r)},[n,r]);const l=f.useSyncExternalStore(f.useCallback(d=>n.subscribe(P.batchCalls(d)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),x=f.useCallback((d,p)=>{n.mutate(d,p).catch(J)},[n]);if(l.error&&Q(n.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:x,mutateAsync:l.mutate}}/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/WissenView-DpReQzIY.js b/frontend/dist/assets/WissenView-IXZy1TUN.js similarity index 99% rename from frontend/dist/assets/WissenView-DpReQzIY.js rename to frontend/dist/assets/WissenView-IXZy1TUN.js index 66010ba..6e36dc3 100644 --- a/frontend/dist/assets/WissenView-DpReQzIY.js +++ b/frontend/dist/assets/WissenView-IXZy1TUN.js @@ -1,4 +1,4 @@ -var to=Object.defineProperty;var eo=(e,n,r)=>n in e?to(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var Bn=(e,n,r)=>eo(e,typeof n!="symbol"?n+"":n,r);import{ao as Ft,r as W,ap as no,aq as Xn,ar as Yn,as as ro,at as io,au as Zn,av as Kn,aw as oo,j as $,R as ao,ax as so,ay as uo,n as lo,b as Ae,L as Ke,S as co,a8 as fo,a0 as ho,az as po}from"./index-CCbyojll.js";import{F as go}from"./folder-open-FZLk16T9.js";function yo(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Qn=180/Math.PI,fn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yr(e,n,r,i,o,a){var s,u,c;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(c=e*r+n*i)&&(r-=e*c,i-=n*c),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,c/=u),e*i180?f+=360:f-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Ft(l,f)})):f&&h.push(o(h)+"rotate("+f+i)}function u(l,f,h,d){l!==f?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Ft(l,f)}):f&&h.push(o(h)+"skewX("+f+i)}function c(l,f,h,d,p,y){if(l!==h||f!==d){var x=p.push(o(p)+"scale(",null,",",null,")");y.push({i:x-4,x:Ft(l,h)},{i:x-2,x:Ft(f,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,f){var h=[],d=[];return l=e(l),f=e(f),a(l.translateX,l.translateY,f.translateX,f.translateY,h,d),s(l.rotate,f.rotate,h,d),u(l.skewX,f.skewX,h,d),c(l.scaleX,l.scaleY,f.scaleX,f.scaleY,h,d),l=f=null,function(p){for(var y=-1,x=d.length,m;++ye.length)&&(n=e.length);for(var r=0,i=new Array(n);rn in e?to(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var Bn=(e,n,r)=>eo(e,typeof n!="symbol"?n+"":n,r);import{ao as Ft,r as W,ap as no,aq as Xn,ar as Yn,as as ro,at as io,au as Zn,av as Kn,aw as oo,j as $,R as ao,ax as so,ay as uo,n as lo,b as Ae,L as Ke,S as co,a8 as fo,a0 as ho,az as po}from"./index-0Xcu6PnS.js";import{F as go}from"./folder-open-DbWikJy5.js";function yo(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Qn=180/Math.PI,fn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yr(e,n,r,i,o,a){var s,u,c;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(c=e*r+n*i)&&(r-=e*c,i-=n*c),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,c/=u),e*i180?f+=360:f-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Ft(l,f)})):f&&h.push(o(h)+"rotate("+f+i)}function u(l,f,h,d){l!==f?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Ft(l,f)}):f&&h.push(o(h)+"skewX("+f+i)}function c(l,f,h,d,p,y){if(l!==h||f!==d){var x=p.push(o(p)+"scale(",null,",",null,")");y.push({i:x-4,x:Ft(l,h)},{i:x-2,x:Ft(f,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,f){var h=[],d=[];return l=e(l),f=e(f),a(l.translateX,l.translateY,f.translateX,f.translateY,h,d),s(l.rotate,f.rotate,h,d),u(l.skewX,f.skewX,h,d),c(l.scaleX,l.scaleY,f.scaleX,f.scaleY,h,d),l=f=null,function(p){for(var y=-1,x=d.length,m;++ye.length)&&(n=e.length);for(var r=0,i=new Array(n);ra,methodNames:i=[],initPropNames:o=[]}={}){return W.forwardRef((a,s)=>{const u=W.useRef(),c=W.useMemo(()=>{const h=Object.fromEntries(o.filter(d=>a.hasOwnProperty(d)).map(d=>[d,a[d]]));return e(h)},[]);er(()=>{c(r(u.current))},W.useLayoutEffect),er(()=>c._destructor instanceof Function?c._destructor:void 0);const l=W.useCallback((h,...d)=>c[h]instanceof Function?c[h](...d):void 0,[c]),f=W.useRef({});return Object.keys(jo(a,[...i,...o])).filter(h=>f.current[h]!==a[h]).forEach(h=>l(h,a[h])),f.current=a,W.useImperativeHandle(s,()=>Object.fromEntries(i.map(h=>[h,(...d)=>l(h,...d)])),[l]),no.createElement(n,{ref:u})})}function er(e,n=W.useEffect){const r=W.useRef(),i=W.useRef(!1),o=W.useRef(!1),[a,s]=W.useState(0);i.current&&(o.current=!0),n(()=>(i.current||(r.current=e(),i.current=!0),s(u=>u+1),()=>{o.current&&(r.current&&r.current(),r.current=void 0,i.current=!1,o.current=!1)}),[])}var dn="http://www.w3.org/1999/xhtml";const nr={svg:"http://www.w3.org/2000/svg",xhtml:dn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function We(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),nr.hasOwnProperty(n)?{space:nr[n],local:e}:e}function Io(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===dn&&n.documentElement.namespaceURI===dn?n.createElement(e):n.createElementNS(r,e)}}function $o(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qr(e){var n=We(e);return(n.local?$o:Io)(n)}function Lo(){}function Tn(e){return e==null?Lo:function(){return this.querySelector(e)}}function Fo(e){typeof e!="function"&&(e=Tn(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o=w&&(w=k+1);!(v=m[w])&&++w=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function fa(e){e||(e=ha);function n(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;an?1:e>=n?0:NaN}function da(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function pa(){return Array.from(this)}function ga(){for(var e=this._groups,n=0,r=e.length;n1?this.each((n==null?Sa:typeof n=="function"?Ta:Ma)(e,n,r??"")):Bt(this.node(),e)}function Bt(e,n){return e.style.getPropertyValue(n)||ri(e).getComputedStyle(e,null).getPropertyValue(n)}function Oa(e){return function(){delete this[e]}}function Ea(e,n){return function(){this[e]=n}}function za(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Na(e,n){return arguments.length>1?this.each((n==null?Oa:typeof n=="function"?za:Ea)(e,n)):this.node()[e]}function ii(e){return e.trim().split(/^|\s+/)}function Pn(e){return e.classList||new oi(e)}function oi(e){this._node=e,this._names=ii(e.getAttribute("class")||"")}oi.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ai(e,n){for(var r=Pn(e),i=-1,o=n.length;++i=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function ss(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r{}};function ve(){for(var e=0,n=arguments.length,r={},i;e=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Se.prototype=ve.prototype={constructor:Se,on:function(e,n){var r=this._,i=_s(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(o),i=0,o,a;i()=>e;function pn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:c,dy:l,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:f}})}pn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function xs(e){return!e.ctrlKey&&!e.button}function bs(){return this.parentNode}function ws(e,n){return n??{x:e.x,y:e.y}}function ks(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cs(){var e=xs,n=bs,r=ws,i=ks,o={},a=ve("start","drag","end"),s=0,u,c,l,f,h=0;function d(_){_.on("mousedown.drag",p).filter(i).on("touchstart.drag",m).on("touchmove.drag",g,ms).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(_,v){if(!(f||!e.call(this,_,v))){var A=w(this,n.call(this,_,v),_,v,"mouse");A&&(pt(_.view).on("mousemove.drag",y,pe).on("mouseup.drag",x,pe),ci(_.view),Qe(_),l=!1,u=_.clientX,c=_.clientY,A("start",_))}}function y(_){if(Vt(_),!l){var v=_.clientX-u,A=_.clientY-c;l=v*v+A*A>h}o.mouse("drag",_)}function x(_){pt(_.view).on("mousemove.drag mouseup.drag",null),fi(_.view,l),Vt(_),o.mouse("end",_)}function m(_,v){if(e.call(this,_,v)){var A=_.changedTouches,M=n.call(this,_,v),T=A.length,R,P;for(R=0;R=0&&e._call.call(void 0,n),e=e._next;--Xt}function ir(){Ht=(Re=ge.now())+Ge,Xt=ae=0;try{Ss()}finally{Xt=0,Ts(),Ht=0}}function Ms(){var e=ge.now(),n=e-Re;n>hi&&(Ge-=n,Re=e)}function Ts(){for(var e,n=Ne,r,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:Ne=r);se=e,gn(i)}function gn(e){if(!Xt){ae&&(ae=clearTimeout(ae));var n=e-Ht;n>24?(e<1/0&&(ae=setTimeout(ir,e-ge.now()-Ge)),Qt&&(Qt=clearInterval(Qt))):(Qt||(Re=ge.now(),Qt=setInterval(Ms,hi)),Xt=1,di(ir))}}function or(e,n,r){var i=new je;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var Ps=ve("start","end","cancel","interrupt"),Os=[],pi=0,ar=1,yn=2,Me=3,sr=4,_n=5,Te=6;function Ve(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Es(e,r,{name:n,index:i,group:o,on:Ps,tween:Os,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:pi})}function zn(e,n){var r=vt(e,n);if(r.state>pi)throw new Error("too late; already scheduled");return r}function Ct(e,n){var r=vt(e,n);if(r.state>Me)throw new Error("too late; already running");return r}function vt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function Es(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=En(a,0,r.time);function a(l){r.state=ar,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var f,h,d,p;if(r.state!==ar)return c();for(f in i)if(p=i[f],p.name===r.name){if(p.state===Me)return or(s);p.state===sr?(p.state=Te,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[f]):+fyn&&i.state<_n,i.state=Te,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function zs(e){return this.each(function(){Pe(this,e)})}function Ns(e,n){var r,i;return function(){var o=Ct(this,e),a=o.tween;if(a!==r){i=r=a;for(var s=0,u=i.length;s=0&&(n=n.slice(0,r)),!n||n==="start"})}function su(e,n,r){var i,o,a=au(n)?zn:Ct;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function uu(e,n){var r=this._id;return arguments.length<2?vt(this.node(),r).on.on(e):this.each(su(r,e,n))}function lu(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function cu(){return this.on("end.remove",lu(this._id))}function fu(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Tn(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s()=>e;function Du(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Et(e,n,r){this.k=e,this.x=n,this.y=r}Et.prototype={constructor:Et,scale:function(e){return e===1?this:new Et(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Et(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Rn=new Et(1,0,0);mt.prototype=Et.prototype;function mt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Rn;return e.__zoom}function Je(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function Iu(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function $u(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ur(){return this.__zoom||Rn}function Lu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Fu(){return navigator.maxTouchPoints||"ontouchstart"in this}function Uu(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function Hu(){var e=Iu,n=$u,r=Uu,i=Lu,o=Fu,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,c=Co,l=ve("start","zoom","end"),f,h,d,p=500,y=150,x=0,m=10;function g(S){S.property("__zoom",ur).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(S,j,E,C){var O=S.selection?S.selection():S;O.property("__zoom",ur),S!==O?v(S,j,E,C):O.interrupt().each(function(){A(this,arguments).event(C).start().zoom(null,typeof j=="function"?j.apply(this,arguments):j).end()})},g.scaleBy=function(S,j,E,C){g.scaleTo(S,function(){var O=this.__zoom.k,I=typeof j=="function"?j.apply(this,arguments):j;return O*I},E,C)},g.scaleTo=function(S,j,E,C){g.transform(S,function(){var O=n.apply(this,arguments),I=this.__zoom,L=E==null?_(O):typeof E=="function"?E.apply(this,arguments):E,H=I.invert(L),F=typeof j=="function"?j.apply(this,arguments):j;return r(w(k(I,F),L,H),O,s)},E,C)},g.translateBy=function(S,j,E,C){g.transform(S,function(){return r(this.__zoom.translate(typeof j=="function"?j.apply(this,arguments):j,typeof E=="function"?E.apply(this,arguments):E),n.apply(this,arguments),s)},null,C)},g.translateTo=function(S,j,E,C,O){g.transform(S,function(){var I=n.apply(this,arguments),L=this.__zoom,H=C==null?_(I):typeof C=="function"?C.apply(this,arguments):C;return r(Rn.translate(H[0],H[1]).scale(L.k).translate(typeof j=="function"?-j.apply(this,arguments):-j,typeof E=="function"?-E.apply(this,arguments):-E),I,s)},C,O)};function k(S,j){return j=Math.max(a[0],Math.min(a[1],j)),j===S.k?S:new Et(j,S.x,S.y)}function w(S,j,E){var C=j[0]-E[0]*S.k,O=j[1]-E[1]*S.k;return C===S.x&&O===S.y?S:new Et(S.k,C,O)}function _(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function v(S,j,E,C){S.on("start.zoom",function(){A(this,arguments).event(C).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(C).end()}).tween("zoom",function(){var O=this,I=arguments,L=A(O,I).event(C),H=n.apply(O,I),F=E==null?_(H):typeof E=="function"?E.apply(O,I):E,G=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),V=O.__zoom,X=typeof j=="function"?j.apply(O,I):j,tt=c(V.invert(F).concat(G/V.k),X.invert(F).concat(G/X.k));return function(Z){if(Z===1)Z=X;else{var st=tt(Z),et=G/st[2];Z=new Et(et,F[0]-st[0]*et,F[1]-st[1]*et)}L.zoom(null,Z)}})}function A(S,j,E){return!E&&S.__zooming||new M(S,j)}function M(S,j){this.that=S,this.args=j,this.active=0,this.sourceEvent=null,this.extent=n.apply(S,j),this.taps=0}M.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,j){return this.mouse&&S!=="mouse"&&(this.mouse[1]=j.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=j.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=j.invert(this.touch1[0])),this.that.__zoom=j,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var j=pt(this.that).datum();l.call(S,this.that,new Du(S,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:l}),j)}};function T(S,...j){if(!e.apply(this,arguments))return;var E=A(this,j).event(S),C=this.__zoom,O=Math.max(a[0],Math.min(a[1],C.k*Math.pow(2,i.apply(this,arguments)))),I=xt(S);if(E.wheel)(E.mouse[0][0]!==I[0]||E.mouse[0][1]!==I[1])&&(E.mouse[1]=C.invert(E.mouse[0]=I)),clearTimeout(E.wheel);else{if(C.k===O)return;E.mouse=[I,C.invert(I)],Pe(this),E.start()}Jt(S),E.wheel=setTimeout(L,y),E.zoom("mouse",r(w(k(C,O),E.mouse[0],E.mouse[1]),E.extent,s));function L(){E.wheel=null,E.end()}}function R(S,...j){if(d||!e.apply(this,arguments))return;var E=S.currentTarget,C=A(this,j,!0).event(S),O=pt(S.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",G,!0),I=xt(S,E),L=S.clientX,H=S.clientY;ci(S.view),Je(S),C.mouse=[I,this.__zoom.invert(I)],Pe(this),C.start();function F(V){if(Jt(V),!C.moved){var X=V.clientX-L,tt=V.clientY-H;C.moved=X*X+tt*tt>x}C.event(V).zoom("mouse",r(w(C.that.__zoom,C.mouse[0]=xt(V,E),C.mouse[1]),C.extent,s))}function G(V){O.on("mousemove.zoom mouseup.zoom",null),fi(V.view,C.moved),Jt(V),C.event(V).end()}}function P(S,...j){if(e.apply(this,arguments)){var E=this.__zoom,C=xt(S.changedTouches?S.changedTouches[0]:S,this),O=E.invert(C),I=E.k*(S.shiftKey?.5:2),L=r(w(k(E,I),C,O),n.apply(this,j),s);Jt(S),u>0?pt(this).transition().duration(u).call(v,L,C,S):pt(this).call(g.transform,L,C,S)}}function N(S,...j){if(e.apply(this,arguments)){var E=S.touches,C=E.length,O=A(this,j,S.changedTouches.length===C).event(S),I,L,H,F;for(Je(S),L=0;L=n||M<0||h&&T>=a}function g(){var A=tn();if(m(A))return k(A);u=setTimeout(g,x(A))}function k(A){return u=void 0,d&&i?p(A):(i=o=void 0,s)}function w(){u!==void 0&&clearTimeout(u),l=0,i=c=o=u=void 0}function _(){return u===void 0?s:k(tn())}function v(){var A=tn(),M=m(A);if(i=arguments,o=this,c=A,M){if(u===void 0)return y(c);if(h)return clearTimeout(u),u=setTimeout(g,n),p(c)}return u===void 0&&(u=setTimeout(g,n)),s}return v.cancel=w,v.flush=_,v}var pl="Expected a function";function gl(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(pl);return Ie(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),xi(e,n,{leading:i,maxWait:n,trailing:o})}var Ut=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Ut.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Ut.Bounce.In(e*2)*.5:Ut.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ue=function(){return performance.now()},bi=(function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n},e.prototype.remove=function(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]},e.prototype.update=function(n,r){n===void 0&&(n=ue()),r===void 0&&(r=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},wi=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),mn=new bi,hr=(function(){function e(n,r){r===void 0&&(r=mn),this._object=n,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Ut.Linear.None,this._interpolationFunction=vn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=wi.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ue()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var u=n[s],c=Array.isArray(u),l=c?"array":typeof u,f=!c&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(f){var h=i[s];if(h.length===0)continue;for(var d=[u],p=0,y=h.length;p"u"||a)&&(r[s]=u),c||(r[s]*=1),f?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(n){return n===void 0&&(n=ue()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this._group&&this._group.remove(this),this)},e.prototype.resume=function(n){return n===void 0&&(n=ue()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;ns)return!1;r&&this.start(n,!0)}if(this._goToEnd=!1,nl)return 1;var m=Math.trunc(u/c),g=u-m*c,k=Math.min(g/i._duration,1);return k===0&&u===i._duration?1:k},h=f(),d=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((u-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,x=this._chainedTweens.length;ye.length)&&(n=e.length);for(var r=0,i=Array(n);r=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return q(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(Rl,arguments)},brighten:function(){return this._applyModification(jl,arguments)},darken:function(){return this._applyModification(Dl,arguments)},desaturate:function(){return this._applyModification(El,arguments)},saturate:function(){return this._applyModification(zl,arguments)},greyscale:function(){return this._applyModification(Nl,arguments)},spin:function(){return this._applyModification(Il,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Fl,arguments)},complement:function(){return this._applyCombination($l,arguments)},monochromatic:function(){return this._applyCombination(Ul,arguments)},splitcomplement:function(){return this._applyCombination(Ll,arguments)},triad:function(){return this._applyCombination(vr,[3])},tetrad:function(){return this._applyCombination(vr,[4])}};q.fromRatio=function(e,n){if($e(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=le(e[i]));e=r}return q(e,n)};function Sl(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,u=!1;return typeof e=="string"&&(e=Vl(e)),$e(e)=="object"&&(Mt(e.r)&&Mt(e.g)&&Mt(e.b)?(n=Ml(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Mt(e.h)&&Mt(e.s)&&Mt(e.v)?(i=le(e.s),o=le(e.v),n=Pl(e.h,i,o),s=!0,u="hsv"):Mt(e.h)&&Mt(e.s)&&Mt(e.l)&&(i=le(e.s),a=le(e.l),n=Tl(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ki(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function Ml(e,n,r){return{r:Q(e,255)*255,g:Q(n,255)*255,b:Q(r,255)*255}}function pr(e,n,r){e=Q(e,255),n=Q(n,255),r=Q(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var c=i-o;switch(s=u>.5?c/(2-i-o):c/(i+o),i){case e:a=(n-r)/c+(n1&&(h-=1),h<1/6?l+(f-l)*6*h:h<1/2?f:h<2/3?l+(f-l)*(2/3-h)*6:l}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,c=2*r-u;i=s(c,u,e+1/3),o=s(c,u,e),a=s(c,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function gr(e,n,r){e=Q(e,255),n=Q(n,255),r=Q(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,c=i-o;if(s=i===0?0:c/i,i==o)a=0;else{switch(i){case e:a=(n-r)/c+(n>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(q(i));return a}function Ul(e,n){n=n||6;for(var r=q(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push(q({h:i,s:o,v:a})),a=(a+u)%1;return s}q.mix=function(e,n,r){r=r===0?0:r||50;var i=q(e).toRgb(),o=q(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return q(s)};q.readability=function(e,n){var r=q(e),i=q(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};q.isReadable=function(e,n,r){var i=q.readability(e,n),o,a;switch(a=!1,o=Bl(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};q.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,c;r=r||{},s=r.includeFallbackColors,u=r.level,c=r.size;for(var l=0;lo&&(o=a,i=q(n[l]));return q.isReadable(e,i,{level:u,size:c})||!s?i:(r.includeFallbackColors=!1,q.mostReadable(e,["#fff","#000"],r))};var xn=q.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Hl=q.hexNames=ql(xn);function ql(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function ki(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Q(e,n){Wl(e)&&(e="100%");var r=Gl(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Be(e){return Math.min(1,Math.max(0,e))}function ct(e){return parseInt(e,16)}function Wl(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Gl(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _t(e){return e.length==1?"0"+e:""+e}function le(e){return e<=1&&(e=e*100+"%"),e}function Ci(e){return Math.round(parseFloat(e)*255).toString(16)}function mr(e){return ct(e)/255}var yt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Mt(e){return!!yt.CSS_UNIT.exec(e)}function Vl(e){e=e.replace(Cl,"").replace(Al,"").toLowerCase();var n=!1;if(xn[e])e=xn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=yt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=yt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=yt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=yt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=yt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=yt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=yt.hex8.exec(e))?{r:ct(r[1]),g:ct(r[2]),b:ct(r[3]),a:mr(r[4]),format:n?"name":"hex8"}:(r=yt.hex6.exec(e))?{r:ct(r[1]),g:ct(r[2]),b:ct(r[3]),format:n?"name":"hex"}:(r=yt.hex4.exec(e))?{r:ct(r[1]+""+r[1]),g:ct(r[2]+""+r[2]),b:ct(r[3]+""+r[3]),a:mr(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=yt.hex3.exec(e))?{r:ct(r[1]+""+r[1]),g:ct(r[2]+""+r[2]),b:ct(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Bl(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function bn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);ri.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelsView-BEx7Kj-e.js","assets/JobsBar-JgL4-cSI.js","assets/code-xml-BeQlEZLv.js","assets/rotate-ccw-CBM-YWkV.js","assets/zap-BHzSmHiL.js","assets/chevron-down-Bak281TY.js","assets/layers-D3tFEnOl.js","assets/ConnectView-CV4093im.js","assets/folder-open-DbWikJy5.js","assets/GuideView-DUanjnT4.js","assets/AuftragsbuchView-DqhMB1_4.js","assets/SectionLabel-CLJNaK00.js","assets/IdeenView-DGY-eQxb.js","assets/SkillsView-CYYp19Ox.js","assets/ChronikView-DeYQ77we.js","assets/WissenView-IXZy1TUN.js"])))=>i.map(i=>d[i]); var KI=Object.defineProperty;var b1=e=>{throw TypeError(e)};var VI=(e,t,r)=>t in e?KI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xs=(e,t,r)=>VI(e,typeof t!="symbol"?t+"":t,r),mm=(e,t,r)=>t.has(e)||b1("Cannot "+r);var $=(e,t,r)=>(mm(e,t,"read from private field"),r?r.call(e):t.get(e)),Ce=(e,t,r)=>t.has(e)?b1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pe=(e,t,r,n)=>(mm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Le=(e,t,r)=>(mm(e,t,"access private method"),r);var Kc=(e,t,r,n)=>({set _(i){pe(e,t,i,r)},get _(){return $(e,t,n)}});function qI(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(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 n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Ty(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vm={exports:{}},bs={},ym={exports:{}},$e={};/** * @license React * react.production.min.js @@ -430,6 +430,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LV(e,t){if(e){if(typeof e=="string")return UE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?UE(e,t):void 0}}function UE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=g.useState("".concat(Zs("recharts"),"-clip")),n=RV(r,1),i=n[0],o=S0();if(o==null)return null;var s=o.x,u=o.y,d=o.width,f=o.height;return g.createElement(BV.Provider,{value:i},g.createElement("defs",null,g.createElement("clipPath",{id:i},g.createElement("rect",{x:s,y:u,height:f,width:d}))),t)};function hj(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function KV(e,t){return hj(e,t+1)}function VV(e,t,r,n,i){for(var o=(n||[]).slice(),s=t.start,u=t.end,d=0,f=1,h=s,m=function(){var k=n==null?void 0:n[d];if(k===void 0)return{v:hj(n,f)};var S=d,E,P=()=>(E===void 0&&(E=r(k,S)),E),O=k.coordinate,j=d===0||hu(e,O,P,h,u);j||(d=0,h=s,f+=1),j&&(h=O+e*(P()/2+i),d+=f)},v;f<=o.length;)if(v=m(),v)return v.v;return[]}function qV(e,t,r,n,i){var o=(n||[]).slice(),s=o.length;if(s===0)return[];for(var u=t.start,d=t.end,f=1;f<=s;f++){for(var h=(s-1)%f,m=u,v=!0,x=function(){var _=n[S];if(_==null)return 0;var N=S,C,D=()=>(C===void 0&&(C=r(_,N)),C),F=_.coordinate,z=S===h||hu(e,F,D,m,d);if(!z)return v=!1,1;z&&(m=F+e*(D()/2+i))},k,S=h;S(S===void 0&&(S=r(x,v)),S);if(v===s-1){var P=e*(k.coordinate+e*E()/2-d);o[v]=k=Qt(Qt({},k),{},{tickCoord:P>0?k.coordinate-P*e:k.coordinate})}else o[v]=k=Qt(Qt({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var O=hu(e,k.tickCoord,E,u,d);O&&(d=k.tickCoord-e*(E()/2+i),o[v]=Qt(Qt({},k),{},{isShow:!0}))}},h=s-1;h>=0;h--)f(h);return o}function ZV(e,t,r,n,i,o){var s=(n||[]).slice(),u=s.length,d=t.start,f=t.end;if(o){var h=n[u-1];if(h!=null){var m=r(h,u-1),v=e*(h.coordinate+e*m/2-f);if(s[u-1]=h=Qt(Qt({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate}),h.tickCoord!=null){var x=hu(e,h.tickCoord,()=>m,d,f);x&&(f=h.tickCoord-e*(m/2+i),s[u-1]=Qt(Qt({},h),{},{isShow:!0}))}}}for(var k=o?u-1:u,S=function(O){var j=s[O];if(j==null)return 1;var _=j,N,C=()=>(N===void 0&&(N=r(j,O)),N);if(O===0){var D=e*(_.coordinate-e*C()/2-d);s[O]=_=Qt(Qt({},_),{},{tickCoord:D<0?_.coordinate-D*e:_.coordinate})}else s[O]=_=Qt(Qt({},_),{},{tickCoord:_.coordinate});if(_.tickCoord!=null){var F=hu(e,_.tickCoord,C,d,f);F&&(d=_.tickCoord+e*(C()/2+i),s[O]=Qt(Qt({},_),{},{isShow:!0}))}},E=0;E{var D=typeof f=="function"?f(N.value,C):N.value;return k==="width"?WV(Ws(D,{fontSize:t,letterSpacing:r}),S,m):Ws(D,{fontSize:t,letterSpacing:r})[k]},P=i[0],O=i[1],j=i.length>=2&&P!=null&&O!=null?Lr(O.coordinate-P.coordinate):1,_=HV(o,j,k);return d==="equidistantPreserveStart"?VV(j,_,E,i,s):d==="equidistantPreserveEnd"?qV(j,_,E,i,s):(d==="preserveStart"||d==="preserveStartEnd"?x=ZV(j,_,E,i,s,d==="preserveStartEnd"):x=XV(j,_,E,i,s),x.filter(N=>N.isShow))}var JV=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,s=o===void 0?0:o,u=e.tickMargin,d=u===void 0?0:u,f=0;if(t){Array.from(t).forEach(x=>{if(x){var k=x.getBoundingClientRect();k.width>f&&(f=k.width)}});var h=r?r.getBoundingClientRect().width:0,m=s+d,v=f+m+h+(r?i:0);return Math.round(v)}return 0},eq={xAxis:{},yAxis:{}},pj=Zt({name:"renderedTicks",initialState:eq,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),mj=pj.actions,tq=mj.setRenderedTicks,rq=mj.removeRenderedTicks,nq=pj.reducer,iq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function HE(e,t){return sq(e)||lq(e,t)||oq(e,t)||aq()}function aq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oq(e,t){if(e){if(typeof e=="string")return KE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?KE(e,t):void 0}}function KE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return kl;var o=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return i(tq({ticks:o,axisId:n,axisType:r})),()=>{i(rq({axisId:n,axisType:r}))}},[i,t,n,r]),null}var bq=g.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,s=e.stroke,u=e.tickFormatter,d=e.unit,f=e.padding,h=e.tickTextProps,m=e.orientation,v=e.mirror,x=e.x,k=e.y,S=e.width,E=e.height,P=e.tickSize,O=e.tickMargin,j=e.fontSize,_=e.letterSpacing,N=e.getTicksConfig,C=e.events,D=e.axisType,F=e.axisId,z=k0(ht(ht({},N),{},{ticks:n}),j,_),q=on(N),X=Rf(i),B=G_(q.textAnchor)?q.textAnchor:vq(m,v),ue=yq(m,v),Y={};typeof o=="object"&&(Y=o);var le=ht(ht({},q),{},{fill:"none"},Y),fe=z.map(ie=>ht({entry:ie},mq(ie,x,k,S,E,m,P,v,O))),de=fe.map(ie=>{var Q=ie.entry,R=ie.line;return g.createElement(Ur,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},o&&g.createElement("line",Qa({},le,R,{className:Qe("recharts-cartesian-axis-tick-line",Za(o,"className"))})))}),K=fe.map((ie,Q)=>{var R,M,J=ie.entry,se=ie.tick,te=ht(ht(ht(ht({verticalAnchor:ue},q),{},{textAnchor:B,stroke:"none",fill:s},se),{},{index:Q,payload:J,visibleTicksCount:z.length,tickFormatter:u,padding:f},h),{},{angle:(R=(M=h==null?void 0:h.angle)!==null&&M!==void 0?M:q.angle)!==null&&R!==void 0?R:0}),ce=ht(ht({},te),X);return g.createElement(Ur,Qa({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},E$(C,J,Q)),i&&g.createElement(gq,{option:i,tickProps:ce,value:"".concat(typeof u=="function"?u(J.value,Q):J.value).concat(d||"")}))});return g.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},g.createElement(xq,{ticks:z,axisId:F,axisType:D}),K.length>0&&g.createElement(di,{zIndex:rr.label},g.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},K)),de.length>0&&g.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},de))}),wq=g.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,s=e.hide,u=e.ticks,d=e.axisType,f=e.axisId,h=uq(e,iq),m=g.useState(""),v=HE(m,2),x=v[0],k=v[1],S=g.useState(""),E=HE(S,2),P=E[0],O=E[1],j=g.useRef(null);g.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var N;return JV({ticks:j.current,label:(N=e.labelRef)===null||N===void 0?void 0:N.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var _=g.useCallback(N=>{if(N){var C=N.getElementsByClassName("recharts-cartesian-axis-tick-value");j.current=C;var D=C[0];if(D){var F=window.getComputedStyle(D),z=F.fontSize,q=F.letterSpacing;(z!==x||q!==P)&&(k(z),O(q))}}},[x,P]);return s||n!=null&&n<=0||i!=null&&i<=0?null:g.createElement(di,{zIndex:e.zIndex},g.createElement(Ur,{className:Qe("recharts-cartesian-axis",o)},g.createElement(pq,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:on(e)}),g.createElement(bq,{ref:_,axisType:d,events:h,fontSize:x,getTicksConfig:e,height:e.height,letterSpacing:P,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),g.createElement(KH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},g.createElement(tK,{label:e.label,labelRef:e.labelRef}),e.children)))}),E0=g.forwardRef((e,t)=>{var r=Hr(e,ei);return g.createElement(wq,Qa({},r,{ref:t}))});E0.displayName="CartesianAxis";var Sq=["x1","y1","x2","y2","key"],kq=["offset"],Eq=["xAxisId","yAxisId"],Pq=["xAxisId","yAxisId"];function qE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,s=e.height,u=e.ry;return g.createElement("rect",{x:n,y:i,ry:u,width:o,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function vj(e){var t=e.option,r=e.lineItemProps,n;if(g.isValidElement(t))n=g.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,s=r.y1,u=r.x2,d=r.y2,f=r.key,h=gf(r,Sq),m=(i=on(h))!==null&&i!==void 0?i:{};m.offset;var v=gf(m,kq);n=g.createElement("line",Ca({},v,{x1:o,y1:s,x2:u,y2:d,fill:"none",key:f}))}return n}function Nq(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=gf(e,Eq),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:t,y1:d,x2:t+r,y2:d,key:"line-".concat(f),index:f});return g.createElement(vj,{key:"line-".concat(f),option:i,lineItemProps:h})});return g.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Iq(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=gf(e,Pq),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:d,y1:t,x2:d,y2:t+r,key:"line-".concat(f),index:f});return g.createElement(vj,{option:i,lineItemProps:h,key:"line-".concat(f)})});return g.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Mq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,s=e.height,u=e.horizontalPoints,d=e.horizontal,f=d===void 0?!0:d;if(!f||!t||!t.length||u==null)return null;var h=u.map(v=>Math.round(v+i-i)).sort((v,x)=>v-x);i!==h[0]&&h.unshift(0);var m=h.map((v,x)=>{var k=h[x+1],S=k==null,E=S?i+s-v:k-v;if(E<=0)return null;var P=x%t.length;return g.createElement("rect",{key:"react-".concat(x),y:v,x:n,height:E,width:o,stroke:"none",fill:t[P],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return g.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Tq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,s=e.y,u=e.width,d=e.height,f=e.verticalPoints;if(!r||!n||!n.length)return null;var h=f.map(v=>Math.round(v+o-o)).sort((v,x)=>v-x);o!==h[0]&&h.unshift(0);var m=h.map((v,x)=>{var k=h[x+1],S=k==null,E=S?o+u-v:k-v;if(E<=0)return null;var P=x%n.length;return g.createElement("rect",{key:"react-".concat(x),x:v,y:s,width:E,height:d,stroke:"none",fill:n[P],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return g.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Dq=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return QO(k0(Xt(Xt(Xt({},ei),r),{},{ticks:XO(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},Rq=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return QO(k0(Xt(Xt(Xt({},ei),r),{},{ticks:XO(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},$q={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:rr.grid};function yj(e){var t=a2(),r=o2(),n=i2(),i=Xt(Xt({},Hr(e,$q)),{},{x:be(e.x)?e.x:n.left,y:be(e.y)?e.y:n.top,width:be(e.width)?e.width:n.width,height:be(e.height)?e.height:n.height}),o=i.xAxisId,s=i.yAxisId,u=i.x,d=i.y,f=i.width,h=i.height,m=i.syncWithTicks,v=i.horizontalValues,x=i.verticalValues,k=gr(),S=ke(z=>Yk(z,"xAxis",o,k)),E=ke(z=>Yk(z,"yAxis",s,k));if(!_n(f)||!_n(h)||!be(u)||!be(d))return null;var P=i.verticalCoordinatesGenerator||Dq,O=i.horizontalCoordinatesGenerator||Rq,j=i.horizontalPoints,_=i.verticalPoints;if((!j||!j.length)&&typeof O=="function"){var N=v&&v.length,C=O({yAxis:E?Xt(Xt({},E),{},{ticks:N?v:E.ticks}):void 0,width:t??f,height:r??h,offset:n},N?!0:m);Wd(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(j=C)}if((!_||!_.length)&&typeof P=="function"){var D=x&&x.length,F=P({xAxis:S?Xt(Xt({},S),{},{ticks:D?x:S.ticks}):void 0,width:t??f,height:r??h,offset:n},D?!0:m);Wd(Array.isArray(F),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof F,"]")),Array.isArray(F)&&(_=F)}return g.createElement(di,{zIndex:i.zIndex},g.createElement("g",{className:"recharts-cartesian-grid"},g.createElement(jq,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),g.createElement(Mq,Ca({},i,{horizontalPoints:j})),g.createElement(Tq,Ca({},i,{verticalPoints:_})),g.createElement(Nq,Ca({},i,{offset:n,horizontalPoints:j,xAxis:S,yAxis:E})),g.createElement(Iq,Ca({},i,{offset:n,verticalPoints:_,xAxis:S,yAxis:E}))))}yj.displayName="CartesianGrid";var Lq={},gj=Zt({name:"errorBars",initialState:Lq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(s=>s.dataKey===i.dataKey&&s.direction===i.direction?o:s))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),P0=gj.actions;P0.addErrorBar;P0.replaceErrorBar;P0.removeErrorBar;var zq=gj.reducer;function xj(e,t){var r,n,i=ke(f=>si(f,e)),o=ke(f=>ui(f,t)),s=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:St.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:kt.allowDataOverflow,d=s||u;return{needClip:d,needClipX:s,needClipY:u}}function Fq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=S0(),o=xj(t,r),s=o.needClipX,u=o.needClipY,d=o.needClip,f=ke(j=>n_(j,t,!1)),h=ke(j=>i_(j,r,!1));if(!d||!i)return null;var m=i.x,v=i.y,x=i.width,k=i.height,S=s&&f?Math.min(f[0],f[1]):m-x/2,E=u&&h?Math.min(h[0],h[1]):v-k/2,P=s&&f?Math.abs(f[1]-f[0]):x*2,O=u&&h?Math.abs(h[1]-h[0]):k*2;return g.createElement("clipPath",{id:"clipPath-".concat(n)},g.createElement("rect",{x:S,y:E,width:P,height:O}))}function Bq(e){var t=Rf(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,s=Number(i),u=Number(o);return(Number.isNaN(s)||s<0)&&(s=r),(Number.isNaN(u)||u<0)&&(u=n),{r:s,strokeWidth:u}}return{r,strokeWidth:n}}function A0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:uj}function O0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:uj}var bj=(e,t,r)=>f_(e,"xAxis",A0(e,t),r),wj=(e,t,r)=>d_(e,"xAxis",A0(e,t),r),Sj=(e,t,r)=>f_(e,"yAxis",O0(e,t),r),kj=(e,t,r)=>d_(e,"yAxis",O0(e,t),r),Uq=H([ot,bj,Sj,wj,kj],(e,t,r,n,i)=>Mn(e,"xAxis")?Ud(t,n,!1):Ud(r,i,!1)),Wq=(e,t)=>t,Ej=H([NC,Wq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),Pj=e=>{var t=ot(e),r=Mn(t,"xAxis");return r?"yAxis":"xAxis"},Hq=(e,t)=>{var r=Pj(e);return r==="yAxis"?O0(e,t):A0(e,t)},Kq=(e,t,r)=>BC(e,Pj(e),Hq(e,t),r),Vq=H([Ej,Kq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=Og(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,s=o==null?void 0:o.find(u=>u.key===i);if(s!=null)return s.map(u=>[u[0],u[1]])}}}),qq=H([ot,bj,Sj,wj,kj,Vq,y6,Uq,Ej,T6],(e,t,r,n,i,o,s,u,d,f)=>{var h=s.chartData,m=s.dataStartIndex,v=s.dataEndIndex;if(!(d==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||u==null)){var x=d.data,k;if(x&&x.length>0?k=x:k=h==null?void 0:h.slice(m,v+1),k!=null)return xG({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:m,areaSettings:d,stackedData:o,displayedData:k,chartBaseValue:f,bandSize:u})}}),Gq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],Yq=["id","baseLine"];function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;tm.y||0));return be(i)?h=Math.max(i,h):i&&Array.isArray(i)&&i.length&&(h=Math.max(...i.map(m=>m.y||0),h)),be(h)?g.createElement("rect",{x:um.x||0));return be(i)?h=Math.max(i,h):i&&Array.isArray(i)&&i.length&&(h=Math.max(...i.map(m=>m.x||0),h)),be(h)?g.createElement("rect",{x:0,y:ue==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[xl(xl({},r.next),{},{x:Yn(r.prev.x,r.next.x,t),y:Yn(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),Oj={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:b0,animationInterpolateFn:lG,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:eG,xAxisId:0,yAxisId:0,zIndex:rr.area};function bf(e,t){return e&&e!=="none"?e:t}var sG=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,s=e.hide;return[{inactive:s,dataKey:t,type:o,color:bf(n,i),value:ZO(r,t),payload:e}]},uG=g.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,s=e.name,u=e.hide,d=e.unit,f=e.tooltipType,h=e.id,m={dataDefinedOnItem:r,getPosition:kl,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:ZO(s,t),hide:u,type:f,color:bf(n,o),unit:d,graphicalItemId:h}};return g.createElement(wK,{tooltipEntrySettings:m})});function cG(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,s=n.dataKey,u=on(n);return g.createElement(cV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:u,needClip:i,clipPathId:t})}function dG(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var s,u,d={x:(s=o.x)!==null&&s!==void 0?s:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return xl(xl({},d),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return g.createElement(oK,{value:t?i:void 0},r)}function fG(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,s=e.animationElapsedTime,u=e.isAnimating,d=e.isEntrance,f=o.layout,h=o.type,m=o.stroke,v=o.connectNulls,x=o.isRange,k=o.shape,S=o.id,E=Aj(o,tG),P=Br(E),O=xl(xl({},P),{},{id:S,points:t,connectNulls:v,type:h,baseLine:r,layout:f,stroke:m,isRange:x,animationElapsedTime:s,isAnimating:u,isEntrance:d});return g.createElement(g.Fragment,null,(t==null?void 0:t.length)>1&&g.createElement(Ur,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},g.createElement(bK,{option:k,DefaultShape:Oj.shape,shapeProps:O})),g.createElement(cG,{points:t,props:E,clipPathId:i}))}function hG(e,t,r){if(be(e)){var n=be(t)?t:void 0;return Yn(n,e,r)}if(Ut(e)||On(e)){var i=be(t)?t:void 0;return Yn(i,0,r)}return e}function pG(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,s=n.points,u=n.baseLine,d=n.isAnimationActive,f=n.animationBegin,h=n.animationDuration,m=n.animationEasing,v=n.animationMatchBy,x=n.animationInterpolateFn,k=g.useMemo(()=>({points:s,baseLine:u}),[s,u]),S=oj(k,o),E=hg(),P=LK(n.onAnimationStart,n.onAnimationEnd),O=P.isAnimating,j=P.handleAnimationStart,_=P.handleAnimationEnd,N=S.startValue;if(E==null)return null;var C;return Array.isArray(u)&&Array.isArray(N)?C=Ey(N,u,v):Array.isArray(u)?C=Ey(null,u,v):C=null,g.createElement(zK,{animationInput:k,animationIdPrefix:"recharts-area-",items:s,previousItemsRef:i,isAnimationActive:d,animationBegin:f,animationDuration:h,animationEasing:m,onAnimationStart:j,onAnimationEnd:_,animationInterpolateFn:x,animationMatchBy:v,layout:E},(D,F,z)=>{var q;return F===1?q=u:Array.isArray(u)?q=x(C,F,E):q=z?u:hG(u,N,F),S.syncStepValue(q,F),g.createElement(dG,{showLabels:!O,points:s},n.children,g.createElement(fG,{points:D,baseLine:q,needClip:t,clipPathId:r,props:n,animationElapsedTime:F,isAnimating:O||F<1,isEntrance:z}),g.createElement(uK,{label:n.label}))})}function mG(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=g.useRef(null),o=g.useRef();return g.createElement(pG,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class vG extends g.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,s=t.top,u=t.left,d=t.needClip,f=t.xAxisId,h=t.yAxisId,m=t.width,v=t.height,x=t.id,k=t.baseLine,S=t.zIndex;if(r)return null;var E=Qe("recharts-area",o),P=x,O=Bq(n),j=O.r,_=O.strokeWidth,N=ij(n),C=j*2+_,D=d?"url(#clipPath-".concat(N?"":"dots-").concat(P,")"):void 0;return g.createElement(di,{zIndex:S},g.createElement(Ur,{className:E},d&&g.createElement("defs",null,g.createElement(Fq,{clipPathId:P,xAxisId:f,yAxisId:h}),!N&&g.createElement("clipPath",{id:"clipPath-dots-".concat(P)},g.createElement("rect",{x:u-C/2,y:s-C/2,width:m+C,height:v+C}))),g.createElement(mG,{needClip:d,clipPathId:P,props:this.props})),g.createElement(FE,{points:i,mainColor:bf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(k)&&g.createElement(FE,{points:k,mainColor:bf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function yG(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,s=e.connectNulls,u=e.dot,d=e.fill,f=e.fillOpacity,h=e.hide,m=e.isAnimationActive,v=e.legendType,x=e.stroke,k=e.xAxisId,S=e.yAxisId,E=Aj(e,rG),P=El(),O=D_(),j=xj(k,S),_=j.needClip,N=gr(),C=(t=ke(le=>qq(le,e.id,N)))!==null&&t!==void 0?t:{},D=C.points,F=C.isRange,z=C.baseLine,q=S0();if(P!=="horizontal"&&P!=="vertical"||q==null||O!=="AreaChart"&&O!=="ComposedChart")return null;var X=q.height,B=q.width,ue=q.x,Y=q.y;return!D||!D.length?null:g.createElement(vG,xf({},E,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:z,connectNulls:s,dot:u,fill:d,fillOpacity:f,height:X,hide:h,layout:P,isAnimationActive:m,isRange:F,legendType:v,needClip:_,points:D,stroke:x,width:B,left:ue,top:Y,xAxisId:k,yAxisId:S}))}var gG=(e,t,r,n,i)=>{var o=r??t;if(be(o))return o;var s=e==="horizontal"?i:n,u=s.scale.domain();if(s.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return o==="dataMin"?f:o==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function xG(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,s=e.layout,u=e.chartBaseValue,d=e.xAxis,f=e.yAxis,h=e.displayedData,m=e.dataStartIndex,v=e.xAxisTicks,x=e.yAxisTicks,k=e.bandSize,S=o&&o.length,E=gG(s,u,n,d,f),P=s==="horizontal",O=!1,j=h.map((N,C)=>{var D,F,z,q;if(S)q=o[m+C];else{var X=Nt(N,i);Array.isArray(X)?(q=X,O=!0):q=[E,X]}var B=(D=(F=q)===null||F===void 0?void 0:F[1])!==null&&D!==void 0?D:null,ue=B==null||S&&!r&&Nt(N,i)==null;if(P){var Y;return{x:Hw({axis:d,ticks:v,bandSize:k,entry:N,index:C}),y:ue?null:(Y=f.scale.map(B))!==null&&Y!==void 0?Y:null,value:q,payload:N}}return{x:ue?null:(z=d.scale.map(B))!==null&&z!==void 0?z:null,y:Hw({axis:f,ticks:x,bandSize:k,entry:N,index:C}),value:q,payload:N}}),_;return S||O?_=j.map(N=>{var C,D=Array.isArray(N.value)?N.value[0]:null;if(P){var F;return{x:N.x,y:D!=null&&N.y!=null&&(F=f.scale.map(D))!==null&&F!==void 0?F:null,payload:N.payload}}return{x:D!=null&&(C=d.scale.map(D))!==null&&C!==void 0?C:null,y:N.y,payload:N.payload}}):_=P?f.scale.map(E):d.scale.map(E),{points:j,baseLine:_??0,isRange:O}}function bG(e){var t=Hr(e,Oj),r=gr();return g.createElement(GK,{id:t.id,type:"area"},n=>g.createElement(g.Fragment,null,g.createElement(SK,{legendPayload:sG(t)}),g.createElement(uG,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),g.createElement(tV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:n4(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),g.createElement(yG,xf({},t,{id:n}))))}var Cj=g.memo(bG,ih);Cj.displayName="Area";var wG=["domain","range"],SG=["domain","range"];function QE(e,t){if(e==null)return{};var r,n,i=kG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(s!=null)return JE(JE({},o),{},{type:s})},[o,s]);return g.useLayoutEffect(()=>{u!=null&&(r.current===null?t(mV(u)):r.current!==u&&t(vV({prev:r.current,next:u})),r.current=u)},[u,t]),g.useLayoutEffect(()=>()=>{r.current&&(t(yV(r.current)),r.current=null)},[t]),null}var IG=e=>{var t=e.xAxisId,r=e.className,n=ke(e2),i=gr(),o="xAxis",s=ke(v=>c_(v,o,t,i)),u=ke(v=>f7(v,t)),d=ke(v=>g7(v,t)),f=ke(v=>OC(v,t));if(u==null||d==null||f==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var h=Ay(e,PG);f.id,f.scale;var m=Ay(f,AG);return g.createElement(E0,Py({},h,m,{x:d.x,y:d.y,width:u.width,height:u.height,className:Qe("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:s,axisType:o,axisId:t}))},MG={allowDataOverflow:St.allowDataOverflow,allowDecimals:St.allowDecimals,allowDuplicatedCategory:St.allowDuplicatedCategory,angle:St.angle,axisLine:ei.axisLine,height:St.height,hide:!1,includeHidden:St.includeHidden,interval:St.interval,label:!1,minTickGap:St.minTickGap,mirror:St.mirror,orientation:St.orientation,padding:St.padding,reversed:St.reversed,scale:St.scale,tick:St.tick,tickCount:St.tickCount,tickLine:ei.tickLine,tickSize:ei.tickSize,type:St.type,niceTicks:St.niceTicks,xAxisId:0},TG=e=>{var t=Hr(e,MG);return g.createElement(g.Fragment,null,g.createElement(NG,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),g.createElement(IG,t))},Oy=g.memo(TG,_j);Oy.displayName="XAxis";var DG=["type"],RG=["dangerouslySetInnerHTML","ticks","scale"],$G=["id","scale"];function Cy(){return Cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(s!=null)return tP(tP({},o),{},{type:s})},[s,o]);return g.useLayoutEffect(()=>{u!=null&&(r.current===null?t(gV(u)):r.current!==u&&t(xV({prev:r.current,next:u})),r.current=u)},[u,t]),g.useLayoutEffect(()=>()=>{r.current&&(t(bV(r.current)),r.current=null)},[t]),null}function WG(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=g.useRef(null),s=g.useRef(null),u=ke(e2),d=gr(),f=xt(),h="yAxis",m=ke(P=>w7(P,t)),v=ke(P=>b7(P,t)),x=ke(P=>c_(P,h,t,d)),k=ke(P=>CC(P,t));if(g.useLayoutEffect(()=>{if(!(n!=="auto"||!m||x0(i)||g.isValidElement(i)||k==null)){var P=o.current;if(P){var O=P.getCalculatedWidth();Math.round(m.width)!==Math.round(O)&&f(wV({id:t,width:O}))}}},[x,m,f,i,t,n,k]),m==null||v==null||k==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var S=_y(e,RG);k.id,k.scale;var E=_y(k,$G);return g.createElement(E0,Cy({},S,E,{ref:o,labelRef:s,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:m.width,height:m.height,className:Qe("recharts-".concat(h," ").concat(h),r),viewBox:u,ticks:x,axisType:h,axisId:t}))}var HG={allowDataOverflow:kt.allowDataOverflow,allowDecimals:kt.allowDecimals,allowDuplicatedCategory:kt.allowDuplicatedCategory,angle:kt.angle,axisLine:ei.axisLine,hide:!1,includeHidden:kt.includeHidden,interval:kt.interval,label:!1,minTickGap:kt.minTickGap,mirror:kt.mirror,orientation:kt.orientation,padding:kt.padding,reversed:kt.reversed,scale:kt.scale,tick:kt.tick,tickCount:kt.tickCount,tickLine:ei.tickLine,tickSize:ei.tickSize,type:kt.type,niceTicks:kt.niceTicks,width:kt.width,yAxisId:0},KG=e=>{var t=Hr(e,HG);return g.createElement(g.Fragment,null,g.createElement(UG,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),g.createElement(WG,t))},jj=g.memo(KG,_j);jj.displayName="YAxis";var VG=(e,t)=>t,C0=H([VG,ot,U2,Mt,__,ci,W9,Ht],Q9);function qG(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function _0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(qG(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var s=(u,d)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((d-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>s(u.clientX,u.clientY)):s(e.clientX,e.clientY)}var Nj=Cr("mouseClick"),Ij=Su();Ij.startListening({actionCreator:Nj,effect:(e,t)=>{var r=e.payload,n=C0(t.getState(),_0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(R7({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var jy=Cr("mouseMove"),Mj=Su(),$o=null,ya=null,uv=null;Mj.startListening({actionCreator:jy,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,s=i.throttledEvents,u=s==="all"||(s==null?void 0:s.includes("mousemove"));$o!==null&&(cancelAnimationFrame($o),$o=null),ya!==null&&(typeof o!="number"||!u)&&(clearTimeout(ya),ya=null),uv=_0(r);var d=()=>{var f=t.getState(),h=Du(f,f.tooltip.settings.shared);if(!uv){$o=null,ya=null;return}if(h==="axis"){var m=C0(f,uv);(m==null?void 0:m.activeIndex)!=null?t.dispatch(x_({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(g_())}$o=null,ya=null};if(!u){d();return}o==="raf"?$o=requestAnimationFrame(d):typeof o=="number"&&ya===null&&(ya=setTimeout(d,o))}});function GG(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var rP={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},Tj=Zt({name:"rootProps",initialState:rP,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:rP.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),YG=Tj.reducer,QG=Tj.actions.updateOptions,XG=null,ZG={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},Dj=Zt({name:"polarOptions",initialState:XG,reducers:ZG});Dj.actions.updatePolarOptions;var JG=Dj.reducer,Rj=Cr("keyDown"),$j=Cr("focus"),Lj=Cr("blur"),Eh=Su(),Lo=null,ga=null,md=null;Eh.startListening({actionCreator:Rj,effect:(e,t)=>{md=e.payload,Lo!==null&&(cancelAnimationFrame(Lo),Lo=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,s=o==="all"||o.includes("keydown");ga!==null&&(typeof i!="number"||!s)&&(clearTimeout(ga),ga=null);var u=()=>{try{var d=t.getState(),f=d.rootProps.accessibilityLayer!==!1;if(!f)return;var h=d.tooltip.keyboardInteraction,m=md;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var v=Us(h,Ya(d),yl(d),gl(d)),x=v==null?-1:Number(v),k=!Number.isFinite(x)||x<0,S=ci(d),E=Ya(d),P=Du(d,d.tooltip.settings.shared);if(m==="Enter"){if(k)return;var O=pf(d,P,"hover",String(h.index));t.dispatch(hf({active:!h.active,activeIndex:h.index,activeCoordinate:O}));return}var j=A7(d),_=j==="left-to-right"?1:-1,N=m==="ArrowRight"?1:-1,C;if(k){var D=yl(d),F=gl(d),z=N*_,q=le=>({active:!1,index:String(le),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,z>0){for(var X=0;X=0;B--)if(Us(q(B),E,D,F)!=null){C=B;break}if(C<0)return}else{C=x+N*_;var ue=(S==null?void 0:S.length)||E.length;if(ue===0||C>=ue||C<0)return}var Y=pf(d,P,"hover",String(C));t.dispatch(hf({active:!0,activeIndex:C.toString(),activeCoordinate:Y}))}finally{Lo=null,ga=null}};if(!s){u();return}i==="raf"?Lo=requestAnimationFrame(u):typeof i=="number"&&ga===null&&(u(),md=null,ga=setTimeout(()=>{md?u():(ga=null,Lo=null)},i))}});Eh.startListening({actionCreator:$j,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",s=Du(r,r.tooltip.settings.shared),u=pf(r,s,"hover",String(o));t.dispatch(hf({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Eh.startListening({actionCreator:Lj,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(hf({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function zj(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Rr=Cr("externalEvent"),Fj=Su(),vd=new Map,Ds=new Map,cv=new Map;Fj.startListening({actionCreator:Rr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,s=zj(i);cv.set(o,{handler:n,reactEvent:s});var u=vd.get(o);u!==void 0&&(cancelAnimationFrame(u),vd.delete(o));var d=t.getState(),f=d.eventSettings,h=f.throttleDelay,m=f.throttledEvents,v=m,x=v==="all"||(v==null?void 0:v.includes(o)),k=Ds.get(o);k!==void 0&&(typeof h!="number"||!x)&&(clearTimeout(k),Ds.delete(o));var S=()=>{var O=cv.get(o);try{if(!O)return;var j=O.handler,_=O.reactEvent,N=t.getState(),C={activeCoordinate:C9(N),activeDataKey:P9(N),activeIndex:du(N),activeLabel:I_(N),activeTooltipIndex:du(N),isTooltipActive:_9(N)};j&&j(C,_)}finally{vd.delete(o),Ds.delete(o),cv.delete(o)}};if(!x){S();return}if(h==="raf"){var E=requestAnimationFrame(S);vd.set(o,E)}else if(typeof h=="number"){if(!Ds.has(o)){S();var P=setTimeout(S,h);Ds.set(o,P)}}else S()}}});var eY=H([Il],e=>e.tooltipItemPayloads),tY=H([eY,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var i=n.getPosition;if(i!=null)return i(t)}}}),Bj=Cr("touchMove"),Uj=Su(),xa=null,Ti=null,nP=null,Rs=null;Uj.startListening({actionCreator:Bj,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Rs=zj(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,s=i.throttledEvents,u=s==="all"||s.includes("touchmove");xa!==null&&(cancelAnimationFrame(xa),xa=null),Ti!==null&&(typeof o!="number"||!u)&&(clearTimeout(Ti),Ti=null),nP=Array.from(r.touches).map(f=>_0({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var d=()=>{if(Rs!=null){var f=t.getState(),h=Du(f,f.tooltip.settings.shared);if(h==="axis"){var m,v=(m=nP)===null||m===void 0?void 0:m[0];if(v==null){xa=null,Ti=null;return}var x=C0(f,v);(x==null?void 0:x.activeIndex)!=null&&t.dispatch(x_({activeIndex:x.activeIndex,activeDataKey:void 0,activeCoordinate:x.activeCoordinate}))}else if(h==="item"){var k,S=Rs.touches[0];if(document.elementFromPoint==null||S==null)return;var E=document.elementFromPoint(S.clientX,S.clientY);if(!E||!E.getAttribute)return;var P=E.getAttribute(c4),O=(k=E.getAttribute(d4))!==null&&k!==void 0?k:void 0,j=to(f).find(C=>C.id===O);if(P==null||j==null||O==null)return;var _=j.dataKey,N=tY(f,P,O);t.dispatch(D7({activeDataKey:_,activeIndex:P,activeCoordinate:N,activeGraphicalItemId:O}))}xa=null,Ti=null}};if(!u){d();return}o==="raf"?xa=requestAnimationFrame(d):typeof o=="number"&&Ti===null&&(d(),Rs=null,Ti=setTimeout(()=>{Rs?d():(Ti=null,xa=null)},o))}}});var Wj={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Hj=Zt({name:"eventSettings",initialState:Wj,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),rY=Hj.actions.setEventSettings,nY=Hj.reducer,iY=wO({brush:NV,cartesianAxis:SV,chartData:OW,errorBars:zq,eventSettings:nY,graphicalItems:JK,layout:GL,legend:sz,options:SW,polarAxis:dK,polarOptions:JG,referenceElements:DV,renderedTicks:nq,rootProps:YG,tooltip:$7,zIndex:uW}),aY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return xL({reducer:iY,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([Ij.middleware,Mj.middleware,Eh.middleware,Fj.middleware,Uj.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(RO({type:"raf"}))},devTools:{serialize:{replacer:GG},name:"recharts-".concat(r)}})};function oY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=gr(),o=g.useRef(null);if(i)return r;o.current==null&&(o.current=aY(t,n));var s=ig;return g.createElement(Ez,{context:s,store:o.current},r)}function lY(e){var t=e.layout,r=e.margin,n=xt(),i=gr();return g.useEffect(()=>{i||(n(KL(t)),n(HL(r)))},[n,i,t,r]),null}var sY=g.memo(lY,ih);function uY(e){var t=xt();return g.useEffect(()=>{t(QG(e))},[t,e]),null}var cY=e=>{var t=xt();return g.useEffect(()=>{t(rY(e))},[t,e]),null},dY=g.memo(cY,ih);function iP(e){var t=e.zIndex,r=e.isPanorama,n=g.useRef(null),i=xt();return g.useLayoutEffect(()=>(n.current&&i(lW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(sW({zIndex:t,isPanorama:r}))}),[i,t,r]),g.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function aP(e){var t=e.children,r=e.isPanorama,n=ke(Z9);if(!n||n.length===0)return t;var i=n.filter(s=>s<0),o=n.filter(s=>s>0);return g.createElement(g.Fragment,null,i.map(s=>g.createElement(iP,{key:s,zIndex:s,isPanorama:r})),t,o.map(s=>g.createElement(iP,{key:s,zIndex:s,isPanorama:r})))}var fY=["children"];function hY(e,t){if(e==null)return{};var r,n,i=pY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=a2(),n=o2(),i=v2();if(!_n(r)||!_n(n))return null;var o=e.children,s=e.otherAttributes,u=e.title,d=e.desc,f,h;return s!=null&&(typeof s.tabIndex=="number"?f=s.tabIndex:f=i?0:void 0,typeof s.role=="string"?h=s.role:h=i?"application":void 0),g.createElement(zA,wf({},s,{title:u,desc:d,role:h,tabIndex:f,width:r,height:n,style:mY,ref:t}),o)}),yY=e=>{var t=e.children,r=ke(Jf);if(!r)return null;var n=r.width,i=r.height,o=r.y,s=r.x;return g.createElement(zA,{width:n,height:i,x:s,y:o},t)},oP=g.forwardRef((e,t)=>{var r=e.children,n=hY(e,fY),i=gr();return i?g.createElement(yY,null,g.createElement(aP,{isPanorama:!0},r)):g.createElement(vY,wf({ref:t},n),g.createElement(aP,{isPanorama:!1},r))});function gY(e,t){return SY(e)||wY(e,t)||bY(e,t)||xY()}function xY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bY(e,t){if(e){if(typeof e=="string")return lP(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lP(e,t):void 0}}function lP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var s=n.getBoundingClientRect(),u=s.width/n.offsetWidth;Fe(u)&&u!==o&&e(qL(u))}},[n,e,o]),i}function sP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EY(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(RW(),null);function kf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var MY=g.forwardRef((e,t)=>{var r,n,i=g.useRef(null),o=g.useState({containerWidth:kf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:kf((n=e.style)===null||n===void 0?void 0:n.height)}),s=Sf(o,2),u=s[0],d=s[1],f=g.useCallback((m,v)=>{d(x=>{var k=Math.round(m),S=Math.round(v);return x.containerWidth===k&&x.containerHeight===S?x:{containerWidth:k,containerHeight:S}})},[]),h=g.useCallback(m=>{if(typeof t=="function"&&t(m),i.current!=null&&(i.current.disconnect(),i.current=null),m!=null&&typeof ResizeObserver<"u"){var v=m.getBoundingClientRect(),x=v.width,k=v.height;f(x,k);var S=P=>{var O=P[0];if(O!=null){var j=O.contentRect,_=j.width,N=j.height;f(_,N)}},E=new ResizeObserver(S);E.observe(m),i.current=E}},[t,f]);return g.useEffect(()=>()=>{var m=i.current;m!=null&&m.disconnect()},[f]),g.createElement(g.Fragment,null,g.createElement(Eu,{width:u.containerWidth,height:u.containerHeight}),g.createElement("div",Zi({ref:h},e)))}),TY=g.forwardRef((e,t)=>{var r=e.width,n=e.height,i=g.useState({containerWidth:kf(r),containerHeight:kf(n)}),o=Sf(i,2),s=o[0],u=o[1],d=g.useCallback((h,m)=>{u(v=>{var x=Math.round(h),k=Math.round(m);return v.containerWidth===x&&v.containerHeight===k?v:{containerWidth:x,containerHeight:k}})},[]),f=g.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var m=h.getBoundingClientRect(),v=m.width,x=m.height;d(v,x)}},[t,d]);return g.createElement(g.Fragment,null,g.createElement(Eu,{width:s.containerWidth,height:s.containerHeight}),g.createElement("div",Zi({ref:f},e)))}),DY=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return g.createElement(g.Fragment,null,g.createElement(Eu,{width:r,height:n}),g.createElement("div",Zi({ref:t},e)))}),RY=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?g.createElement(TY,Zi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?g.createElement(DY,Zi({},e,{width:r,height:n,ref:t})):g.createElement(g.Fragment,null,g.createElement(Eu,{width:r,height:n}),g.createElement("div",Zi({ref:t},e)))});function $Y(e){return e?MY:RY}var LY=g.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,s=e.onContextMenu,u=e.onDoubleClick,d=e.onMouseDown,f=e.onMouseEnter,h=e.onMouseLeave,m=e.onMouseMove,v=e.onMouseUp,x=e.onTouchEnd,k=e.onTouchMove,S=e.onTouchStart,E=e.style,P=e.width,O=e.responsive,j=e.dispatchTouchEvents,_=j===void 0?!0:j,N=g.useRef(null),C=xt(),D=g.useState(null),F=Sf(D,2),z=F[0],q=F[1],X=g.useState(null),B=Sf(X,2),ue=B[0],Y=B[1],le=kY(),fe=dg(),de=(fe==null?void 0:fe.width)>0?fe.width:P,K=(fe==null?void 0:fe.height)>0?fe.height:i,ie=g.useCallback(Ee=>{le(Ee),typeof t=="function"&&t(Ee),q(Ee),Y(Ee),Ee!=null&&(N.current=Ee)},[le,t,q,Y]),Q=g.useCallback(Ee=>{C(Nj(Ee)),C(Rr({handler:o,reactEvent:Ee}))},[C,o]),R=g.useCallback(Ee=>{C(jy(Ee)),C(Rr({handler:f,reactEvent:Ee}))},[C,f]),M=g.useCallback(Ee=>{C(g_()),C(Rr({handler:h,reactEvent:Ee}))},[C,h]),J=g.useCallback(Ee=>{C(jy(Ee)),C(Rr({handler:m,reactEvent:Ee}))},[C,m]),se=g.useCallback(()=>{C($j())},[C]),te=g.useCallback(()=>{C(Lj())},[C]),ce=g.useCallback(Ee=>{C(Rj(Ee.key))},[C]),ye=g.useCallback(Ee=>{C(Rr({handler:s,reactEvent:Ee}))},[C,s]),_e=g.useCallback(Ee=>{C(Rr({handler:u,reactEvent:Ee}))},[C,u]),Z=g.useCallback(Ee=>{C(Rr({handler:d,reactEvent:Ee}))},[C,d]),we=g.useCallback(Ee=>{C(Rr({handler:v,reactEvent:Ee}))},[C,v]),Pe=g.useCallback(Ee=>{C(Rr({handler:S,reactEvent:Ee}))},[C,S]),ne=g.useCallback(Ee=>{_&&C(Bj(Ee)),C(Rr({handler:k,reactEvent:Ee}))},[C,_,k]),lt=g.useCallback(Ee=>{C(Rr({handler:x,reactEvent:Ee}))},[C,x]),Re=$Y(O);return g.createElement(F_.Provider,{value:z},g.createElement(Z3.Provider,{value:ue},g.createElement(Re,{width:de??(E==null?void 0:E.width),height:K??(E==null?void 0:E.height),className:Qe("recharts-wrapper",n),style:EY({position:"relative",cursor:"default",width:de,height:K},E),onClick:Q,onContextMenu:ye,onDoubleClick:_e,onFocus:se,onBlur:te,onKeyDown:ce,onMouseDown:Z,onMouseEnter:R,onMouseLeave:M,onMouseMove:J,onMouseUp:we,onTouchEnd:lt,onTouchMove:ne,onTouchStart:Pe,ref:ie},g.createElement(IY,null),r)))}),zY=["width","height","responsive","children","className","style","compact","title","desc"];function FY(e,t){if(e==null)return{};var r,n,i=BY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,i=e.responsive,o=e.children,s=e.className,u=e.style,d=e.compact,f=e.title,h=e.desc,m=FY(e,zY),v=on(m);return d?g.createElement(g.Fragment,null,g.createElement(Eu,{width:r,height:n}),g.createElement(oP,{otherAttributes:v,title:f,desc:h},o)):g.createElement(LY,{className:s,style:u,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},g.createElement(oP,{otherAttributes:v,title:f,desc:h,ref:t},g.createElement(UV,null,o)))});function Ny(){return Ny=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.createElement(YY,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:QY,tooltipPayloadSearcher:bW,categoricalChartProps:e,ref:t}));const ZY="rgba(130,130,150,0.14)",dv="rgba(130,130,150,0.85)";function JY(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function Kj(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function eQ({active:e,payload:t,unit:r,label:n}){return!e||!(t!=null&&t.length)?null:w.jsxs("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:[Number.isFinite(n)&&w.jsx("div",{className:"mb-1 border-b border-border/40 pb-1 font-mono text-[10px] text-muted-foreground/80",children:new Date(n).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),w.jsx("div",{className:"space-y-1",children:t.map(i=>w.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[w.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),w.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:i.name}),w.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:Kj(i.value,r)})]},i.dataKey))})]})}function Vj({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176,showTime:o=!1}){var h,m;const s=e.reduce((v,x)=>t.reduce((k,S)=>Math.max(k,Number(x[S.key])||0),v),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(s*1.2/25)*25)):Math.max(JY(s*1.15),10),d=e.length>1?Number((h=e[e.length-1])==null?void 0:h.t)-Number((m=e[0])==null?void 0:m.t):0,f=v=>new Date(v).toLocaleTimeString("de-DE",d<=10*6e4?{hour:"2-digit",minute:"2-digit",second:"2-digit"}:{hour:"2-digit",minute:"2-digit"});return w.jsx("div",{style:{height:i},className:"w-full",children:w.jsx(H4,{width:"100%",height:"100%",children:w.jsxs(XY,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[w.jsx("defs",{children:t.map(v=>w.jsxs("linearGradient",{id:`grad-${v.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[w.jsx("stop",{offset:"0%",stopColor:v.color,stopOpacity:.22}),w.jsx("stop",{offset:"100%",stopColor:v.color,stopOpacity:0})]},v.key))}),w.jsx(yj,{vertical:!1,stroke:ZY}),o?w.jsx(Oy,{dataKey:"t",type:"number",domain:["dataMin","dataMax"],tickFormatter:f,tickCount:5,minTickGap:40,interval:"preserveStartEnd",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:dv},height:18}):w.jsx(Oy,{dataKey:"t",hide:!0}),w.jsx(jj,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:v=>Kj(v,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:dv}}),w.jsx(YW,{content:w.jsx(eQ,{unit:r}),cursor:{stroke:dv,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(v=>w.jsx(Cj,{type:"monotone",dataKey:v.key,name:v.label,stroke:v.color,strokeWidth:2,fill:`url(#grad-${v.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},v.key))]})})})}const qj={"1h":60,"24h":1440},dP={live:"Live","1h":"1 h","24h":"24 h"};function Gj({value:e,onChange:t}){return w.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(dP).map(r=>w.jsx("button",{onClick:()=>t(r),className:De("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:dP[r]},r))})}const tQ=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function rQ(){var h,m,v,x;const{sys:e,hist:t}=B3(),[r,n]=g.useState("live"),i=NA(r==="live"?60:qj[r],r!=="live"),o=g.useMemo(()=>{var k;return r==="live"?t:(((k=i.data)==null?void 0:k.points)??[]).map(S=>({t:S.t*1e3,cpu:S.cpu,ram:S.ram,gpu:S.gpu,disk:S.disk}))},[r,t,i.data]),s=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),u=tQ.filter(k=>k.key!=="gpu"||s),d={cpu:(h=e==null?void 0:e.cpu)==null?void 0:h.percent,ram:(m=e==null?void 0:e.ram)==null?void 0:m.percent,gpu:s?e.gpu.busy_percent:null,disk:(v=e==null?void 0:e.disk)==null?void 0:v.percent},f={cpu:(x=e==null?void 0:e.cpu)!=null&&x.cores?`${e.cpu.cores} Cores`:"",ram:e?`${No(e.ram.used)}/${No(e.ram.total)} GB`:"",gpu:s?`${No(e.gpu.gtt_used)}/${No(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${No(e.disk.used)}/${No(e.disk.total)} GB`:""};return w.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[w.jsxs("div",{children:[w.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[w.jsx(FP,{className:"h-4.5 w-4.5 text-primary"}),w.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),r==="live"&&w.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[w.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),w.jsx("div",{className:"ml-auto",children:w.jsx(Gj,{value:r,onChange:n})})]}),e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:u.map(k=>w.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[w.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:k.color}}),w.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:k.label}),w.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(d[k.key]??0),"%"]}),f[k.key]&&w.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:f[k.key]})]},k.key))}),r!=="live"&&o.length===0&&w.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:i.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(r==="live"||o.length>0)&&w.jsx(Vj,{data:o,series:u,unit:"%",yMode:"percent",height:176,showTime:!0})]}):w.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&w.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&w.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&w.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const bl=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],_a=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function nQ(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function Iy(e){return bl.reduce((t,r)=>t+(e[r.key]??0),0)}function iQ(e){let t=null;for(const r of bl){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function aQ({t:e,scale:t}){const r=bl.map(n=>`${n.label} ${_a(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Gedächtnis ${_a(e.mem0_ms)})`:"");return w.jsxs("div",{className:"flex items-center gap-2.5",children:[w.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:nQ(e.ts)}),w.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[w.jsx("div",{className:"absolute inset-0 flex",children:bl.map(n=>{const i=e[n.key];return!i||i<=0?null:w.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&w.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),w.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":_a(Iy(e))})]})}function oQ(){const{data:e}=b3(12),t=e??[],r=Math.max(1,...t.map(o=>Iy(o))),n=t[0],i=n?iQ(n):null;return w.jsxs("div",{className:"mc-card p-5",children:[w.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[w.jsxs("div",{children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(aT,{className:"h-4.5 w-4.5 text-primary"}),w.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),w.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[w.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?w.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[w.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":_a(Iy(n))}),w.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&w.jsxs(w.Fragment,{children:[" · Täter: ",w.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",_a(i.ms)]})]})]}):w.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&w.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[bl.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${_a(n[o.key])}`).join(" · "),n.mem0_ms!=null&&w.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Gedächtnis ",_a(n.mem0_ms)]})]})]}),w.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:bl.map(o=>w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?w.jsx("div",{className:"space-y-1.5",children:t.map(o=>w.jsx(aQ,{t:o,scale:r},o.id))}):w.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),w.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const fP=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function lQ(){const{data:e}=MA(),t=R3(),[r,n]=g.useState("live"),i=NA(r==="live"?60:qj[r],r!=="live"),o=g.useMemo(()=>{var h;if(r==="live")return t;const d=((h=i.data)==null?void 0:h.points)??[],f=[];for(let m=1;mw.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:d.color}}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:d.label}),w.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((s==null?void 0:s[d.key])??0)})]},d.key))})]})]}),r!=="live"&&o.length===0?w.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:i.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}):e?w.jsx(Vj,{data:o,series:fP,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):w.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),w.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}const Ef=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function sQ({onNavigate:e}){var Y,le,fe,de;const{data:t}=IA(),{data:r}=Qy(),{data:n}=TA(),{data:i}=S3(),{data:o}=k3(),{data:s}=y3(),{data:u}=g3(),d=L3(),{showAlert:f,dialogElement:h}=_A(),m=Af(),[v,x]=g.useState({});async function k(K,ie){x(Q=>({...Q,[K]:!0}));try{if(ie.kind==="loadModel")await Te(`/api/models/${encodeURIComponent(ie.model)}/load`,{method:"POST"});else{const Q=await Te("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:ie.service})});Q.ok||f("Reparatur nicht ganz geklappt",(Q.err||"Unbekannter Fehler")+(ie.needsSudo?` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _Y(e,t){if(e){if(typeof e=="string")return uP(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uP(e,t):void 0}}function uP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r(RW(),null);function kf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var MY=g.forwardRef((e,t)=>{var r,n,i=g.useRef(null),o=g.useState({containerWidth:kf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:kf((n=e.style)===null||n===void 0?void 0:n.height)}),s=Sf(o,2),u=s[0],d=s[1],f=g.useCallback((m,v)=>{d(x=>{var k=Math.round(m),S=Math.round(v);return x.containerWidth===k&&x.containerHeight===S?x:{containerWidth:k,containerHeight:S}})},[]),h=g.useCallback(m=>{if(typeof t=="function"&&t(m),i.current!=null&&(i.current.disconnect(),i.current=null),m!=null&&typeof ResizeObserver<"u"){var v=m.getBoundingClientRect(),x=v.width,k=v.height;f(x,k);var S=P=>{var O=P[0];if(O!=null){var j=O.contentRect,_=j.width,N=j.height;f(_,N)}},E=new ResizeObserver(S);E.observe(m),i.current=E}},[t,f]);return g.useEffect(()=>()=>{var m=i.current;m!=null&&m.disconnect()},[f]),g.createElement(g.Fragment,null,g.createElement(Eu,{width:u.containerWidth,height:u.containerHeight}),g.createElement("div",Zi({ref:h},e)))}),TY=g.forwardRef((e,t)=>{var r=e.width,n=e.height,i=g.useState({containerWidth:kf(r),containerHeight:kf(n)}),o=Sf(i,2),s=o[0],u=o[1],d=g.useCallback((h,m)=>{u(v=>{var x=Math.round(h),k=Math.round(m);return v.containerWidth===x&&v.containerHeight===k?v:{containerWidth:x,containerHeight:k}})},[]),f=g.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var m=h.getBoundingClientRect(),v=m.width,x=m.height;d(v,x)}},[t,d]);return g.createElement(g.Fragment,null,g.createElement(Eu,{width:s.containerWidth,height:s.containerHeight}),g.createElement("div",Zi({ref:f},e)))}),DY=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return g.createElement(g.Fragment,null,g.createElement(Eu,{width:r,height:n}),g.createElement("div",Zi({ref:t},e)))}),RY=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?g.createElement(TY,Zi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?g.createElement(DY,Zi({},e,{width:r,height:n,ref:t})):g.createElement(g.Fragment,null,g.createElement(Eu,{width:r,height:n}),g.createElement("div",Zi({ref:t},e)))});function $Y(e){return e?MY:RY}var LY=g.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,s=e.onContextMenu,u=e.onDoubleClick,d=e.onMouseDown,f=e.onMouseEnter,h=e.onMouseLeave,m=e.onMouseMove,v=e.onMouseUp,x=e.onTouchEnd,k=e.onTouchMove,S=e.onTouchStart,E=e.style,P=e.width,O=e.responsive,j=e.dispatchTouchEvents,_=j===void 0?!0:j,N=g.useRef(null),C=xt(),D=g.useState(null),F=Sf(D,2),z=F[0],q=F[1],X=g.useState(null),B=Sf(X,2),ue=B[0],Y=B[1],le=kY(),fe=dg(),de=(fe==null?void 0:fe.width)>0?fe.width:P,K=(fe==null?void 0:fe.height)>0?fe.height:i,ie=g.useCallback(Ee=>{le(Ee),typeof t=="function"&&t(Ee),q(Ee),Y(Ee),Ee!=null&&(N.current=Ee)},[le,t,q,Y]),Q=g.useCallback(Ee=>{C(Nj(Ee)),C(Rr({handler:o,reactEvent:Ee}))},[C,o]),R=g.useCallback(Ee=>{C(jy(Ee)),C(Rr({handler:f,reactEvent:Ee}))},[C,f]),M=g.useCallback(Ee=>{C(g_()),C(Rr({handler:h,reactEvent:Ee}))},[C,h]),J=g.useCallback(Ee=>{C(jy(Ee)),C(Rr({handler:m,reactEvent:Ee}))},[C,m]),se=g.useCallback(()=>{C($j())},[C]),te=g.useCallback(()=>{C(Lj())},[C]),ce=g.useCallback(Ee=>{C(Rj(Ee.key))},[C]),ye=g.useCallback(Ee=>{C(Rr({handler:s,reactEvent:Ee}))},[C,s]),_e=g.useCallback(Ee=>{C(Rr({handler:u,reactEvent:Ee}))},[C,u]),Z=g.useCallback(Ee=>{C(Rr({handler:d,reactEvent:Ee}))},[C,d]),we=g.useCallback(Ee=>{C(Rr({handler:v,reactEvent:Ee}))},[C,v]),Pe=g.useCallback(Ee=>{C(Rr({handler:S,reactEvent:Ee}))},[C,S]),ne=g.useCallback(Ee=>{_&&C(Bj(Ee)),C(Rr({handler:k,reactEvent:Ee}))},[C,_,k]),lt=g.useCallback(Ee=>{C(Rr({handler:x,reactEvent:Ee}))},[C,x]),Re=$Y(O);return g.createElement(F_.Provider,{value:z},g.createElement(Z3.Provider,{value:ue},g.createElement(Re,{width:de??(E==null?void 0:E.width),height:K??(E==null?void 0:E.height),className:Qe("recharts-wrapper",n),style:EY({position:"relative",cursor:"default",width:de,height:K},E),onClick:Q,onContextMenu:ye,onDoubleClick:_e,onFocus:se,onBlur:te,onKeyDown:ce,onMouseDown:Z,onMouseEnter:R,onMouseLeave:M,onMouseMove:J,onMouseUp:we,onTouchEnd:lt,onTouchMove:ne,onTouchStart:Pe,ref:ie},g.createElement(IY,null),r)))}),zY=["width","height","responsive","children","className","style","compact","title","desc"];function FY(e,t){if(e==null)return{};var r,n,i=BY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,i=e.responsive,o=e.children,s=e.className,u=e.style,d=e.compact,f=e.title,h=e.desc,m=FY(e,zY),v=on(m);return d?g.createElement(g.Fragment,null,g.createElement(Eu,{width:r,height:n}),g.createElement(oP,{otherAttributes:v,title:f,desc:h},o)):g.createElement(LY,{className:s,style:u,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},g.createElement(oP,{otherAttributes:v,title:f,desc:h,ref:t},g.createElement(UV,null,o)))});function Ny(){return Ny=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.createElement(YY,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:QY,tooltipPayloadSearcher:bW,categoricalChartProps:e,ref:t}));const ZY="rgba(130,130,150,0.14)",dv="rgba(130,130,150,0.85)";function JY(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function Kj(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function eQ({active:e,payload:t,unit:r,label:n}){return!e||!(t!=null&&t.length)?null:w.jsxs("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:[Number.isFinite(n)&&w.jsx("div",{className:"mb-1 border-b border-border/40 pb-1 font-mono text-[10px] text-muted-foreground/80",children:new Date(n).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),w.jsx("div",{className:"space-y-1",children:t.map(i=>w.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[w.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),w.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:i.name}),w.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:Kj(i.value,r)})]},i.dataKey))})]})}function Vj({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176,showTime:o=!1}){var h,m;const s=e.reduce((v,x)=>t.reduce((k,S)=>Math.max(k,Number(x[S.key])||0),v),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(s*1.2/25)*25)):Math.max(JY(s*1.15),10),d=e.length>1?Number((h=e[e.length-1])==null?void 0:h.t)-Number((m=e[0])==null?void 0:m.t):0,f=v=>new Date(v).toLocaleTimeString("de-DE",d<=10*6e4?{hour:"2-digit",minute:"2-digit",second:"2-digit"}:{hour:"2-digit",minute:"2-digit"});return w.jsx("div",{style:{height:i},className:"w-full",children:w.jsx(H4,{width:"100%",height:"100%",children:w.jsxs(XY,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[w.jsx("defs",{children:t.map(v=>w.jsxs("linearGradient",{id:`grad-${v.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[w.jsx("stop",{offset:"0%",stopColor:v.color,stopOpacity:.22}),w.jsx("stop",{offset:"100%",stopColor:v.color,stopOpacity:0})]},v.key))}),w.jsx(yj,{vertical:!1,stroke:ZY}),o?w.jsx(Oy,{dataKey:"t",type:"number",domain:["dataMin","dataMax"],tickFormatter:f,tickCount:5,minTickGap:40,interval:"preserveStartEnd",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:dv},height:18}):w.jsx(Oy,{dataKey:"t",hide:!0}),w.jsx(jj,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:v=>Kj(v,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:dv}}),w.jsx(YW,{content:w.jsx(eQ,{unit:r}),cursor:{stroke:dv,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(v=>w.jsx(Cj,{type:"monotone",dataKey:v.key,name:v.label,stroke:v.color,strokeWidth:2,fill:`url(#grad-${v.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},v.key))]})})})}const qj={"1h":60,"24h":1440},dP={live:"Live","1h":"1 h","24h":"24 h"};function Gj({value:e,onChange:t}){return w.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(dP).map(r=>w.jsx("button",{onClick:()=>t(r),className:De("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:dP[r]},r))})}const tQ=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function rQ(){var h,m,v,x;const{sys:e,hist:t}=B3(),[r,n]=g.useState("live"),i=NA(r==="live"?60:qj[r],r!=="live"),o=g.useMemo(()=>{var k;return r==="live"?t:(((k=i.data)==null?void 0:k.points)??[]).map(S=>({t:S.t*1e3,cpu:S.cpu,ram:S.ram,gpu:S.gpu,disk:S.disk}))},[r,t,i.data]),s=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),u=tQ.filter(k=>k.key!=="gpu"||s),d={cpu:(h=e==null?void 0:e.cpu)==null?void 0:h.percent,ram:(m=e==null?void 0:e.ram)==null?void 0:m.percent,gpu:s?e.gpu.busy_percent:null,disk:(v=e==null?void 0:e.disk)==null?void 0:v.percent},f={cpu:(x=e==null?void 0:e.cpu)!=null&&x.cores?`${e.cpu.cores} Cores`:"",ram:e?`${No(e.ram.used)}/${No(e.ram.total)} GB`:"",gpu:s?`${No(e.gpu.gtt_used)}/${No(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${No(e.disk.used)}/${No(e.disk.total)} GB`:""};return w.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[w.jsxs("div",{children:[w.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[w.jsx(FP,{className:"h-4.5 w-4.5 text-primary"}),w.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),r==="live"&&w.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[w.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),w.jsx("div",{className:"ml-auto",children:w.jsx(Gj,{value:r,onChange:n})})]}),e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:u.map(k=>w.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[w.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:k.color}}),w.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:k.label}),w.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(d[k.key]??0),"%"]}),f[k.key]&&w.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:f[k.key]})]},k.key))}),r!=="live"&&o.length===0&&w.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:i.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(r==="live"||o.length>0)&&w.jsx(Vj,{data:o,series:u,unit:"%",yMode:"percent",height:176,showTime:!0})]}):w.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&w.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&w.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&w.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const bl=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],_a=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function nQ(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function Iy(e){return bl.reduce((t,r)=>t+(e[r.key]??0),0)}function iQ(e){let t=null;for(const r of bl){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function aQ({t:e,scale:t}){const r=bl.map(n=>`${n.label} ${_a(e[n.key])}`).join(" · ")+(e.memory_ms!=null?` (davon Gedächtnis ${_a(e.memory_ms)})`:"");return w.jsxs("div",{className:"flex items-center gap-2.5",children:[w.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:nQ(e.ts)}),w.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[w.jsx("div",{className:"absolute inset-0 flex",children:bl.map(n=>{const i=e[n.key];return!i||i<=0?null:w.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&w.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),w.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":_a(Iy(e))})]})}function oQ(){const{data:e}=b3(12),t=e??[],r=Math.max(1,...t.map(o=>Iy(o))),n=t[0],i=n?iQ(n):null;return w.jsxs("div",{className:"mc-card p-5",children:[w.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[w.jsxs("div",{children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(aT,{className:"h-4.5 w-4.5 text-primary"}),w.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),w.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[w.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?w.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[w.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":_a(Iy(n))}),w.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&w.jsxs(w.Fragment,{children:[" · Täter: ",w.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",_a(i.ms)]})]})]}):w.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&w.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[bl.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${_a(n[o.key])}`).join(" · "),n.memory_ms!=null&&w.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Gedächtnis ",_a(n.memory_ms)]})]})]}),w.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:bl.map(o=>w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?w.jsx("div",{className:"space-y-1.5",children:t.map(o=>w.jsx(aQ,{t:o,scale:r},o.id))}):w.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),w.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Gedächtnis-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const fP=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function lQ(){const{data:e}=MA(),t=R3(),[r,n]=g.useState("live"),i=NA(r==="live"?60:qj[r],r!=="live"),o=g.useMemo(()=>{var h;if(r==="live")return t;const d=((h=i.data)==null?void 0:h.points)??[],f=[];for(let m=1;mw.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:d.color}}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:d.label}),w.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((s==null?void 0:s[d.key])??0)})]},d.key))})]})]}),r!=="live"&&o.length===0?w.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:i.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}):e?w.jsx(Vj,{data:o,series:fP,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):w.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),w.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}const Ef=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function sQ({onNavigate:e}){var Y,le,fe,de;const{data:t}=IA(),{data:r}=Qy(),{data:n}=TA(),{data:i}=S3(),{data:o}=k3(),{data:s}=y3(),{data:u}=g3(),d=L3(),{showAlert:f,dialogElement:h}=_A(),m=Af(),[v,x]=g.useState({});async function k(K,ie){x(Q=>({...Q,[K]:!0}));try{if(ie.kind==="loadModel")await Te(`/api/models/${encodeURIComponent(ie.model)}/load`,{method:"POST"});else{const Q=await Te("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:ie.service})});Q.ok||f("Reparatur nicht ganz geklappt",(Q.err||"Unbekannter Fehler")+(ie.needsSudo?` -Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}m.invalidateQueries({queryKey:ze.health}),m.invalidateQueries({queryKey:ze.services}),m.invalidateQueries({queryKey:ze.models})}catch(Q){f("Reparatur fehlgeschlagen",String((Q==null?void 0:Q.message)||Q))}finally{x(Q=>({...Q,[K]:!1}))}}const S=((Y=t==null?void 0:t.running)==null?void 0:Y.length)??0,E=(r==null?void 0:r.services.filter(K=>K.ok).length)??0,P=(r==null?void 0:r.services.length)??0,O=P-E,j=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((le=n==null?void 0:n.components)==null?void 0:le.filter(K=>K.update===!0).length)??0),_=s!=null&&s.available?s.open_count:0,N=u!=null&&u.available?u.items.filter(K=>K.status==="blocked").length:0,C=o?[o.gateway,o.memory,o.desktop_gateway]:[],D=C.filter(K=>K==null?void 0:K.ok).length,F=o?o.gateway.ok?o.memory.ok?o.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",z=(fe=t==null?void 0:t.models)==null?void 0:fe.find(K=>K.role==="hermes"),q=z!=null&&z.name?(de=z.name.split("/").pop())==null?void 0:de.replace(/\.gguf$/i,""):"",X=r==null?void 0:r.services.filter(K=>!K.ok).map(K=>K.name).join(", "),B=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],ue=B.length>0?B.join(" + "):"";return w.jsxs("div",{className:"space-y-6",children:[w.jsxs("div",{children:[w.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),w.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[w.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[w.jsx(uQ,{verdict:d.verdict,memory:d.memory,warns:d.warns,problems:d.problems}),w.jsxs("section",{children:[w.jsx(fv,{children:"Leistung"}),w.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:w.jsx(rQ,{})}),w.jsx("div",{className:"mt-4",children:w.jsx(oQ,{})}),w.jsx("div",{className:"mt-4",children:w.jsx(lQ,{})})]}),w.jsxs("section",{children:[w.jsx(fv,{children:"Bereiche"}),w.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[w.jsx(As,{icon:Fy,title:"Auftragsbuch",value:s!=null&&s.available?_:"—",unit:_===1?"Vorschlag":"Vorschläge",tone:s?N>0||_>0?"warn":"ok":"loading",hint:N>0?`${N} Karte${N===1?"":"n"} wartet auf deine Antwort`:_>0?`${_} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),w.jsx(As,{icon:LP,title:"Modelle",value:S,unit:"warm",tone:S>0?"ok":"muted",hint:q?`Hirn: ${q}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),w.jsx(As,{icon:Of,title:"Dienste",value:r?`${E}/${P}`:"…",unit:"laufen",tone:r?O>0?"warn":"ok":"loading",hint:X?`Ausfall: ${X}`:"Alle Dienste online",onClick:()=>Ef("maintenance")}),w.jsx(As,{icon:Wy,title:"Updates",value:n?j>0?j:"0":"…",unit:j>0?"bereit":"aktuell",tone:n?j>0?"warn":"ok":"loading",hint:j>0?`Verfügbar: ${ue}`:"Alles auf dem neuesten Stand",onClick:()=>Ef("maintenance")}),w.jsx(As,{icon:Uy,title:"Verbinden",value:o?`${D}/${C.length}`:"…",unit:"Leitungen",tone:o?D===C.length?"ok":"warn":"loading",hint:F?`Gestört: ${F}`:"Hermes Desktop & IDEs bereit",onClick:()=>e("connect")})]})]})]}),w.jsxs("div",{className:"space-y-6",children:[w.jsx(cQ,{problems:d.problems,pendingCount:j,openAuftraege:_,blockedIdeen:N,busy:v,onRepair:k,onNavigate:e}),w.jsxs("section",{children:[w.jsx(fv,{children:"Werkzeuge & Diagnose"}),w.jsx(dQ,{agent:i,svcErrors:O,onNavigate:e})]})]})]}),h]})}function fv({children:e}){return w.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function uQ({verdict:e,memory:t,warns:r,problems:n}){const i=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:t.status==="full"?t.text:"Nichts Schlimmes — nur ein Hinweis.",o=n.length?`${n[0].label}: ${n[0].detail}${n.length>1?` (+${n.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",s={loading:{ring:"border-border/60 bg-card/45",icon:By,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:sT,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Ys,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:i},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Ys,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:o}}[e],u=s.icon,d={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],f={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return w.jsxs("div",{className:De("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",s.ring),children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:w.jsx(u,{className:De("h-6 w-6",s.iconCls)})}),w.jsxs("div",{className:"min-w-0",children:[w.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:s.title}),w.jsx("p",{className:"text-xs text-muted-foreground",children:s.sub})]})]}),w.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[w.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[w.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[w.jsx(lT,{className:"h-3.5 w-3.5"})," Speicher"]}),w.jsx("span",{className:De("font-mono font-bold",d),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(1)} / ${t.totalGb.toFixed(1)} GB`})]}),w.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:w.jsx("div",{className:De("h-full rounded-full transition-all duration-500",f),style:{width:`${t.pct}%`}})})]})]})}function cQ({problems:e,pendingCount:t,openAuftraege:r,blockedIdeen:n,busy:i,onRepair:o,onNavigate:s}){const u=t>0,d=r>0,f=n>0,h=e.length===0&&!u&&!d&&!f;return w.jsx("div",{className:"h-full flex flex-col justify-between",children:h?w.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[w.jsx(XM,{className:"h-5 w-5 shrink-0 text-emerald-400"}),w.jsxs("div",{children:[w.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):w.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(m=>w.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[w.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:w.jsx(m.icon,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{className:"min-w-0 flex-1",children:[w.jsx("p",{className:"text-sm font-bold text-foreground",children:m.label}),w.jsx("p",{className:"truncate text-xs text-muted-foreground",children:m.detail})]})]}),m.repair&&w.jsxs("button",{onClick:()=>m.repair&&o(m.id,m.repair),disabled:!!i[m.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[i[m.id]?w.jsx(By,{className:"h-3.5 w-3.5 animate-spin"}):w.jsx(kT,{className:"h-3.5 w-3.5"}),m.repair.label]})]},m.id)),f&&w.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-red-500/30 bg-red-500/5 p-4 text-left transition-all hover:bg-red-500/10 cursor-pointer",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:w.jsx(zP,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{children:[w.jsxs("p",{className:"text-sm font-bold text-foreground",children:[n," Karte",n===1?"":"n"," braucht deine Antwort"]}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),w.jsx(Bs,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),d&&w.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:w.jsx(Fy,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{children:[w.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),w.jsx(Bs,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),u&&w.jsxs("button",{onClick:()=>Ef("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:w.jsx(Wy,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{children:[w.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),w.jsx(Bs,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function dQ({agent:e,svcErrors:t,onNavigate:r}){const n=[{label:"Hermes Agent",status:e?e.gateway_reachable?"Bereit":"Offline":"…",tone:e?e.gateway_reachable?"ok":"alert":"loading",action:()=>r("agent")},{label:"Konsole (Box-Shell)",status:e?e.box_console_reachable?"Bereit":"Offline":"…",tone:e?e.box_console_reachable?"ok":"warn":"loading",action:()=>r("konsole")},{label:"Systemlogs & Diagnose",status:t>0?`${t} Fehler`:"Keine Fehler",tone:t>0?"alert":"ok",action:()=>Ef("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return w.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:w.jsx("div",{className:"divide-y divide-border/20",children:n.map((i,o)=>{const s={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[i.tone];return w.jsxs("button",{onClick:i.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[w.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("span",{className:De("text-[10px] font-semibold font-mono",i.tone==="ok"?"text-emerald-400":i.tone==="warn"?"text-amber-400":i.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:i.status}),w.jsx("span",{className:De("h-1.5 w-1.5 rounded-full",s)})]})]},o)})})})}const fQ=g.lazy(()=>In(()=>import("./ModelsView-aEV2pe9C.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.ModelsView}))),hQ=g.lazy(()=>In(()=>import("./ConnectView-5DXpNBft.js"),__vite__mapDeps([7,5,8])).then(e=>({default:e.ConnectView}))),pQ=g.lazy(()=>In(()=>import("./AgentView-C-rUOPjn.js"),[]).then(e=>({default:e.AgentView}))),mQ=g.lazy(()=>In(()=>import("./KonsoleView-Bdk_kJ2m.js"),[]).then(e=>({default:e.KonsoleView}))),vQ=g.lazy(()=>In(()=>import("./GuideView-D6hHVfTx.js"),__vite__mapDeps([9,4,6])).then(e=>({default:e.GuideView}))),yQ=g.lazy(()=>In(()=>import("./AuftragsbuchView-BdYOUdf1.js"),__vite__mapDeps([10,11,5])).then(e=>({default:e.AuftragsbuchView}))),gQ=g.lazy(()=>In(()=>import("./IdeenView-DcsN5ZLB.js"),__vite__mapDeps([12,11,2,6,5,3])).then(e=>({default:e.IdeenView}))),xQ=g.lazy(()=>In(()=>import("./SkillsView-C5D9xEVH.js"),__vite__mapDeps([13,1])).then(e=>({default:e.SkillsView}))),bQ=g.lazy(()=>In(()=>import("./ChronikView-BBdQX2_R.js"),__vite__mapDeps([14,3])).then(e=>({default:e.ChronikView}))),wQ=g.lazy(()=>In(()=>import("./WissenView-DpReQzIY.js"),__vite__mapDeps([15,8])).then(e=>({default:e.WissenView})));function SQ(){return w.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:w.jsx(By,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const kQ=/Mac|iPhone|iPad/.test(navigator.platform);function EQ(){$3(),v3();const[e,t]=g.useState(()=>{const S=window.location.hash.slice(1);return Ko.some(E=>E.id===S)?S:"dashboard"}),r=g.useCallback(S=>{window.location.hash.slice(1)===S?t(S):window.location.hash=S},[]),[n,i]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,s]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState("maintenance"),{data:m,isError:v}=jA(),{data:x}=Df();g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const S=E=>{var O;h(((O=E.detail)==null?void 0:O.tab)||"maintenance"),d(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]),g.useEffect(()=>{const S=E=>{var O;const P=(O=E.detail)==null?void 0:O.view;P&&r(P)};return window.addEventListener("mc-navigate",S),()=>window.removeEventListener("mc-navigate",S)},[r]),g.useEffect(()=>{const S=()=>{const E=window.location.hash.slice(1);Ko.some(P=>P.id===E)&&t(E)};return window.addEventListener("hashchange",S),()=>window.removeEventListener("hashchange",S)},[]),g.useEffect(()=>{s(!1)},[e]);const k=Ko.find(S=>S.id===e);return w.jsxs("div",{className:"flex h-full relative",children:[w.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),w.jsx(NR,{onNavigate:r}),w.jsx(I3,{open:u,onClose:()=>d(!1),defaultTab:f}),w.jsx("aside",{className:De("hidden md:flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:w.jsx(hP,{collapsed:n,onToggleCollapse:()=>{i(S=>{const E=!S;return localStorage.setItem("mc_sidebar_collapsed",E.toString()),E})},view:e,health:m,backendDown:v,sysStatus:x})}),w.jsxs("div",{className:De("md:hidden fixed inset-0 z-50 transition-opacity duration-200",o?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!o,children:[w.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>s(!1)}),w.jsx("aside",{className:De("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",o?"translate-x-0":"-translate-x-full"),children:w.jsx(hP,{collapsed:!1,onClose:()=>s(!1),view:e,health:m,backendDown:v,sysStatus:x})})]}),w.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[w.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[w.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[w.jsx("button",{onClick:()=>s(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:w.jsx(pT,{className:"h-5 w-5","aria-hidden":"true"})}),w.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:k.hint})]}),w.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[w.jsx(h3,{}),w.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm:flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),w.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[w.jsx(rT,{className:"h-3.5 w-3.5"}),w.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),w.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:kQ?"⌘K":"Strg+K"})]})]})]}),w.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 scrollbar-thin",children:w.jsxs(g.Suspense,{fallback:w.jsx(SQ,{}),children:[e==="dashboard"&&w.jsx(sQ,{onNavigate:S=>r(S)}),e==="ideen"&&w.jsx(gQ,{}),e==="auftraege"&&w.jsx(yQ,{}),e==="skills"&&w.jsx(xQ,{}),e==="models"&&w.jsx(fQ,{}),e==="connect"&&w.jsx(hQ,{}),e==="wissen"&&w.jsx(wQ,{}),e==="chronik"&&w.jsx(bQ,{}),e==="agent"&&w.jsx(pQ,{}),e==="konsole"&&w.jsx(mQ,{}),e==="guide"&&w.jsx(vQ,{})]})})]})]})}function hP({collapsed:e,onToggleCollapse:t,onClose:r,view:n,health:i,backendDown:o,sysStatus:s}){var u,d,f,h,m;return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:De("flex items-center py-4 border-b border-border/40 shrink-0",e?"flex-col gap-3 px-2":"justify-between px-5"),children:[w.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[w.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!e&&w.jsxs("div",{className:"leading-tight",children:[w.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),w.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),t&&w.jsx("button",{onClick:t,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":e?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:e?"Maximieren":"Minimieren",children:e?w.jsx(Bs,{className:"h-4 w-4","aria-hidden":"true"}):w.jsx(ZM,{className:"h-4 w-4","aria-hidden":"true"})}),r&&w.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:w.jsx(Cf,{className:"h-4 w-4","aria-hidden":"true"})})]}),w.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let v=null;return Ko.map(x=>{const k=x.group!==v;return v=x.group,w.jsxs("div",{className:"space-y-1",children:[k&&(e?v!==Ko[0].group&&w.jsx("div",{className:"my-3 border-t border-border/30"}):w.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:x.group})),w.jsxs("a",{href:`#${x.id}`,onClick:r,"aria-current":n===x.id?"page":void 0,className:De("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",e?"justify-center p-2.5":"gap-3 px-3 py-2",n===x.id?e?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:e?x.label:void 0,"aria-label":e?x.label:void 0,children:[w.jsx(x.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!e&&w.jsx("span",{className:"truncate",children:x.label})]})]},x.id)})})()}),w.jsx("div",{className:De("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",e?"px-2 text-center":"px-5"),children:e?w.jsx("div",{className:"flex justify-center",children:w.jsx("span",{className:De("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",o||!i?"bg-red-500":i.engine_reachable?i.brain&&!i.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:o?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":i?i.engine_reachable?i.brain&&!i.brain.ready?`Hirn offline (${i.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):w.jsxs("div",{className:"space-y-2 text-left",children:[o?w.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[w.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),w.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):i?w.jsxs(w.Fragment,{children:[w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:De("h-2 w-2 rounded-full animate-pulse",i.engine_reachable?"bg-emerald-500":"bg-amber-500")}),w.jsxs("span",{className:"truncate",children:["Engine ",i.engine_reachable?"online":"offline"]})]}),i.brain&&!i.brain.ready&&w.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${i.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[w.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),w.jsxs("span",{className:"truncate",children:["Hirn offline",i.brain.model?` (${i.brain.model})`:""]})]})]}):w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",w.jsx("span",{className:"truncate",children:"Backend offline"})]}),(s==null?void 0:s.versions)&&w.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[w.jsxs("div",{className:"truncate",title:s.versions.mc2?`${s.versions.mc2.branch}-${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""} (${s.versions.mc2.date})`:"nicht gefunden",children:[w.jsx("strong",{children:"MC2:"})," ",s.versions.mc2?`${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""}`:"—"]}),w.jsxs("div",{className:"truncate",title:((u=s.versions.engine)==null?void 0:u.type)==="git"?`${s.versions.engine.branch}-${s.versions.engine.hash}${s.versions.engine.dirty?"*":""} (${s.versions.engine.date})`:((d=s.versions.engine)==null?void 0:d.version_text)||"unbekannt",children:[w.jsx("strong",{children:"Engine:"})," ",((f=s.versions.engine)==null?void 0:f.type)==="git"?`${s.versions.engine.hash}${s.versions.engine.dirty?"*":""}`:((m=(h=s.versions.engine)==null?void 0:h.version_text)==null?void 0:m.split(" ").pop())||"—"]}),w.jsxs("div",{className:"truncate",title:s.versions.hermes_agent?`${s.versions.hermes_agent.branch}-${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""} (${s.versions.hermes_agent.date})`:"nicht gefunden",children:[w.jsx("strong",{children:"Hermes Agent:"})," ",s.versions.hermes_agent?`${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}class PQ extends Dy.Component{constructor(){super(...arguments);xs(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?w.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:w.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[w.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),w.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),w.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const AQ=new CM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});rM.createRoot(document.getElementById("root")).render(w.jsx(Dy.StrictMode,{children:w.jsx(PQ,{children:w.jsx(_M,{client:AQ,children:w.jsx(EQ,{})})})}));export{aT as $,k3 as A,YM as B,XM as C,B1 as D,Ov as E,Bs as F,JM as G,lT as H,S3 as I,nT as J,CQ as K,By as L,Gs as M,VM as N,Hy as O,vT as P,wT as Q,Ho as R,yT as S,Ys as T,Es as U,Of as V,kT as W,Cf as X,LP as Y,Uy as Z,hT as _,RQ as a,bT as a0,y3 as a1,g3 as a2,eT as a3,HQ as a4,Fy as a5,NQ as a6,zP as a7,iT as a8,xu as a9,pv as aa,Ks as ab,PM as ac,Ft as ad,pr as ae,CP as af,at as ag,w3 as ah,UQ as ai,IQ as aj,uT as ak,Wy as al,sT as am,x3 as an,nf as ao,Dy as ap,uu as aq,bk as ar,A8 as as,Ng as at,dk as au,ck as av,Ty as aw,MQ as ax,TQ as ay,fT as az,De as b,je as c,jQ as d,qM as e,IA as f,DQ as g,Df as h,$Q as i,w as j,_A as k,BQ as l,zQ as m,Te as n,No as o,TR as p,ze as q,g as r,_Q as s,FP as t,Af as u,WQ as v,LQ as w,TA as x,Nm as y,FQ as z}; +Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}m.invalidateQueries({queryKey:ze.health}),m.invalidateQueries({queryKey:ze.services}),m.invalidateQueries({queryKey:ze.models})}catch(Q){f("Reparatur fehlgeschlagen",String((Q==null?void 0:Q.message)||Q))}finally{x(Q=>({...Q,[K]:!1}))}}const S=((Y=t==null?void 0:t.running)==null?void 0:Y.length)??0,E=(r==null?void 0:r.services.filter(K=>K.ok).length)??0,P=(r==null?void 0:r.services.length)??0,O=P-E,j=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((le=n==null?void 0:n.components)==null?void 0:le.filter(K=>K.update===!0).length)??0),_=s!=null&&s.available?s.open_count:0,N=u!=null&&u.available?u.items.filter(K=>K.status==="blocked").length:0,C=o?[o.gateway,o.memory,o.desktop_gateway]:[],D=C.filter(K=>K==null?void 0:K.ok).length,F=o?o.gateway.ok?o.memory.ok?o.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",z=(fe=t==null?void 0:t.models)==null?void 0:fe.find(K=>K.role==="hermes"),q=z!=null&&z.name?(de=z.name.split("/").pop())==null?void 0:de.replace(/\.gguf$/i,""):"",X=r==null?void 0:r.services.filter(K=>!K.ok).map(K=>K.name).join(", "),B=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],ue=B.length>0?B.join(" + "):"";return w.jsxs("div",{className:"space-y-6",children:[w.jsxs("div",{children:[w.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),w.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[w.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[w.jsx(uQ,{verdict:d.verdict,memory:d.memory,warns:d.warns,problems:d.problems}),w.jsxs("section",{children:[w.jsx(fv,{children:"Leistung"}),w.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:w.jsx(rQ,{})}),w.jsx("div",{className:"mt-4",children:w.jsx(oQ,{})}),w.jsx("div",{className:"mt-4",children:w.jsx(lQ,{})})]}),w.jsxs("section",{children:[w.jsx(fv,{children:"Bereiche"}),w.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[w.jsx(As,{icon:Fy,title:"Auftragsbuch",value:s!=null&&s.available?_:"—",unit:_===1?"Vorschlag":"Vorschläge",tone:s?N>0||_>0?"warn":"ok":"loading",hint:N>0?`${N} Karte${N===1?"":"n"} wartet auf deine Antwort`:_>0?`${_} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),w.jsx(As,{icon:LP,title:"Modelle",value:S,unit:"warm",tone:S>0?"ok":"muted",hint:q?`Hirn: ${q}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),w.jsx(As,{icon:Of,title:"Dienste",value:r?`${E}/${P}`:"…",unit:"laufen",tone:r?O>0?"warn":"ok":"loading",hint:X?`Ausfall: ${X}`:"Alle Dienste online",onClick:()=>Ef("maintenance")}),w.jsx(As,{icon:Wy,title:"Updates",value:n?j>0?j:"0":"…",unit:j>0?"bereit":"aktuell",tone:n?j>0?"warn":"ok":"loading",hint:j>0?`Verfügbar: ${ue}`:"Alles auf dem neuesten Stand",onClick:()=>Ef("maintenance")}),w.jsx(As,{icon:Uy,title:"Verbinden",value:o?`${D}/${C.length}`:"…",unit:"Leitungen",tone:o?D===C.length?"ok":"warn":"loading",hint:F?`Gestört: ${F}`:"Hermes Desktop & IDEs bereit",onClick:()=>e("connect")})]})]})]}),w.jsxs("div",{className:"space-y-6",children:[w.jsx(cQ,{problems:d.problems,pendingCount:j,openAuftraege:_,blockedIdeen:N,busy:v,onRepair:k,onNavigate:e}),w.jsxs("section",{children:[w.jsx(fv,{children:"Werkzeuge & Diagnose"}),w.jsx(dQ,{agent:i,svcErrors:O,onNavigate:e})]})]})]}),h]})}function fv({children:e}){return w.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function uQ({verdict:e,memory:t,warns:r,problems:n}){const i=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:t.status==="full"?t.text:"Nichts Schlimmes — nur ein Hinweis.",o=n.length?`${n[0].label}: ${n[0].detail}${n.length>1?` (+${n.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",s={loading:{ring:"border-border/60 bg-card/45",icon:By,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:sT,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Ys,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:i},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Ys,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:o}}[e],u=s.icon,d={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],f={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return w.jsxs("div",{className:De("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",s.ring),children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:w.jsx(u,{className:De("h-6 w-6",s.iconCls)})}),w.jsxs("div",{className:"min-w-0",children:[w.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:s.title}),w.jsx("p",{className:"text-xs text-muted-foreground",children:s.sub})]})]}),w.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[w.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[w.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[w.jsx(lT,{className:"h-3.5 w-3.5"})," Speicher"]}),w.jsx("span",{className:De("font-mono font-bold",d),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(1)} / ${t.totalGb.toFixed(1)} GB`})]}),w.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:w.jsx("div",{className:De("h-full rounded-full transition-all duration-500",f),style:{width:`${t.pct}%`}})})]})]})}function cQ({problems:e,pendingCount:t,openAuftraege:r,blockedIdeen:n,busy:i,onRepair:o,onNavigate:s}){const u=t>0,d=r>0,f=n>0,h=e.length===0&&!u&&!d&&!f;return w.jsx("div",{className:"h-full flex flex-col justify-between",children:h?w.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[w.jsx(XM,{className:"h-5 w-5 shrink-0 text-emerald-400"}),w.jsxs("div",{children:[w.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):w.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(m=>w.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[w.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:w.jsx(m.icon,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{className:"min-w-0 flex-1",children:[w.jsx("p",{className:"text-sm font-bold text-foreground",children:m.label}),w.jsx("p",{className:"truncate text-xs text-muted-foreground",children:m.detail})]})]}),m.repair&&w.jsxs("button",{onClick:()=>m.repair&&o(m.id,m.repair),disabled:!!i[m.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[i[m.id]?w.jsx(By,{className:"h-3.5 w-3.5 animate-spin"}):w.jsx(kT,{className:"h-3.5 w-3.5"}),m.repair.label]})]},m.id)),f&&w.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-red-500/30 bg-red-500/5 p-4 text-left transition-all hover:bg-red-500/10 cursor-pointer",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:w.jsx(zP,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{children:[w.jsxs("p",{className:"text-sm font-bold text-foreground",children:[n," Karte",n===1?"":"n"," braucht deine Antwort"]}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),w.jsx(Bs,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),d&&w.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:w.jsx(Fy,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{children:[w.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),w.jsx(Bs,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),u&&w.jsxs("button",{onClick:()=>Ef("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:w.jsx(Wy,{className:"h-4.5 w-4.5"})}),w.jsxs("div",{children:[w.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),w.jsx(Bs,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function dQ({agent:e,svcErrors:t,onNavigate:r}){const n=[{label:"Hermes Agent",status:e?e.gateway_reachable?"Bereit":"Offline":"…",tone:e?e.gateway_reachable?"ok":"alert":"loading",action:()=>r("agent")},{label:"Konsole (Box-Shell)",status:e?e.box_console_reachable?"Bereit":"Offline":"…",tone:e?e.box_console_reachable?"ok":"warn":"loading",action:()=>r("konsole")},{label:"Systemlogs & Diagnose",status:t>0?`${t} Fehler`:"Keine Fehler",tone:t>0?"alert":"ok",action:()=>Ef("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return w.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:w.jsx("div",{className:"divide-y divide-border/20",children:n.map((i,o)=>{const s={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[i.tone];return w.jsxs("button",{onClick:i.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[w.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("span",{className:De("text-[10px] font-semibold font-mono",i.tone==="ok"?"text-emerald-400":i.tone==="warn"?"text-amber-400":i.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:i.status}),w.jsx("span",{className:De("h-1.5 w-1.5 rounded-full",s)})]})]},o)})})})}const fQ=g.lazy(()=>In(()=>import("./ModelsView-BEx7Kj-e.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.ModelsView}))),hQ=g.lazy(()=>In(()=>import("./ConnectView-CV4093im.js"),__vite__mapDeps([7,5,8])).then(e=>({default:e.ConnectView}))),pQ=g.lazy(()=>In(()=>import("./AgentView-D4zN2MPP.js"),[]).then(e=>({default:e.AgentView}))),mQ=g.lazy(()=>In(()=>import("./KonsoleView-DeJwkqSp.js"),[]).then(e=>({default:e.KonsoleView}))),vQ=g.lazy(()=>In(()=>import("./GuideView-DUanjnT4.js"),__vite__mapDeps([9,4,6])).then(e=>({default:e.GuideView}))),yQ=g.lazy(()=>In(()=>import("./AuftragsbuchView-DqhMB1_4.js"),__vite__mapDeps([10,11,5])).then(e=>({default:e.AuftragsbuchView}))),gQ=g.lazy(()=>In(()=>import("./IdeenView-DGY-eQxb.js"),__vite__mapDeps([12,11,2,6,5,3])).then(e=>({default:e.IdeenView}))),xQ=g.lazy(()=>In(()=>import("./SkillsView-CYYp19Ox.js"),__vite__mapDeps([13,1])).then(e=>({default:e.SkillsView}))),bQ=g.lazy(()=>In(()=>import("./ChronikView-DeYQ77we.js"),__vite__mapDeps([14,3])).then(e=>({default:e.ChronikView}))),wQ=g.lazy(()=>In(()=>import("./WissenView-IXZy1TUN.js"),__vite__mapDeps([15,8])).then(e=>({default:e.WissenView})));function SQ(){return w.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:w.jsx(By,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const kQ=/Mac|iPhone|iPad/.test(navigator.platform);function EQ(){$3(),v3();const[e,t]=g.useState(()=>{const S=window.location.hash.slice(1);return Ko.some(E=>E.id===S)?S:"dashboard"}),r=g.useCallback(S=>{window.location.hash.slice(1)===S?t(S):window.location.hash=S},[]),[n,i]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,s]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState("maintenance"),{data:m,isError:v}=jA(),{data:x}=Df();g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const S=E=>{var O;h(((O=E.detail)==null?void 0:O.tab)||"maintenance"),d(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]),g.useEffect(()=>{const S=E=>{var O;const P=(O=E.detail)==null?void 0:O.view;P&&r(P)};return window.addEventListener("mc-navigate",S),()=>window.removeEventListener("mc-navigate",S)},[r]),g.useEffect(()=>{const S=()=>{const E=window.location.hash.slice(1);Ko.some(P=>P.id===E)&&t(E)};return window.addEventListener("hashchange",S),()=>window.removeEventListener("hashchange",S)},[]),g.useEffect(()=>{s(!1)},[e]);const k=Ko.find(S=>S.id===e);return w.jsxs("div",{className:"flex h-full relative",children:[w.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),w.jsx(NR,{onNavigate:r}),w.jsx(I3,{open:u,onClose:()=>d(!1),defaultTab:f}),w.jsx("aside",{className:De("hidden md:flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:w.jsx(hP,{collapsed:n,onToggleCollapse:()=>{i(S=>{const E=!S;return localStorage.setItem("mc_sidebar_collapsed",E.toString()),E})},view:e,health:m,backendDown:v,sysStatus:x})}),w.jsxs("div",{className:De("md:hidden fixed inset-0 z-50 transition-opacity duration-200",o?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!o,children:[w.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>s(!1)}),w.jsx("aside",{className:De("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",o?"translate-x-0":"-translate-x-full"),children:w.jsx(hP,{collapsed:!1,onClose:()=>s(!1),view:e,health:m,backendDown:v,sysStatus:x})})]}),w.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[w.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[w.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[w.jsx("button",{onClick:()=>s(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:w.jsx(pT,{className:"h-5 w-5","aria-hidden":"true"})}),w.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:k.hint})]}),w.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[w.jsx(h3,{}),w.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm:flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),w.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[w.jsx(rT,{className:"h-3.5 w-3.5"}),w.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),w.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:kQ?"⌘K":"Strg+K"})]})]})]}),w.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 scrollbar-thin",children:w.jsxs(g.Suspense,{fallback:w.jsx(SQ,{}),children:[e==="dashboard"&&w.jsx(sQ,{onNavigate:S=>r(S)}),e==="ideen"&&w.jsx(gQ,{}),e==="auftraege"&&w.jsx(yQ,{}),e==="skills"&&w.jsx(xQ,{}),e==="models"&&w.jsx(fQ,{}),e==="connect"&&w.jsx(hQ,{}),e==="wissen"&&w.jsx(wQ,{}),e==="chronik"&&w.jsx(bQ,{}),e==="agent"&&w.jsx(pQ,{}),e==="konsole"&&w.jsx(mQ,{}),e==="guide"&&w.jsx(vQ,{})]})})]})]})}function hP({collapsed:e,onToggleCollapse:t,onClose:r,view:n,health:i,backendDown:o,sysStatus:s}){var u,d,f,h,m;return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:De("flex items-center py-4 border-b border-border/40 shrink-0",e?"flex-col gap-3 px-2":"justify-between px-5"),children:[w.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[w.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!e&&w.jsxs("div",{className:"leading-tight",children:[w.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),w.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),t&&w.jsx("button",{onClick:t,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":e?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:e?"Maximieren":"Minimieren",children:e?w.jsx(Bs,{className:"h-4 w-4","aria-hidden":"true"}):w.jsx(ZM,{className:"h-4 w-4","aria-hidden":"true"})}),r&&w.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:w.jsx(Cf,{className:"h-4 w-4","aria-hidden":"true"})})]}),w.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let v=null;return Ko.map(x=>{const k=x.group!==v;return v=x.group,w.jsxs("div",{className:"space-y-1",children:[k&&(e?v!==Ko[0].group&&w.jsx("div",{className:"my-3 border-t border-border/30"}):w.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:x.group})),w.jsxs("a",{href:`#${x.id}`,onClick:r,"aria-current":n===x.id?"page":void 0,className:De("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",e?"justify-center p-2.5":"gap-3 px-3 py-2",n===x.id?e?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:e?x.label:void 0,"aria-label":e?x.label:void 0,children:[w.jsx(x.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!e&&w.jsx("span",{className:"truncate",children:x.label})]})]},x.id)})})()}),w.jsx("div",{className:De("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",e?"px-2 text-center":"px-5"),children:e?w.jsx("div",{className:"flex justify-center",children:w.jsx("span",{className:De("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",o||!i?"bg-red-500":i.engine_reachable?i.brain&&!i.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:o?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":i?i.engine_reachable?i.brain&&!i.brain.ready?`Hirn offline (${i.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):w.jsxs("div",{className:"space-y-2 text-left",children:[o?w.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[w.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),w.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):i?w.jsxs(w.Fragment,{children:[w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:De("h-2 w-2 rounded-full animate-pulse",i.engine_reachable?"bg-emerald-500":"bg-amber-500")}),w.jsxs("span",{className:"truncate",children:["Engine ",i.engine_reachable?"online":"offline"]})]}),i.brain&&!i.brain.ready&&w.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${i.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[w.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),w.jsxs("span",{className:"truncate",children:["Hirn offline",i.brain.model?` (${i.brain.model})`:""]})]})]}):w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",w.jsx("span",{className:"truncate",children:"Backend offline"})]}),(s==null?void 0:s.versions)&&w.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[w.jsxs("div",{className:"truncate",title:s.versions.mc2?`${s.versions.mc2.branch}-${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""} (${s.versions.mc2.date})`:"nicht gefunden",children:[w.jsx("strong",{children:"MC2:"})," ",s.versions.mc2?`${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""}`:"—"]}),w.jsxs("div",{className:"truncate",title:((u=s.versions.engine)==null?void 0:u.type)==="git"?`${s.versions.engine.branch}-${s.versions.engine.hash}${s.versions.engine.dirty?"*":""} (${s.versions.engine.date})`:((d=s.versions.engine)==null?void 0:d.version_text)||"unbekannt",children:[w.jsx("strong",{children:"Engine:"})," ",((f=s.versions.engine)==null?void 0:f.type)==="git"?`${s.versions.engine.hash}${s.versions.engine.dirty?"*":""}`:((m=(h=s.versions.engine)==null?void 0:h.version_text)==null?void 0:m.split(" ").pop())||"—"]}),w.jsxs("div",{className:"truncate",title:s.versions.hermes_agent?`${s.versions.hermes_agent.branch}-${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""} (${s.versions.hermes_agent.date})`:"nicht gefunden",children:[w.jsx("strong",{children:"Hermes Agent:"})," ",s.versions.hermes_agent?`${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}class PQ extends Dy.Component{constructor(){super(...arguments);xs(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?w.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:w.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[w.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),w.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),w.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const AQ=new CM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});rM.createRoot(document.getElementById("root")).render(w.jsx(Dy.StrictMode,{children:w.jsx(PQ,{children:w.jsx(_M,{client:AQ,children:w.jsx(EQ,{})})})}));export{aT as $,k3 as A,YM as B,XM as C,B1 as D,Ov as E,Bs as F,JM as G,lT as H,S3 as I,nT as J,CQ as K,By as L,Gs as M,VM as N,Hy as O,vT as P,wT as Q,Ho as R,yT as S,Ys as T,Es as U,Of as V,kT as W,Cf as X,LP as Y,Uy as Z,hT as _,RQ as a,bT as a0,y3 as a1,g3 as a2,eT as a3,HQ as a4,Fy as a5,NQ as a6,zP as a7,iT as a8,xu as a9,pv as aa,Ks as ab,PM as ac,Ft as ad,pr as ae,CP as af,at as ag,w3 as ah,UQ as ai,IQ as aj,uT as ak,Wy as al,sT as am,x3 as an,nf as ao,Dy as ap,uu as aq,bk as ar,A8 as as,Ng as at,dk as au,ck as av,Ty as aw,MQ as ax,TQ as ay,fT as az,De as b,je as c,jQ as d,qM as e,IA as f,DQ as g,Df as h,$Q as i,w as j,_A as k,BQ as l,zQ as m,Te as n,No as o,TR as p,ze as q,g as r,_Q as s,FP as t,Af as u,WQ as v,LQ as w,TA as x,Nm as y,FQ as z}; diff --git a/frontend/dist/assets/layers-Dpl2QlP2.js b/frontend/dist/assets/layers-D3tFEnOl.js similarity index 91% rename from frontend/dist/assets/layers-Dpl2QlP2.js rename to frontend/dist/assets/layers-D3tFEnOl.js index 40beed4..91dfec8 100644 --- a/frontend/dist/assets/layers-Dpl2QlP2.js +++ b/frontend/dist/assets/layers-D3tFEnOl.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CCbyojll.js";/** +import{c as a}from"./index-0Xcu6PnS.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/rotate-ccw-DuKtbjZS.js b/frontend/dist/assets/rotate-ccw-CBM-YWkV.js similarity index 88% rename from frontend/dist/assets/rotate-ccw-DuKtbjZS.js rename to frontend/dist/assets/rotate-ccw-CBM-YWkV.js index a9bc819..2fea4e6 100644 --- a/frontend/dist/assets/rotate-ccw-DuKtbjZS.js +++ b/frontend/dist/assets/rotate-ccw-CBM-YWkV.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-CCbyojll.js";/** +import{c as t}from"./index-0Xcu6PnS.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/zap-CRNNnxfs.js b/frontend/dist/assets/zap-BHzSmHiL.js similarity index 96% rename from frontend/dist/assets/zap-CRNNnxfs.js rename to frontend/dist/assets/zap-BHzSmHiL.js index e9237de..1fdb198 100644 --- a/frontend/dist/assets/zap-CRNNnxfs.js +++ b/frontend/dist/assets/zap-BHzSmHiL.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CCbyojll.js";/** +import{c as a}from"./index-0Xcu6PnS.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 7fc1a0b..f602146 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,7 +7,7 @@ Mission Control 2.0 - + diff --git a/frontend/src/components/dashboard/LatencyCard.tsx b/frontend/src/components/dashboard/LatencyCard.tsx index 3cbc1ba..4221214 100644 --- a/frontend/src/components/dashboard/LatencyCard.tsx +++ b/frontend/src/components/dashboard/LatencyCard.tsx @@ -2,7 +2,7 @@ import { Gauge } from "lucide-react" import { useVoiceTrace } from "@/lib/queries" import type { VoiceTurn } from "@/lib/api" -// Balken-Stufen in kanonischer Reihenfolge (zeitlich disjunkt). Mem0 ist ein Unter-Detail +// Balken-Stufen in kanonischer Reihenfolge (zeitlich disjunkt). Gedächtnis ist ein Unter-Detail // INNERHALB von „Hirn" und wird NICHT als eigenes Segment addiert (sonst Doppelzählung). const SEGMENTS = [ { key: "stt_ms", label: "STT", color: "#f59e0b" }, @@ -39,7 +39,7 @@ function culprit(t: VoiceTurn): { label: string; color: string; ms: number } | n function TurnRow({ t, scale }: { t: VoiceTurn; scale: number }) { const title = SEGMENTS.map((s) => `${s.label} ${fmt(t[s.key] as number | null)}`).join(" · ") - + (t.mem0_ms != null ? ` (davon Gedächtnis ${fmt(t.mem0_ms)})` : "") + + (t.memory_ms != null ? ` (davon Gedächtnis ${fmt(t.memory_ms)})` : "") return (
{ago(t.ts)} @@ -103,7 +103,7 @@ export function LatencyCard() { {latest && !latest.error && (
{SEGMENTS.filter((s) => (latest[s.key] as number | null) != null).map((s) => `${s.label} ${fmt(latest[s.key] as number)}`).join(" · ")} - {latest.mem0_ms != null && · davon Gedächtnis {fmt(latest.mem0_ms)}} + {latest.memory_ms != null && · davon Gedächtnis {fmt(latest.memory_ms)}}
)}
@@ -128,7 +128,7 @@ export function LatencyCard() { )}
- „Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine + „Hirn" = Zeit bis zum ersten Wort (Agent + Gedächtnis-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 25f2bf4..e7b447d 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -443,7 +443,7 @@ export interface TokenStats { } // Per-Turn-Latenz-Trace (GET /api/voice/trace). Balken-Stufen (zeitlich disjunkt): -// stt · vision · hirn · gen. mem0 = Unter-Detail INNERHALB von hirn (nicht zum Balken addieren). +// stt · vision · hirn · gen. memory = Unter-Detail INNERHALB von hirn (nicht zum Balken addieren). export interface VoiceTurn { id: string ts: number // Epoch-Sekunden @@ -452,9 +452,9 @@ export interface VoiceTurn { had_images: boolean stt_ms: number | null vision_ms: number | null - hirn_ms: number | null // Zeit bis erstes Inhalts-Token (Agent + Mem0 + LLM-TTFT) + hirn_ms: number | null // Zeit bis erstes Inhalts-Token (Agent + Gedächtnis + LLM-TTFT) gen_ms: number | null // Generierung nach dem ersten Token bis Stream-Ende - mem0_ms: number | null // Teil VON hirn (Mem0-Retrieve), best-effort + memory_ms: number | null // Teil VON hirn (Gedächtnis-Retrieve), best-effort total_ms: number error: string | null } diff --git a/frontend/src/views/GuideView.tsx b/frontend/src/views/GuideView.tsx index 11e2a89..ae8f7d2 100644 --- a/frontend/src/views/GuideView.tsx +++ b/frontend/src/views/GuideView.tsx @@ -345,11 +345,8 @@ description: Treibt Entwicklung mit strikter TDD-Praxis - Dein Gedächtnis (Tab Gedächtnis) ist Mem0-basiert: auto-lernend & - semantisch, graph-first dargestellt, mit 4-Typen-Taxonomie - (Identität · Wissen · Regeln · Ereignisse). Der Agent - lernt im Hintergrund nach jedem Turn — egal ob du per Desktop, Konsole, Telegram oder Lucy mit ihm sprichst. -
Gotcha: ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion). + Dein Gedächtnis ist auto-lernend & semantisch: Der Agent lernt im Hintergrund nach jedem Turn — + egal ob du per Desktop, Konsole, Telegram oder Lucy mit ihm sprichst.