@thevinci/web 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{JsonTreeView-Bie0XyLU.js → JsonTreeView-BBtZafcv.js} +1 -1
- package/dist/assets/{MarkdownRendererImpl-Dnzxw6uY.js → MarkdownRendererImpl-BZjKbBnk.js} +1 -1
- package/dist/assets/{MultiRunWindow-CfYyqkfD.js → MultiRunWindow-Dqf5GOA5.js} +1 -1
- package/dist/assets/{OnboardingScreen-D9bDrllQ.js → OnboardingScreen-DUFwZbaB.js} +1 -1
- package/dist/assets/{SettingsWindow-BxZuSH3A.js → SettingsWindow-DhrucBDB.js} +1 -1
- package/dist/assets/{TerminalView-DicjUNco.js → TerminalView-D7AHniYY.js} +1 -1
- package/dist/assets/{ToolOutputDialog-q7JD-9Qg.js → ToolOutputDialog-BkrKVyMm.js} +1 -1
- package/dist/assets/{main-D0MP_5rN.js → main-716W6LX4.js} +2 -2
- package/dist/assets/{main-zAl2LN82.js → main-DmYsx-6W.js} +4 -4
- package/dist/assets/{miniChat-BbD25AWT.js → miniChat-DBQSKbzK.js} +2 -2
- package/dist/assets/{modelPrefsAutoSave-CUTOCovb.js → modelPrefsAutoSave-KrAH9uIC.js} +4 -4
- package/dist/assets/{renderElectronMiniChatApp-BhvvlOgv.js → renderElectronMiniChatApp-DjqaRauC.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/mini-chat.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-.bun-B9l0ZNi2.js","assets/vendor--DBfsbEis.css","assets/MarkdownRendererImpl-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-.bun-B9l0ZNi2.js","assets/vendor--DBfsbEis.css","assets/MarkdownRendererImpl-BZjKbBnk.js","assets/index-DgiFEKGN.js","assets/index-DLTDToSP.css","assets/ToolOutputDialog-BkrKVyMm.js","assets/JsonTreeView-BBtZafcv.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{ax as zt,t as Zc,bA as xm,aH as Cm,aI as de,b5 as a,an as Sm,bh as ie,ao as km,aj as Mm,am as Am,ai as Fm,ak as _m,al as Bm,Z as g,G as Dm,O as Pm,v as L8,u as V8,ab as N8,y as Tm,z as Hm,J as Im,N as Em,x as R8,w as z8,B as jm,aL as uo,aS as an,bd as $n,aM as Zn,aN as sd,ah as Lm,by as Gi,bI as Vm,bg as u2,h as Nm,n as Rm,j as zm,m as Om,i as $m,k as Zm,l as Um,aP as qm,a as Wm,b as Gm,a8 as Km,a9 as Ym,aa as Jm,a5 as Qm,a2 as Xm,_ as eh,a0 as th,a1 as oh,a7 as nh,a6 as sh,a3 as rh,a4 as ih,bi as ah,bJ as O8,bu as lh,as as ch,at as dh,bt as uh,bb as g1,A as fh,bF as $8,bE as Ol,Q as Z8,o as U8,aG as q8,ac as W8,bK as G8,bH as K8,C as Y8,az as mi,K as mh,bs as hh,aB as F0,P as ph,aX as vi,V as gh,T as vh,R as bh,S as yh,U as wh,bx as xh,bG as rd,ba as Ch,aC as Sh}from"./vendor-.bun-B9l0ZNi2.js";import{H as J8,r as kh,a2 as Mh,n as Ah,u as Fh,I as _h,E as Bh,e as Dh,G as Ph,B as Th,o as Hh,s as Ih,a3 as Eh,R as jh,U as Lh,t as Vh,a as Nh,b as Rh,c as zh,d as Oh,f as $h,i as Zh,j as Uh,k as qh,l as Wh,m as Gh,q as Kh,v as Yh,x as Jh,y as Qh,z as Xh,A as ep,C as tp,D as op,F as np,J as sp,K as rp,L as ip,M as ap,N as lp,O as cp,P as dp,Q as up,S as fp,T as mp,W as hp,X as pp,Y as gp,Z as vp,_ as bp,$ as yp,a0 as wp,a1 as xp,a4 as Cp}from"./index-DgiFEKGN.js";const Sp=()=>typeof window>"u"?null:window.__APP_ELECTRON__??null,Xt=()=>typeof window>"u"?!1:typeof window.__TAURI__?.core?.invoke=="function",Q8=()=>Sp()?.runtime==="electron",kp=()=>typeof window>"u"?!1:typeof window.__TAURI__?.core?.invoke=="function",Mp=()=>Q8()&&kp(),Ap=async(t,e)=>{if(typeof window>"u")return null;const o=window.__TAURI__;return typeof o?.core?.invoke!="function"?null:o.core.invoke(t,e??{})},id=t=>{const e=t.trim();if(!e)return null;try{return new URL(e).origin}catch{try{return new URL(e.endsWith("/")?e:`${e}/`).origin}catch{return null}}},ad=t=>{const e=t.trim();if(!e)return null;try{return new URL(e)}catch{try{return new URL(e.endsWith("/")?e:`${e}/`)}catch{return null}}},Fp=t=>t.replace(/^\[|\]$/g,"").toLowerCase(),_0=t=>{const e=Fp(t);return e==="localhost"||e==="127.0.0.1"||e==="::1"},gs=()=>{if(typeof window>"u"||!hn())return!1;const t=typeof window.__APP_LOCAL_ORIGIN__=="string"?window.__APP_LOCAL_ORIGIN__:"",e=ad(t),o=ad(window.location.origin);if(e&&o){if(e.origin===o.origin)return!0;const r=e.port||(e.protocol==="https:"?"443":"80"),i=o.port||(o.protocol==="https:"?"443":"80");return e.protocol===o.protocol&&r===i&&_0(e.hostname)&&_0(o.hostname)}const n=id(t),s=id(window.location.origin)||window.location.origin;return n&&s&&n===s?!0:!!(o&&_0(o.hostname))},hn=()=>typeof window>"u"?!1:Xt()||Q8(),kO=async()=>{if(!hn()||!Xt())return!1;try{const{getCurrentWindow:t}=await zt(async()=>{const{getCurrentWindow:o}=await import("./vendor-.bun-B9l0ZNi2.js").then(n=>n.bM);return{getCurrentWindow:o}},__vite__mapDeps([0,1]));return await t().startDragging(),!0}catch{return!1}},Io=()=>typeof window>"u"?!1:window.__VINCI_RUNTIME_APIS__?.runtime?.isVSCode===!0,q2=()=>{if(typeof window>"u")return!1;const e=window.__VINCI_RUNTIME_APIS__?.runtime?.platform;return e==="web"?!0:e==="desktop"||e==="vscode"?!1:!Io()},Uc=async()=>{if(typeof window<"u"){const t=window.__VINCI_HOME__;if(t&&t.length>0)return t}return null},MO=async t=>{if(Xt()&&gs())try{const o=await window.__TAURI__?.dialog?.open?.({directory:!0,multiple:!1,title:"Select Working Directory"});return!o||typeof o!="string"?{success:!1,error:"Directory selection cancelled"}:{success:!0,path:o}}catch(e){return console.warn("Failed to request directory access (tauri)",e),{success:!1,error:e instanceof Error?e.message:String(e)}}return{success:!0,path:t}},AO=async t=>{if(Xt()&&gs())try{const o=await window.__TAURI__?.dialog?.open?.({directory:!1,multiple:!1,title:"Select File",...t?.filters?{filters:t.filters}:{},...t?.defaultPath?{defaultPath:t.defaultPath}:{}});return!o||typeof o!="string"?{success:!1,error:"File selection cancelled"}:{success:!0,path:o}}catch(e){return console.warn("Failed to request file access (tauri)",e),{success:!1,error:e instanceof Error?e.message:String(e)}}return{success:!1,error:"Native file picker not available"}},FO=async t=>({success:!0}),_O=async t=>({success:!0}),BO=async()=>{if(!Xt())return!1;try{return await window.__TAURI__?.core?.invoke?.("desktop_restart"),!0}catch(t){return console.warn("Failed to restart desktop app (tauri)",t),!1}},DO=async()=>{if(!Xt()||!gs())return null;try{const e=await window.__TAURI__?.core?.invoke?.("desktop_get_lan_address");return typeof e=="string"&&e.trim().length>0?e.trim():null}catch(t){return console.warn("Failed to get desktop LAN address (tauri)",t),null}},_p=async(t,e)=>{if(!Xt()||!gs())return!1;const o=t?.trim();if(!o)return!1;try{return await window.__TAURI__?.core?.invoke?.("desktop_open_path",{path:o,app:typeof e=="string"&&e.trim().length>0?e.trim():void 0}),!0}catch(n){return console.warn("Failed to open path (tauri)",n),!1}},PO=async t=>{if(!Xt()||!gs())return!1;const e=t?.trim();if(!e)return!1;try{return await window.__TAURI__?.core?.invoke?.("desktop_reveal_path",{path:e}),!0}catch{return _p(e)}},TO=async(t,e)=>{if(!Xt()||!gs())return null;const o=t?.trim();if(!o)return null;try{const s=await window.__TAURI__?.core?.invoke?.("desktop_save_markdown_file",{defaultFileName:o,content:e});return typeof s=="string"&&s.trim().length>0?s:null}catch(n){return console.warn("Failed to save markdown file (tauri)",n),null}},HO=async(t,e,o)=>{if(!Xt()||!gs())return!1;const n=t?.trim(),s=e?.trim(),r=o?.trim();if(!n||!s||!r)return!1;try{return await window.__TAURI__?.core?.invoke?.("desktop_open_in_app",{projectPath:n,appId:s,appName:r}),!0}catch(i){return console.warn("Failed to open project in app",i),!1}},IO=async(t,e,o)=>{if(!Xt()||!gs())return!1;const n=t?.trim(),s=e?.trim(),r=o?.trim();if(!n||!s||!r)return!1;try{return await window.__TAURI__?.core?.invoke?.("desktop_open_file_in_app",{filePath:n,appId:s,appName:r}),!0}catch(i){return console.warn("Failed to open file in app",i),!1}},EO=async(t,e)=>{if(!Xt()||!gs())return{apps:[],success:!1,hasCache:!1,isCacheStale:!1};const o=Array.isArray(t)?t.filter(n=>typeof n=="string"):[];if(o.length===0)return{apps:[],success:!0,hasCache:!1,isCacheStale:!1};try{const s=await window.__TAURI__?.core?.invoke?.("desktop_get_installed_apps",{apps:o,force:e===!0?!0:void 0});if(!s||typeof s!="object")return{apps:[],success:!1,hasCache:!1,isCacheStale:!1};const r=s;return Array.isArray(r.apps)?{apps:r.apps.filter(l=>l&&typeof l=="object").map(l=>{const c=l;return{name:typeof c.name=="string"?c.name:"",iconDataUrl:typeof c.iconDataUrl=="string"?c.iconDataUrl:null}}).filter(l=>l.name.length>0),success:!0,hasCache:r.hasCache===!0,isCacheStale:r.isCacheStale===!0}:{apps:[],success:!1,hasCache:!1,isCacheStale:!1}}catch(n){return console.warn("Failed to fetch installed apps (tauri)",n),{apps:[],success:!1,hasCache:!1,isCacheStale:!1}}},X8={threshold:.4,distance:100,ignoreLocation:!0,preferSubstring:!0};function Bp(t,e,o){if(!e)return!0;if(!t)return!1;const n={...X8,...o};return n.preferSubstring&&t.toLowerCase().includes(e.toLowerCase())?!0:new Zc([t],{threshold:n.threshold,distance:n.distance,ignoreLocation:n.ignoreLocation}).search(e).length>0}function Dp(t,e,o,n){if(!e)return t.map(()=>!0);const s={...X8,...n},r=e.toLowerCase(),i=new Array(t.length).fill(!1),l=[],c=[];for(let u=0;u<t.length;u++){const f=o(t[u]);if(f){if(s.preferSubstring&&f.toLowerCase().includes(r)){i[u]=!0;continue}l.push(f),c.push(u)}}if(l.length===0)return i;const d=new Zc(l,{threshold:s.threshold,distance:s.distance,ignoreLocation:s.ignoreLocation});for(const u of d.search(e))i[c[u.refIndex]]=!0;return i}function jO(t,e,o,n){if(!e)return t.map(u=>({item:u,score:0}));const s=n?.limit??t.length,r=n?.threshold??.3,i=n?.noFuzzy??!1,l=e.toLowerCase(),c=[],d=[];for(const u of t){const f=o(u);if(!f)continue;const h=f.toLowerCase().indexOf(l);if(h===0){c.push({item:u,score:-1});continue}if(h>0){c.push({item:u,score:h/1e3});continue}i||d.push({item:u,text:f})}if(d.length>0){const u=new Zc(d.map(f=>f.text),{threshold:r,ignoreLocation:!0,distance:100,includeScore:!0,minMatchCharLength:2});for(const f of u.search(e))c.push({item:d[f.refIndex].item,score:f.score??1})}return c.sort((u,f)=>u.score-f.score),c.slice(0,s)}function LO(t,e,o,n){const s=Dp(t,e,o,n),r=[],i=[];for(let l=0;l<t.length;l++){if(s[l]){r.push(t[l]);continue}i.push(t[l])}return{matching:r,other:i}}function U(...t){return xm(Cm(t))}const nr=()=>typeof navigator>"u"?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||""),Pp=()=>typeof navigator>"u"?!1:/Windows/.test(navigator.userAgent||""),VO=()=>nr()?"common.revealPath.finder":Pp()?"common.revealPath.fileExplorer":"common.revealPath.fileManager",NO=t=>nr()&&Xt()?t.metaKey:t.ctrlKey,RO=()=>nr()&&Xt()?"⌘":"Ctrl",B0=(t,e)=>{const o=t??"",n=Math.max(16,e?.maxLength??45);if(o.length<=n)return o;const s=o.split("/");if(s.length<=1)return o;const r=s.pop()??"";if(!r)return o;const i=Math.max(0,n-(r.length+2));if(i<=0)return`…/${r}`;let l="";for(const c of s){if(!c)continue;const d=l?`${l}/${c}`:c;if(d.length>i)break;l=d}if(!l){const c=s[0]??"";l=c?c.slice(0,i):""}return l?`${l}…/${r}`:`…/${r}`},f2=t=>t?t==="/"?"/":t.replace(/\/+$/,""):"";function zO(t,e){if(!t)return"";const o=f2(t);if(o==="/")return"/";const n=e?f2(e):void 0;if(n&&n!=="/"){if(o===n)return"~";if(o.startsWith(`${n}/`)){const s=o.slice(n.length+1);return s?`~/${s}`:"~"}}return o}function tr(t,e){if(!t)return"/";const o=f2(t);if(!o||o==="/")return"/";const n=e?f2(e):void 0;return n&&n!=="/"&&o===n?"~":o.split("/").pop()||o||"/"}function Fr(t,e){return Bp(t,e)}class e7 extends ie.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}}function $l(t){const e=de.c(10);let o,n,s,r,i;e[0]!==t?({delayDuration:i,skipDelayDuration:r,delay:n,closeDelay:o,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i):(o=e[1],n=e[2],s=e[3],r=e[4],i=e[5]);const c=n??(i===void 0?0:i),d=o??r;let u;return e[6]!==s||e[7]!==c||e[8]!==d?(u=a.jsx(Am,{delay:c,closeDelay:d,...s}),e[6]=s,e[7]=c,e[8]=d,e[9]=u):u=e[9],u}function no(t){const e=de.c(8);let o,n;e[0]!==t?({delayDuration:o,...n}=t,e[0]=t,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let s;e[3]!==n?(s=a.jsx(Sm,{...n}),e[3]=n,e[4]=s):s=e[4];const r=s;if(o===void 0)return r;let i;return e[5]!==o||e[6]!==r?(i=a.jsx($l,{delayDuration:o,children:r}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function so(t){const e=de.c(13);let o,n,s;e[0]!==t?({asChild:o,children:n,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]);let r;e[4]!==o||e[5]!==n?(r=o&&ie.isValidElement(n)?{render:n}:{children:n},e[4]=o,e[5]=n,e[6]=r):r=e[6];const i=r;let l;e[7]!==s||e[8]!==i?(l=a.jsx(km,{"data-slot":"tooltip-trigger",...s,...i}),e[7]=s,e[8]=i,e[9]=l):l=e[9];let c;return e[10]!==n||e[11]!==l?(c=a.jsx(e7,{fallback:n,children:l}),e[10]=n,e[11]=l,e[12]=c):c=e[12],c}function eo(t){const e=de.c(23);let o,n,s,r,i,l,c;e[0]!==t?({className:s,sideOffset:c,side:i,align:o,children:n,style:l,...r}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c):(o=e[1],n=e[2],s=e[3],r=e[4],i=e[5],l=e[6],c=e[7]);const d=c===void 0?0:c;let u;e[8]!==s?(u=U("bg-muted text-muted-foreground border border-border/60 transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 z-50 w-fit origin-[var(--transform-origin)] rounded-xl px-3 py-1.5 typography-meta text-balance overflow-hidden",s),e[8]=s,e[9]=u):u=e[9];let f;e[10]!==l?(f={...l},e[10]=l,e[11]=f):f=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Fm,{className:"fill-muted z-50 size-2"}),e[12]=m):m=e[12];let h;e[13]!==n||e[14]!==r||e[15]!==u||e[16]!==f?(h=a.jsxs(Mm,{"data-slot":"tooltip-content",className:u,style:f,...r,children:[n,m]}),e[13]=n,e[14]=r,e[15]=u,e[16]=f,e[17]=h):h=e[17];let p;return e[18]!==o||e[19]!==i||e[20]!==d||e[21]!==h?(p=a.jsx(e7,{children:a.jsx(_m,{children:a.jsx(Bm,{sideOffset:d,side:i,align:o,className:"z-50",children:h})})}),e[18]=o,e[19]=i,e[20]=d,e[21]=h,e[22]=p):p=e[22],p}const Tp={"add-circle":'<path d="M11 11V7H13V11H17V13H13V17H11V13H7V11H11ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z" fill="currentColor"/>',add:'<path d="M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" fill="currentColor"/>',"ai-agent-fill":'<path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 15C9.71266 15 7.65042 15.961 6.19238 17.5C7.65042 19.039 9.71266 20 12 20C14.2871 20 16.3486 19.0387 17.8066 17.5C16.3486 15.9613 14.2871 15 12 15ZM12.4707 5.31934C12.2943 4.89337 11.7058 4.89339 11.5293 5.31934L11.2764 5.93066C10.8445 6.97341 10.0384 7.80621 9.02539 8.25684L8.30762 8.57617C7.89751 8.75905 7.89744 9.35625 8.30762 9.53906L9.06738 9.87695C10.0551 10.3163 10.8476 11.1193 11.2871 12.1279L11.5332 12.6934C11.7138 13.1073 12.2863 13.1073 12.4668 12.6934L12.7139 12.1279C13.1534 11.1194 13.9449 10.3163 14.9326 9.87695L15.6924 9.53906C16.1026 9.35624 16.1025 8.75907 15.6924 8.57617L14.9746 8.25684C13.9616 7.8062 13.1556 6.9734 12.7236 5.93066L12.4707 5.31934Z" fill="currentColor"/>',"ai-agent":'<path d="M12 2C17.5228 2 22 6.47715 22 12C22 14.7096 20.9205 17.1697 19.1709 18.9697C17.3551 20.8376 14.8124 22 12 22C9.18756 22 6.64488 20.8376 4.8291 18.9697C3.07949 17.1697 2 14.7096 2 12C2 6.47715 6.47715 2 12 2ZM12 16C10.0022 16 8.20124 16.8375 6.9248 18.1816C8.30642 19.3175 10.0724 20 12 20C13.9274 20 15.6927 19.3173 17.0742 18.1816C15.7978 16.8377 13.9975 16 12 16ZM12 4C7.58172 4 4 7.58172 4 12C4 13.7701 4.57462 15.4044 5.54785 16.7295C7.1822 15.0483 9.46797 14 12 14C14.5318 14 16.8169 15.0485 18.4512 16.7295C19.4246 15.4043 20 13.7703 20 12C20 7.58172 16.4183 4 12 4ZM11.5293 5.31934C11.7058 4.89329 12.2943 4.89329 12.4707 5.31934L12.7236 5.93066C13.1556 6.97343 13.9615 7.80622 14.9746 8.25684L15.6924 8.5752C16.1029 8.75796 16.1028 9.35627 15.6924 9.53906L14.9326 9.87695C13.9448 10.3163 13.1534 11.1193 12.7139 12.1279L12.4668 12.6934C12.2864 13.1074 11.7137 13.1074 11.5332 12.6934L11.2871 12.1279C10.8476 11.1193 10.0552 10.3163 9.06738 9.87695L8.30762 9.53906C7.89719 9.35628 7.89717 8.75795 8.30762 8.5752L9.02539 8.25684C10.0385 7.80623 10.8445 6.97345 11.2764 5.93066L11.5293 5.31934Z" fill="currentColor"/>',"ai-generate-2":'<path d="M20.4668 8.69379L20.7134 8.12811C21.1529 7.11947 21.9445 6.31641 22.9323 5.87708L23.6919 5.53922C24.1027 5.35653 24.1027 4.75881 23.6919 4.57612L22.9748 4.25714C21.9616 3.80651 21.1558 2.97373 20.7238 1.93083L20.4706 1.31953C20.2942 0.893489 19.7058 0.893489 19.5293 1.31953L19.2761 1.93083C18.8442 2.97373 18.0384 3.80651 17.0252 4.25714L16.308 4.57612C15.8973 4.75881 15.8973 5.35653 16.308 5.53922L17.0677 5.87708C18.0555 6.31641 18.8471 7.11947 19.2866 8.12811L19.5331 8.69379C19.7136 9.10792 20.2864 9.10792 20.4668 8.69379ZM5.79993 16H7.95399L8.55399 14.5H11.4459L12.0459 16H14.1999L10.9999 8H8.99993L5.79993 16ZM9.99993 10.8852L10.6459 12.5H9.35399L9.99993 10.8852ZM15 16V8H17V16H15ZM3 3C2.44772 3 2 3.44772 2 4V20C2 20.5523 2.44772 21 3 21H21C21.5523 21 22 20.5523 22 20V11H20V19H4V5H14V3H3Z" fill="currentColor"/>',alert:'<path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM4.20568 19.0002H19.7941L11.9999 5.50017L4.20568 19.0002ZM10.9999 16.0002H12.9999V18.0002H10.9999V16.0002ZM10.9999 9.00017H12.9999V14.0002H10.9999V9.00017Z" fill="currentColor"/>',"align-justify":'<path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" fill="currentColor"/>',apple:'<path d="M15.778 8.20793C15.3053 8.1711 14.7974 8.28434 14.0197 8.58067C14.085 8.55577 13.2775 8.87173 13.0511 8.95077C12.5494 9.12593 12.1364 9.22198 11.6734 9.22198C11.2151 9.22198 10.7925 9.13042 10.3078 8.96683C10.1524 8.91441 9.99616 8.8564 9.80283 8.7809C9.71993 8.74852 9.41997 8.62947 9.3544 8.60379C8.70626 8.34996 8.34154 8.25434 8.03885 8.26181C6.88626 8.2765 5.79557 8.9421 5.16246 10.0442C3.87037 12.2875 4.58583 16.3428 6.47459 19.075C7.4802 20.5189 8.03062 21.035 8.25199 21.0279C8.4743 21.0183 8.63777 20.9713 9.03567 20.8026C9.11485 20.7689 9.11485 20.7689 9.202 20.7317C10.2077 20.3032 10.9118 20.114 11.9734 20.114C12.9944 20.114 13.6763 20.2997 14.6416 20.7159C14.7302 20.7542 14.7302 20.7542 14.8097 20.7884C15.2074 20.9588 15.3509 20.9962 15.6016 20.9902C15.9591 20.9846 16.4003 20.5726 17.3791 19.1362C17.6471 18.7447 17.884 18.3333 18.0895 17.9168C17.9573 17.8077 17.826 17.6917 17.6975 17.5693C16.4086 16.3408 15.6114 14.6845 15.5895 12.6391C15.5756 11.0186 16.1057 9.61487 16.999 8.45797C16.6293 8.3142 16.2216 8.23805 15.778 8.20793ZM15.9334 6.21398C16.6414 6.26198 18.6694 6.47798 19.9894 8.40998C19.8814 8.46998 17.5654 9.81397 17.5894 12.622C17.6254 15.982 20.5294 17.098 20.5654 17.11C20.5414 17.194 20.0974 18.706 19.0294 20.266C18.1054 21.622 17.1454 22.966 15.6334 22.99C14.1454 23.026 13.6654 22.114 11.9734 22.114C10.2694 22.114 9.74138 22.966 8.33738 23.026C6.87338 23.074 5.76938 21.562 4.83338 20.218C2.92538 17.458 1.47338 12.442 3.42938 9.04597C4.40138 7.35397 6.12938 6.28598 8.01338 6.26198C9.44138 6.22598 10.7974 7.22198 11.6734 7.22198C12.5374 7.22198 14.0854 6.06998 15.9334 6.21398ZM14.7934 4.38998C14.0134 5.32598 12.7414 6.05798 11.5054 5.96198C11.3374 4.68998 11.9614 3.35798 12.6814 2.52998C13.4854 1.59398 14.8294 0.897976 15.9454 0.849976C16.0894 2.14598 15.5734 3.45398 14.7934 4.38998Z" fill="currentColor"/>',archive:'<path d="M3 10H2V4.00293C2 3.44903 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.43788 22 4.00293V10H21V20.0015C21 20.553 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5525 3 20.0015V10ZM19 10H5V19H19V10ZM4 5V8H20V5H4ZM9 12H15V14H9V12Z" fill="currentColor"/>',"archive-stack":'<path d="M4 5H20V3H4V5ZM20 9H4V7H20V9ZM3 11H10V13H14V11H21V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V11ZM16 13V15H8V13H5V19H19V13H16Z" fill="currentColor"/>',"arrow-down":'<path d="M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z" fill="currentColor"/>',"arrow-down-s":'<path d="M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" fill="currentColor"/>',"arrow-go-back":'<path d="M5.82843 6.99955L8.36396 9.53509L6.94975 10.9493L2 5.99955L6.94975 1.0498L8.36396 2.46402L5.82843 4.99955H13C17.4183 4.99955 21 8.58127 21 12.9996C21 17.4178 17.4183 20.9996 13 20.9996H4V18.9996H13C16.3137 18.9996 19 16.3133 19 12.9996C19 9.68584 16.3137 6.99955 13 6.99955H5.82843Z" fill="currentColor"/>',"arrow-go-forward":'<path d="M18.1716 6.99955H11C7.68629 6.99955 5 9.68584 5 12.9996C5 16.3133 7.68629 18.9996 11 18.9996H20V20.9996H11C6.58172 20.9996 3 17.4178 3 12.9996C3 8.58127 6.58172 4.99955 11 4.99955H18.1716L15.636 2.46402L17.0503 1.0498L22 5.99955L17.0503 10.9493L15.636 9.53509L18.1716 6.99955Z" fill="currentColor"/>',"arrow-left":'<path d="M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z" fill="currentColor"/>',"arrow-left-long":'<path d="M22.0003 13.0001L22.0004 11.0002L5.82845 11.0002L9.77817 7.05044L8.36396 5.63623L2 12.0002L8.36396 18.3642L9.77817 16.9499L5.8284 13.0002L22.0003 13.0001Z" fill="currentColor"/>',"arrow-left-right":'<path d="M16.0503 12.0498L21 16.9996L16.0503 21.9493L14.636 20.5351L17.172 17.9988L4 17.9996V15.9996L17.172 15.9988L14.636 13.464L16.0503 12.0498ZM7.94975 2.0498L9.36396 3.46402L6.828 5.9988L20 5.99955V7.99955L6.828 7.9988L9.36396 10.5351L7.94975 11.9493L3 6.99955L7.94975 2.0498Z" fill="currentColor"/>',"arrow-left-s":'<path d="M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" fill="currentColor"/>',"arrow-right":'<path d="M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z" fill="currentColor"/>',"arrow-right-s":'<path d="M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" fill="currentColor"/>',"arrow-up-double":'<path d="M12 4.83582L5.79291 11.0429L7.20712 12.4571L12 7.66424L16.7929 12.4571L18.2071 11.0429L12 4.83582ZM12 10.4857L5.79291 16.6928L7.20712 18.107L12 13.3141L16.7929 18.107L18.2071 16.6928L12 10.4857Z" fill="currentColor"/>',"arrow-up":'<path d="M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" fill="currentColor"/>',"arrow-up-s":'<path d="M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" fill="currentColor"/>',"attachment-2":'<path d="M14.8287 7.75737L9.1718 13.4142C8.78127 13.8047 8.78127 14.4379 9.1718 14.8284C9.56232 15.219 10.1955 15.219 10.586 14.8284L16.2429 9.17158C17.4144 8.00001 17.4144 6.10052 16.2429 4.92894C15.0713 3.75737 13.1718 3.75737 12.0002 4.92894L6.34337 10.5858C4.39075 12.5384 4.39075 15.7042 6.34337 17.6569C8.29599 19.6095 11.4618 19.6095 13.4144 17.6569L19.0713 12L20.4855 13.4142L14.8287 19.0711C12.095 21.8047 7.66283 21.8047 4.92916 19.0711C2.19549 16.3374 2.19549 11.9053 4.92916 9.17158L10.586 3.51473C12.5386 1.56211 15.7045 1.56211 17.6571 3.51473C19.6097 5.46735 19.6097 8.63317 17.6571 10.5858L12.0002 16.2427C10.8287 17.4142 8.92916 17.4142 7.75759 16.2427C6.58601 15.0711 6.58601 13.1716 7.75759 12L13.4144 6.34316L14.8287 7.75737Z" fill="currentColor"/>',"bar-chart-2":'<path d="M2 13H8V21H2V13ZM16 8H22V21H16V8ZM9 3H15V21H9V3ZM4 15V19H6V15H4ZM11 5V19H13V5H11ZM18 10V19H20V10H18Z" fill="currentColor"/>',"bar-chart-box":'<path d="M3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM4 5V19H20V5H4ZM7 13H9V17H7V13ZM11 7H13V17H11V7ZM15 10H17V17H15V10Z" fill="currentColor"/>',book:'<path d="M3 18.5V5C3 3.34315 4.34315 2 6 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H6.5C4.567 22 3 20.433 3 18.5ZM19 20V17H6.5C5.67157 17 5 17.6716 5 18.5C5 19.3284 5.67157 20 6.5 20H19ZM5 15.3368C5.45463 15.1208 5.9632 15 6.5 15H19V4H6C5.44772 4 5 4.44772 5 5V15.3368Z" fill="currentColor"/>',"book-open":'<path d="M13 21V23H11V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H9C10.1947 3 11.2671 3.52375 12 4.35418C12.7329 3.52375 13.8053 3 15 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H13ZM20 19V5H15C13.8954 5 13 5.89543 13 7V19H20ZM11 19V7C11 5.89543 10.1046 5 9 5H4V19H11Z" fill="currentColor"/>',booklet:'<path d="M20.0049 2C21.1068 2 22 2.89821 22 3.9908V20.0092C22 21.1087 21.1074 22 20.0049 22H4V18H2V16H4V13H2V11H4V8H2V6H4V2H20.0049ZM8 4H6V20H8V4ZM20 4H10V20H20V4Z" fill="currentColor"/>',"brain-ai-3":'<path d="M19.5 4.7832V7.6709L22 9.11426V14.8867L19.499 16.3311L19.5 19.2178L14.5 22.1045L12 20.6611L9.5 22.1045L4.5 19.2178V16.3311L2 14.8877L2.00098 9.11328L4.5 7.66992V4.78418L9.5 1.89746L11.999 3.34082L14.501 1.89648L19.5 4.7832ZM13 5.07227V7H11V5.07324L9.5 4.20703L6.49902 5.93848V8.8252L4 10.2676V13.7334L6.5 15.1768V18.0635L9.5 19.7959L11 18.9287V17H13V18.9297L14.5 19.7959L17.5 18.0625V15.1768L20 13.7324V10.2695L17.499 8.8252L17.5 5.9375L14.501 4.20605L13 5.07227ZM14.2646 13.1602C14.3529 12.9473 14.6472 12.9473 14.7354 13.1602L14.8623 13.4648C15.0783 13.986 15.4807 14.4027 15.9873 14.6279L16.3457 14.7871C16.5511 14.8784 16.5511 15.1773 16.3457 15.2686L15.9658 15.4375C15.4721 15.6571 15.0761 16.0586 14.8564 16.5625L14.7334 16.8447C14.6432 17.0517 14.3569 17.0517 14.2666 16.8447L14.1436 16.5625C13.9239 16.0586 13.5279 15.6571 13.0342 15.4375L12.6543 15.2686C12.4489 15.1773 12.4489 14.8784 12.6543 14.7871L13.0127 14.6279C13.5193 14.4027 13.9217 13.986 14.1377 13.4648L14.2646 13.1602ZM9.58789 7.7793C9.74239 7.40671 10.2577 7.4067 10.4121 7.7793L10.6338 8.31445C11.0118 9.22695 11.7161 9.95624 12.6025 10.3506L13.2305 10.6289C13.5899 10.7887 13.5897 11.3117 13.2305 11.4717L12.5654 11.7676C11.7013 12.152 11.0086 12.8548 10.624 13.7373L10.4082 14.2324C10.2504 14.5948 9.74973 14.5948 9.5918 14.2324L9.37598 13.7373C8.99143 12.8548 8.29875 12.152 7.43457 11.7676L6.76953 11.4717C6.41033 11.3117 6.41022 10.7887 6.76953 10.6289L7.39746 10.3506C8.2839 9.95624 8.98832 9.22697 9.36621 8.31445L9.58789 7.7793Z" fill="currentColor"/>',brain:'<path d="M9 4C10.1046 4 11 4.89543 11 6V12.8271C10.1058 12.1373 8.96602 11.7305 7.6644 11.5136L7.3356 13.4864C8.71622 13.7165 9.59743 14.1528 10.1402 14.7408C10.67 15.3147 11 16.167 11 17.5C11 18.8807 9.88071 20 8.5 20C7.11929 20 6 18.8807 6 17.5V17.1493C6.43007 17.2926 6.87634 17.4099 7.3356 17.4864L7.6644 15.5136C6.92149 15.3898 6.1752 15.1144 5.42909 14.7599C4.58157 14.3573 4 13.499 4 12.5C4 11.6653 4.20761 11.0085 4.55874 10.5257C4.90441 10.0504 5.4419 9.6703 6.24254 9.47014L7 9.28078V6C7 4.89543 7.89543 4 9 4ZM12 3.35418C11.2671 2.52376 10.1947 2 9 2C6.79086 2 5 3.79086 5 6V7.77422C4.14895 8.11644 3.45143 8.64785 2.94126 9.34933C2.29239 10.2415 2 11.3347 2 12.5C2 14.0652 2.79565 15.4367 4 16.2422V17.5C4 19.9853 6.01472 22 8.5 22C9.91363 22 11.175 21.3482 12 20.3287C12.825 21.3482 14.0864 22 15.5 22C17.9853 22 20 19.9853 20 17.5V16.2422C21.2044 15.4367 22 14.0652 22 12.5C22 11.3347 21.7076 10.2415 21.0587 9.34933C20.5486 8.64785 19.8511 8.11644 19 7.77422V6C19 3.79086 17.2091 2 15 2C13.8053 2 12.7329 2.52376 12 3.35418ZM18 17.1493V17.5C18 18.8807 16.8807 20 15.5 20C14.1193 20 13 18.8807 13 17.5C13 16.167 13.33 15.3147 13.8598 14.7408C14.4026 14.1528 15.2838 13.7165 16.6644 13.4864L16.3356 11.5136C15.034 11.7305 13.8942 12.1373 13 12.8271V6C13 4.89543 13.8954 4 15 4C16.1046 4 17 4.89543 17 6V9.28078L17.7575 9.47014C18.5581 9.6703 19.0956 10.0504 19.4413 10.5257C19.7924 11.0085 20 11.6653 20 12.5C20 13.499 19.4184 14.3573 18.5709 14.7599C17.8248 15.1144 17.0785 15.3898 16.3356 15.5136L16.6644 17.4864C17.1237 17.4099 17.5699 17.2926 18 17.1493Z" fill="currentColor"/>',briefcase:'<path d="M7 5V2C7 1.44772 7.44772 1 8 1H16C16.5523 1 17 1.44772 17 2V5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V6C2 5.44772 2.44772 5 3 5H7ZM4 16V19H20V16H4ZM4 14H20V7H4V14ZM9 3V5H15V3H9ZM11 11H13V13H11V11Z" fill="currentColor"/>',bug:'<path d="M13 19.9C15.2822 19.4367 17 17.419 17 15V12C17 11.299 16.8564 10.6219 16.5846 10H7.41538C7.14358 10.6219 7 11.299 7 12V15C7 17.419 8.71776 19.4367 11 19.9V14H13V19.9ZM5.5358 17.6907C5.19061 16.8623 5 15.9534 5 15H2V13H5V12C5 11.3573 5.08661 10.7348 5.2488 10.1436L3.0359 8.86602L4.0359 7.13397L6.05636 8.30049C6.11995 8.19854 6.18609 8.09835 6.25469 8H17.7453C17.8139 8.09835 17.88 8.19854 17.9436 8.30049L19.9641 7.13397L20.9641 8.86602L18.7512 10.1436C18.9134 10.7348 19 11.3573 19 12V13H22V15H19C19 15.9534 18.8094 16.8623 18.4642 17.6907L20.9641 19.134L19.9641 20.866L17.4383 19.4077C16.1549 20.9893 14.1955 22 12 22C9.80453 22 7.84512 20.9893 6.56171 19.4077L4.0359 20.866L3.0359 19.134L5.5358 17.6907ZM8 6C8 3.79086 9.79086 2 12 2C14.2091 2 16 3.79086 16 6H8Z" fill="currentColor"/>',calendar:'<path d="M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z" fill="currentColor"/>',"calendar-schedule":'<path d="M7 3V1H9V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V9H20V5H17V7H15V5H9V7H7V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7ZM17 12C14.7909 12 13 13.7909 13 16C13 18.2091 14.7909 20 17 20C19.2091 20 21 18.2091 21 16C21 13.7909 19.2091 12 17 12ZM11 16C11 12.6863 13.6863 10 17 10C20.3137 10 23 12.6863 23 16C23 19.3137 20.3137 22 17 22C13.6863 22 11 19.3137 11 16ZM16 13V16.4142L18.2929 18.7071L19.7071 17.2929L18 15.5858V13H16Z" fill="currentColor"/>',camera:'<path d="M9.82843 5L7.82843 7H4V19H20V7H16.1716L14.1716 5H9.82843ZM9 3H15L17 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V6C2 5.44772 2.44772 5 3 5H7L9 3ZM12 18C8.96243 18 6.5 15.5376 6.5 12.5C6.5 9.46243 8.96243 7 12 7C15.0376 7 17.5 9.46243 17.5 12.5C17.5 15.5376 15.0376 18 12 18ZM12 16C13.933 16 15.5 14.433 15.5 12.5C15.5 10.567 13.933 9 12 9C10.067 9 8.5 10.567 8.5 12.5C8.5 14.433 10.067 16 12 16Z" fill="currentColor"/>',"chat-1":'<path d="M10 3H14C18.4183 3 22 6.58172 22 11C22 15.4183 18.4183 19 14 19V22.5C9 20.5 2 17.5 2 11C2 6.58172 5.58172 3 10 3ZM12 17H14C17.3137 17 20 14.3137 20 11C20 7.68629 17.3137 5 14 5H10C6.68629 5 4 7.68629 4 11C4 14.61 6.46208 16.9656 12 19.4798V17Z" fill="currentColor"/>',"chat-3":'<path d="M7.29117 20.8242L2 22L3.17581 16.7088C2.42544 15.3056 2 13.7025 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.6944 21.5746 7.29117 20.8242ZM7.58075 18.711L8.23428 19.0605C9.38248 19.6745 10.6655 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 13.3345 4.32549 14.6175 4.93949 15.7657L5.28896 16.4192L4.63416 19.3658L7.58075 18.711Z" fill="currentColor"/>',"chat-4":'<path d="M5.76282 17H20V5H4V18.3851L5.76282 17ZM6.45455 19L2 22.5V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V18C22 18.5523 21.5523 19 21 19H6.45455Z" fill="currentColor"/>',"chat-ai-3":'<path d="M12 1.99996C12.8632 1.99996 13.701 2.10973 14.5 2.31539L14 4.25192C13.3608 4.0874 12.6906 3.99997 12 3.99997C7.58174 3.99997 4.00002 7.58172 4 12C4 13.3344 4.3255 14.6174 4.93945 15.7656L5.28906 16.4189L4.63379 19.3662L7.58105 18.7109L8.23438 19.0605C9.38255 19.6745 10.6656 20 12 20C16.4183 20 20 16.4183 20 12C20 11.6771 19.9805 11.3587 19.9434 11.0459L21.9297 10.8095C21.976 11.1999 22 11.5972 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.69425 21.5746 7.29102 20.8242L2 22L3.17578 16.709C2.42541 15.3057 2 13.7025 2 12C2.00002 6.47714 6.47717 1.99996 12 1.99996ZM19.5293 1.3193C19.7058 0.893513 20.2942 0.8935 20.4707 1.3193L20.7236 1.93063C21.1555 2.97343 21.9615 3.80614 22.9746 4.2568L23.6914 4.57614C24.1022 4.75882 24.1022 5.35635 23.6914 5.53903L22.9326 5.87692C21.945 6.3162 21.1534 7.11943 20.7139 8.1279L20.4668 8.69333C20.2863 9.10747 19.7136 9.10747 19.5332 8.69333L19.2861 8.1279C18.8466 7.11942 18.0551 6.3162 17.0674 5.87692L16.3076 5.53903C15.8974 5.35618 15.8974 4.75895 16.3076 4.57614L17.0254 4.2568C18.0384 3.80614 18.8445 2.97343 19.2764 1.93063L19.5293 1.3193Z" fill="currentColor"/>',"chat-history":'<path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.298 22 8.69525 21.5748 7.29229 20.8248L2 22L3.17629 16.7097C2.42562 15.3063 2 13.7028 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 13.3347 4.32563 14.6181 4.93987 15.7664L5.28952 16.4201L4.63445 19.3663L7.58189 18.7118L8.23518 19.061C9.38315 19.6747 10.6659 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM13 7V12H17V14H11V7H13Z" fill="currentColor"/>',"chat-new":'<path d="M14 3V5H4V18.3851L5.76282 17H20V10H22V18C22 18.5523 21.5523 19 21 19H6.45455L2 22.5V4C2 3.44772 2.44772 3 3 3H14ZM19 3V0H21V3H24V5H21V8H19V5H16V3H19Z" fill="currentColor"/>',check:'<path d="M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" fill="currentColor"/>',"checkbox-blank-circle-fill":'<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" fill="currentColor"/>',"checkbox-blank":'<path d="M4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM5 5V19H19V5H5Z" fill="currentColor"/>',"checkbox-circle":'<path d="M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z" fill="currentColor"/>',checkbox:'<path d="M4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM5 5V19H19V5H5ZM11.0026 16L6.75999 11.7574L8.17421 10.3431L11.0026 13.1716L16.6595 7.51472L18.0737 8.92893L11.0026 16Z" fill="currentColor"/>',"checkbox-multiple":'<path d="M6.99979 7V3C6.99979 2.44772 7.4475 2 7.99979 2H20.9998C21.5521 2 21.9998 2.44772 21.9998 3V16C21.9998 16.5523 21.5521 17 20.9998 17H17V20.9925C17 21.5489 16.551 22 15.9925 22H3.00728C2.45086 22 2 21.5511 2 20.9925L2.00276 8.00748C2.00288 7.45107 2.4518 7 3.01025 7H6.99979ZM8.99979 7H15.9927C16.549 7 17 7.44892 17 8.00748V15H19.9998V4H8.99979V7ZM15 9H4.00255L4.00021 20H15V9ZM8.50242 18L4.96689 14.4645L6.3811 13.0503L8.50242 15.1716L12.7451 10.9289L14.1593 12.3431L8.50242 18Z" fill="currentColor"/>',clipboard:'<path d="M7 4V2H17V4H20.0066C20.5552 4 21 4.44495 21 4.9934V21.0066C21 21.5552 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5551 3 21.0066V4.9934C3 4.44476 3.44495 4 3.9934 4H7ZM7 6H5V20H19V6H17V8H7V6ZM9 4V6H15V4H9Z" fill="currentColor"/>',"close-circle":'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 10.5858L14.8284 7.75736L16.2426 9.17157L13.4142 12L16.2426 14.8284L14.8284 16.2426L12 13.4142L9.17157 16.2426L7.75736 14.8284L10.5858 12L7.75736 9.17157L9.17157 7.75736L12 10.5858Z" fill="currentColor"/>',close:'<path d="M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" fill="currentColor"/>',cloud:'<path d="M12 2C15.866 2 19 5.13401 19 9C19 9.11351 18.9973 9.22639 18.992 9.33857C21.3265 10.16 23 12.3846 23 15C23 18.3137 20.3137 21 17 21H7C3.68629 21 1 18.3137 1 15C1 12.3846 2.67346 10.16 5.00804 9.33857C5.0027 9.22639 5 9.11351 5 9C5 5.13401 8.13401 2 12 2ZM12 4C9.23858 4 7 6.23858 7 9C7 9.08147 7.00193 9.16263 7.00578 9.24344L7.07662 10.7309L5.67183 11.2252C4.0844 11.7837 3 13.2889 3 15C3 17.2091 4.79086 19 7 19H17C19.2091 19 21 17.2091 21 15C21 12.79 19.21 11 17 11C15.233 11 13.7337 12.1457 13.2042 13.7347L11.3064 13.1021C12.1005 10.7185 14.35 9 17 9C17 6.23858 14.7614 4 12 4Z" fill="currentColor"/>',"cloud-off":'<path d="M3.51472 2.10051L22.6066 21.1924L21.1924 22.6066L19.1782 20.5924C18.503 20.8556 17.7684 21 17 21H7C3.68629 21 1 18.3137 1 15C1 12.3846 2.67346 10.16 5.00804 9.33857C5.0027 9.22639 5 9.11351 5 9C5 8.22228 5.12683 7.47418 5.36094 6.77527L2.10051 3.51472L3.51472 2.10051ZM7 9C7 9.08147 7.00193 9.16263 7.00578 9.24344L7.07662 10.7309L5.67183 11.2252C4.0844 11.7837 3 13.2889 3 15C3 17.2091 4.79086 19 7 19H17C17.1858 19 17.3687 18.9873 17.5478 18.9628L7.03043 8.44519C7.01032 8.62736 7 8.81247 7 9ZM12 2C15.866 2 19 5.13401 19 9C19 9.11351 18.9973 9.22639 18.992 9.33857C21.3265 10.16 23 12.3846 23 15C23 16.0883 22.7103 17.1089 22.2037 17.9889L20.7111 16.4955C20.8974 16.0335 21 15.5287 21 15C21 12.79 19.21 11 17 11C16.4711 11 15.9661 11.1027 15.5039 11.2892L14.0111 9.7964C14.8912 9.28978 15.9118 9 17 9C17 6.23858 14.7614 4 12 4C10.9295 4 9.93766 4.33639 9.12428 4.90922L7.69418 3.48056C8.88169 2.55284 10.3763 2 12 2Z" fill="currentColor"/>',"code-ai":'<path d="M17.7134 10.1281L17.4668 10.6938C17.2864 11.1079 16.7136 11.1079 16.5331 10.6938L16.2866 10.1281C15.8471 9.11947 15.0555 8.31641 14.0677 7.87708L13.308 7.53922C12.8973 7.35653 12.8973 6.75881 13.308 6.57612L14.0252 6.25714C15.0384 5.80651 15.8442 4.97373 16.2761 3.93083L16.5293 3.31953C16.7058 2.89349 17.2942 2.89349 17.4706 3.31953L17.7238 3.93083C18.1558 4.97373 18.9616 5.80651 19.9748 6.25714L20.6919 6.57612C21.1027 6.75881 21.1027 7.35653 20.6919 7.53922L19.9323 7.87708C18.9445 8.31641 18.1529 9.11947 17.7134 10.1281ZM2.82843 12.0001L7.07107 16.2428L5.65685 17.657L0 12.0001L5.65685 6.34326L7.07107 7.75748L2.82843 12.0001ZM18.3429 17.6572L23.9998 12.0003L21.1714 9.17188L19.7571 10.5861L21.1714 12.0003L16.9287 16.2429L18.3429 17.6572Z" fill="currentColor"/>',"code-box":'<path d="M3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM4 5V19H20V5H4ZM20 12L16.4645 15.5355L15.0503 14.1213L17.1716 12L15.0503 9.87868L16.4645 8.46447L20 12ZM6.82843 12L8.94975 14.1213L7.53553 15.5355L4 12L7.53553 8.46447L8.94975 9.87868L6.82843 12ZM11.2443 17H9.11597L12.7557 7H14.884L11.2443 17Z" fill="currentColor"/>',code:'<path d="M23 12L15.9289 19.0711L14.5147 17.6569L20.1716 12L14.5147 6.34317L15.9289 4.92896L23 12ZM3.82843 12L9.48528 17.6569L8.07107 19.0711L1 12L8.07107 4.92896L9.48528 6.34317L3.82843 12Z" fill="currentColor"/>',"code-sslash":'<path d="M24 12L18.3431 17.6569L16.9289 16.2426L21.1716 12L16.9289 7.75736L18.3431 6.34315L24 12ZM2.82843 12L7.07107 16.2426L5.65685 17.6569L0 12L5.65685 6.34315L7.07107 7.75736L2.82843 12ZM9.78845 21H7.66009L14.2116 3H16.3399L9.78845 21Z" fill="currentColor"/>',command:'<path d="M10 8H14V6.5C14 4.567 15.567 3 17.5 3C19.433 3 21 4.567 21 6.5C21 8.433 19.433 10 17.5 10H16V14H17.5C19.433 14 21 15.567 21 17.5C21 19.433 19.433 21 17.5 21C15.567 21 14 19.433 14 17.5V16H10V17.5C10 19.433 8.433 21 6.5 21C4.567 21 3 19.433 3 17.5C3 15.567 4.567 14 6.5 14H8V10H6.5C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5V8ZM8 8V6.5C8 5.67157 7.32843 5 6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8H8ZM8 16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19C7.32843 19 8 18.3284 8 17.5V16ZM16 8H17.5C18.3284 8 19 7.32843 19 6.5C19 5.67157 18.3284 5 17.5 5C16.6716 5 16 5.67157 16 6.5V8ZM16 16V17.5C16 18.3284 16.6716 19 17.5 19C18.3284 19 19 18.3284 19 17.5C19 16.6716 18.3284 16 17.5 16H16ZM10 10V14H14V10H10Z" fill="currentColor"/>',computer:'<path d="M4 16H20V5H4V16ZM13 18V20H17V22H7V20H11V18H2.9918C2.44405 18 2 17.5511 2 16.9925V4.00748C2 3.45107 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44892 22 4.00748V16.9925C22 17.5489 21.5447 18 21.0082 18H13Z" fill="currentColor"/>',"contract-up-down":'<path d="M5.79285 5.20718 12 11.4143 18.2071 5.20718 16.7928 3.79297 12 8.58586 7.20706 3.79297 5.79285 5.20718ZM18.2072 18.7928 12.0001 12.5857 5.793 18.7928 7.20721 20.207 12.0001 15.4141 16.793 20.207 18.2072 18.7928Z" fill="currentColor"/>',"corner-down-left":'<path d="M19.0001 13.9999L19.0002 5L17.0002 4.99997L17.0001 11.9999L6.8283 12L10.778 8.05024L9.36382 6.63603L2.99986 13L9.36382 19.364L10.778 17.9497L6.82826 14L19.0001 13.9999Z" fill="currentColor"/>',cursor:'<path d="M15.3873 13.4975L17.9403 20.5117L13.2418 22.2218L10.6889 15.2076L6.79004 17.6529L8.4086 1.63318L19.9457 12.8646L15.3873 13.4975ZM15.3768 19.3163L12.6618 11.8568L15.6212 11.4459L9.98201 5.9561L9.19088 13.7863L11.7221 12.1988L14.4371 19.6583L15.3768 19.3163Z" fill="currentColor"/>',"database-2":'<path d="M5 12.5C5 12.8134 5.46101 13.3584 6.53047 13.8931C7.91405 14.5849 9.87677 15 12 15C14.1232 15 16.0859 14.5849 17.4695 13.8931C18.539 13.3584 19 12.8134 19 12.5V10.3287C17.35 11.3482 14.8273 12 12 12C9.17273 12 6.64996 11.3482 5 10.3287V12.5ZM19 15.3287C17.35 16.3482 14.8273 17 12 17C9.17273 17 6.64996 16.3482 5 15.3287V17.5C5 17.8134 5.46101 18.3584 6.53047 18.8931C7.91405 19.5849 9.87677 20 12 20C14.1232 20 16.0859 19.5849 17.4695 18.8931C18.539 18.3584 19 17.8134 19 17.5V15.3287ZM3 17.5V7.5C3 5.01472 7.02944 3 12 3C16.9706 3 21 5.01472 21 7.5V17.5C21 19.9853 16.9706 22 12 22C7.02944 22 3 19.9853 3 17.5ZM12 10C14.1232 10 16.0859 9.58492 17.4695 8.89313C18.539 8.3584 19 7.81342 19 7.5C19 7.18658 18.539 6.6416 17.4695 6.10687C16.0859 5.41508 14.1232 5 12 5C9.87677 5 7.91405 5.41508 6.53047 6.10687C5.46101 6.6416 5 7.18658 5 7.5C5 7.81342 5.46101 8.3584 6.53047 8.89313C7.91405 9.58492 9.87677 10 12 10Z" fill="currentColor"/>',"delete-bin":'<path d="M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" fill="currentColor"/>',"discord-fill":'<path d="M19.3034 5.33716C17.9344 4.71103 16.4805 4.2547 14.9629 4C14.7719 4.32899 14.5596 4.77471 14.411 5.12492C12.7969 4.89144 11.1944 4.89144 9.60255 5.12492C9.45397 4.77471 9.2311 4.32899 9.05068 4C7.52251 4.2547 6.06861 4.71103 4.70915 5.33716C1.96053 9.39111 1.21766 13.3495 1.5891 17.2549C3.41443 18.5815 5.17612 19.388 6.90701 19.9187C7.33151 19.3456 7.71356 18.73 8.04255 18.0827C7.41641 17.8492 6.82211 17.5627 6.24904 17.2231C6.39762 17.117 6.5462 17.0003 6.68416 16.8835C10.1438 18.4648 13.8911 18.4648 17.3082 16.8835C17.4568 17.0003 17.5948 17.117 17.7434 17.2231C17.1703 17.5627 16.576 17.8492 15.9499 18.0827C16.2789 18.73 16.6609 19.3456 17.0854 19.9187C18.8152 19.388 20.5875 18.5815 22.4033 17.2549C22.8596 12.7341 21.6806 8.80747 19.3034 5.33716ZM8.5201 14.8459C7.48007 14.8459 6.63107 13.9014 6.63107 12.7447C6.63107 11.5879 7.45884 10.6434 8.5201 10.6434C9.57071 10.6434 10.4303 11.5879 10.4091 12.7447C10.4091 13.9014 9.57071 14.8459 8.5201 14.8459ZM15.4936 14.8459C14.4535 14.8459 13.6034 13.9014 13.6034 12.7447C13.6034 11.5879 14.4323 10.6434 15.4936 10.6434C16.5442 10.6434 17.4038 11.5879 17.3825 12.7447C17.3825 13.9014 16.5548 14.8459 15.4936 14.8459Z" fill="currentColor"/>',"donut-chart-fill":'<path d="M10.9999 2.04938L11 5.07088C7.6077 5.55612 5 8.47352 5 12C5 15.866 8.13401 19 12 19C13.5723 19 15.0236 18.4816 16.1922 17.6064L18.3289 19.7428C16.605 21.1536 14.4014 22 12 22C6.47715 22 2 17.5228 2 12C2 6.81468 5.94662 2.55115 10.9999 2.04938ZM21.9506 13.0001C21.7509 15.0111 20.9555 16.8468 19.7433 18.3283L17.6064 16.1922C18.2926 15.2759 18.7595 14.1859 18.9291 13L21.9506 13.0001ZM13.0011 2.04948C17.725 2.51902 21.4815 6.27589 21.9506 10.9999L18.9291 10.9998C18.4905 7.93452 16.0661 5.50992 13.001 5.07103L13.0011 2.04948Z" fill="currentColor"/>',"donut-chart":'<path d="M10.9999 2.04938L11 4.06188C7.05371 4.55396 4 7.92036 4 12C4 16.4183 7.58172 20 12 20C13.8487 20 15.5509 19.3729 16.9055 18.3199L18.3289 19.7428C16.605 21.1536 14.4014 22 12 22C6.47715 22 2 17.5228 2 12C2 6.81468 5.94662 2.55115 10.9999 2.04938ZM21.9506 13.0001C21.7509 15.0111 20.9555 16.8468 19.7433 18.3283L18.3199 16.9055C19.1801 15.799 19.756 14.4606 19.9381 12.9999L21.9506 13.0001ZM13.0011 2.04948C17.725 2.51902 21.4815 6.27589 21.9506 10.9999L19.9381 11C19.4869 7.38162 16.6192 4.51364 13.001 4.062L13.0011 2.04948Z" fill="currentColor"/>',"download-cloud":'<path d="M1 14.5C1 12.1716 2.22429 10.1291 4.06426 8.9812C4.56469 5.044 7.92686 2 12 2C16.0731 2 19.4353 5.044 19.9357 8.9812C21.7757 10.1291 23 12.1716 23 14.5C23 17.9216 20.3562 20.7257 17 20.9811L7 21C3.64378 20.7257 1 17.9216 1 14.5ZM16.8483 18.9868C19.1817 18.8093 21 16.8561 21 14.5C21 12.927 20.1884 11.4962 18.8771 10.6781L18.0714 10.1754L17.9517 9.23338C17.5735 6.25803 15.0288 4 12 4C8.97116 4 6.42647 6.25803 6.0483 9.23338L5.92856 10.1754L5.12288 10.6781C3.81156 11.4962 3 12.927 3 14.5C3 16.8561 4.81833 18.8093 7.1517 18.9868L7.325 19H16.675L16.8483 18.9868ZM13 12H16L12 17L8 12H11V8H13V12Z" fill="currentColor"/>',download:'<path d="M3 19H21V21H3V19ZM13 13.1716L19.0711 7.1005L20.4853 8.51472L12 17L3.51472 8.51472L4.92893 7.1005L11 13.1716V2H13V13.1716Z" fill="currentColor"/>',"drag-move-2":'<path d="M11 11V5.82843L9.17157 7.65685L7.75736 6.24264L12 2L16.2426 6.24264L14.8284 7.65685L13 5.82843V11H18.1716L16.3431 9.17157L17.7574 7.75736L22 12L17.7574 16.2426L16.3431 14.8284L18.1716 13H13V18.1716L14.8284 16.3431L16.2426 17.7574L12 22L7.75736 17.7574L9.17157 16.3431L11 18.1716V13H5.82843L7.65685 14.8284L6.24264 16.2426L2 12L6.24264 7.75736L7.65685 9.17157L5.82843 11H11Z" fill="currentColor"/>',draggable:'<path d="M8.5 7C9.32843 7 10 6.32843 10 5.5C10 4.67157 9.32843 4 8.5 4C7.67157 4 7 4.67157 7 5.5C7 6.32843 7.67157 7 8.5 7ZM8.5 13.5C9.32843 13.5 10 12.8284 10 12C10 11.1716 9.32843 10.5 8.5 10.5C7.67157 10.5 7 11.1716 7 12C7 12.8284 7.67157 13.5 8.5 13.5ZM10 18.5C10 19.3284 9.32843 20 8.5 20C7.67157 20 7 19.3284 7 18.5C7 17.6716 7.67157 17 8.5 17C9.32843 17 10 17.6716 10 18.5ZM15.5 7C16.3284 7 17 6.32843 17 5.5C17 4.67157 16.3284 4 15.5 4C14.6716 4 14 4.67157 14 5.5C14 6.32843 14.6716 7 15.5 7ZM17 12C17 12.8284 16.3284 13.5 15.5 13.5C14.6716 13.5 14 12.8284 14 12C14 11.1716 14.6716 10.5 15.5 10.5C16.3284 10.5 17 11.1716 17 12ZM15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z" fill="currentColor"/>',earth:'<path d="M6.23509 6.45329C4.85101 7.89148 4 9.84636 4 12C4 16.4183 7.58172 20 12 20C13.0808 20 14.1116 19.7857 15.0521 19.3972C15.1671 18.6467 14.9148 17.9266 14.8116 17.6746C14.582 17.115 13.8241 16.1582 12.5589 14.8308C12.2212 14.4758 12.2429 14.2035 12.3636 13.3943L12.3775 13.3029C12.4595 12.7486 12.5971 12.4209 14.4622 12.1248C15.4097 11.9746 15.6589 12.3533 16.0043 12.8777C16.0425 12.9358 16.0807 12.9928 16.1198 13.0499C16.4479 13.5297 16.691 13.6394 17.0582 13.8064C17.2227 13.881 17.428 13.9751 17.7031 14.1314C18.3551 14.504 18.3551 14.9247 18.3551 15.8472V15.9518C18.3551 16.3434 18.3168 16.6872 18.2566 16.9859C19.3478 15.6185 20 13.8854 20 12C20 8.70089 18.003 5.8682 15.1519 4.64482C14.5987 5.01813 13.8398 5.54726 13.575 5.91C13.4396 6.09538 13.2482 7.04166 12.6257 7.11976C12.4626 7.14023 12.2438 7.12589 12.012 7.11097C11.3905 7.07058 10.5402 7.01606 10.268 7.75495C10.0952 8.2232 10.0648 9.49445 10.6239 10.1543C10.7134 10.2597 10.7307 10.4547 10.6699 10.6735C10.59 10.9608 10.4286 11.1356 10.3783 11.1717C10.2819 11.1163 10.0896 10.8931 9.95938 10.7412C9.64554 10.3765 9.25405 9.92233 8.74797 9.78176C8.56395 9.73083 8.36166 9.68867 8.16548 9.64736C7.6164 9.53227 6.99443 9.40134 6.84992 9.09302C6.74442 8.8672 6.74488 8.55621 6.74529 8.22764C6.74529 7.8112 6.74529 7.34029 6.54129 6.88256C6.46246 6.70541 6.35689 6.56446 6.23509 6.45329ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22Z" fill="currentColor"/>',"edit-2":'<path d="M5 18.89H6.41421L15.7279 9.57627L14.3137 8.16206L5 17.4758V18.89ZM21 20.89H3V16.6473L16.435 3.21231C16.8256 2.82179 17.4587 2.82179 17.8492 3.21231L20.6777 6.04074C21.0682 6.43126 21.0682 7.06443 20.6777 7.45495L9.24264 18.89H21V20.89ZM15.7279 6.74785L17.1421 8.16206L18.5563 6.74785L17.1421 5.33363L15.7279 6.74785Z" fill="currentColor"/>',edit:'<path d="M6.41421 15.89L16.5563 5.74785L15.1421 4.33363L5 14.4758V15.89H6.41421ZM7.24264 17.89H3V13.6473L14.435 2.21231C14.8256 1.82179 15.4587 1.82179 15.8492 2.21231L18.6777 5.04074C19.0682 5.43126 19.0682 6.06443 18.6777 6.45495L7.24264 17.89ZM3 19.89H21V21.89H3V19.89Z" fill="currentColor"/>',"emotion-happy":'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM7 13H9C9 14.6569 10.3431 16 12 16C13.6569 16 15 14.6569 15 13H17C17 15.7614 14.7614 18 12 18C9.23858 18 7 15.7614 7 13ZM8 11C7.17157 11 6.5 10.3284 6.5 9.5C6.5 8.67157 7.17157 8 8 8C8.82843 8 9.5 8.67157 9.5 9.5C9.5 10.3284 8.82843 11 8 11ZM16 11C15.1716 11 14.5 10.3284 14.5 9.5C14.5 8.67157 15.1716 8 16 8C16.8284 8 17.5 8.67157 17.5 9.5C17.5 10.3284 16.8284 11 16 11Z" fill="currentColor"/>',"equalizer-2":'<path d="M5 7C5 6.17157 5.67157 5.5 6.5 5.5C7.32843 5.5 8 6.17157 8 7C8 7.82843 7.32843 8.5 6.5 8.5C5.67157 8.5 5 7.82843 5 7ZM6.5 3.5C4.567 3.5 3 5.067 3 7C3 8.933 4.567 10.5 6.5 10.5C8.433 10.5 10 8.933 10 7C10 5.067 8.433 3.5 6.5 3.5ZM12 8H20V6H12V8ZM16 17C16 16.1716 16.6716 15.5 17.5 15.5C18.3284 15.5 19 16.1716 19 17C19 17.8284 18.3284 18.5 17.5 18.5C16.6716 18.5 16 17.8284 16 17ZM17.5 13.5C15.567 13.5 14 15.067 14 17C14 18.933 15.567 20.5 17.5 20.5C19.433 20.5 21 18.933 21 17C21 15.067 19.433 13.5 17.5 13.5ZM4 16V18H12V16H4Z" fill="currentColor"/>',"error-warning":'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" fill="currentColor"/>',"expand-up-down":'<path d="M18.2072 9.0428 12.0001 2.83569 5.793 9.0428 7.20721 10.457 12.0001 5.66412 16.793 10.457 18.2072 9.0428ZM5.79285 14.9572 12 21.1643 18.2071 14.9572 16.7928 13.543 12 18.3359 7.20706 13.543 5.79285 14.9572Z" fill="currentColor"/>',"external-link":'<path d="M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z" fill="currentColor"/>',eye:'<path d="M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z" fill="currentColor"/>',"eye-off":'<path d="M17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968ZM5.9356 7.3497C4.60673 8.56015 3.6378 10.1672 3.22278 12.0002C4.14022 16.0521 7.7646 19.0002 12.0003 19.0002C13.5997 19.0002 15.112 18.5798 16.4243 17.8384L14.396 15.8101C13.7023 16.2472 12.8808 16.5002 12.0003 16.5002C9.51498 16.5002 7.50026 14.4854 7.50026 12.0002C7.50026 11.1196 7.75317 10.2981 8.19031 9.60442L5.9356 7.3497ZM12.9139 14.328L9.67246 11.0866C9.5613 11.3696 9.50026 11.6777 9.50026 12.0002C9.50026 13.3809 10.6196 14.5002 12.0003 14.5002C12.3227 14.5002 12.6309 14.4391 12.9139 14.328ZM20.8068 16.5925L19.376 15.1617C20.0319 14.2268 20.5154 13.1586 20.7777 12.0002C19.8603 7.94818 16.2359 5.00016 12.0003 5.00016C11.1544 5.00016 10.3329 5.11773 9.55249 5.33818L7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925ZM11.7229 7.50857C11.8146 7.50299 11.9071 7.50016 12.0003 7.50016C14.4855 7.50016 16.5003 9.51488 16.5003 12.0002C16.5003 12.0933 16.4974 12.1858 16.4919 12.2775L11.7229 7.50857Z" fill="currentColor"/>',"file-add":'<path d="M15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918ZM11 11V8H13V11H16V13H13V16H11V13H8V11H11Z" fill="currentColor"/>',"file-check-fill":'<path d="M20.9998 7L16 2H3.9985C3.44749 2 3 2.44405 3 2.9918V21.0082C3 21.5447 3.44476 22 3.9934 22H12.3414C12.1203 21.3744 12 20.7013 12 20C12 16.6863 14.6863 14 18 14C19.0928 14 20.1174 14.2922 20.9999 14.8026L20.9998 7ZM14.4646 19.4647L18.0001 23.0002L22.9498 18.0505L21.5356 16.6362L18.0001 20.1718L15.8788 18.0505L14.4646 19.4647Z" fill="currentColor"/>',"file-check":'<path d="M12 20V22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9998 7V14H19V8H15V4H5V20H12ZM14.4646 19.4647L18.0001 23.0002L22.9498 18.0505L21.5356 16.6362L18.0001 20.1718L15.8788 18.0505L14.4646 19.4647Z" fill="currentColor"/>',"file-code":'<path d="M15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918ZM17.6569 12L14.1213 15.5355L12.7071 14.1213L14.8284 12L12.7071 9.87868L14.1213 8.46447L17.6569 12ZM6.34315 12L9.87868 8.46447L11.2929 9.87868L9.17157 12L11.2929 14.1213L9.87868 15.5355L6.34315 12Z" fill="currentColor"/>',"file-copy-2":'<path d="M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6ZM7 11H13V13H7V11ZM7 15H13V17H7V15Z" fill="currentColor"/>',"file-copy":'<path d="M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z" fill="currentColor"/>',"file-edit":'<path d="M21 6.75736L19 8.75736V4H10V9H5V20H19V17.2426L21 15.2426V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V6.75736ZM21.7782 8.80761L23.1924 10.2218L15.4142 18L13.9979 17.9979L14 16.5858L21.7782 8.80761Z" fill="currentColor"/>',"file-image":'<path d="M15 8V4H5V20H19V8H15ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918ZM11 9.5C11 10.3284 10.3284 11 9.5 11C8.67157 11 8 10.3284 8 9.5C8 8.67157 8.67157 8 9.5 8C10.3284 8 11 8.67157 11 9.5ZM17.5 17L13.5 10L8 17H17.5Z" fill="currentColor"/>',file:'<path d="M9 2.00318V2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8L9 2.00318ZM5.82918 8H9V4.83086L5.82918 8ZM11 4V9C11 9.55228 10.5523 10 10 10H5V20H19V4H11Z" fill="currentColor"/>',"file-list-2":'<path d="M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H13V17H8V15Z" fill="currentColor"/>',"file-music":'<path d="M16 8V10H13V14.5C13 15.8807 11.8807 17 10.5 17C9.11929 17 8 15.8807 8 14.5C8 13.1193 9.11929 12 10.5 12C10.6712 12 10.8384 12.0172 11 12.05V8H15V4H5V20H19V8H16ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918Z" fill="currentColor"/>',"file-pdf":'<path d="M12 16H8V8H12C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16ZM10 10V14H12C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10H10ZM15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918Z" fill="currentColor"/>',"file-search":'<path d="M15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918ZM13.529 14.4464C11.9951 15.3524 9.98633 15.1464 8.66839 13.8284C7.1063 12.2663 7.1063 9.73367 8.66839 8.17157C10.2305 6.60948 12.7631 6.60948 14.3252 8.17157C15.6432 9.48951 15.8492 11.4983 14.9432 13.0322L17.1537 15.2426L15.7395 16.6569L13.529 14.4464ZM12.911 12.4142C13.6921 11.6332 13.6921 10.3668 12.911 9.58579C12.13 8.80474 10.8637 8.80474 10.0826 9.58579C9.30156 10.3668 9.30156 11.6332 10.0826 12.4142C10.8637 13.1953 12.13 13.1953 12.911 12.4142Z" fill="currentColor"/>',"file-text":'<path d="M21 8V20.9932C21 21.5501 20.5552 22 20.0066 22H3.9934C3.44495 22 3 21.556 3 21.0082V2.9918C3 2.45531 3.4487 2 4.00221 2H14.9968L21 8ZM19 9H14V4H5V20H19V9ZM8 7H11V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z" fill="currentColor"/>',"file-transfer":'<path d="M15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918ZM12 11V8L16 12L12 16V13H8V11H12Z" fill="currentColor"/>',"file-video":'<path d="M15 4V8H19V20H5V4H15ZM3.9985 2C3.44749 2 3 2.44405 3 2.9918V21.0082C3 21.5447 3.44476 22 3.9934 22H20.0066C20.5551 22 21 21.5489 21 20.9925L20.9997 7L16 2H3.9985ZM15.0008 11.667L10.1219 8.41435C10.0562 8.37054 9.979 8.34717 9.9 8.34717C9.6791 8.34717 9.5 8.52625 9.5 8.74717V15.2524C9.5 15.3314 9.5234 15.4086 9.5672 15.4743C9.6897 15.6581 9.9381 15.7078 10.1219 15.5852L15.0008 12.3326C15.0447 12.3033 15.0824 12.2656 15.1117 12.2217C15.2343 12.0379 15.1846 11.7895 15.0008 11.667Z" fill="currentColor"/>',flashlight:'<path d="M13 9H21L11 24V15H4L13 0V9ZM11 11V7.22063L7.53238 13H13V17.3944L17.263 11H11Z" fill="currentColor"/>',flask:'<path d="M15.9994 2V4H14.9994V7.24291C14.9994 8.40051 15.2506 9.54432 15.7357 10.5954L20.017 19.8714C20.3641 20.6236 20.0358 21.5148 19.2836 21.8619C19.0865 21.9529 18.8721 22 18.655 22H5.34375C4.51532 22 3.84375 21.3284 3.84375 20.5C3.84375 20.2829 3.89085 20.0685 3.98181 19.8714L8.26306 10.5954C8.74816 9.54432 8.99939 8.40051 8.99939 7.24291V4H7.99939V2H15.9994ZM13.3873 10.0012H10.6115C10.5072 10.3644 10.3823 10.7221 10.2371 11.0724L10.079 11.4335L6.12439 20H17.8734L13.9198 11.4335C13.7054 10.9691 13.5276 10.4902 13.3873 10.0012ZM10.9994 7.24291C10.9994 7.49626 10.9898 7.7491 10.9706 8.00087H13.0282C13.0189 7.87982 13.0119 7.75852 13.0072 7.63704L12.9994 7.24291V4H10.9994V7.24291Z" fill="currentColor"/>',"folder-3-fill":'<path d="M22 8V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V7H21C21.5523 7 22 7.44772 22 8ZM12.4142 5H2V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5Z" fill="currentColor"/>',"folder-3":'<path d="M12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5ZM4 7V19H20V7H4Z" fill="currentColor"/>',"folder-6":'<path d="M2 4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21L3 21C2.45 21 2 20.55 2 20V4ZM10.5858 6L9.58579 5H4V7H9.58579L10.5858 6ZM4 9V19L20 19V7H12.4142L10.4142 9H4Z" fill="currentColor"/>',"folder-add":'<path d="M12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5ZM4 5V19H20V7H11.5858L9.58579 5H4ZM11 12V9H13V12H16V14H13V17H11V14H8V12H11Z" fill="currentColor"/>',folder:'<path d="M4 5V19H20V7H11.5858L9.58579 5H4ZM12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5Z" fill="currentColor"/>',"folder-open-fill":'<path d="M3 21C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5H20C20.5523 5 21 5.44772 21 6V9H4V18.996L6 11H22.5L20.1894 20.2425C20.0781 20.6877 19.6781 21 19.2192 21H3Z" fill="currentColor"/>',"folder-open":'<path d="M3 21C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5H20C20.5523 5 21 5.44772 21 6V9H19V7H11.5858L9.58579 5H4V16.998L5.5 11H22.5L20.1894 20.2425C20.0781 20.6877 19.6781 21 19.2192 21H3ZM19.9384 13H7.06155L5.56155 19H18.4384L19.9384 13Z" fill="currentColor"/>',"folder-received":'<path d="M22 13H20V7H11.5858L9.58579 5H4V19H13V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5H21C21.5523 5 22 5.44772 22 6V13ZM20 17H23V19H20V22.5L15 18L20 13.5V17Z" fill="currentColor"/>',folders:'<path d="M6 7V4C6 3.44772 6.44772 3 7 3H13.4142L15.4142 5H21C21.5523 5 22 5.44772 22 6V16C22 16.5523 21.5523 17 21 17H18V20C18 20.5523 17.5523 21 17 21H3C2.44772 21 2 20.5523 2 20V8C2 7.44772 2.44772 7 3 7H6ZM6 9H4V19H16V17H6V9ZM8 5V15H20V7H14.5858L12.5858 5H8Z" fill="currentColor"/>',"fullscreen-exit":'<path d="M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z" fill="currentColor"/>',fullscreen:'<path d="M8 3V5H4V9H2V3H8ZM2 21V15H4V19H8V21H2ZM22 21H16V19H20V15H22V21ZM22 9H20V5H16V3H22V9Z" fill="currentColor"/>',gamepad:'<path d="M17 4C20.3137 4 23 6.68629 23 10V14C23 17.3137 20.3137 20 17 20H7C3.68629 20 1 17.3137 1 14V10C1 6.68629 3.68629 4 7 4H17ZM17 6H7C4.8578 6 3.10892 7.68397 3.0049 9.80036L3 10V14C3 16.1422 4.68397 17.8911 6.80036 17.9951L7 18H17C19.1422 18 20.8911 16.316 20.9951 14.1996L21 14V10C21 7.8578 19.316 6.10892 17.1996 6.0049L17 6ZM10 9V11H12V13H9.999L10 15H8L7.999 13H6V11H8V9H10ZM18 13V15H16V13H18ZM16 9V11H14V9H16Z" fill="currentColor"/>',"git-branch":'<path d="M7.10508 15.2101C8.21506 15.6501 9 16.7334 9 18C9 19.6569 7.65685 21 6 21C4.34315 21 3 19.6569 3 18C3 16.6938 3.83481 15.5825 5 15.1707V8.82929C3.83481 8.41746 3 7.30622 3 6C3 4.34315 4.34315 3 6 3C7.65685 3 9 4.34315 9 6C9 7.30622 8.16519 8.41746 7 8.82929V11.9996C7.83566 11.3719 8.87439 11 10 11H14C15.3835 11 16.5482 10.0635 16.8949 8.78991C15.7849 8.34988 15 7.26661 15 6C15 4.34315 16.3431 3 18 3C19.6569 3 21 4.34315 21 6C21 7.3332 20.1303 8.46329 18.9274 8.85392C18.5222 11.2085 16.4703 13 14 13H10C8.61653 13 7.45179 13.9365 7.10508 15.2101ZM6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17ZM6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5ZM18 5C17.4477 5 17 5.44772 17 6C17 6.55228 17.4477 7 18 7C18.5523 7 19 6.55228 19 6C19 5.44772 18.5523 5 18 5Z" fill="currentColor"/>',"git-close-pull-request":'<path d="M6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5ZM3 6C3 4.34315 4.34315 3 6 3C7.65685 3 9 4.34315 9 6C9 7.30622 8.16519 8.41746 7 8.82929V15.1707C8.16519 15.5825 9 16.6938 9 18C9 19.6569 7.65685 21 6 21C4.34315 21 3 19.6569 3 18C3 16.6938 3.83481 15.5825 5 15.1707V8.82929C3.83481 8.41746 3 7.30622 3 6ZM15.2929 3.29289C15.6834 2.90237 16.3166 2.90237 16.7071 3.29289L18 4.58579L19.2929 3.29289C19.6834 2.90237 20.3166 2.90237 20.7071 3.29289C21.0976 3.68342 21.0976 4.31658 20.7071 4.70711L19.4142 6L20.7071 7.29289C21.0976 7.68342 21.0976 8.31658 20.7071 8.70711C20.3166 9.09763 19.6834 9.09763 19.2929 8.70711L18 7.41421L16.7071 8.70711C16.3166 9.09763 15.6834 9.09763 15.2929 8.70711C14.9024 8.31658 14.9024 7.68342 15.2929 7.29289L16.5858 6L15.2929 4.70711C14.9024 4.31658 14.9024 3.68342 15.2929 3.29289ZM18 10C18.5523 10 19 10.4477 19 11V15.1707C20.1652 15.5825 21 16.6938 21 18C21 19.6569 19.6569 21 18 21C16.3431 21 15 19.6569 15 18C15 16.6938 15.8348 15.5825 17 15.1707V11C17 10.4477 17.4477 10 18 10ZM6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17ZM18 17C17.4477 17 17 17.4477 17 18C17 18.5523 17.4477 19 18 19C18.5523 19 19 18.5523 19 18C19 17.4477 18.5523 17 18 17Z" fill="currentColor"/>',"git-commit":'<path d="M15.874 13C15.4299 14.7252 13.8638 16 12 16C10.1362 16 8.57006 14.7252 8.12602 13H3V11H8.12602C8.57006 9.27477 10.1362 8 12 8C13.8638 8 15.4299 9.27477 15.874 11H21V13H15.874ZM12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10C10.8954 10 10 10.8954 10 12C10 13.1046 10.8954 14 12 14Z" fill="currentColor"/>',"git-merge":'<path d="M7.10508 8.78991C7.45179 10.0635 8.61653 11 10 11H14C16.4703 11 18.5222 12.7915 18.9274 15.1461C20.1303 15.5367 21 16.6668 21 18C21 19.6569 19.6569 21 18 21C16.3431 21 15 19.6569 15 18C15 16.7334 15.7849 15.6501 16.8949 15.2101C16.5482 13.9365 15.3835 13 14 13H10C8.87439 13 7.83566 12.6281 7 12.0004V15.1707C8.16519 15.5825 9 16.6938 9 18C9 19.6569 7.65685 21 6 21C4.34315 21 3 19.6569 3 18C3 16.6938 3.83481 15.5825 5 15.1707V8.82929C3.83481 8.41746 3 7.30622 3 6C3 4.34315 4.34315 3 6 3C7.65685 3 9 4.34315 9 6C9 7.26661 8.21506 8.34988 7.10508 8.78991ZM6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7ZM6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19ZM18 19C18.5523 19 19 18.5523 19 18C19 17.4477 18.5523 17 18 17C17.4477 17 17 17.4477 17 18C17 18.5523 17.4477 19 18 19Z" fill="currentColor"/>',"git-pr-draft":'<path d="M5 6C5 5.44772 5.44772 5 6 5C6.55228 5 7 5.44772 7 6C7 6.55228 6.55228 7 6 7C5.44772 7 5 6.55228 5 6ZM6 3C4.34315 3 3 4.34315 3 6C3 7.30622 3.83481 8.41746 5 8.82929V15.1707C3.83481 15.5825 3 16.6938 3 18C3 19.6569 4.34315 21 6 21C7.65685 21 9 19.6569 9 18C9 16.6938 8.16519 15.5825 7 15.1707V8.82929C8.16519 8.41746 9 7.30622 9 6C9 4.34315 7.65685 3 6 3ZM5 18C5 17.4477 5.44772 17 6 17C6.55228 17 7 17.4477 7 18C7 18.5523 6.55228 19 6 19C5.44772 19 5 18.5523 5 18ZM18 17C17.4477 17 17 17.4477 17 18C17 18.5523 17.4477 19 18 19C18.5523 19 19 18.5523 19 18C19 17.4477 18.5523 17 18 17ZM15 18C15 16.3431 16.3431 15 18 15C19.6569 15 21 16.3431 21 18C21 19.6569 19.6569 21 18 21C16.3431 21 15 19.6569 15 18ZM18 7.5C18.8284 7.5 19.5 6.82843 19.5 6C19.5 5.17157 18.8284 4.5 18 4.5C17.1716 4.5 16.5 5.17157 16.5 6C16.5 6.82843 17.1716 7.5 18 7.5ZM19.5 11.5C19.5 12.3284 18.8284 13 18 13C17.1716 13 16.5 12.3284 16.5 11.5C16.5 10.6716 17.1716 10 18 10C18.8284 10 19.5 10.6716 19.5 11.5Z" fill="currentColor"/>',"git-pull-request":'<path d="M15 5H17C18.1046 5 19 5.89543 19 7V15.1707C20.1652 15.5825 21 16.6938 21 18C21 19.6569 19.6569 21 18 21C16.3431 21 15 19.6569 15 18C15 16.6938 15.8348 15.5825 17 15.1707V7H15V10L10.5 6L15 2V5ZM5 8.82929C3.83481 8.41746 3 7.30622 3 6C3 4.34315 4.34315 3 6 3C7.65685 3 9 4.34315 9 6C9 7.30622 8.16519 8.41746 7 8.82929V15.1707C8.16519 15.5825 9 16.6938 9 18C9 19.6569 7.65685 21 6 21C4.34315 21 3 19.6569 3 18C3 16.6938 3.83481 15.5825 5 15.1707V8.82929ZM6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7ZM6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19ZM18 19C18.5523 19 19 18.5523 19 18C19 17.4477 18.5523 17 18 17C17.4477 17 17 17.4477 17 18C17 18.5523 17.4477 19 18 19Z" fill="currentColor"/>',"git-repository":'<path d="M13 21V23.5L10 21.5L7 23.5V21H6.5C4.567 21 3 19.433 3 17.5V5C3 3.34315 4.34315 2 6 2H20C20.5523 2 21 2.44772 21 3V20C21 20.5523 20.5523 21 20 21H13ZM13 19H19V16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19H7V17H13V19ZM19 14V4H6V14.0354C6.1633 14.0121 6.33024 14 6.5 14H19ZM7 5H9V7H7V5ZM7 8H9V10H7V8ZM7 11H9V13H7V11Z" fill="currentColor"/>',"github-fill":'<path d="M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z" fill="currentColor"/>',github:'<path d="M5.88401 18.6533C5.58404 18.4526 5.32587 18.1975 5.0239 17.8369C4.91473 17.7065 4.47283 17.1524 4.55811 17.2583C4.09533 16.6833 3.80296 16.417 3.50156 16.3089C2.9817 16.1225 2.7114 15.5499 2.89784 15.0301C3.08428 14.5102 3.65685 14.2399 4.17672 14.4263C4.92936 14.6963 5.43847 15.1611 6.12425 16.0143C6.03025 15.8974 6.46364 16.441 6.55731 16.5529C6.74784 16.7804 6.88732 16.9182 6.99629 16.9911C7.20118 17.1283 7.58451 17.1874 8.14709 17.1311C8.17065 16.7489 8.24136 16.3783 8.34919 16.0358C5.38097 15.3104 3.70116 13.3952 3.70116 9.63971C3.70116 8.40085 4.0704 7.28393 4.75917 6.3478C4.5415 5.45392 4.57433 4.37284 5.06092 3.15636C5.1725 2.87739 5.40361 2.66338 5.69031 2.57352C5.77242 2.54973 5.81791 2.53915 5.89878 2.52673C6.70167 2.40343 7.83573 2.69705 9.31449 3.62336C10.181 3.41879 11.0885 3.315 12.0012 3.315C12.9129 3.315 13.8196 3.4186 14.6854 3.62277C16.1619 2.69 17.2986 2.39649 18.1072 2.52651C18.1919 2.54013 18.2645 2.55783 18.3249 2.57766C18.6059 2.66991 18.8316 2.88179 18.9414 3.15636C19.4279 4.37256 19.4608 5.45344 19.2433 6.3472C19.9342 7.28337 20.3012 8.39208 20.3012 9.63971C20.3012 13.3968 18.627 15.3048 15.6588 16.032C15.7837 16.447 15.8496 16.9105 15.8496 17.4121C15.8496 18.0765 15.8471 18.711 15.8424 19.4225C15.8412 19.6127 15.8397 19.8159 15.8375 20.1281C16.2129 20.2109 16.5229 20.5077 16.6031 20.9089C16.7114 21.4504 16.3602 21.9773 15.8186 22.0856C14.6794 22.3134 13.8353 21.5538 13.8353 20.5611C13.8353 20.4708 13.836 20.3417 13.8375 20.1145C13.8398 19.8015 13.8412 19.599 13.8425 19.4094C13.8471 18.7019 13.8496 18.0716 13.8496 17.4121C13.8496 16.7148 13.6664 16.2602 13.4237 16.051C12.7627 15.4812 13.0977 14.3973 13.965 14.2999C16.9314 13.9666 18.3012 12.8177 18.3012 9.63971C18.3012 8.68508 17.9893 7.89571 17.3881 7.23559C17.1301 6.95233 17.0567 6.54659 17.199 6.19087C17.3647 5.77663 17.4354 5.23384 17.2941 4.57702L17.2847 4.57968C16.7928 4.71886 16.1744 5.0198 15.4261 5.5285C15.182 5.69438 14.8772 5.74401 14.5932 5.66413C13.7729 5.43343 12.8913 5.315 12.0012 5.315C11.111 5.315 10.2294 5.43343 9.40916 5.66413C9.12662 5.74359 8.82344 5.69492 8.57997 5.53101C7.8274 5.02439 7.2056 4.72379 6.71079 4.58376C6.56735 5.23696 6.63814 5.77782 6.80336 6.19087C6.94565 6.54659 6.87219 6.95233 6.61423 7.23559C6.01715 7.8912 5.70116 8.69376 5.70116 9.63971C5.70116 12.8116 7.07225 13.9683 10.023 14.2999C10.8883 14.3971 11.2246 15.4769 10.5675 16.0482C10.3751 16.2156 10.1384 16.7802 10.1384 17.4121V20.5611C10.1384 21.5474 9.30356 22.2869 8.17878 22.09C7.63476 21.9948 7.27093 21.4766 7.36613 20.9326C7.43827 20.5204 7.75331 20.2116 8.13841 20.1276V19.1381C7.22829 19.1994 6.47656 19.0498 5.88401 18.6533Z" fill="currentColor"/>',global:'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z" fill="currentColor"/>',"graduation-cap":'<path d="M4 11.3333L0 9L12 2L24 9V17.5H22V10.1667L20 11.3333V18.0113L19.7774 18.2864C17.9457 20.5499 15.1418 22 12 22C8.85817 22 6.05429 20.5499 4.22263 18.2864L4 18.0113V11.3333ZM6 12.5V17.2917C7.46721 18.954 9.61112 20 12 20C14.3889 20 16.5328 18.954 18 17.2917V12.5L12 16L6 12.5ZM3.96927 9L12 13.6846L20.0307 9L12 4.31541L3.96927 9Z" fill="currentColor"/>',hammer:'<path d="M20 2C20.5523 2 21 2.44772 21 3V8C21 8.55228 20.5523 9 20 9H15V22C15 22.5523 14.5523 23 14 23H10C9.44772 23 9 22.5523 9 22V9H3.5C2.94772 9 2.5 8.55228 2.5 8V5.61803C2.5 5.23926 2.714 4.893 3.05279 4.72361L8.5 2H20ZM15 4H8.97214L4.5 6.23607V7H11V21H13V7H15V4ZM19 4H17V7H19V4Z" fill="currentColor"/>',heart:'<path d="M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853ZM18.827 6.1701C17.3279 4.66794 14.9076 4.60701 13.337 6.01687L12.0019 7.21524L10.6661 6.01781C9.09098 4.60597 6.67506 4.66808 5.17157 6.17157C3.68183 7.66131 3.60704 10.0473 4.97993 11.6232L11.9999 18.6543L19.0201 11.6232C20.3935 10.0467 20.319 7.66525 18.827 6.1701Z" fill="currentColor"/>',history:'<path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z" fill="currentColor"/>',home:'<path d="M21 20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V9.48907C3 9.18048 3.14247 8.88917 3.38606 8.69972L11.3861 2.47749C11.7472 2.19663 12.2528 2.19663 12.6139 2.47749L20.6139 8.69972C20.8575 8.88917 21 9.18048 21 9.48907V20ZM19 19V9.97815L12 4.53371L5 9.97815V19H19Z" fill="currentColor"/>',"hourglass-fill":'<path d="M6 4H4V2H20V4H18V6C18 7.61543 17.1838 8.91468 16.1561 9.97667C15.4532 10.703 14.598 11.372 13.7309 12C14.598 12.628 15.4532 13.297 16.1561 14.0233C17.1838 15.0853 18 16.3846 18 18V20H20V22H4V20H6V18C6 16.3846 6.81616 15.0853 7.8439 14.0233C8.54682 13.297 9.40202 12.628 10.2691 12C9.40202 11.372 8.54682 10.703 7.8439 9.97667C6.81616 8.91468 6 7.61543 6 6V4ZM8 4V6C8 6.68514 8.26026 7.33499 8.77131 8H15.2287C15.7397 7.33499 16 6.68514 16 6V4H8ZM12 13.2219C10.9548 13.9602 10.008 14.663 9.2811 15.4142C9.09008 15.6116 8.92007 15.8064 8.77131 16H15.2287C15.0799 15.8064 14.9099 15.6116 14.7189 15.4142C13.992 14.663 13.0452 13.9602 12 13.2219Z" fill="currentColor"/>',hourglass:'<path d="M6 4H4V2H20V4H18V6C18 7.61543 17.1838 8.91468 16.1561 9.97667C15.4532 10.703 14.598 11.372 13.7309 12C14.598 12.628 15.4532 13.297 16.1561 14.0233C17.1838 15.0853 18 16.3846 18 18V20H20V22H4V20H6V18C6 16.3846 6.81616 15.0853 7.8439 14.0233C8.54682 13.297 9.40202 12.628 10.2691 12C9.40202 11.372 8.54682 10.703 7.8439 9.97667C6.81616 8.91468 6 7.61543 6 6V4ZM8 4V6C8 6.88457 8.43384 7.71032 9.2811 8.58583C10.008 9.33699 10.9548 10.0398 12 10.7781C13.0452 10.0398 13.992 9.33699 14.7189 8.58583C15.5662 7.71032 16 6.88457 16 6V4H8ZM12 13.2219C10.9548 13.9602 10.008 14.663 9.2811 15.4142C8.43384 16.2897 8 17.1154 8 18V20H16V18C16 17.1154 15.5662 16.2897 14.7189 15.4142C13.992 14.663 13.0452 13.9602 12 13.2219Z" fill="currentColor"/>',"image-download":'<path d="M21 15V19H24L20 23L16 19H19V15H21ZM21.0078 3C21.5555 3 21.9999 3.44482 22 3.99316V13H20V5H4V18.999L14 9L17 12V14.8291L14 11.8281L6.82715 19H14V21H2.99219C2.44451 21 2.00013 20.5552 2 20.0068V3.99316C2.00013 3.44463 2.45577 3 2.99219 3H21.0078ZM8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7Z" fill="currentColor"/>',"inbox-archive":'<path d="M20 3L22 7V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V7.00353L4 3H20ZM20 9H4V19H20V9ZM13 10V14H16L12 18L8 14H11V10H13ZM18.7639 5H5.23656L4.23744 7H19.7639L18.7639 5Z" fill="currentColor"/>',"inbox-unarchive-fill":'<path d="M20 3L22 7V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V7.00353L4 3H20ZM12 10L8 14H11V18H13V14H16L12 10ZM18.764 5H5.236L4.237 7H19.764L18.764 5Z" fill="currentColor"/>',"inbox-unarchive":'<path d="M20 3L22 7V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V7.00353L4 3H20ZM20 9H4V19H20V9ZM12 10L16 14H13V18H11V14H8L12 10ZM18.764 5H5.236L4.237 7H19.764L18.764 5Z" fill="currentColor"/>',information:'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z" fill="currentColor"/>',key:'<path d="M12.917 13C12.441 15.8377 9.973 18 7 18C3.68629 18 1 15.3137 1 12C1 8.68629 3.68629 6 7 6C9.973 6 12.441 8.16229 12.917 11H23V13H21V17H19V13H17V17H15V13H12.917ZM7 16C9.20914 16 11 14.2091 11 12C11 9.79086 9.20914 8 7 8C4.79086 8 3 9.79086 3 12C3 14.2091 4.79086 16 7 16Z" fill="currentColor"/>',"layout-column":'<path d="M11 5H5V19H11V5ZM13 5V19H19V5H13ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z" fill="currentColor"/>',"layout-left":'<path d="M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM7 5H4V19H7V5ZM20 5H9V19H20V5Z" fill="currentColor"/>',"layout-right":'<path d="M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM15 5H4V19H15V5ZM20 5H17V19H20V5Z" fill="currentColor"/>',leaf:'<path d="M20.998 3V5C20.998 14.6274 15.6255 19 8.99805 19L5.24077 18.9999C5.0786 19.912 4.99805 20.907 4.99805 22H2.99805C2.99805 20.6373 3.11376 19.3997 3.34381 18.2682C3.1133 16.9741 2.99805 15.2176 2.99805 13C2.99805 7.47715 7.4752 3 12.998 3C14.998 3 16.998 4 20.998 3ZM12.998 5C8.57977 5 4.99805 8.58172 4.99805 13C4.99805 13.3624 5.00125 13.7111 5.00759 14.0459C6.26198 12.0684 8.09902 10.5048 10.5019 9.13176L11.4942 10.8682C8.6393 12.4996 6.74554 14.3535 5.77329 16.9998L8.99805 17C15.0132 17 18.8692 13.0269 18.9949 5.38766C17.6229 5.52113 16.3481 5.436 14.7754 5.20009C13.6243 5.02742 13.3988 5 12.998 5Z" fill="currentColor"/>',lightbulb:'<path d="M9.97308 18H11V13H13V18H14.0269C14.1589 16.7984 14.7721 15.8065 15.7676 14.7226C15.8797 14.6006 16.5988 13.8564 16.6841 13.7501C17.5318 12.6931 18 11.385 18 10C18 6.68629 15.3137 4 12 4C8.68629 4 6 6.68629 6 10C6 11.3843 6.46774 12.6917 7.31462 13.7484C7.40004 13.855 8.12081 14.6012 8.23154 14.7218C9.22766 15.8064 9.84103 16.7984 9.97308 18ZM10 20V21H14V20H10ZM5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.624 15.7748 16 17 16 18.5V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V18.5C8 17 6.37458 15.7736 5.75395 14.9992Z" fill="currentColor"/>',"link-unlink-m":'<path d="M17.657 14.8284L16.2428 13.4142L17.657 12C19.2191 10.4379 19.2191 7.90526 17.657 6.34316C16.0949 4.78106 13.5622 4.78106 12.0001 6.34316L10.5859 7.75737L9.17171 6.34316L10.5859 4.92895C12.9291 2.5858 16.7281 2.5858 19.0712 4.92895C21.4143 7.27209 21.4143 11.0711 19.0712 13.4142L17.657 14.8284ZM14.8286 17.6569L13.4143 19.0711C11.0712 21.4142 7.27221 21.4142 4.92907 19.0711C2.58592 16.7279 2.58592 12.9289 4.92907 10.5858L6.34328 9.17159L7.75749 10.5858L6.34328 12C4.78118 13.5621 4.78118 16.0948 6.34328 17.6569C7.90538 19.219 10.438 19.219 12.0001 17.6569L13.4143 16.2427L14.8286 17.6569ZM14.8286 7.75737L16.2428 9.17159L9.17171 16.2427L7.75749 14.8284L14.8286 7.75737ZM5.77539 2.29291L7.70724 1.77527L8.74252 5.63897L6.81067 6.15661L5.77539 2.29291ZM15.2578 18.3611L17.1896 17.8434L18.2249 21.7071L16.293 22.2248L15.2578 18.3611ZM2.29303 5.77527L6.15673 6.81054L5.63909 8.7424L1.77539 7.70712L2.29303 5.77527ZM18.3612 15.2576L22.2249 16.2929L21.7072 18.2248L17.8435 17.1895L18.3612 15.2576Z" fill="currentColor"/>',"list-check-2":'<path d="M11 4H21V6H11V4ZM11 8H17V10H11V8ZM11 14H21V16H11V14ZM11 18H17V20H11V18ZM3 4H9V10H3V4ZM5 6V8H7V6H5ZM3 14H9V20H3V14ZM5 16V18H7V16H5Z" fill="currentColor"/>',"list-check-3":'<path d="M8.00008 6V9H5.00008V6H8.00008ZM3.00008 4V11H10.0001V4H3.00008ZM13.0001 4H21.0001V6H13.0001V4ZM13.0001 11H21.0001V13H13.0001V11ZM13.0001 18H21.0001V20H13.0001V18ZM10.7072 16.2071L9.29297 14.7929L6.00008 18.0858L4.20718 16.2929L2.79297 17.7071L6.00008 20.9142L10.7072 16.2071Z" fill="currentColor"/>',"list-unordered":'<path d="M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" fill="currentColor"/>',"loader-4":'<path d="M18.364 5.63604L16.9497 7.05025C15.683 5.7835 13.933 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12H21C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C14.4853 3 16.7353 4.00736 18.364 5.63604Z" fill="currentColor"/>',loader:'<path d="M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" fill="currentColor"/>',"lock-2":'<path d="M6 8V7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7V8H20C20.5523 8 21 8.44772 21 9V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V9C3 8.44772 3.44772 8 4 8H6ZM19 10H5V20H19V10ZM11 15.7324C10.4022 15.3866 10 14.7403 10 14C10 12.8954 10.8954 12 12 12C13.1046 12 14 12.8954 14 14C14 14.7403 13.5978 15.3866 13 15.7324V18H11V15.7324ZM8 8H16V7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7V8Z" fill="currentColor"/>',lock:'<path d="M19 10H20C20.5523 10 21 10.4477 21 11V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V11C3 10.4477 3.44772 10 4 10H5V9C5 5.13401 8.13401 2 12 2C15.866 2 19 5.13401 19 9V10ZM5 12V20H19V12H5ZM11 14H13V18H11V14ZM17 10V9C17 6.23858 14.7614 4 12 4C9.23858 4 7 6.23858 7 9V10H17Z" fill="currentColor"/>',"lock-unlock":'<path d="M7 10H20C20.5523 10 21 10.4477 21 11V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V11C3 10.4477 3.44772 10 4 10H5V9C5 5.13401 8.13401 2 12 2C14.7405 2 17.1131 3.5748 18.2624 5.86882L16.4731 6.76344C15.6522 5.12486 13.9575 4 12 4C9.23858 4 7 6.23858 7 9V10ZM5 12V20H19V12H5ZM10 15H14V17H10V15Z" fill="currentColor"/>',"loop-right-ai":'<path d="M22 12C22 17.5228 17.5228 22 12 22C8.72774 22 5.82382 20.4286 4 18.001V20.5H2V14.5H8V16.5H5.38477C6.82543 18.6137 9.25151 20 12 20C16.4183 20 20 16.4183 20 12H22ZM11.5293 8.31934C11.7059 7.8935 12.2943 7.89349 12.4707 8.31934L12.7236 8.93066C13.1556 9.97346 13.9615 10.8062 14.9746 11.2568L15.6924 11.5762C16.1026 11.759 16.1026 12.3562 15.6924 12.5391L14.9326 12.877C13.9449 13.3162 13.1534 14.1194 12.7139 15.1279L12.4668 15.6934C12.2864 16.1075 11.7137 16.1075 11.5332 15.6934L11.2871 15.1279C10.8476 14.1193 10.0552 13.3163 9.06738 12.877L8.30762 12.5391C7.89744 12.3562 7.89741 11.759 8.30762 11.5762L9.02539 11.2568C10.0385 10.8062 10.8445 9.97348 11.2764 8.93066L11.5293 8.31934ZM12 2C15.2723 2 18.1762 3.57144 20 5.99902V3.5H22V9.5H16V7.5H18.6152C17.1746 5.38634 14.7485 4 12 4C7.58172 4 4 7.58172 4 12H2C2 6.47715 6.47715 2 12 2Z" fill="currentColor"/>',macbook:'<path d="M4 5V16H20V5H4ZM2 4.00748C2 3.45107 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44892 22 4.00748V18H2V4.00748ZM1 19H23V21H1V19Z" fill="currentColor"/>',"menu-fold-2":'<path d="M4.40347 3.90332L2.98926 5.31753L6.17124 8.49951L2.98926 11.6815L4.40347 13.0957L8.99967 8.49951L4.40347 3.90332ZM20.9997 19.9995V17.9995H2.99967V19.9995H20.9997ZM20.9997 12.9995V10.9995H11.9997V12.9995H20.9997ZM20.9997 5.99951V3.99951H11.9997V5.99951H20.9997Z" fill="currentColor"/>',"menu-search":'<path d="M15.5 5C13.567 5 12 6.567 12 8.5C12 10.433 13.567 12 15.5 12C17.433 12 19 10.433 19 8.5C19 6.567 17.433 5 15.5 5ZM10 8.5C10 5.46243 12.4624 3 15.5 3C18.5376 3 21 5.46243 21 8.5C21 9.6575 20.6424 10.7315 20.0317 11.6175L22.7071 14.2929L21.2929 15.7071L18.6175 13.0317C17.7315 13.6424 16.6575 14 15.5 14C12.4624 14 10 11.5376 10 8.5ZM3 4H8V6H3V4ZM3 11H8V13H3V11ZM21 18V20H3V18H21Z" fill="currentColor"/>',"message-2":'<path d="M6.45455 19L2 22.5V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V18C22 18.5523 21.5523 19 21 19H6.45455ZM5.76282 17H20V5H4V18.3851L5.76282 17ZM11 10H13V12H11V10ZM7 10H9V12H7V10ZM15 10H17V12H15V10Z" fill="currentColor"/>',mic:'<path d="M11.9998 3C10.3429 3 8.99976 4.34315 8.99976 6V10C8.99976 11.6569 10.3429 13 11.9998 13C13.6566 13 14.9998 11.6569 14.9998 10V6C14.9998 4.34315 13.6566 3 11.9998 3ZM11.9998 1C14.7612 1 16.9998 3.23858 16.9998 6V10C16.9998 12.7614 14.7612 15 11.9998 15C9.23833 15 6.99976 12.7614 6.99976 10V6C6.99976 3.23858 9.23833 1 11.9998 1ZM3.05469 11H5.07065C5.55588 14.3923 8.47329 17 11.9998 17C15.5262 17 18.4436 14.3923 18.9289 11H20.9448C20.4837 15.1716 17.1714 18.4839 12.9998 18.9451V23H10.9998V18.9451C6.82814 18.4839 3.51584 15.1716 3.05469 11Z" fill="currentColor"/>',"mic-off":'<path d="M16.4249 17.839L21.1925 22.6066L22.6068 21.1924L2.80777 1.3934L1.39355 2.80761L7.00016 8.41421V10C7.00016 12.7614 9.23873 15 12.0002 15C12.4825 15 12.9489 14.9317 13.3902 14.8042L14.9404 16.3544C14.0464 16.7688 13.0503 17 12.0002 17C8.47368 17 5.55627 14.3923 5.07105 11H3.05509C3.51623 15.1716 6.82854 18.4839 11.0002 18.9451V23H13.0002V18.9451C14.2341 18.8087 15.3929 18.4228 16.4249 17.839ZM11.5528 12.9669C10.2541 12.7727 9.22745 11.7461 9.03328 10.4473L11.5528 12.9669ZM19.3747 15.1604L17.9323 13.7179C18.4407 12.9084 18.788 11.9874 18.9293 11H20.9452C20.7754 12.5366 20.2187 13.9565 19.3747 15.1604ZM16.4658 12.2514L14.9173 10.703C14.9715 10.4775 15.0002 10.2421 15.0002 10V6C15.0002 4.34315 13.657 3 12.0002 3C10.7059 3 9.6031 3.81956 9.18237 4.96802L7.68575 3.47139C8.55427 1.99268 10.1613 1 12.0002 1C14.7616 1 17.0002 3.23858 17.0002 6V10C17.0002 10.8099 16.8076 11.5748 16.4658 12.2514Z" fill="currentColor"/>',"more-2-fill":'<path d="M12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5C14 3.9 13.1 3 12 3ZM12 17C10.9 17 10 17.9 10 19C10 20.1 10.9 21 12 21C13.1 21 14 20.1 14 19C14 17.9 13.1 17 12 17ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z" fill="currentColor"/>',"more-2":'<path d="M12 3C11.175 3 10.5 3.675 10.5 4.5C10.5 5.325 11.175 6 12 6C12.825 6 13.5 5.325 13.5 4.5C13.5 3.675 12.825 3 12 3ZM12 18C11.175 18 10.5 18.675 10.5 19.5C10.5 20.325 11.175 21 12 21C12.825 21 13.5 20.325 13.5 19.5C13.5 18.675 12.825 18 12 18ZM12 10.5C11.175 10.5 10.5 11.175 10.5 12C10.5 12.825 11.175 13.5 12 13.5C12.825 13.5 13.5 12.825 13.5 12C13.5 11.175 12.825 10.5 12 10.5Z" fill="currentColor"/>',more:'<path d="M4.5 10.5C3.675 10.5 3 11.175 3 12C3 12.825 3.675 13.5 4.5 13.5C5.325 13.5 6 12.825 6 12C6 11.175 5.325 10.5 4.5 10.5ZM19.5 10.5C18.675 10.5 18 11.175 18 12C18 12.825 18.675 13.5 19.5 13.5C20.325 13.5 21 12.825 21 12C21 11.175 20.325 10.5 19.5 10.5ZM12 10.5C11.175 10.5 10.5 11.175 10.5 12C10.5 12.825 11.175 13.5 12 13.5C12.825 13.5 13.5 12.825 13.5 12C13.5 11.175 12.825 10.5 12 10.5Z" fill="currentColor"/>',music:'<path d="M12 13.5351V3H20V5H14V17C14 19.2091 12.2091 21 10 21C7.79086 21 6 19.2091 6 17C6 14.7909 7.79086 13 10 13C10.7286 13 11.4117 13.1948 12 13.5351ZM10 19C11.1046 19 12 18.1046 12 17C12 15.8954 11.1046 15 10 15C8.89543 15 8 15.8954 8 17C8 18.1046 8.89543 19 10 19Z" fill="currentColor"/>',"node-tree":'<path d="M10 2C10.5523 2 11 2.44772 11 3V7C11 7.55228 10.5523 8 10 8H8V10H13V9C13 8.44772 13.4477 8 14 8H20C20.5523 8 21 8.44772 21 9V13C21 13.5523 20.5523 14 20 14H14C13.4477 14 13 13.5523 13 13V12H8V18H13V17C13 16.4477 13.4477 16 14 16H20C20.5523 16 21 16.4477 21 17V21C21 21.5523 20.5523 22 20 22H14C13.4477 22 13 21.5523 13 21V20H7C6.44772 20 6 19.5523 6 19V8H4C3.44772 8 3 7.55228 3 7V3C3 2.44772 3.44772 2 4 2H10ZM19 18H15V20H19V18ZM19 10H15V12H19V10ZM9 4H5V6H9V4Z" fill="currentColor"/>',"notification-3":'<path d="M20 17H22V19H2V17H4V10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10V17ZM18 17V10C18 6.68629 15.3137 4 12 4C8.68629 4 6 6.68629 6 10V17H18ZM9 21H15V23H9V21Z" fill="currentColor"/>',palette:'<path d="M12 2C17.5222 2 22 5.97778 22 10.8889C22 13.9556 19.5111 16.4444 16.4444 16.4444H14.4778C13.5556 16.4444 12.8111 17.1889 12.8111 18.1111C12.8111 18.5333 12.9778 18.9222 13.2333 19.2111C13.5 19.5111 13.6667 19.9 13.6667 20.3333C13.6667 21.2556 12.9 22 12 22C6.47778 22 2 17.5222 2 12C2 6.47778 6.47778 2 12 2ZM10.8111 18.1111C10.8111 16.0843 12.451 14.4444 14.4778 14.4444H16.4444C18.4065 14.4444 20 12.851 20 10.8889C20 7.1392 16.4677 4 12 4C7.58235 4 4 7.58235 4 12C4 16.19 7.2226 19.6285 11.324 19.9718C10.9948 19.4168 10.8111 18.7761 10.8111 18.1111ZM7.5 12C6.67157 12 6 11.3284 6 10.5C6 9.67157 6.67157 9 7.5 9C8.32843 9 9 9.67157 9 10.5C9 11.3284 8.32843 12 7.5 12ZM16.5 12C15.6716 12 15 11.3284 15 10.5C15 9.67157 15.6716 9 16.5 9C17.3284 9 18 9.67157 18 10.5C18 11.3284 17.3284 12 16.5 12ZM12 9C11.1716 9 10.5 8.32843 10.5 7.5C10.5 6.67157 11.1716 6 12 6C12.8284 6 13.5 6.67157 13.5 7.5C13.5 8.32843 12.8284 9 12 9Z" fill="currentColor"/>',"pencil-ai":'<path d="M16.4356 3.21188C16.8261 2.82185 17.4592 2.82157 17.8496 3.21188L20.6777 6.04099C21.0681 6.43152 21.0682 7.06457 20.6777 7.45505L7.2422 20.8896H3.00001V16.6475L16.4356 3.21188ZM5.00001 17.4756V18.8896H6.41407L15.7276 9.57615L14.3135 8.16208L5.00001 17.4756ZM4.5293 1.3193C4.70583 0.893505 5.29418 0.893508 5.47071 1.3193L5.72364 1.93063C6.15555 2.97342 6.96155 3.80613 7.97462 4.2568L8.69239 4.57614C9.10267 4.75896 9.10262 5.35616 8.69239 5.53903L7.93263 5.87692C6.94497 6.3162 6.15339 7.11943 5.71387 8.1279L5.4668 8.69334C5.28636 9.10747 4.71366 9.10747 4.53321 8.69334L4.28614 8.1279C3.84661 7.11943 3.05506 6.3162 2.06739 5.87692L1.30762 5.53903C0.897483 5.35617 0.897435 4.75896 1.30762 4.57614L2.0254 4.2568C3.03845 3.80614 3.84446 2.97344 4.27637 1.93063L4.5293 1.3193ZM15.7276 6.74802L17.1426 8.16208L18.5567 6.74802L17.1426 5.33395L15.7276 6.74802Z" fill="currentColor"/>',pencil:'<path d="M15.7279 9.57627L14.3137 8.16206L5 17.4758V18.89H6.41421L15.7279 9.57627ZM17.1421 8.16206L18.5563 6.74785L17.1421 5.33363L15.7279 6.74785L17.1421 8.16206ZM7.24264 20.89H3V16.6473L16.435 3.21231C16.8256 2.82179 17.4587 2.82179 17.8492 3.21231L20.6777 6.04074C21.0682 6.43126 21.0682 7.06443 20.6777 7.45495L7.24264 20.89Z" fill="currentColor"/>',"picture-in-picture-2":'<path d="M21 3C21.5523 3 22 3.44772 22 4V11H20V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM21 13C21.5523 13 22 13.4477 22 14V20C22 20.5523 21.5523 21 21 21H13C12.4477 21 12 20.5523 12 20V14C12 13.4477 12.4477 13 13 13H21ZM20 15H14V19H20V15ZM6.70711 6.29289L8.95689 8.54289L11 6.5V12H5.5L7.54289 9.95689L5.29289 7.70711L6.70711 6.29289Z" fill="currentColor"/>',"pie-chart":'<path d="M9 2.4578V4.58152C6.06817 5.76829 4 8.64262 4 12C4 16.4183 7.58172 20 12 20C15.3574 20 18.2317 17.9318 19.4185 15H21.5422C20.2679 19.0571 16.4776 22 12 22C6.47715 22 2 17.5228 2 12C2 7.52236 4.94289 3.73207 9 2.4578ZM12 2C17.5228 2 22 6.47715 22 12C22 12.3375 21.9833 12.6711 21.9506 13H11V2.04938C11.3289 2.01672 11.6625 2 12 2ZM13 4.06189V11H19.9381C19.4869 7.38128 16.6187 4.51314 13 4.06189Z" fill="currentColor"/>',play:'<path d="M16.3944 12.0001L10 7.7371V16.263L16.3944 12.0001ZM19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" fill="currentColor"/>',"play-list-add":'<path d="M2 18H12V20H2V18ZM2 11H22V13H2V11ZM2 4H22V6H2V4ZM18 18V15H20V18H23V20H20V23H18V20H15V18H18Z" fill="currentColor"/>',"plug-2":'<path d="M13 18V20H19V22H13C11.8954 22 11 21.1046 11 20V18H8C5.79086 18 4 16.2091 4 14V7C4 6.44772 4.44772 6 5 6H7V2H9V6H15V2H17V6H19C19.5523 6 20 6.44772 20 7V14C20 16.2091 18.2091 18 16 18H13ZM8 16H16C17.1046 16 18 15.1046 18 14V11H6V14C6 15.1046 6.89543 16 8 16ZM18 8H6V9H18V8ZM12 14.5C11.4477 14.5 11 14.0523 11 13.5C11 12.9477 11.4477 12.5 12 12.5C12.5523 12.5 13 12.9477 13 13.5C13 14.0523 12.5523 14.5 12 14.5ZM11 2H13V5H11V2Z" fill="currentColor"/>',plug:'<path d="M13 18V20H19V22H13C11.8954 22 11 21.1046 11 20V18H8C5.79086 18 4 16.2091 4 14V7C4 6.44772 4.44772 6 5 6H8V2H10V6H14V2H16V6H19C19.5523 6 20 6.44772 20 7V14C20 16.2091 18.2091 18 16 18H13ZM8 16H16C17.1046 16 18 15.1046 18 14V11H6V14C6 15.1046 6.89543 16 8 16ZM18 8H6V9H18V8ZM12 14.5C11.4477 14.5 11 14.0523 11 13.5C11 12.9477 11.4477 12.5 12 12.5C12.5523 12.5 13 12.9477 13 13.5C13 14.0523 12.5523 14.5 12 14.5Z" fill="currentColor"/>',pulse:'<path d="M9 7.53861L15 21.5386L18.6594 13H23V11H17.3406L15 16.4614L9 2.46143L5.3406 11H1V13H6.6594L9 7.53861Z" fill="currentColor"/>',"pushpin-2-fill":'<path d="M18 3V5H17V11L19 14V16H13V23H11V16H5V14L7 11V5H6V3H18Z" fill="currentColor"/>',"pushpin-2":'<path d="M18 3V5H17V11L19 14V16H13V23H11V16H5V14L7 11V5H6V3H18ZM9 5V11.6056L7.4037 14H16.5963L15 11.6056V5H9Z" fill="currentColor"/>',pushpin:'<path d="M13.8273 1.69L22.3126 10.1753L20.8984 11.5895L20.1913 10.8824L15.9486 15.125L15.2415 18.6606L13.8273 20.0748L9.58466 15.8321L4.63492 20.7819L3.2207 19.3677L8.17045 14.4179L3.92781 10.1753L5.34202 8.76107L8.87756 8.05396L13.1202 3.81132L12.4131 3.10422L13.8273 1.69ZM14.5344 5.22554L9.86358 9.89637L7.0417 10.4607L13.5418 16.9609L14.1062 14.139L18.7771 9.46818L14.5344 5.22554Z" fill="currentColor"/>',question:'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM13 13.3551V14H11V12.5C11 11.9477 11.4477 11.5 12 11.5C12.8284 11.5 13.5 10.8284 13.5 10C13.5 9.17157 12.8284 8.5 12 8.5C11.2723 8.5 10.6656 9.01823 10.5288 9.70577L8.56731 9.31346C8.88637 7.70919 10.302 6.5 12 6.5C13.933 6.5 15.5 8.067 15.5 10C15.5 11.5855 14.4457 12.9248 13 13.3551Z" fill="currentColor"/>',"record-circle":'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12C15 13.6569 13.6569 15 12 15Z" fill="currentColor"/>',refresh:'<path d="M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" fill="currentColor"/>',restart:'<path d="M18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" fill="currentColor"/>',"robot-2":'<path d="M13.5 2C13.5 2.44425 13.3069 2.84339 13 3.11805V5H18C19.6569 5 21 6.34315 21 8V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V8C3 6.34315 4.34315 5 6 5H11V3.11805C10.6931 2.84339 10.5 2.44425 10.5 2C10.5 1.17157 11.1716 0.5 12 0.5C12.8284 0.5 13.5 1.17157 13.5 2ZM6 7C5.44772 7 5 7.44772 5 8V18C5 18.5523 5.44772 19 6 19H18C18.5523 19 19 18.5523 19 18V8C19 7.44772 18.5523 7 18 7H13H11H6ZM2 10H0V16H2V10ZM22 10H24V16H22V10ZM9 14.5C9.82843 14.5 10.5 13.8284 10.5 13C10.5 12.1716 9.82843 11.5 9 11.5C8.17157 11.5 7.5 12.1716 7.5 13C7.5 13.8284 8.17157 14.5 9 14.5ZM15 14.5C15.8284 14.5 16.5 13.8284 16.5 13C16.5 12.1716 15.8284 11.5 15 11.5C14.1716 11.5 13.5 12.1716 13.5 13C13.5 13.8284 14.1716 14.5 15 14.5Z" fill="currentColor"/>',robot:'<path d="M13 4.05493C17.5 4.55237 21 8.36745 21 13V22H3V13C3 8.36745 6.50005 4.55237 11 4.05493V1H13V4.05493ZM19 20V13C19 9.13401 15.866 6 12 6C8.13401 6 5 9.13401 5 13V20H19ZM12 18C9.23858 18 7 15.7614 7 13C7 10.2386 9.23858 8 12 8C14.7614 8 17 10.2386 17 13C17 15.7614 14.7614 18 12 18ZM12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16ZM12 14C11.4477 14 11 13.5523 11 13C11 12.4477 11.4477 12 12 12C12.5523 12 13 12.4477 13 13C13 13.5523 12.5523 14 12 14Z" fill="currentColor"/>',rocket:'<path d="M4.99958 12.9999C4.99958 7.91198 7.90222 3.5636 11.9996 1.81799C16.0969 3.5636 18.9996 7.91198 18.9996 12.9999C18.9996 13.8229 18.9236 14.6264 18.779 15.4027L20.7194 17.2353C20.8845 17.3913 20.9238 17.6389 20.815 17.8383L18.3196 22.4133C18.1873 22.6557 17.8836 22.7451 17.6412 22.6128C17.5993 22.59 17.5608 22.5612 17.5271 22.5274L15.2925 20.2928C15.1049 20.1053 14.8506 19.9999 14.5854 19.9999H9.41379C9.14857 19.9999 8.89422 20.1053 8.70668 20.2928L6.47209 22.5274C6.27683 22.7227 5.96025 22.7227 5.76498 22.5274C5.73122 22.4937 5.70246 22.4552 5.67959 22.4133L3.18412 17.8383C3.07537 17.6389 3.11464 17.3913 3.27975 17.2353L5.22014 15.4027C5.07551 14.6264 4.99958 13.8229 4.99958 12.9999ZM6.47542 19.6957L7.29247 18.8786C7.85508 18.316 8.61814 17.9999 9.41379 17.9999H14.5854C15.381 17.9999 16.1441 18.316 16.7067 18.8786L17.5237 19.6957L18.5056 17.8955L17.4058 16.8568C16.9117 16.3901 16.6884 15.7045 16.8128 15.0364C16.9366 14.3722 16.9996 13.6911 16.9996 12.9999C16.9996 9.13037 15.0045 5.69965 11.9996 4.04033C8.99462 5.69965 6.99958 9.13037 6.99958 12.9999C6.99958 13.6911 7.06255 14.3722 7.18631 15.0364C7.31078 15.7045 7.08746 16.3901 6.59338 16.8568L5.49353 17.8955L6.47542 19.6957ZM11.9996 12.9999C10.895 12.9999 9.99958 12.1045 9.99958 10.9999C9.99958 9.89537 10.895 8.99994 11.9996 8.99994C13.1041 8.99994 13.9996 9.89537 13.9996 10.9999C13.9996 12.1045 13.1041 12.9999 11.9996 12.9999Z" fill="currentColor"/>',"save-3":'<path d="M18 19H19V6.82843L17.1716 5H16V9H7V5H5V19H6V12H18V19ZM4 3H18L20.7071 5.70711C20.8946 5.89464 21 6.149 21 6.41421V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM8 14V19H16V14H8Z" fill="currentColor"/>',scissors:'<path d="M9.44618 8.02867L12 10.5825L18.7279 3.85457C19.509 3.07352 20.7753 3.07352 21.5563 3.85457L9.44618 15.9647C9.79807 16.5603 10 17.2549 10 17.9967C10 20.2058 8.20914 21.9967 6 21.9967C3.79086 21.9967 2 20.2058 2 17.9967C2 15.7876 3.79086 13.9967 6 13.9967C6.74181 13.9967 7.43645 14.1986 8.03197 14.5505L10.5858 11.9967L8.03197 9.44289C7.43645 9.79478 6.74181 9.9967 6 9.9967C3.79086 9.9967 2 8.20584 2 5.9967C2 3.78756 3.79086 1.9967 6 1.9967C8.20914 1.9967 10 3.78756 10 5.9967C10 6.73851 9.79807 7.43316 9.44618 8.02867ZM14.8255 13.408L21.5563 20.1388C20.7753 20.9199 19.509 20.9199 18.7279 20.1388L13.4113 14.8222L14.8255 13.408ZM7.41421 16.5825C7.05228 16.2206 6.55228 15.9967 6 15.9967C4.89543 15.9967 4 16.8921 4 17.9967C4 19.1013 4.89543 19.9967 6 19.9967C7.10457 19.9967 8 19.1013 8 17.9967C8 17.4444 7.77614 16.9444 7.41421 16.5825ZM7.41421 7.41092C7.77614 7.04899 8 6.54899 8 5.9967C8 4.89213 7.10457 3.9967 6 3.9967C4.89543 3.9967 4 4.89213 4 5.9967C4 7.10127 4.89543 7.9967 6 7.9967C6.55228 7.9967 7.05228 7.77285 7.41421 7.41092Z" fill="currentColor"/>',"search-eye":'<path d="M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748ZM12.1779 7.17624C11.4834 7.48982 11 8.18846 11 9C11 10.1046 11.8954 11 13 11C13.8115 11 14.5102 10.5166 14.8238 9.82212C14.9383 10.1945 15 10.59 15 11C15 13.2091 13.2091 15 11 15C8.79086 15 7 13.2091 7 11C7 8.79086 8.79086 7 11 7C11.41 7 11.8055 7.06167 12.1779 7.17624Z" fill="currentColor"/>',search:'<path d="M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z" fill="currentColor"/>',"send-plane-2":'<path d="M3.5 1.34558C3.58425 1.34558 3.66714 1.36687 3.74096 1.40747L22.2034 11.5618C22.4454 11.6949 22.5337 11.9989 22.4006 12.2409C22.3549 12.324 22.2865 12.3924 22.2034 12.4381L3.74096 22.5924C3.499 22.7255 3.19497 22.6372 3.06189 22.3953C3.02129 22.3214 3 22.2386 3 22.1543V1.84558C3 1.56944 3.22386 1.34558 3.5 1.34558ZM5 4.38249V10.9999H10V12.9999H5V19.6174L18.8499 11.9999L5 4.38249Z" fill="currentColor"/>',"send-plane":'<path d="M21.7267 2.95694L16.2734 22.0432C16.1225 22.5716 15.7979 22.5956 15.5563 22.1126L11 13L1.9229 9.36919C1.41322 9.16532 1.41953 8.86022 1.95695 8.68108L21.0432 2.31901C21.5716 2.14285 21.8747 2.43866 21.7267 2.95694ZM19.0353 5.09647L6.81221 9.17085L12.4488 11.4255L15.4895 17.5068L19.0353 5.09647Z" fill="currentColor"/>',server:'<path d="M5 11H19V5H5V11ZM21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20C20.5523 3 21 3.44772 21 4ZM19 13H5V19H19V13ZM7 15H10V17H7V15ZM7 7H10V9H7V7Z" fill="currentColor"/>',"settings-3":'<path d="M3.33946 17.0002C2.90721 16.2515 2.58277 15.4702 2.36133 14.6741C3.3338 14.1779 3.99972 13.1668 3.99972 12.0002C3.99972 10.8345 3.3348 9.824 2.36353 9.32741C2.81025 7.71651 3.65857 6.21627 4.86474 4.99001C5.7807 5.58416 6.98935 5.65534 7.99972 5.072C9.01009 4.48866 9.55277 3.40635 9.4962 2.31604C11.1613 1.8846 12.8847 1.90004 14.5031 2.31862C14.4475 3.40806 14.9901 4.48912 15.9997 5.072C17.0101 5.65532 18.2187 5.58416 19.1346 4.99007C19.7133 5.57986 20.2277 6.25151 20.66 7.00021C21.0922 7.7489 21.4167 8.53025 21.6381 9.32628C20.6656 9.82247 19.9997 10.8336 19.9997 12.0002C19.9997 13.166 20.6646 14.1764 21.6359 14.673C21.1892 16.2839 20.3409 17.7841 19.1347 19.0104C18.2187 18.4163 17.0101 18.3451 15.9997 18.9284C14.9893 19.5117 14.4467 20.5941 14.5032 21.6844C12.8382 22.1158 11.1148 22.1004 9.49633 21.6818C9.55191 20.5923 9.00929 19.5113 7.99972 18.9284C6.98938 18.3451 5.78079 18.4162 4.86484 19.0103C4.28617 18.4205 3.77172 17.7489 3.33946 17.0002ZM8.99972 17.1964C10.0911 17.8265 10.8749 18.8227 11.2503 19.9659C11.7486 20.0133 12.2502 20.014 12.7486 19.9675C13.1238 18.8237 13.9078 17.8268 14.9997 17.1964C16.0916 16.5659 17.347 16.3855 18.5252 16.6324C18.8146 16.224 19.0648 15.7892 19.2729 15.334C18.4706 14.4373 17.9997 13.2604 17.9997 12.0002C17.9997 10.74 18.4706 9.5632 19.2729 8.6665C19.1688 8.4405 19.0538 8.21822 18.9279 8.00021C18.802 7.78219 18.667 7.57148 18.5233 7.36842C17.3457 7.61476 16.0911 7.43414 14.9997 6.80405C13.9083 6.17395 13.1246 5.17768 12.7491 4.03455C12.2509 3.98714 11.7492 3.98646 11.2509 4.03292C10.8756 5.17671 10.0916 6.17364 8.99972 6.80405C7.9078 7.43447 6.65245 7.61494 5.47428 7.36803C5.18485 7.77641 4.93463 8.21117 4.72656 8.66637C5.52881 9.56311 5.99972 10.74 5.99972 12.0002C5.99972 13.2604 5.52883 14.4372 4.72656 15.3339C4.83067 15.5599 4.94564 15.7822 5.07152 16.0002C5.19739 16.2182 5.3324 16.4289 5.47612 16.632C6.65377 16.3857 7.90838 16.5663 8.99972 17.1964ZM11.9997 15.0002C10.3429 15.0002 8.99972 13.6571 8.99972 12.0002C8.99972 10.3434 10.3429 9.00021 11.9997 9.00021C13.6566 9.00021 14.9997 10.3434 14.9997 12.0002C14.9997 13.6571 13.6566 15.0002 11.9997 15.0002ZM11.9997 13.0002C12.552 13.0002 12.9997 12.5525 12.9997 12.0002C12.9997 11.4479 12.552 11.0002 11.9997 11.0002C11.4474 11.0002 10.9997 11.4479 10.9997 12.0002C10.9997 12.5525 11.4474 13.0002 11.9997 13.0002Z" fill="currentColor"/>',"share-2":'<path d="M12 2.58582L18.2071 8.79292L16.7929 10.2071L13 6.41424V16H11V6.41424L7.20711 10.2071L5.79289 8.79292L12 2.58582ZM3 18V14H5V18C5 18.5523 5.44772 19 6 19H18C18.5523 19 19 18.5523 19 18V14H21V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18Z" fill="currentColor"/>',"shield-check":'<path d="M12 1L20.2169 2.82598C20.6745 2.92766 21 3.33347 21 3.80217V13.7889C21 15.795 19.9974 17.6684 18.3282 18.7812L12 23L5.6718 18.7812C4.00261 17.6684 3 15.795 3 13.7889V3.80217C3 3.33347 3.32553 2.92766 3.78307 2.82598L12 1ZM12 3.04879L5 4.60434V13.7889C5 15.1263 5.6684 16.3752 6.7812 17.1171L12 20.5963L17.2188 17.1171C18.3316 16.3752 19 15.1263 19 13.7889V4.60434L12 3.04879ZM16.4524 8.22183L17.8666 9.63604L11.5026 16L7.25999 11.7574L8.67421 10.3431L11.5019 13.1709L16.4524 8.22183Z" fill="currentColor"/>',"shield-keyhole":'<path d="M12 1L20.2169 2.82598C20.6745 2.92766 21 3.33347 21 3.80217V13.7889C21 15.795 19.9974 17.6684 18.3282 18.7812L12 23L5.6718 18.7812C4.00261 17.6684 3 15.795 3 13.7889V3.80217C3 3.33347 3.32553 2.92766 3.78307 2.82598L12 1ZM12 3.04879L5 4.60434V13.7889C5 15.1263 5.6684 16.3752 6.7812 17.1171L12 20.5963L17.2188 17.1171C18.3316 16.3752 19 15.1263 19 13.7889V4.60434L12 3.04879ZM12 7C13.1046 7 14 7.89543 14 9C14 9.73984 13.5983 10.3858 13.0011 10.7318L13 15H11L10.9999 10.7324C10.4022 10.3866 10 9.74025 10 9C10 7.89543 10.8954 7 12 7Z" fill="currentColor"/>',shield:'<path d="M3.78307 2.82598L12 1L20.2169 2.82598C20.6745 2.92766 21 3.33347 21 3.80217V13.7889C21 15.795 19.9974 17.6684 18.3282 18.7812L12 23L5.6718 18.7812C4.00261 17.6684 3 15.795 3 13.7889V3.80217C3 3.33347 3.32553 2.92766 3.78307 2.82598ZM5 4.60434V13.7889C5 15.1263 5.6684 16.3752 6.7812 17.1171L12 20.5963L17.2188 17.1171C18.3316 16.3752 19 15.1263 19 13.7889V4.60434L12 3.04879L5 4.60434Z" fill="currentColor"/>',"shield-user":'<path d="M3.78307 2.82598L12 1L20.2169 2.82598C20.6745 2.92766 21 3.33347 21 3.80217V13.7889C21 15.795 19.9974 17.6684 18.3282 18.7812L12 23L5.6718 18.7812C4.00261 17.6684 3 15.795 3 13.7889V3.80217C3 3.33347 3.32553 2.92766 3.78307 2.82598ZM5 4.60434V13.7889C5 15.1263 5.6684 16.3752 6.7812 17.1171L12 20.5963L17.2188 17.1171C18.3316 16.3752 19 15.1263 19 13.7889V4.60434L12 3.04879L5 4.60434ZM12 11C10.6193 11 9.5 9.88071 9.5 8.5C9.5 7.11929 10.6193 6 12 6C13.3807 6 14.5 7.11929 14.5 8.5C14.5 9.88071 13.3807 11 12 11ZM7.52746 16C7.77619 13.75 9.68372 12 12 12C14.3163 12 16.2238 13.75 16.4725 16H7.52746Z" fill="currentColor"/>',shuffle:'<path d="M18 17.8832V16L23 19L18 22V19.9095C14.9224 19.4698 12.2513 17.4584 11.0029 14.5453L11 14.5386L10.9971 14.5453C9.57893 17.8544 6.32508 20 2.72483 20H2V18H2.72483C5.52503 18 8.05579 16.3312 9.15885 13.7574L9.91203 12L9.15885 10.2426C8.05579 7.66878 5.52503 6 2.72483 6H2V4H2.72483C6.32508 4 9.57893 6.14557 10.9971 9.45473L11 9.46141L11.0029 9.45473C12.2513 6.5416 14.9224 4.53022 18 4.09051V2L23 5L18 8V6.11684C15.7266 6.53763 13.7737 8.0667 12.8412 10.2426L12.088 12L12.8412 13.7574C13.7737 15.9333 15.7266 17.4624 18 17.8832Z" fill="currentColor"/>',"slash-commands-2":'<path d="M5 2C3.34315 2 2 3.34315 2 5V19C2 20.6569 3.34315 22 5 22H19C20.6569 22 22 20.6569 22 19V5C22 3.34315 20.6569 2 19 2H5ZM4 5C4 4.44772 4.44772 4 5 4H19C19.5523 4 20 4.44772 20 5V19C20 19.5523 19.5523 20 19 20H5C4.44772 20 4 19.5523 4 19V5ZM9.72318 18L16.5803 6H14.2768L7.41968 18H9.72318Z" fill="currentColor"/>',smartphone:'<path d="M7 4V20H17V4H7ZM6 2H18C18.5523 2 19 2.44772 19 3V21C19 21.5523 18.5523 22 18 22H6C5.44772 22 5 21.5523 5 21V3C5 2.44772 5.44772 2 6 2ZM12 17C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18C11 17.4477 11.4477 17 12 17Z" fill="currentColor"/>',sparkling:'<path d="M14 4.4375C15.3462 4.4375 16.4375 3.34619 16.4375 2H17.5625C17.5625 3.34619 18.6538 4.4375 20 4.4375V5.5625C18.6538 5.5625 17.5625 6.65381 17.5625 8H16.4375C16.4375 6.65381 15.3462 5.5625 14 5.5625V4.4375ZM1 11C4.31371 11 7 8.31371 7 5H9C9 8.31371 11.6863 11 15 11V13C11.6863 13 9 15.6863 9 19H7C7 15.6863 4.31371 13 1 13V11ZM4.87601 12C6.18717 12.7276 7.27243 13.8128 8 15.124 8.72757 13.8128 9.81283 12.7276 11.124 12 9.81283 11.2724 8.72757 10.1872 8 8.87601 7.27243 10.1872 6.18717 11.2724 4.87601 12ZM17.25 14C17.25 15.7949 15.7949 17.25 14 17.25V18.75C15.7949 18.75 17.25 20.2051 17.25 22H18.75C18.75 20.2051 20.2051 18.75 22 18.75V17.25C20.2051 17.25 18.75 15.7949 18.75 14H17.25Z" fill="currentColor"/>',"split-cells-horizontal":'<path d="M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V19H11V15H13V19H19V5H13V9H11V5ZM15 9L18 12L15 15V13H9V15L6 12L9 9V11H15V9Z" fill="currentColor"/>',stack:'<path d="M20.0833 15.1999L21.2854 15.9212C21.5221 16.0633 21.5989 16.3704 21.4569 16.6072C21.4146 16.6776 21.3557 16.7365 21.2854 16.7787L12.5144 22.0412C12.1977 22.2313 11.8021 22.2313 11.4854 22.0412L2.71451 16.7787C2.47772 16.6366 2.40093 16.3295 2.54301 16.0927C2.58523 16.0223 2.64413 15.9634 2.71451 15.9212L3.9166 15.1999L11.9999 20.0499L20.0833 15.1999ZM20.0833 10.4999L21.2854 11.2212C21.5221 11.3633 21.5989 11.6704 21.4569 11.9072C21.4146 11.9776 21.3557 12.0365 21.2854 12.0787L11.9999 17.6499L2.71451 12.0787C2.47772 11.9366 2.40093 11.6295 2.54301 11.3927C2.58523 11.3223 2.64413 11.2634 2.71451 11.2212L3.9166 10.4999L11.9999 15.3499L20.0833 10.4999ZM12.5144 1.30864L21.2854 6.5712C21.5221 6.71327 21.5989 7.0204 21.4569 7.25719C21.4146 7.32757 21.3557 7.38647 21.2854 7.42869L11.9999 12.9999L2.71451 7.42869C2.47772 7.28662 2.40093 6.97949 2.54301 6.7427C2.58523 6.67232 2.64413 6.61343 2.71451 6.5712L11.4854 1.30864C11.8021 1.11864 12.1977 1.11864 12.5144 1.30864ZM11.9999 3.33233L5.88723 6.99995L11.9999 10.6676L18.1126 6.99995L11.9999 3.33233Z" fill="currentColor"/>',"star-fill":'<path d="M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26Z" fill="currentColor"/>',star:'<path d="M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26ZM12.0006 15.968L16.2473 18.3451L15.2988 13.5717L18.8719 10.2674L14.039 9.69434L12.0006 5.27502L9.96214 9.69434L5.12921 10.2674L8.70231 13.5717L7.75383 18.3451L12.0006 15.968Z" fill="currentColor"/>',"sticky-note":'<path d="M21 15L15 20.996L4.00221 21C3.4487 21 3 20.5551 3 20.0066V3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.45576 21 4.00247V15ZM19 5H5V19H13V14C13 13.4872 13.386 13.0645 13.8834 13.0067L14 13L19 12.999V5ZM18.171 14.999L15 15V18.169L18.171 14.999Z" fill="currentColor"/>',"stop-circle":'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM9 9H15V15H9V9Z" fill="currentColor"/>',stop:'<path d="M7 7V17H17V7H7ZM6 5H18C18.5523 5 19 5.44772 19 6V18C19 18.5523 18.5523 19 18 19H6C5.44772 19 5 18.5523 5 18V6C5 5.44772 5.44772 5 6 5Z" fill="currentColor"/>',subtract:'<path d="M5 11V13H19V11H5Z" fill="currentColor"/>',survey:'<path d="M17 2V4H20.0066C20.5552 4 21 4.44495 21 4.9934V21.0066C21 21.5552 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5551 3 21.0066V4.9934C3 4.44476 3.44495 4 3.9934 4H7V2H17ZM7 6H5V20H19V6H17V8H7V6ZM9 16V18H7V16H9ZM9 13V15H7V13H9ZM9 10V12H7V10H9ZM15 4H9V6H15V4Z" fill="currentColor"/>',task:'<path d="M19 4H5V20H19V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H19.9997C20.5519 2 20.9996 2.44772 20.9997 3L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918ZM11.2929 13.1213L15.5355 8.87868L16.9497 10.2929L11.2929 15.9497L7.40381 12.0607L8.81802 10.6464L11.2929 13.1213Z" fill="currentColor"/>',"terminal-box":'<path d="M3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM4 5V19H20V5H4ZM12 15H18V17H12V15ZM8.66685 12L5.83842 9.17157L7.25264 7.75736L11.4953 12L7.25264 16.2426L5.83842 14.8284L8.66685 12Z" fill="currentColor"/>',terminal:'<path d="M10.9999 12L3.92886 19.0711L2.51465 17.6569L8.1715 12L2.51465 6.34317L3.92886 4.92896L10.9999 12ZM10.9999 19H20.9999V21H10.9999V19Z" fill="currentColor"/>',"terminal-window":'<path d="M20 9V5H4V9H20ZM20 11H4V19H20V11ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM5 12H8V17H5V12ZM5 6H7V8H5V6ZM9 6H11V8H9V6Z" fill="currentColor"/>',text:'<path d="M13 6V21H11V6H5V4H19V6H13Z" fill="currentColor"/>',"text-wrap":'<path d="M15 18H16.5C17.8807 18 19 16.8807 19 15.5C19 14.1193 17.8807 13 16.5 13H3V11H16.5C18.9853 11 21 13.0147 21 15.5C21 17.9853 18.9853 20 16.5 20H15V22L11 19L15 16V18ZM3 4H21V6H3V4ZM9 18V20H3V18H9Z" fill="currentColor"/>',time:'<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM13 12H17V14H11V7H13V12Z" fill="currentColor"/>',timer:'<path d="M17.6177 5.9681L19.0711 4.51472L20.4853 5.92893L19.0319 7.38231C20.2635 8.92199 21 10.875 21 13C21 17.9706 16.9706 22 12 22C7.02944 22 3 17.9706 3 13C3 8.02944 7.02944 4 12 4C14.125 4 16.078 4.73647 17.6177 5.9681ZM12 20C15.866 20 19 16.866 19 13C19 9.13401 15.866 6 12 6C8.13401 6 5 9.13401 5 13C5 16.866 8.13401 20 12 20ZM11 8H13V14H11V8ZM8 1H16V3H8V1Z" fill="currentColor"/>',tools:'<path d="M5.32943 3.27158C6.56252 2.8332 7.9923 3.10749 8.97927 4.09446C10.1002 5.21537 10.3019 6.90741 9.5843 8.23385L20.293 18.9437L18.8788 20.3579L8.16982 9.64875C6.84325 10.3669 5.15069 10.1654 4.02952 9.04421C3.04227 8.05696 2.7681 6.62665 3.20701 5.39332L5.44373 7.63C6.02952 8.21578 6.97927 8.21578 7.56505 7.63C8.15084 7.04421 8.15084 6.09446 7.56505 5.50868L5.32943 3.27158ZM15.6968 5.15512L18.8788 3.38736L20.293 4.80157L18.5252 7.98355L16.7574 8.3371L14.6361 10.4584L13.2219 9.04421L15.3432 6.92289L15.6968 5.15512ZM8.97927 13.2868L10.3935 14.7011L5.09018 20.0044C4.69966 20.3949 4.06649 20.3949 3.67597 20.0044C3.31334 19.6417 3.28744 19.0699 3.59826 18.6774L3.67597 18.5902L8.97927 13.2868Z" fill="currentColor"/>',"twitter-xfill":'<path d="M17.6874 3.0625L12.6907 8.77425L8.37045 3.0625H2.11328L9.58961 12.8387L2.50378 20.9375H5.53795L11.0068 14.6886L15.7863 20.9375H21.8885L14.095 10.6342L20.7198 3.0625H17.6874ZM16.6232 19.1225L5.65436 4.78217H7.45745L18.3034 19.1225H16.6232Z" fill="currentColor"/>',unpin:'<path d="M20.9701 17.1716 19.5559 18.5858 16.0214 15.0513 15.9476 15.1251 15.2405 18.6606 13.8263 20.0748 9.58369 15.8322 4.63394 20.7819 3.21973 19.3677 8.16947 14.418 3.92683 10.1753 5.34105 8.7611 8.87658 8.05399 8.95029 7.98028 5.41373 4.44371 6.82794 3.0295 20.9701 17.1716ZM10.3645 9.39449 9.86261 9.8964 7.04072 10.4608 13.5409 16.9609 14.1052 14.139 14.6071 13.6371 10.3645 9.39449ZM18.7761 9.46821 17.4356 10.8087 18.8498 12.2229 20.1903 10.8824 20.8974 11.5895 22.3116 10.1753 13.8263 1.69003 12.4121 3.10425 13.1192 3.81135 11.7787 5.15185 13.1929 6.56607 14.5334 5.22557 18.7761 9.46821Z" fill="currentColor"/>',"user-3":'<path d="M20 22H18V20C18 18.3431 16.6569 17 15 17H9C7.34315 17 6 18.3431 6 20V22H4V20C4 17.2386 6.23858 15 9 15H15C17.7614 15 20 17.2386 20 20V22ZM12 13C8.68629 13 6 10.3137 6 7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7C18 10.3137 15.3137 13 12 13ZM12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z" fill="currentColor"/>',user:'<path d="M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z" fill="currentColor"/>',"voice-recognition":'<path d="M4.99805 15V19H8.99805V21H2.99805V15H4.99805ZM20.998 15V21H14.998V19H18.998V15H20.998ZM12.998 6V18H10.998V6H12.998ZM8.99805 9V15H6.99805V9H8.99805ZM16.998 9V15H14.998V9H16.998ZM8.99805 3V5H4.99805V9H2.99805V3H8.99805ZM20.998 3V9H18.998V5H14.998V3H20.998Z" fill="currentColor"/>',"volume-up":'<path d="M6.60282 10.0001L10 7.22056V16.7796L6.60282 14.0001H3V10.0001H6.60282ZM2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z" fill="currentColor"/>',window:'<path d="M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM20 11H4V19H20V11ZM20 5H4V9H20V5ZM11 6V8H9V6H11ZM7 6V8H5V6H7Z" fill="currentColor"/>'},ld="vinci-icon-sprite";let D0=!1;function Hp(){if(D0||typeof document>"u")return;const t=document.body;if(!t)return;if(document.getElementById(ld)){D0=!0;return}const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.id=ld,o.setAttribute("aria-hidden","true"),o.style.display="none",o.innerHTML=Object.entries(Tp).map(([n,s])=>`<symbol id="oc-${n}" viewBox="0 0 24 24">${s}</symbol>`).join(""),t.insertBefore(o,t.firstChild),D0=!0}const G=g.memo(t=>{const e=de.c(12);let o,n,s;e[0]!==t?({name:n,className:o,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]),typeof document<"u"&&Hp();let r;e[4]!==o?(r=U("remixicon",o),e[4]=o,e[5]=r):r=e[5];const i=`#oc-${n}`;let l;e[6]!==i?(l=a.jsx("use",{href:i}),e[6]=i,e[7]=l):l=e[7];let c;return e[8]!==s||e[9]!==r||e[10]!==l?(c=a.jsx("svg",{className:r,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...s,children:l}),e[8]=s,e[9]=r,e[10]=l,e[11]=c):c=e[11],c});G.displayName="Icon";const W2=ie.createContext(null),Ip=t=>t?t.closest('[data-slot="dialog-content"], [role="dialog"]'):null;function t7(t,e){return t&&ie.isValidElement(e)?{render:e}:{children:e}}function bi(t){const e=de.c(9);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];const[n,s]=ie.useState(null);let r;e[2]!==n?(r={portalContainer:n,setPortalContainer:s},e[2]=n,e[3]=r):r=e[3];const i=r;let l;e[4]!==o?(l=a.jsx(Dm,{...o}),e[4]=o,e[5]=l):l=e[5];let c;return e[6]!==i||e[7]!==l?(c=a.jsx(W2.Provider,{value:i,children:l}),e[6]=i,e[7]=l,e[8]=c):c=e[8],c}function yi(t){const e=de.c(22);let o,n,s,r,i;e[0]!==t?({asChild:o,children:n,onPointerDownCapture:r,onFocusCapture:s,...i}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i):(o=e[1],n=e[2],s=e[3],r=e[4],i=e[5]);const l=ie.useContext(W2);let c;e[6]!==l?(c=v=>{if(!l)return;const b=v instanceof HTMLElement?v:null;l.setPortalContainer(Ip(b))},e[6]=l,e[7]=c):c=e[7];const d=c;let u;e[8]!==o||e[9]!==n?(u=t7(o,n),e[8]=o,e[9]=n,e[10]=u):u=e[10];const f=u;let m;e[11]!==r||e[12]!==d?(m=v=>{d(v.currentTarget),r?.(v)},e[11]=r,e[12]=d,e[13]=m):m=e[13];let h;e[14]!==s||e[15]!==d?(h=v=>{d(v.currentTarget),s?.(v)},e[14]=s,e[15]=d,e[16]=h):h=e[16];let p;return e[17]!==i||e[18]!==f||e[19]!==m||e[20]!==h?(p=a.jsx(Pm,{"data-slot":"dropdown-menu-trigger",onPointerDownCapture:m,onFocusCapture:h,...i,...f}),e[17]=i,e[18]=f,e[19]=m,e[20]=h,e[21]=p):p=e[21],p}function wi(t){const e=de.c(28);let o,n,s,r,i,l,c,d,u;if(e[0]!==t){const{className:C,sideOffset:x,align:_,side:k,alignOffset:D,portalToBody:F,style:A,children:B,onCloseAutoFocus:M,...H}=t;r=C,d=x,o=_,l=k,n=D,u=F,c=A,s=B,i=H,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else o=e[1],n=e[2],s=e[3],r=e[4],i=e[5],l=e[6],c=e[7],d=e[8],u=e[9];const f=d===void 0?4:d,m=u===void 0?!1:u,h=ie.useContext(W2),p=m?void 0:h?.portalContainer||void 0;let v;e[10]!==c?(v={backgroundColor:"var(--surface-elevated)",color:"var(--surface-elevated-foreground)",...c},e[10]=c,e[11]=v):v=e[11];let b;e[12]!==r?(b=U("transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 z-50 max-h-[var(--available-height)] min-w-[8rem] origin-[var(--transform-origin)] overflow-visible rounded-xl p-1 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]",r),e[12]=r,e[13]=b):b=e[13];let y;e[14]!==s||e[15]!==i||e[16]!==v||e[17]!==b?(y=a.jsx(L8,{"data-slot":"dropdown-menu-content",style:v,className:b,...i,children:s}),e[14]=s,e[15]=i,e[16]=v,e[17]=b,e[18]=y):y=e[18];let w;e[19]!==o||e[20]!==n||e[21]!==l||e[22]!==f||e[23]!==y?(w=a.jsx(R8,{sideOffset:f,align:o,side:l,alignOffset:n,className:"z-50",children:y}),e[19]=o,e[20]=n,e[21]=l,e[22]=f,e[23]=y,e[24]=w):w=e[24];let S;return e[25]!==p||e[26]!==w?(S=a.jsx(z8,{container:p,children:w}),e[25]=p,e[26]=w,e[27]=S):S=e[27],S}function Fs(t){const e=de.c(24);let o,n,s,r,i,l,c,d;e[0]!==t?({className:s,inset:r,variant:d,asChild:o,children:n,onSelect:l,onClick:i,...c}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c,e[8]=d):(o=e[1],n=e[2],s=e[3],r=e[4],i=e[5],l=e[6],c=e[7],d=e[8]);const u=d===void 0?"default":d;let f;e[9]!==o||e[10]!==n?(f=t7(o,n),e[9]=o,e[10]=n,e[11]=f):f=e[11];const m=f;let h;e[12]!==i||e[13]!==l?(h=y=>{i?.(y),y.defaultPrevented||l?.(y)},e[12]=i,e[13]=l,e[14]=h):h=e[14];const p=h;let v;e[15]!==s?(v=U("data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 typography-ui-label outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",s),e[15]=s,e[16]=v):v=e[16];let b;return e[17]!==p||e[18]!==r||e[19]!==c||e[20]!==m||e[21]!==v||e[22]!==u?(b=a.jsx(V8,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":u,className:v,...c,onClick:p,...m}),e[17]=p,e[18]=r,e[19]=c,e[20]=m,e[21]=v,e[22]=u,e[23]=b):b=e[23],b}function OO(t){const e=de.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let n;return e[2]!==o?(n=a.jsx(Tm,{"data-slot":"dropdown-menu-radio-group",...o}),e[2]=o,e[3]=n):n=e[3],n}function $O(t){const e=de.c(11);let o,n,s;e[0]!==t?({className:n,children:o,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]);let r;e[4]!==n?(r=U("data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover data-[checked]:bg-interactive-selection data-[checked]:text-interactive-selection-foreground relative flex cursor-pointer items-start gap-2 rounded-lg py-1 pl-2 pr-8 typography-ui-label outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),e[4]=n,e[5]=r):r=e[5];let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx("span",{className:"pointer-events-none absolute right-2 flex size-3.5 items-center justify-center text-primary",children:a.jsx(jm,{children:a.jsx(G,{name:"check",className:"size-3"})})}),e[6]=i):i=e[6];let l;return e[7]!==o||e[8]!==s||e[9]!==r?(l=a.jsxs(Hm,{"data-slot":"dropdown-menu-radio-item",className:r,...s,children:[i,o]}),e[7]=o,e[8]=s,e[9]=r,e[10]=l):l=e[10],l}function P0(t){const e=de.c(10);let o,n,s;e[0]!==t?({className:o,inset:n,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]);let r;e[4]!==o?(r=U("px-2 py-1 typography-ui-label font-medium data-[inset]:pl-8",o),e[4]=o,e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==r?(i=a.jsx("div",{"data-slot":"dropdown-menu-label","data-inset":n,className:r,...s}),e[6]=n,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function qr(t){const e=de.c(8);let o,n;e[0]!==t?({className:o,...n}=t,e[0]=t,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let s;e[3]!==o?(s=U("bg-border -mx-1 my-0.5 h-px",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==n||e[6]!==s?(r=a.jsx(N8,{"data-slot":"dropdown-menu-separator",className:s,...n}),e[5]=n,e[6]=s,e[7]=r):r=e[7],r}function ZO(t){const e=de.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let n;return e[2]!==o?(n=a.jsx(Im,{...o}),e[2]=o,e[3]=n):n=e[3],n}function UO(t){const e=de.c(13);let o,n,s,r;e[0]!==t?({className:n,inset:s,children:o,...r}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r):(o=e[1],n=e[2],s=e[3],r=e[4]);let i;e[5]!==n?(i=U("data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 typography-ui-label outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),e[5]=n,e[6]=i):i=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(G,{name:"arrow-right-s",className:"ml-auto size-3.5"}),e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==s||e[10]!==r||e[11]!==i?(c=a.jsxs(Em,{"data-slot":"dropdown-menu-sub-trigger","data-inset":s,className:i,...r,children:[o,l]}),e[8]=o,e[9]=s,e[10]=r,e[11]=i,e[12]=c):c=e[12],c}function qO(t){const e=de.c(14);let o,n,s;e[0]!==t?({className:n,children:o,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]);const i=ie.useContext(W2)?.portalContainer||void 0;let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={backgroundColor:"var(--surface-elevated)",color:"var(--surface-elevated-foreground)"},e[4]=l):l=e[4];let c;e[5]!==n?(c=U("transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 z-50 min-w-[8rem] origin-[var(--transform-origin)] overflow-visible rounded-xl p-1 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]",n),e[5]=n,e[6]=c):c=e[6];let d;e[7]!==o||e[8]!==s||e[9]!==c?(d=a.jsx(R8,{className:"z-50",children:a.jsx(L8,{"data-slot":"dropdown-menu-sub-content",style:l,className:c,...s,children:o})}),e[7]=o,e[8]=s,e[9]=c,e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==d?(u=a.jsx(z8,{container:i,children:d}),e[11]=i,e[12]=d,e[13]=u):u=e[13],u}const Ep={"settings.appearance.language.label":"Language","settings.appearance.language.description":"Choose the interface language.","settings.appearance.language.select":"Select language","settings.window.description":"Vinci settings window.","settings.view.home.title":"Settings","settings.view.home.description":"Jump to common pages.","settings.view.home.cards.providers.title":"Providers","settings.view.home.cards.providers.description":"Connect models + credentials","settings.view.home.cards.agents.title":"Agents","settings.view.home.cards.agents.description":"Prompts, tools, permissions","settings.view.home.cards.skillsCatalog.title":"Skills Catalog","settings.view.home.cards.skillsCatalog.description":"Install skills from catalogs","settings.view.home.cards.mcp.title":"MCP","settings.view.home.cards.mcp.description":"Configure MCP servers + connections","settings.view.home.cards.usage.title":"Usage","settings.view.home.cards.usage.description":"Quota + spend visibility","settings.view.unavailable.title":"Not available","settings.view.unavailable.description":"This settings page is not available in this runtime.","settings.view.badge.beta":"beta","settings.view.actions.reloadOpenCode":"Reload OpenCode","settings.view.actions.reloadOpenCodeTooltip":"Restart OpenCode and reload its configuration.","settings.view.actions.backToSettings":"Back to Settings","settings.view.actions.closeSettings":"Close settings","settings.view.actions.openSectionList":"Open section list","settings.view.actions.closeSettingsWithShortcut":"Close Settings ({shortcut}+,)","settings.view.actions.back":"Back","settings.view.actions.resizeNavigation":"Resize settings navigation","settings.page.projects.title":"Projects","settings.page.remoteInstances.title":"Remote Instances","settings.page.providers.title":"Providers","settings.page.usage.title":"Usage","settings.page.agents.title":"Agents","settings.page.commands.title":"Commands","settings.page.mcp.title":"MCP","settings.page.skills.title":"Skills","settings.page.skillsCatalog.title":"Skills Catalog","settings.page.git.title":"Git","settings.page.appearance.title":"Appearance","settings.page.chat.title":"Chat","settings.page.shortcuts.title":"Shortcuts","settings.page.sessions.title":"Sessions","settings.page.magicPrompts.title":"Magic Prompts","settings.page.notifications.title":"Notifications","settings.page.voice.title":"Voice","settings.page.tunnel.title":"Remote Tunnel","settings.vinci.tunnel.title":"Remote Tunnel","settings.vinci.tunnel.description":"Configure secure remote access with quick links or your own managed remote Cloudflare tunnel.","settings.vinci.tunnel.note.serverSideEnforced":"Secure tunnel access is enforced server-side.","settings.vinci.tunnel.note.connectLinksOneTime":"Connect links are one-time and are revoked when tunnel stops or connect-link TTL expires.","settings.vinci.tunnel.note.cloudflareConnectorTarget":"Cloudflare connector target:","settings.vinci.tunnel.note.cloudflareConnectorTargetUse":"For Cloudflare connector target, use","settings.vinci.tunnel.note.tokensSavedPerTunnel":"Tokens are saved per tunnel and reused from disk.","settings.vinci.tunnel.note.customConfigUsed":"Custom config file will be used when starting the tunnel.","settings.vinci.tunnel.note.defaultConfigUsed":"When empty, cloudflared uses its default config (~/.cloudflared/config.yml).","settings.vinci.tunnel.note.managedRemoteRequiresDomain":"Managed remote tunnels require a purchased domain in your Cloudflare account.","settings.vinci.tunnel.note.managedLocalUsesConfig":"Managed local tunnels use your local cloudflared configuration file.","settings.vinci.tunnel.note.startModeAndGenerateLink":"Start a {mode} tunnel and generate a one-time connect link. Do not close the app while this tunnel is in use.","settings.vinci.tunnel.note.scanQrToConnect":"Scan with your phone to connect.","settings.vinci.tunnel.section.redeemedAccessLinks":"Redeemed access links","settings.vinci.tunnel.section.savedManagedRemoteTunnels":"Saved managed remote tunnels","settings.vinci.tunnel.notAvailable.cloudflaredNotFound":"cloudflared not found","settings.vinci.tunnel.notAvailable.installHint":"Install it to enable remote tunnel access:","settings.vinci.tunnel.field.provider":"Provider","settings.vinci.tunnel.field.providerPlaceholder":"Select provider","settings.vinci.tunnel.field.tunnelType":"Tunnel type","settings.vinci.tunnel.field.connectLinkTtl":"Connect link TTL","settings.vinci.tunnel.field.tunnelSessionTtl":"Tunnel session TTL","settings.vinci.tunnel.field.hostnameLabel":"Hostname:","settings.vinci.tunnel.field.savedTokenAvailablePlaceholder":"Saved token available (optional to replace)","settings.vinci.tunnel.field.pasteTokenPlaceholder":"Paste token for this tunnel","settings.vinci.tunnel.field.newPresetNamePlaceholder":"Tunnel name (e.g. Production)","settings.vinci.tunnel.field.newPresetHostnamePlaceholder":"Hostname (e.g. oc.example.com)","settings.vinci.tunnel.field.newPresetTokenPlaceholder":"Token","settings.vinci.tunnel.field.managedRemoteTokenInfoAria":"Managed remote tunnel token info","settings.vinci.tunnel.field.configurationFile":"Configuration file","settings.vinci.tunnel.field.configurationFilePlaceholder":"Using default cloudflared config","settings.vinci.tunnel.field.managedRemoteTunnelToConnect":"Managed remote tunnel to connect","settings.vinci.tunnel.field.selectSavedTunnelPlaceholder":"Select saved tunnel","settings.vinci.tunnel.field.publicUrlHint":"Public URL (not accessible without a token)","settings.vinci.tunnel.field.connectLink":"Connect link","settings.vinci.tunnel.field.expires":"Expires","settings.vinci.tunnel.field.connectQrAlt":"Tunnel connect QR code","settings.vinci.tunnel.actions.removePresetAria":"Remove {name}","settings.vinci.tunnel.actions.saveToken":"Save token","settings.vinci.tunnel.actions.browseConfigFileAria":"Browse config file","settings.vinci.tunnel.actions.clearConfigFileAria":"Clear config file","settings.vinci.tunnel.actions.openManagedRemoteDocs":"Check documentation on how to configure a managed remote tunnel","settings.vinci.tunnel.actions.openManagedLocalDocs":"Check documentation on managed local tunnel configuration","settings.vinci.tunnel.actions.startTunnel":"Start Tunnel","settings.vinci.tunnel.actions.startingTunnel":"Starting tunnel...","settings.vinci.tunnel.actions.stopTunnel":"Stop Tunnel","settings.vinci.tunnel.actions.stopping":"Stopping...","settings.vinci.tunnel.actions.newConnectLink":"New connect link","settings.vinci.tunnel.actions.copied":"Copied","settings.vinci.tunnel.actions.retry":"Retry","settings.vinci.tunnel.option.moreProvidersSoon":"More providers coming soon","settings.vinci.tunnel.option.mode.quick.label":"Quick","settings.vinci.tunnel.option.mode.quick.tooltip":"Quick Tunnel is best effort and Cloudflare does not guarantee uptime.","settings.vinci.tunnel.option.mode.managedRemote.label":"Managed Remote","settings.vinci.tunnel.option.mode.managedRemote.tooltip":"Managed Remote uses your Cloudflare account and hostname for long-lived access.","settings.vinci.tunnel.option.mode.managedLocal.label":"Managed Local","settings.vinci.tunnel.option.mode.managedLocal.tooltip":"Managed Local uses your local cloudflared configuration file.","settings.vinci.tunnel.warning.quickModeReliability":"For more reliable long-lived access, switch to Managed Remote or Managed Local tunnel mode.","settings.vinci.tunnel.warning.replacesActiveTunnel":"Starting this tunnel replaces the active tunnel and revokes existing connect links and remote sessions.","settings.vinci.tunnel.badge.quick":"QUICK","settings.vinci.tunnel.badge.remote":"REMOTE","settings.vinci.tunnel.badge.local":"LOCAL","settings.vinci.tunnel.state.loading":"Loading","settings.vinci.tunnel.state.expired":"Expired","settings.vinci.tunnel.state.revoked":"Revoked","settings.vinci.tunnel.state.inactive":"Inactive","settings.vinci.tunnel.state.noExpiry":"No expiry","settings.vinci.tunnel.state.never":"Never","settings.vinci.tunnel.state.tunnelReady":"Tunnel ready","settings.vinci.tunnel.session.redeemedAt":"Redeemed {time}","settings.vinci.tunnel.session.expiresIn":"Expires in {remaining}","settings.vinci.tunnel.session.inactiveWithReason":"Inactive ({reason})","settings.vinci.tunnel.error.invalidConfigExtension":"Config file must use .yml, .yaml, or .json extension.","settings.vinci.tunnel.tooltip.tokensSavedPath":"Tokens are saved in ~/.config/vinci/cloudflare-managed-remote-tunnels.json.","settings.vinci.tunnel.empty.noManagedRemoteTunnels":"No managed remote tunnels saved yet.","settings.vinci.tunnel.toast.checkAvailabilityFailed":"Failed to check tunnel availability","settings.vinci.tunnel.toast.saveSettingsFailed":"Failed to save tunnel settings","settings.vinci.tunnel.toast.saveTtlFailed":"Failed to save tunnel TTL settings","settings.vinci.tunnel.toast.saveTokenFailed":"Failed to save managed remote tunnel token","settings.vinci.tunnel.toast.selectOrAddManagedRemoteFirst":"Select or add a managed remote tunnel first","settings.vinci.tunnel.toast.managedRemoteTokenRequiredBeforeStarting":"Managed remote tunnel token is required before starting","settings.vinci.tunnel.toast.addManagedRemoteTokenBeforeStarting":"Add a managed remote tunnel token before starting","settings.vinci.tunnel.toast.startFailed":"Failed to start tunnel","settings.vinci.tunnel.toast.startedButNoPublicUrl":"Tunnel started but no public URL was returned","settings.vinci.tunnel.toast.replacedTunnelSingleSingle":"Replaced previous tunnel: revoked 1 link, invalidated 1 session.","settings.vinci.tunnel.toast.replacedTunnelSingleManySessions":"Replaced previous tunnel: revoked 1 link, invalidated {invalidatedSessionCount} sessions.","settings.vinci.tunnel.toast.replacedTunnelManyLinksSingleSession":"Replaced previous tunnel: revoked {revokedBootstrapCount} links, invalidated 1 session.","settings.vinci.tunnel.toast.replacedTunnelManyMany":"Replaced previous tunnel: revoked {revokedBootstrapCount} links, invalidated {invalidatedSessionCount} sessions.","settings.vinci.tunnel.toast.linkReady":"Tunnel link ready","settings.vinci.tunnel.toast.stopped":"Tunnel stopped","settings.vinci.tunnel.toast.stopFailed":"Failed to stop tunnel","settings.vinci.tunnel.toast.connectLinkCopied":"Connect link copied","settings.vinci.tunnel.toast.copyUrlFailed":"Failed to copy URL","settings.vinci.tunnel.toast.saveSelectedManagedRemoteFailed":"Failed to save selected managed remote tunnel","settings.vinci.tunnel.toast.tunnelNameRequired":"Tunnel name is required","settings.vinci.tunnel.toast.managedRemoteHostnameRequired":"Managed remote tunnel hostname is required","settings.vinci.tunnel.toast.managedRemoteTokenRequired":"Managed remote tunnel token is required","settings.vinci.tunnel.toast.hostnameAlreadyExists":"This hostname already exists","settings.vinci.tunnel.toast.managedRemoteSaved":"Managed remote tunnel saved","settings.vinci.tunnel.toast.managedRemoteRemoved":"Managed remote tunnel removed","settings.magicPrompts.sidebar.title":"Magic Prompts","settings.magicPrompts.sidebar.description":"Select a prompt template to edit.","settings.magicPrompts.sidebar.group.git":"Git","settings.magicPrompts.sidebar.group.github":"GitHub","settings.magicPrompts.sidebar.group.planning":"Planning","settings.magicPrompts.sidebar.group.session":"Session","settings.magicPrompts.sidebar.item.gitCommitGenerate":"Commit Generation","settings.magicPrompts.sidebar.item.gitPrGenerate":"PR Generation","settings.magicPrompts.sidebar.item.gitConflictResolve":"Merge/Rebase Conflict Resolution","settings.magicPrompts.sidebar.item.gitCherrypickConflictResolve":"Cherry-pick Conflict Resolution","settings.magicPrompts.sidebar.item.githubPrReview":"PR Review","settings.magicPrompts.sidebar.item.githubIssueReview":"Issue Review","settings.magicPrompts.sidebar.item.githubPrFailedChecksReview":"PR Failed Checks Review","settings.magicPrompts.sidebar.item.githubPrCommentsReview":"PR Comments Review","settings.magicPrompts.sidebar.item.githubSinglePrCommentReview":"Single PR Comment Review","settings.magicPrompts.sidebar.item.planTodo":"Todo Planning","settings.magicPrompts.sidebar.item.planImprove":"Improve Plan","settings.magicPrompts.sidebar.item.planImplement":"Implement Plan","settings.magicPrompts.sidebar.item.sessionSummary":"Session Summary","settings.magicPrompts.sidebar.item.sessionWorkspaceReview":"Workspace Review","settings.magicPrompts.sidebar.item.sessionFusion":"Fusion","settings.remoteInstances.sidebar.title":"Remote Instances","settings.remoteInstances.sidebar.total":"Total {count}","settings.remoteInstances.sidebar.newSshInstanceName":"New SSH Instance","settings.remoteInstances.sidebar.actions.addSshInstance":"Add SSH instance","settings.remoteInstances.sidebar.actions.connect":"Connect","settings.remoteInstances.sidebar.actions.disconnect":"Disconnect","settings.remoteInstances.sidebar.actions.retry":"Retry","settings.remoteInstances.sidebar.actions.remove":"Remove","settings.remoteInstances.sidebar.confirm.localPortInUseRetry":"Local port is already in use. Pick a random free local port and retry?","settings.remoteInstances.sidebar.toast.createFailed":"Failed to create SSH instance","settings.remoteInstances.sidebar.toast.retriedWithRandomPort":"Retried with a random local port","settings.remoteInstances.sidebar.toast.connectFailed":"Failed to connect instance","settings.remoteInstances.sidebar.toast.disconnectFailed":"Failed to disconnect instance","settings.remoteInstances.sidebar.toast.retryFailed":"Failed to retry connection","settings.remoteInstances.sidebar.toast.removeFailed":"Failed to remove instance","settings.remoteInstances.sidebar.phase.ready":"Ready","settings.remoteInstances.sidebar.phase.error":"Error","settings.remoteInstances.sidebar.phase.reconnect":"Reconnect","settings.remoteInstances.sidebar.phase.installing":"Installing","settings.remoteInstances.sidebar.phase.updating":"Updating","settings.remoteInstances.sidebar.phase.forwarding":"Forwarding","settings.remoteInstances.sidebar.phase.starting":"Starting","settings.remoteInstances.sidebar.phase.connecting":"Connecting","settings.remoteInstances.sidebar.phase.idle":"Idle","settings.remoteInstances.page.section.instance":"Instance","settings.remoteInstances.page.section.instanceDescription":"Core SSH settings.","settings.remoteInstances.page.field.mode":"Mode","settings.remoteInstances.page.field.modeHint":"Managed installs/updates and starts Vinci remotely. External assumes it is already running.","settings.remoteInstances.page.field.modePlaceholder":"Select mode","settings.remoteInstances.page.field.modeManaged":"Managed (auto start)","settings.remoteInstances.page.field.modeExternal":"External (already running)","settings.remoteInstances.page.field.preferredRemotePort":"Preferred remote port","settings.remoteInstances.page.field.preferredRemotePortHint":"Port Vinci should use on the remote host. Leave empty to let the runtime choose.","settings.remoteInstances.page.field.keepServerRunning":"Keep server running","settings.remoteInstances.page.field.keepServerRunningHint":"If enabled, Vinci daemon is left running remotely when you disconnect.","settings.remoteInstances.page.field.bindHost":"Bind host","settings.remoteInstances.page.field.bindHostHint":"Network interface for the main local URL. Use 127.0.0.1/localhost for local-only access.","settings.remoteInstances.page.field.preferredLocalPort":"Preferred local port","settings.remoteInstances.page.field.preferredLocalPortHint":"Preferred local port for the main Vinci tunnel. Leave empty for auto-select.","settings.remoteInstances.page.field.forwardType":"Forward type","settings.remoteInstances.page.field.localHostPlaceholder":"127.0.0.1","settings.remoteInstances.page.field.remoteHostPlaceholder":"127.0.0.1","settings.remoteInstances.page.field.auto":"Auto","settings.remoteInstances.page.confirm.bindAllInterfaces":"Binding to 0.0.0.0 exposes forwarded ports to your local network. Continue?","settings.remoteInstances.page.preview.localSocks5":"(local SOCKS5)","settings.remoteInstances.page.preview.local":"(local)","settings.remoteInstances.page.preview.remote":"(remote)","settings.remoteInstances.page.toast.openLocalEndpointFailed":"Failed to open local endpoint","settings.remoteInstances.page.toast.localUrlCopied":"Local URL copied","settings.remoteInstances.page.actions.copyLocalUrl":"Copy local URL","settings.remoteInstances.page.actions.open":"Open","settings.remoteInstances.page.logsDialog.selectedInstanceFallback":"Selected instance","settings.remoteInstances.page.patternDialog.descriptionWithHost":"{host} requires a concrete destination.","settings.remoteInstances.page.patternDialog.description":"Enter destination.","settings.common.actions.cancel":"Cancel","settings.common.actions.create":"Create","settings.common.actions.delete":"Delete","settings.common.actions.reset":"Reset","settings.common.actions.rename":"Rename","settings.common.actions.duplicate":"Duplicate","settings.common.actions.import":"Import","settings.common.actions.copyAll":"Copy all","settings.common.actions.clear":"Clear","settings.common.actions.saving":"Saving...","settings.common.actions.saveChanges":"Save Changes","settings.common.scope.global":"Global","settings.common.scope.project":"Project","settings.common.field.description":"Description","settings.common.badge.new":"New","settings.common.badge.modified":"Modified","settings.common.permission.allow":"Allow","settings.common.permission.ask":"Ask","settings.common.permission.deny":"Deny","settings.common.state.comingSoon":"Coming soon...","settings.projects.actions.title":"Actions","settings.projects.actions.description":"Per-project commands shown in header next to project name.","settings.projects.actions.validation.fillNameAndCommand":"Fill action name and command before saving.","settings.projects.actions.state.loading":"Loading...","settings.projects.actions.state.empty":"No actions configured yet.","settings.projects.actions.state.untitled":"Untitled action","settings.projects.actions.state.noDesktopSshForwards":"No enabled local SSH forwards available.","settings.projects.actions.field.selectIconAria":"Select icon","settings.projects.actions.field.iconAria":"Icon {icon}","settings.projects.actions.field.actionNamePlaceholder":"Action name","settings.projects.actions.field.command":"Command","settings.projects.actions.field.commandPlaceholder":"e.g. bun run lint","settings.projects.actions.field.autoOpenUrl":"Auto-open URL","settings.projects.actions.field.autoOpenUrlForAria":"Auto-open URL for {title}","settings.projects.actions.field.autoOpenUrlDescription":"Open URL from output or custom URL below","settings.projects.actions.field.overrideUrlPlaceholder":"Override URL (optional)","settings.projects.actions.field.overrideUrlTooltip":"If this field is filled, custom URL is used. If empty, app opens best URL from output.","settings.projects.actions.field.desktopSshForward":"Desktop SSH forward","settings.projects.actions.field.useOutputManualUrl":"Use output/manual URL","settings.projects.actions.actions.add":"Add action","settings.projects.actions.actions.save":"Save Actions","settings.projects.actions.toast.saveFailed":"Failed to save actions","settings.projects.actions.toast.saved":"Project actions saved","settings.vinci.about.title":"About Vinci","settings.vinci.about.field.version":"Version","settings.vinci.about.state.checking":"Checking...","settings.vinci.about.state.upToDate":"Up to date","settings.vinci.about.actions.checkUpdates":"Check updates","settings.vinci.about.actions.update":"Update","settings.vinci.about.actions.updateToVersion":"Update to {version}","settings.vinci.about.actions.checkForUpdates":"Check for updates","settings.vinci.about.toast.latestVersion":"You are on the latest version","settings.agents.sidebar.title":"Agents","settings.agents.sidebar.total":"Total {count}","settings.agents.sidebar.empty.title":"No agents configured","settings.agents.sidebar.empty.description":"Use the + button above to create one","settings.agents.sidebar.section.builtIn":"Built-in Agents","settings.agents.sidebar.section.custom":"Custom Agents","settings.agents.sidebar.badge.system":"system","settings.agents.sidebar.dialog.deleteTitle":"Delete Agent","settings.agents.sidebar.dialog.resetTitle":"Reset Agent","settings.agents.sidebar.dialog.deleteDescription":'Are you sure you want to delete agent "{name}"?',"settings.agents.sidebar.dialog.resetDescription":'Are you sure you want to reset agent "{name}" to its default configuration?',"settings.agents.sidebar.renameDialog.title":"Rename Agent","settings.agents.sidebar.renameDialog.description":'Enter a new name for the agent "@{name}"',"settings.agents.sidebar.renameDialog.placeholder":"New agent name...","settings.agents.sidebar.toast.builtInCannotDelete":"Built-in agents cannot be deleted","settings.agents.sidebar.toast.agentDeleted":'Agent "{name}" deleted successfully',"settings.agents.sidebar.toast.agentReset":'Agent "{name}" reset to default',"settings.agents.sidebar.toast.deleteFailed":"Failed to delete agent","settings.agents.sidebar.toast.resetFailed":"Failed to reset agent","settings.agents.sidebar.toast.agentNameRequired":"Agent name is required","settings.agents.sidebar.toast.agentExists":"An agent with this name already exists","settings.agents.sidebar.toast.removeOldAfterRenameFailed":"Failed to remove old agent after rename","settings.agents.sidebar.toast.renameFailed":"Failed to rename agent","settings.agents.page.toast.permissionNameRequired":"Permission name is required","settings.agents.page.toast.created":"Agent created successfully","settings.agents.page.toast.updated":"Agent updated successfully","settings.agents.page.toast.createFailed":"Failed to create agent","settings.agents.page.toast.updateFailed":"Failed to update agent","settings.agents.page.toast.saveUnexpectedError":"An error occurred while saving","settings.agents.page.empty.title":"Select an agent from the sidebar","settings.agents.page.empty.description":"or create a new one","settings.agents.page.title.new":"New Agent","settings.agents.page.subtitle.new":"Configure a new assistant persona","settings.agents.page.subtitle.edit":"Edit agent settings","settings.agents.page.section.identityRole":"Identity & Role","settings.agents.page.section.modelParameters":"Model & Parameters","settings.agents.page.section.systemPrompt":"System Prompt","settings.agents.page.section.toolPermissions":"Tool Permissions","settings.agents.page.field.agentName":"Agent Name","settings.agents.page.field.agentNamePlaceholder":"agent-name","settings.agents.page.field.scopePlaceholder":"Scope","settings.agents.page.field.descriptionPlaceholder":"What does this agent do?","settings.agents.page.field.mode":"Mode","settings.agents.page.field.modeTooltip":"Primary vs Subagent visibility","settings.agents.page.field.overrideModel":"Override Model","settings.agents.page.field.temperature":"Temperature","settings.agents.page.field.temperatureTooltip":"Controls randomness. Higher = creative, Lower = focused.","settings.agents.page.field.temperatureRange":"0.0 to 2.0","settings.agents.page.field.clearTemperatureAria":"Clear temperature override","settings.agents.page.field.topP":"Top P","settings.agents.page.field.topPTooltip":"Nucleus sampling diversity. Lower = likely tokens only.","settings.agents.page.field.topPRange":"0.0 to 1.0","settings.agents.page.field.clearTopPAria":"Clear top p override","settings.agents.page.field.systemPromptPlaceholder":"You are an expert coding assistant...","settings.agents.page.mode.primary":"Primary","settings.agents.page.mode.subagent":"Subagent","settings.agents.page.mode.all":"All","settings.agents.page.permissions.defaultLabel":"Default","settings.agents.page.permissions.hideEditor":"Hide Editor","settings.agents.page.permissions.advancedEditor":"Advanced Editor","settings.agents.page.permissions.globalSummary":"Global: {summary}","settings.agents.page.permissions.rulesSummary":"Rules: {summary}","settings.agents.page.permissions.globalDefault":"Global Default","settings.agents.page.permissions.pattern":"Pattern","settings.agents.page.permissions.addCustomRule":"Add Custom Rule","settings.agents.page.permissions.permissionPlaceholder":"Permission...","settings.agents.page.permissions.patternPlaceholder":"Pattern (e.g. *)","settings.page.behavior.title":"Behavior","settings.behavior.page.title":"Behavior","settings.behavior.page.warning.title":"Global rules are combined with project rules","settings.behavior.page.warning.description":"Changes made here update {path}. OpenCode also includes any project-level AGENTS.md rules when they exist.","settings.behavior.page.section.systemPrompt":"Global AGENTS.md","settings.behavior.page.field.systemPromptPlaceholder":`You are a helpful AI assistant...
|
|
3
3
|
|
|
4
4
|
Use this space to define absolute rules for how the AI should behave across all sessions and providers.`,"settings.behavior.page.section.responseStyle":"Response style","settings.behavior.page.responseStyle.tooltip":"When enabled, these instructions guide how the assistant responds in each new conversation. They are sent with your first message and do not change your global AGENTS.md rules.","settings.behavior.page.responseStyle.enableAria":"Enable response style instructions","settings.behavior.page.responseStyle.enable":"Add response style instructions to new conversations","settings.behavior.page.responseStyle.preset":"Preset","settings.behavior.page.responseStyle.option.concise":"Concise","settings.behavior.page.responseStyle.option.detailed":"Detailed","settings.behavior.page.responseStyle.option.mentor":"Mentor","settings.behavior.page.responseStyle.option.pushback":"Pushback","settings.behavior.page.responseStyle.option.noFiller":"No filler","settings.behavior.page.responseStyle.option.matchEnergy":"Match my energy","settings.behavior.page.responseStyle.option.warmPeer":"Warm peer","settings.behavior.page.responseStyle.option.custom":"Custom","settings.behavior.page.responseStyle.customPlaceholder":"Write the instruction to add to the first message...","settings.behavior.page.toast.saved":"Behavior saved successfully","settings.behavior.page.toast.saveFailed":"Failed to save behavior","settings.commands.sidebar.title":"Commands","settings.commands.sidebar.total":"Total {count}","settings.commands.sidebar.empty.title":"No commands configured","settings.commands.sidebar.empty.description":"Use the + button above to create one","settings.commands.sidebar.section.builtIn":"Built-in Commands","settings.commands.sidebar.section.custom":"Custom Commands","settings.commands.sidebar.dialog.deleteTitle":"Delete Command","settings.commands.sidebar.dialog.resetTitle":"Reset Command","settings.commands.sidebar.dialog.deleteDescription":'Are you sure you want to delete command "{name}"?',"settings.commands.sidebar.dialog.resetDescription":'Are you sure you want to reset command "{name}" to its default configuration?',"settings.commands.sidebar.renameDialog.title":"Rename Command","settings.commands.sidebar.renameDialog.description":'Enter a new name for the command "/{name}"',"settings.commands.sidebar.renameDialog.placeholder":"New command name...","settings.commands.sidebar.toast.builtInCannotDelete":"Built-in commands cannot be deleted","settings.commands.sidebar.toast.commandDeleted":'Command "{name}" deleted successfully',"settings.commands.sidebar.toast.commandReset":'Command "{name}" reset to default',"settings.commands.sidebar.toast.deleteFailed":"Failed to delete command","settings.commands.sidebar.toast.resetFailed":"Failed to reset command","settings.commands.sidebar.toast.commandNameRequired":"Command name is required","settings.commands.sidebar.toast.commandExists":"A command with this name already exists","settings.commands.sidebar.toast.removeOldAfterRenameFailed":"Failed to remove old command after rename","settings.commands.sidebar.toast.renameFailed":"Failed to rename command","settings.commands.page.toast.templateRequired":"Command template is required","settings.commands.page.toast.created":"Command created successfully","settings.commands.page.toast.updated":"Command updated successfully","settings.commands.page.toast.createFailed":"Failed to create command","settings.commands.page.toast.updateFailed":"Failed to update command","settings.commands.page.toast.saveUnexpectedError":"An error occurred while saving","settings.commands.page.empty.title":"Select a command from the sidebar","settings.commands.page.empty.description":"or create a new one","settings.commands.page.title.new":"New Command","settings.commands.page.subtitle.new":"Configure a new slash command","settings.commands.page.subtitle.edit":"Edit command settings","settings.commands.page.section.identity":"Identity","settings.commands.page.section.executionContext":"Execution Context","settings.commands.page.section.template":"Command Template","settings.commands.page.field.commandName":"Command Name","settings.commands.page.field.commandNamePlaceholder":"command-name","settings.commands.page.field.descriptionPlaceholder":"What does this command do?","settings.commands.page.field.overrideAgent":"Override Agent","settings.commands.page.field.templatePlaceholder":`Your command template here...
|
|
@@ -6832,7 +6832,7 @@ ${e.context.trim()}`:""});try{const u=await af({directory:t,visiblePrompt:c,hidd
|
|
|
6832
6832
|
</svg>
|
|
6833
6833
|
`,hl="oc-file-type-icon-sprite-root",$A=()=>{if(typeof document>"u"||document.getElementById(hl))return;const t=()=>{if(document.getElementById(hl))return;const e=document.createElement("div");e.id=hl,e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width="0",e.style.height="0",e.style.overflow="hidden",e.innerHTML=OA,document.body.appendChild(e)};if(document.body){t();return}document.addEventListener("DOMContentLoaded",t,{once:!0})};$A();const C5={dockerfile:"docker",makefile:"makefile",gnumakefile:"makefile","cmakelists.txt":"cmake","package-lock.json":"npm","yarn.lock":"yarn","pnpm-lock.yaml":"pnpm","bun.lock":"bun","bun.lockb":"bun","tsconfig.json":"tsconfig","jsconfig.json":"jsconfig",".gitignore":"git",".gitattributes":"git",".gitmodules":"git",".editorconfig":"editorconfig",".npmrc":"npm",".yarnrc":"yarn",".prettierrc":"prettier",".eslintrc":"eslint",".babelrc":"babel"},S5={javascript:"javascript",jsx:"react",typescript:"typescript",tsx:"react_ts",html:"html",handlebars:"handlebars",twig:"twig",liquid:"liquid",css:"css",scss:"sass",sass:"sass",less:"less",stylus:"stylus",json:"json",yaml:"yaml",toml:"toml",xml:"xml",ini:"settings",properties:"settings",bash:"console",powershell:"powershell",batch:"console",python:"python",ruby:"ruby",erb:"ruby",php:"php",java:"java",kotlin:"kotlin",scala:"scala",groovy:"groovy",c:"c",cpp:"cpp",objectivec:"objective-c",csharp:"csharp",fsharp:"fsharp",go:"go",rust:"rust",swift:"swift",dart:"dart",lua:"lua",perl:"perl",r:"r",julia:"julia",haskell:"haskell",elixir:"elixir",erlang:"erlang",clojure:"clojure",lisp:"lisp",scheme:"scheme",ocaml:"ocaml",reason:"reason",nim:"nim",zig:"zig",v:"vlang",crystal:"crystal",d:"d",sql:"database",graphql:"graphql",solidity:"solidity",nasm:"assembly",nix:"nix",hcl:"terraform",puppet:"puppet",latex:"tex",bibtex:"bibliography",markdown:"markdown",asciidoc:"asciidoc",text:"document",vim:"vim",makefile:"makefile",cmake:"cmake",diff:"diff",prisma:"prisma",protobuf:"proto",thrift:"document",wasm:"webassembly",glsl:"shader",hlsl:"shader",cg:"shader",apacheconf:"settings",nginx:"nginx"},k5={yml:"yaml",mdx:"mdx",md:"markdown",lock:"lock",env:"settings",zip:"zip",tgz:"zip",gz:"zip",rar:"zip","7z":"zip",png:"image",jpg:"image",jpeg:"image",gif:"image",svg:"svg",webp:"image",avif:"image",bmp:"image",ico:"favicon",mp3:"audio",wav:"audio",flac:"audio",ogg:"audio",mp4:"video",mov:"video",avi:"video",mkv:"video",webm:"video",pdf:"pdf",doc:"word",docx:"word",ppt:"powerpoint",pptx:"powerpoint"},R2="document",ZA=(t,e)=>{if(!t)return e==="light"?`${R2}_light`:R2;if(e==="light"){const o=t.endsWith("_light")?t:`${t}_light`;return B4.has(o)?o:t}return t},UA=t=>typeof t=="string"&&t.trim().length>0,qA=(t,e)=>{const n=t.replace(/\\/g,"/").split("/").pop()?.toLowerCase()||"";if(C5[n])return C5[n];if(n.startsWith(".env"))return"settings";const s=y0(t);if(s&&S5[s])return S5[s];const r=UA(e)?e.toLowerCase():n.includes(".")&&n.split(".").pop()?.toLowerCase()||"";return r&&k5[r]?k5[r]:r&&B4.has(r)?r:R2},WA=(t,e)=>{const o=qA(t,e?.extension),n=B4.has(o)?o:R2;return`#${ZA(n,e?.themeVariant||"dark")}`},D4=ie.createContext(void 0);function js(){const t=ie.useContext(D4);if(!t)throw new Error("useThemeSystem must be used within a ThemeSystemProvider");return t}function Cf(){return ie.useContext(D4)}const es=t=>{const e=de.c(11),{filePath:o,extension:n,className:s}=t,i=Cf()?.currentTheme.metadata.variant==="light"?"light":"dark";let l;e[0]!==n||e[1]!==o||e[2]!==i?(l=WA(o,{extension:n,themeVariant:i}),e[0]=n,e[1]=o,e[2]=i,e[3]=l):l=e[3];const c=l;let d;e[4]!==s?(d=U("h-4 w-4 flex-shrink-0",s),e[4]=s,e[5]=d):d=e[5];let u;e[6]!==c?(u=a.jsx("use",{href:c,xlinkHref:c}),e[6]=c,e[7]=u):u=e[7];let f;return e[8]!==d||e[9]!==u?(f=a.jsx("svg",{className:d,"aria-hidden":"true",focusable:"false",children:u}),e[8]=d,e[9]=u,e[10]=f):f=e[10],f},P4=ie.createContext(null),GA=t=>t?t.closest('[data-slot="dialog-content"], [role="dialog"]'):null;function M5(t){const e=de.c(15);let o,n,s;e[0]!==t?({onValueChange:o,modal:s,...n}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]);const r=s===void 0?!1:s,[i,l]=ie.useState(null);let c;e[4]!==i?(c={portalContainer:i,setPortalContainer:l},e[4]=i,e[5]=c):c=e[5];const d=c;let u;e[6]!==o?(u=(p,v)=>{typeof p=="string"&&o?.(p,v)},e[6]=o,e[7]=u):u=e[7];const f=u;let m;e[8]!==f||e[9]!==r||e[10]!==n?(m=a.jsx(Km,{...n,modal:r,onValueChange:f}),e[8]=f,e[9]=r,e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==d||e[13]!==m?(h=a.jsx(P4.Provider,{value:d,children:m}),e[12]=d,e[13]=m,e[14]=h):h=e[14],h}function A5(t){const e=de.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let n;return e[2]!==o?(n=a.jsx(eh,{"data-slot":"select-group",...o}),e[2]=o,e[3]=n):n=e[3],n}function F5(t){const e=de.c(10);let o,n,s;e[0]!==t?({placeholder:n,children:o,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]);let r;e[4]!==o||e[5]!==n?(r=l=>{const c=typeof l=="string"||l===void 0?l:l===null?void 0:String(l);return typeof o=="function"?o(c):o??(c===void 0||c===""?n:c)},e[4]=o,e[5]=n,e[6]=r):r=e[6];let i;return e[7]!==s||e[8]!==r?(i=a.jsx(Jm,{"data-slot":"select-value",...s,children:r}),e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function _5(t){const e=de.c(34);let o,n,s,r,i,l,c;e[0]!==t?({className:s,size:c,children:n,asChild:o,onPointerDownCapture:i,onFocusCapture:r,...l}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c):(o=e[1],n=e[2],s=e[3],r=e[4],i=e[5],l=e[6],c=e[7]);const d=c===void 0?"default":c,u=ie.useContext(P4);let f;e[8]!==u?(f=x=>{if(!u)return;const _=x instanceof HTMLElement?x:null;u.setPortalContainer(GA(_))},e[8]=u,e[9]=f):f=e[9];const m=f;let h;e[10]!==o||e[11]!==n?(h=o&&ie.isValidElement(n)?{render:n}:null,e[10]=o,e[11]=n,e[12]=h):h=e[12];const p=h;let v;e[13]!==s?(v=U("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-2 py-2 typography-ui-label whitespace-nowrap shadow-none outline-none focus-visible:outline-none hover:bg-interactive-hover data-[popup-open]:bg-interactive-active focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-6 data-[size=sm]:h-6 data-[size=lg]:h-8 data-[size=lg]:py-1.5 data-[size=chip]:h-7 data-[size=chip]:py-1 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[13]=s,e[14]=v):v=e[14];let b;e[15]!==i||e[16]!==m?(b=x=>{m(x.currentTarget),i?.(x)},e[15]=i,e[16]=m,e[17]=b):b=e[17];let y;e[18]!==r||e[19]!==m?(y=x=>{m(x.currentTarget),r?.(x)},e[18]=r,e[19]=m,e[20]=y):y=e[20];let w;e[21]!==p?(w=p??{},e[21]=p,e[22]=w):w=e[22];let S;e[23]!==p||e[24]!==n?(S=p?void 0:a.jsxs(a.Fragment,{children:[n,a.jsx(oh,{children:a.jsx(G,{name:"arrow-down-s",className:"size-4 opacity-50"})})]}),e[23]=p,e[24]=n,e[25]=S):S=e[25];let C;return e[26]!==l||e[27]!==d||e[28]!==v||e[29]!==b||e[30]!==y||e[31]!==w||e[32]!==S?(C=a.jsx(Ym,{"data-slot":"select-trigger","data-size":d,className:v,onPointerDownCapture:b,onFocusCapture:y,...l,...w,children:S}),e[26]=l,e[27]=d,e[28]=v,e[29]=b,e[30]=y,e[31]=w,e[32]=S,e[33]=C):C=e[33],C}function B5(t){const e=de.c(36);let o,n,s,r,i,l,c,d,u;e[0]!==t?({className:s,children:n,position:c,fitContent:d,portalToBody:u,sideOffset:l,side:i,align:o,...r}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c,e[8]=d,e[9]=u):(o=e[1],n=e[2],s=e[3],r=e[4],i=e[5],l=e[6],c=e[7],d=e[8],u=e[9]);const f=c===void 0?"popper":c,m=d===void 0?!1:d,h=u===void 0?!1:u,p=ie.useContext(P4),v=f==="item-aligned",b=p?.portalContainer??null,y=h?void 0:b||void 0;let w;e[10]===Symbol.for("react.memo_cache_sentinel")?(w={backgroundColor:"var(--surface-elevated)",color:"var(--surface-elevated-foreground)"},e[10]=w):w=e[10];const S=!v&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",C=m&&"w-max min-w-0";let x;e[11]!==s||e[12]!==S||e[13]!==C?(x=U("pointer-events-auto transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 relative z-[120] max-h-[var(--available-height)] min-w-[8rem] origin-[var(--transform-origin)] overflow-x-hidden rounded-xl shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]",S,C,s),e[11]=s,e[12]=S,e[13]=C,e[14]=x):x=e[14];const _=m?"w-max":"w-full";let k;e[15]!==_?(k=U("max-h-[var(--available-height)]",_),e[15]=_,e[16]=k):k=e[16];const D=!v&&(m?"w-max min-w-0 scroll-my-1":"w-full min-w-[var(--anchor-width)] scroll-my-1");let F;e[17]!==D?(F=U("p-1",D),e[17]=D,e[18]=F):F=e[18];let A;e[19]!==n||e[20]!==k||e[21]!==F?(A=a.jsx(mn,{outerClassName:k,className:F,preventOverscroll:!0,children:n}),e[19]=n,e[20]=k,e[21]=F,e[22]=A):A=e[22];let B;e[23]!==r||e[24]!==A||e[25]!==x?(B=a.jsx(Qm,{"data-slot":"select-content",style:w,className:x,...r,children:A}),e[23]=r,e[24]=A,e[25]=x,e[26]=B):B=e[26];let M;e[27]!==o||e[28]!==v||e[29]!==i||e[30]!==l||e[31]!==B?(M=a.jsx(nh,{alignItemWithTrigger:v,sideOffset:l,side:i,align:o,className:"absolute z-[120] pointer-events-auto",children:B}),e[27]=o,e[28]=v,e[29]=i,e[30]=l,e[31]=B,e[32]=M):M=e[32];let H;return e[33]!==M||e[34]!==y?(H=a.jsx(sh,{container:y,children:M}),e[33]=M,e[34]=y,e[35]=H):H=e[35],H}function KA(t){const e=de.c(8);let o,n;e[0]!==t?({className:o,...n}=t,e[0]=t,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let s;e[3]!==o?(s=U("text-muted-foreground px-2 py-1.5 typography-meta",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==n||e[6]!==s?(r=a.jsx(th,{"data-slot":"select-label",className:s,...n}),e[5]=n,e[6]=s,e[7]=r):r=e[7],r}function za(t){const e=de.c(13);let o,n,s;e[0]!==t?({className:n,children:o,...s}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=s):(o=e[1],n=e[2],s=e[3]);let r;e[4]!==n?(r=U("data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover data-[selected]:bg-interactive-selection data-[selected]:text-interactive-selection-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 typography-ui-label outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),e[4]=n,e[5]=r):r=e[5];let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:a.jsx(rh,{children:a.jsx(G,{name:"check",className:"size-4"})})}),e[6]=i):i=e[6];let l;e[7]!==o?(l=a.jsx(ih,{children:o}),e[7]=o,e[8]=l):l=e[8];let c;return e[9]!==s||e[10]!==r||e[11]!==l?(c=a.jsxs(Xm,{"data-slot":"select-item",className:r,...s,children:[i,l]}),e[9]=s,e[10]=r,e[11]=l,e[12]=c):c=e[12],c}function YA(t){const e=de.c(8);let o,n;e[0]!==t?({className:o,...n}=t,e[0]=t,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let s;e[3]!==o?(s=U("bg-border pointer-events-none -mx-1 my-1 h-px",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==n||e[6]!==s?(r=a.jsx(N8,{"data-slot":"select-separator",className:s,...n}),e[5]=n,e[6]=s,e[7]=r):r=e[7],r}const JA=t=>t==="diff"||t==="plan"||t==="file"||t==="preview-console"||t==="preview-annotation",QA=t=>t==="original"||t==="modified",D5=t=>{const e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?Math.max(1,Math.floor(e)):null},XA=t=>{if(!t||typeof t!="object")return null;const e=t;if(typeof e.sessionKey!="string"||e.sessionKey.trim().length===0||!JA(e.source))return null;const o=D5(e.startLine),n=D5(e.endLine);return!o||!n?null:{id:typeof e.id=="string"&&e.id.trim().length>0?e.id:`icd-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,sessionKey:e.sessionKey,source:e.source,fileLabel:typeof e.fileLabel=="string"?e.fileLabel:"unknown",startLine:o,endLine:n,side:QA(e.side)?e.side:void 0,code:typeof e.code=="string"?e.code:"",language:typeof e.language=="string"?e.language:"text",text:typeof e.text=="string"?e.text:"",createdAt:Number.isFinite(e.createdAt)?Number(e.createdAt):Date.now()}},eF=t=>{if(!t||typeof t!="object")return{};const e=Object.entries(t),o={};for(const[n,s]of e){if(!Array.isArray(s))continue;const r=s.map(XA).filter(i=>!!i).filter(i=>i.sessionKey===n);r.length>0&&(o[n]=r)}return o},a1=uo()(an($n((t,e)=>({drafts:{},addDraft:o=>{const n=`icd-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,s={...o,id:n,createdAt:Date.now()};return t(r=>{const i=r.drafts[o.sessionKey]??[];return{drafts:{...r.drafts,[o.sessionKey]:[...i,s]}}}),n},updateDraft:(o,n,s)=>{t(r=>{const l=(r.drafts[o]??[]).map(c=>c.id!==n?c:{...c,...s});return{drafts:{...r.drafts,[o]:l}}})},removeDraft:(o,n)=>{t(s=>{const i=(s.drafts[o]??[]).filter(l=>l.id!==n);if(i.length===0){const{[o]:l,...c}=s.drafts;return{drafts:c}}return{drafts:{...s.drafts,[o]:i}}})},clearDrafts:o=>{t(n=>{const{[o]:s,...r}=n.drafts;return{drafts:r}})},getDrafts:o=>e().drafts[o]??[],consumeDrafts:o=>{const n=e().drafts[o]??[];if(n.length===0)return[];const s=[...n].sort((r,i)=>r.createdAt-i.createdAt);return t(r=>{const{[o]:i,...l}=r.drafts;return{drafts:l}}),s},getDraftCount:o=>(e().drafts[o]??[]).length,hasDrafts:o=>(e().drafts[o]??[]).length>0}),{name:"vinci-inline-comment-drafts",storage:Zn(()=>Uo()),version:1,migrate:t=>!t||typeof t!="object"?{drafts:{}}:{drafts:eF(t.drafts)}}),{name:"inline-comment-draft-store"})),tF=t=>/^#[0-9a-fA-F]{6}$/.test(t),oF=t=>/^#[0-9a-fA-F]{8}$/.test(t),nF=(t,e)=>/^[0-9a-fA-F]{2}$/.test(e)?tF(t)?`${t}${e}`:oF(t)?`${t.slice(0,7)}${e}`:t:t,vn=(t,e)=>typeof t=="string"&&t.trim().length>0?t:e,sF=t=>{const e=t.colors.syntax.base,o=t.colors.syntax.tokens??{},n=(s,r)=>vn(o[s],r);return[{name:"plain",scope:["source","support.type.property-name.css"],settings:{foreground:e.foreground}},{name:"classes",scope:["entity.name.type.class"],settings:{foreground:n("className",n("class",e.function))}},{name:"interfaces",scope:["entity.name.type.interface","entity.name.type"],settings:{foreground:n("interface",e.type)}},{name:"structs",scope:["entity.name.type.struct"],settings:{foreground:n("struct",e.function)}},{name:"enums",scope:["entity.name.type.enum"],settings:{foreground:n("enum",e.function)}},{name:"keys",scope:["meta.object-literal.key","support.type.property-name"],settings:{foreground:n("key",e.function)}},{name:"methods",scope:["entity.name.function.method","meta.function.method"],settings:{foreground:n("method",t.colors.status.success)}},{name:"functions",scope:["entity.name.function","support.function","meta.function-call.generic"],settings:{foreground:e.function,fontStyle:"bold"}},{name:"variables",scope:["variable","meta.variable","variable.other.object.property"],settings:{foreground:e.variable}},{name:"variablesOther",scope:["variable.other.object","variable.other.readwrite.alias"],settings:{foreground:n("variableOther",n("method",t.colors.status.success))}},{name:"globalVariables",scope:["variable.other.global","variable.language.this"],settings:{foreground:n("variableGlobal",e.number)}},{name:"localVariables",scope:["variable.other.local"],settings:{foreground:n("variableLocal",t.colors.surface.elevated)}},{name:"parameters",scope:["variable.parameter","meta.parameter"],settings:{foreground:n("parameter",e.foreground)}},{name:"properties",scope:["variable.other.property","meta.property"],settings:{foreground:n("variableProperty",t.colors.status.info)}},{name:"strings",scope:["string","string.other.link","markup.inline.raw.string.markdown"],settings:{foreground:e.string}},{name:"stringEscapeSequences",scope:["constant.character.escape","constant.other.placeholder"],settings:{foreground:n("stringEscape",e.foreground)}},{name:"keywords",scope:["keyword"],settings:{foreground:e.keyword}},{name:"keywordsControl",scope:["keyword.control.import","keyword.control.from","keyword.import"],settings:{foreground:n("keywordImport",e.operator)}},{name:"storageModifiers",scope:["storage.modifier","keyword.modifier","storage.type"],settings:{foreground:n("storageModifier",e.keyword)}},{name:"comments",scope:["comment","punctuation.definition.comment"],settings:{foreground:e.comment}},{name:"docComments",scope:["comment.documentation","comment.line.documentation"],settings:{foreground:n("commentDoc",t.colors.surface.mutedForeground)}},{name:"numbers",scope:["constant.numeric"],settings:{foreground:e.number}},{name:"booleans",scope:["constant.language.boolean","constant.language.json"],settings:{foreground:n("boolean",e.type)}},{name:"operators",scope:["keyword.operator"],settings:{foreground:e.operator}},{name:"macros",scope:["entity.name.function.preprocessor","meta.preprocessor"],settings:{foreground:n("macro",e.keyword)}},{name:"preprocessor",scope:["meta.preprocessor"],settings:{foreground:n("preprocessor",n("label",e.number))}},{name:"urls",scope:["markup.underline.link"],settings:{foreground:n("url",t.colors.status.info)}},{name:"tags",scope:["entity.name.tag"],settings:{foreground:n("tag",e.keyword)}},{name:"jsxTags",scope:["support.class.component"],settings:{foreground:n("jsxTag",n("label",e.number))}},{name:"attributes",scope:["entity.other.attribute-name","meta.attribute"],settings:{foreground:n("tagAttribute",e.type)}},{name:"types",scope:["support.type"],settings:{foreground:e.type}},{name:"constants",scope:["variable.other.constant","variable.readonly"],settings:{foreground:n("constant",e.foreground)}},{name:"labels",scope:["entity.name.label","punctuation.definition.label"],settings:{foreground:n("label",n("variableGlobal",e.number))}},{name:"namespaces",scope:["entity.name.namespace","storage.modifier.namespace","markup.bold.markdown"],settings:{foreground:n("namespace",e.type)}},{name:"modules",scope:["entity.name.module","storage.modifier.module"],settings:{foreground:n("module",e.operator)}},{name:"typeParameters",scope:["variable.type.parameter","variable.parameter.type"],settings:{foreground:n("typeParameter",e.function)}},{name:"exceptions",scope:["keyword.control.exception","keyword.control.trycatch"],settings:{foreground:n("exception",n("label",e.number))}},{name:"decorators",scope:["meta.decorator","punctuation.decorator","entity.name.function.decorator"],settings:{foreground:n("decorator",e.type)}},{name:"calls",scope:["variable.function"],settings:{foreground:e.foreground}},{name:"punctuation",scope:["punctuation","punctuation.terminator","punctuation.definition.tag","punctuation.separator","punctuation.definition.string","punctuation.section.block"],settings:{foreground:n("punctuation",e.comment)}},{name:"yellow",scope:["storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","constant.language.go","support.class.dart","keyword.other.documentation","storage.modifier.import.java","punctuation.definition.list.begin.markdown","punctuation.definition.quote.begin.markdown","meta.separator.markdown","entity.name.section.markdown"],settings:{foreground:e.type}},{name:"green",scope:[],settings:{foreground:n("method",t.colors.status.success)}},{name:"cyan",scope:["markup.italic.markdown","support.type.python","variable.legacy.builtin.python","support.constant.property-value.css","storage.modifier.attribute.swift"],settings:{foreground:e.string}},{name:"blue",scope:[],settings:{foreground:e.keyword}},{name:"purple",scope:["keyword.channel.go","keyword.other.platform.os.swift"],settings:{foreground:e.number}},{name:"magenta",scope:["punctuation.definition.heading.markdown"],settings:{foreground:n("label",n("variableGlobal",e.number))}},{name:"red",scope:[],settings:{foreground:e.operator}},{name:"orange",scope:[],settings:{foreground:e.function}}]},rF=t=>{const e=t.colors.surface,o=t.colors.interactive,n=t.colors.status,s=t.colors.syntax.base,r=t.colors.syntax.highlights??{},i=vn(r.diffAddedBackground,n.successBackground),l=vn(r.diffRemovedBackground,n.errorBackground);return{"editor.background":e.background,"editor.foreground":e.foreground,"editor.hoverHighlightBackground":vn(o.hover,e.subtle),"editor.lineHighlightBackground":e.muted,"editor.selectionBackground":o.selection,"editor.selectionHighlightBackground":o.selection,"editor.findMatchBackground":s.type,"editor.findMatchHighlightBackground":nF(s.type,"cc"),"editor.findRangeHighlightBackground":e.muted,"editor.inactiveSelectionBackground":e.elevated,"editor.lineHighlightBorder":e.elevated,"editor.rangeHighlightBackground":vn(o.active,o.borderHover),"notifications.background":e.elevated,"editorInlayHint.typeBackground":e.subtle,"editorInlayHint.typeForeground":e.foreground,"editorWhitespace.foreground":o.borderHover,"editorIndentGuide.background1":e.subtle,"editorHoverWidget.background":e.elevated,"editorLineNumber.activeForeground":vn(r.lineNumberActive,e.foreground),"editorLineNumber.foreground":vn(r.lineNumber,e.mutedForeground),"editorGutter.background":e.background,"editorGutter.modifiedBackground":n.info,"editorGutter.addedBackground":n.success,"editorGutter.deletedBackground":n.error,"editorBracketMatch.background":e.elevated,"editorBracketMatch.border":e.subtle,"editorError.foreground":n.error,"editorWarning.foreground":n.warning,"editorInfo.foreground":n.info,"diffEditor.insertedTextBackground":i,"diffEditor.removedTextBackground":l,"editorGroupHeader.tabsBackground":e.background,"editorGroup.border":o.border,"tab.activeBackground":e.background,"tab.inactiveBackground":e.muted,"tab.inactiveForeground":e.mutedForeground,"tab.activeForeground":e.foreground,"tab.hoverBackground":e.subtle,"tab.unfocusedHoverBackground":e.subtle,"tab.border":o.border,"tab.activeModifiedBorder":s.type,"tab.inactiveModifiedBorder":n.info,"tab.unfocusedActiveModifiedBorder":s.type,"tab.unfocusedInactiveModifiedBorder":n.info,"editorWidget.background":e.muted,"editorWidget.border":o.border,"editorSuggestWidget.background":e.background,"editorSuggestWidget.border":o.border,"editorSuggestWidget.foreground":e.foreground,"editorSuggestWidget.highlightForeground":e.mutedForeground,"editorSuggestWidget.selectedBackground":e.subtle,"peekView.border":o.border,"peekViewEditor.background":e.background,"peekViewEditor.matchHighlightBackground":e.subtle,"peekViewResult.background":e.muted,"peekViewResult.fileForeground":e.foreground,"peekViewResult.lineForeground":e.mutedForeground,"peekViewResult.matchHighlightBackground":e.subtle,"peekViewResult.selectionBackground":e.elevated,"peekViewResult.selectionForeground":e.mutedForeground,"peekViewTitle.background":e.subtle,"peekViewTitleDescription.foreground":e.mutedForeground,"peekViewTitleLabel.foreground":e.foreground,"merge.currentHeaderBackground":n.success,"merge.currentContentBackground":vn(r.diffAdded,n.success),"merge.incomingHeaderBackground":n.info,"merge.incomingContentBackground":vn(r.diffModified,n.info),"merge.border":o.border,"merge.commonContentBackground":e.subtle,"merge.commonHeaderBackground":e.muted,"panel.background":e.background,"panel.border":o.border,"panelTitle.activeBorder":o.borderHover,"panelTitle.activeForeground":e.foreground,"panelTitle.inactiveForeground":e.mutedForeground,"statusBar.background":e.background,"statusBar.foreground":e.foreground,"statusBar.border":o.border,"statusBar.debuggingBackground":n.error,"statusBar.debuggingForeground":n.errorForeground,"statusBar.noFolderBackground":e.subtle,"statusBar.noFolderForeground":e.mutedForeground,"titleBar.activeBackground":e.background,"titleBar.activeForeground":e.foreground,"titleBar.inactiveBackground":e.muted,"titleBar.inactiveForeground":e.mutedForeground,"titleBar.border":o.border,"menu.foreground":e.foreground,"menu.background":e.background,"menu.selectionForeground":e.foreground,"menu.selectionBackground":e.subtle,"menu.border":o.border,"editorInlayHint.foreground":e.mutedForeground,"editorInlayHint.background":e.subtle,"terminal.foreground":e.foreground,"terminal.background":e.background,"terminalCursor.foreground":e.foreground,"terminalCursor.background":e.background,"terminal.ansiRed":vn(r.diffRemoved,n.error),"terminal.ansiGreen":vn(r.diffAdded,n.success),"terminal.ansiYellow":n.warning,"terminal.ansiBlue":vn(r.diffModified,n.info),"terminal.ansiMagenta":s.keyword,"terminal.ansiCyan":s.type,"activityBar.background":e.background,"activityBar.foreground":e.foreground,"activityBar.inactiveForeground":e.mutedForeground,"activityBar.activeBorder":e.foreground,"activityBar.border":o.border,"sideBar.background":e.background,"sideBar.foreground":e.foreground,"sideBar.border":o.border,"sideBarTitle.foreground":e.foreground,"sideBarSectionHeader.background":e.muted,"sideBarSectionHeader.foreground":e.foreground,"sideBarSectionHeader.border":o.border,"sideBar.activeBackground":e.subtle,"sideBar.activeForeground":e.foreground,"sideBar.hoverBackground":e.muted,"sideBar.hoverForeground":e.foreground,"list.warningForeground":n.warning,"list.errorForeground":n.error,"list.inactiveSelectionBackground":e.subtle,"list.activeSelectionBackground":e.elevated,"list.inactiveSelectionForeground":e.foreground,"list.activeSelectionForeground":e.foreground,"list.hoverForeground":e.foreground,"list.hoverBackground":e.muted,"input.background":e.muted,"input.foreground":e.foreground,"input.border":o.border,"input.placeholderForeground":e.mutedForeground,"inputOption.activeBorder":o.border,"inputOption.activeBackground":e.elevated,"inputOption.activeForeground":e.foreground,"inputValidation.infoBackground":n.infoBackground,"inputValidation.infoBorder":n.infoBorder,"inputValidation.warningBackground":n.warningBackground,"inputValidation.warningBorder":n.warningBorder,"inputValidation.errorBackground":n.errorBackground,"inputValidation.errorBorder":n.errorBorder,"dropdown.background":e.muted,"dropdown.foreground":e.foreground,"dropdown.border":o.border,"dropdown.listBackground":e.background,"badge.background":t.colors.primary.base,"activityBarBadge.background":t.colors.primary.base,"button.background":t.colors.primary.base,"button.foreground":vn(t.colors.primary.foreground,e.background),"badge.foreground":vn(t.colors.primary.foreground,e.background),"activityBarBadge.foreground":vn(t.colors.primary.foreground,e.background)}};function iF(t){return{name:t.metadata.name,type:t.metadata.variant,colors:rF(t),tokenColors:sF(t)}}const aF=t=>/^#[0-9a-fA-F]{8}$/.test(t),P5=t=>aF(t)?t.slice(0,7):t;function lF(t,e){return Object.defineProperty(t,"toString",{value:()=>e,enumerable:!1,configurable:!0}),Object.defineProperty(t,Symbol.toPrimitive,{value:()=>e,enumerable:!1,configurable:!0}),t}const T5=new Map,H5=new Set,cF=(t,e)=>{const o=t.colors?.["editor.background"],n=t.colors?.["editor.foreground"],s=o?P5(o):void 0,r=n?P5(n):void 0;if(!s||!r)throw new Error(`Theme "${e}" is missing editor.background/editor.foreground`);const i=t.tokenColors??[];return lF({...t,name:e,fg:r,bg:s,settings:i},e)},dF=t=>iF(t),uF=t=>{const e=T5.get(t.metadata.id);if(e)return e;const o=dF(t),n=cF(o,t.metadata.id);return T5.set(t.metadata.id,n),n},I5=t=>{const e=t.metadata.id;if(H5.has(e))return;const o=uF(t);ah(e,async()=>o),H5.add(e)},fF="#8957e5",mF="#8250df",hF=t=>{const e=t.colors.syntax?.tokens??{},o=[e.className,e.enum,e.variableGlobal,t.colors.syntax?.base?.keyword].filter(n=>typeof n=="string"&&n.trim().length>0);return o.length>0?o[0]:t.metadata.variant==="dark"?fF:mF},la=t=>t.colors.pr?t:{...t,colors:{...t.colors,pr:{open:t.colors.status.success,draft:t.colors.surface.mutedForeground,blocked:t.colors.status.warning,merged:hF(t),closed:t.colors.status.error}}},pF={id:"aura-dark",name:"Aura",description:"Aura",version:"1.0.0",variant:"dark",tags:["dark","palette"]},gF={primary:{base:"#A277FF",hover:"#8D68DD",active:"#B08BFF",foreground:"#15141B",muted:"#A277FF80",emphasis:"#8D68DD"},surface:{background:"#15141B",foreground:"#EDECEE",muted:"#1A1921",mutedForeground:"#8a8282",elevated:"#201e2b",elevatedForeground:"#EDECEE",overlay:"#FFFFFF20",subtle:"#25232f"},interactive:{border:"#2D2B38",borderHover:"#47415a",borderFocus:"#4E496C",selection:"#95abe02d",selectionForeground:"#FFFFFF",focus:"#A277FF",focusRing:"#A277FF40",cursor:"#FFFFFF",hover:"#7887ac2d",active:"#95abe02d"},status:{error:"#FF6767",errorForeground:"#15141B",errorBackground:"#FF676720",errorBorder:"#FF676750",warning:"#FFCA85",warningForeground:"#15141B",warningBackground:"#FFCA8520",warningBorder:"#FFCA8550",success:"#61FFCA",successForeground:"#15141B",successBackground:"#61FFCA20",successBorder:"#61FFCA50",info:"#82E2FF",infoForeground:"#15141B",infoBackground:"#82E2FF20",infoBorder:"#82E2FF50"},pr:{open:"#61FFCA",draft:"#6D6D6D",blocked:"#FFCA85",merged:"#A277FF",closed:"#FF6767"},syntax:{base:{background:"#1A1921",foreground:"#EDECEE",comment:"#6D6D6D",keyword:"#A277FF",string:"#61FFCA",number:"#FF6767",function:"#A277FF",variable:"#EDECEE",type:"#FFCA85",operator:"#FF6767"},tokens:{boolean:"#FFCA85",class:"#A277FF",className:"#A277FF",commentDoc:"#606061",constant:"#82E2FF",decorator:"#FFCA85",enum:"#A277FF",exception:"#FF6767",functionCall:"#A277FF",interface:"#FFCA85",jsxTag:"#A277FF",key:"#A277FF",keywordImport:"#FF6767",label:"#FF6767",macro:"#82E2FF",method:"#61FFCA",module:"#FF6767",namespace:"#FFCA85",parameter:"#EDECEE",preprocessor:"#FF6767",punctuation:"#6D6D6D",regex:"#61FFCA",storageModifier:"#82E2FF",stringEscape:"#FFFFFF",struct:"#A277FF",tag:"#A277FF",tagAttribute:"#FFCA85",tagAttributeValue:"#61FFCA",typeParameter:"#FFCA85",url:"#A277FF",variableGlobal:"#A277FF",variableLocal:"#121118",variableOther:"#61FFCA",variableProperty:"#82E2FF"},highlights:{diffAdded:"#61FFCA",diffAddedBackground:"#162620",diffModified:"#82E2FF",diffModifiedBackground:"#1E1D2A",diffRemoved:"#FF6767",diffRemovedBackground:"#26161A",lineNumber:"#3E3A56",lineNumberActive:"#FFFFFF"}},markdown:{heading1:"#e7d7f4",heading2:"#e7e0ee",heading3:"#ece7f0",heading4:"#EDECEE",link:"#A277FF",linkHover:"#F694FF",inlineCode:"#61FFCA",inlineCodeBackground:"#1A1921",blockquote:"#6D6D6D",blockquoteBorder:"#2D2B38",listMarker:"#A277FF99"},chat:{userMessage:"#EDECEE",userMessageBackground:"#393647",assistantMessage:"#EDECEE",assistantMessageBackground:"#15141B",timestamp:"#6D6D6D",divider:"#2D2B38"},tools:{background:"#1A192180",border:"#43415480",headerHover:"#0F0E14",icon:"#6D6D6D",title:"#EDECEE",description:"#6D6D6D",edit:{added:"#61FFCA",addedBackground:"#61FFCA25",removed:"#FF6767",removedBackground:"#FF676725",lineNumber:"#3E3A56"}}},vF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},bF={metadata:pF,colors:gF,config:vF},yF={id:"aura-light",name:"Aura",description:"Aura",version:"1.0.0",variant:"light",tags:["light","palette"]},wF={primary:{base:"#A277FF",hover:"#B38FFF",active:"#8D68DD",foreground:"#F5F0FF",muted:"#A277FF80",emphasis:"#B38FFF"},surface:{background:"#F5F0FF",foreground:"#2D2640",muted:"#EFE8FC",mutedForeground:"#807b8b",elevated:"#f1ebfb",elevatedForeground:"#2D2640",overlay:"#15101F20",subtle:"#EFE8FC"},interactive:{border:"#E0D6F2",borderHover:"#D5C9EB",borderFocus:"#A593C8",selection:"#bdb2d74c",selectionForeground:"#15101F",focus:"#A277FF",focusRing:"#A277FF40",cursor:"#15101F",hover:"#bdb2d72d",active:"#bdb2d74c"},status:{error:"#D94F4F",errorForeground:"#F5F0FF",errorBackground:"#D94F4F20",errorBorder:"#D94F4F50",warning:"#D9A24A",warningForeground:"#F5F0FF",warningBackground:"#D9A24A20",warningBorder:"#D9A24A50",success:"#40BF7A",successForeground:"#F5F0FF",successBackground:"#40BF7A20",successBorder:"#40BF7A50",info:"#5BB8D9",infoForeground:"#F5F0FF",infoBackground:"#5BB8D920",infoBorder:"#5BB8D950"},pr:{open:"#40BF7A",draft:"#6D6D6D",blocked:"#D9A24A",merged:"#A277FF",closed:"#D94F4F"},syntax:{base:{background:"#EFE8FC",foreground:"#2D2640",comment:"#5C5270",keyword:"#A277FF",string:"#40BF7A",number:"#D94F4F",function:"#A277FF",variable:"#2D2640",type:"#D9A24A",operator:"#D94F4F"},tokens:{boolean:"#D9A24A",class:"#A277FF",className:"#A277FF",commentDoc:"#A9A1B8",constant:"#5BB8D9",decorator:"#D9A24A",enum:"#A277FF",exception:"#D94F4F",functionCall:"#A277FF",interface:"#D9A24A",jsxTag:"#A277FF",key:"#A277FF",keywordImport:"#D94F4F",label:"#D94F4F",macro:"#5BB8D9",method:"#40BF7A",module:"#D94F4F",namespace:"#D9A24A",parameter:"#2D2640",preprocessor:"#D94F4F",punctuation:"#5C5270",regex:"#40BF7A",storageModifier:"#5BB8D9",stringEscape:"#15101F",struct:"#A277FF",tag:"#A277FF",tagAttribute:"#D9A24A",tagAttributeValue:"#40BF7A",typeParameter:"#D9A24A",url:"#A277FF",variableGlobal:"#A277FF",variableLocal:"#FAF7FF",variableOther:"#40BF7A",variableProperty:"#5BB8D9"},highlights:{diffAdded:"#40BF7A",diffAddedBackground:"#E8F5ED",diffModified:"#5BB8D9",diffModifiedBackground:"#E8E4F5",diffRemoved:"#D94F4F",diffRemovedBackground:"#FAE8E8",lineNumber:"#C0B3DC",lineNumberActive:"#15101F"}},markdown:{heading1:"#A277FF",heading2:"#A277FF",heading3:"#D9A24A",heading4:"#2D2640",link:"#A277FF",linkHover:"#C17AC8",inlineCode:"#40BF7A",inlineCodeBackground:"#EFE8FC",blockquote:"#6D6D6D",blockquoteBorder:"#E0D6F2",listMarker:"#A277FF99"},chat:{userMessage:"#2D2640",userMessageBackground:"#EFE8FC",assistantMessage:"#2D2640",assistantMessageBackground:"#F5F0FF",timestamp:"#5C5270",divider:"#E0D6F2"},tools:{background:"#EFE8FC80",border:"#bdb5cd80",headerHover:"#FDFCFF",icon:"#5C5270",title:"#2D2640",description:"#5C5270",edit:{added:"#40BF7A",addedBackground:"#40BF7A25",removed:"#D94F4F",removedBackground:"#D94F4F25",lineNumber:"#C0B3DC"}}},xF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},CF={metadata:yF,colors:wF,config:xF},SF={id:"ayu-dark",name:"Ayu",description:"Ayu",version:"1.0.0",variant:"dark",tags:["dark","palette"]},kF={primary:{base:"#3FB7E3",hover:"#389FC5",active:"#5BC1E7",foreground:"#0F1419",muted:"#3FB7E380",emphasis:"#389FC5"},surface:{background:"#0F1419",foreground:"#D6DAE0",muted:"#18222C",mutedForeground:"#777e86",elevated:"#17202a",elevatedForeground:"#D6DAE0",overlay:"#FBFBFD20",subtle:"#1e252d"},interactive:{border:"#2B3440",borderHover:"#323C49",borderFocus:"#56647C",selection:"#c7c7df1d",selectionForeground:"#FBFBFD",focus:"#3FB7E3",focusRing:"#3FB7E340",cursor:"#FBFBFD",hover:"#b6b6cc1d",active:"#b8b8ce1d"},status:{error:"#F58572",errorForeground:"#0F1419",errorBackground:"#F5857220",errorBorder:"#F5857250",warning:"#E4A75C",warningForeground:"#0F1419",warningBackground:"#E4A75C20",warningBorder:"#E4A75C50",success:"#78D05C",successForeground:"#0F1419",successBackground:"#78D05C20",successBorder:"#78D05C50",info:"#66C6F1",infoForeground:"#0F1419",infoBackground:"#66C6F120",infoBorder:"#66C6F150"},pr:{open:"#78D05C",draft:"#A3ADBA",blocked:"#E4A75C",merged:"#8a44f2",closed:"#F58572"},syntax:{base:{background:"#18222C",foreground:"#D6DAE0",comment:"#A3ADBA",keyword:"#3FB7E3",string:"#B1C74A",number:"#F2856F",function:"#3FB7E3",variable:"#D6DAE0",type:"#E4A75C",operator:"#F2856F"},tokens:{boolean:"#E4A75C",class:"#3FB7E3",className:"#3FB7E3",commentDoc:"#8D96A2",constant:"#66C6F1",decorator:"#E4A75C",enum:"#3FB7E3",exception:"#F2856F",functionCall:"#3FB7E3",interface:"#E4A75C",jsxTag:"#3FB7E3",key:"#3FB7E3",keywordImport:"#F2856F",label:"#F2856F",macro:"#66C6F1",method:"#78D05C",module:"#F2856F",namespace:"#E4A75C",parameter:"#D6DAE0",preprocessor:"#F2856F",punctuation:"#A3ADBA",regex:"#B1C74A",storageModifier:"#66C6F1",stringEscape:"#FBFBFD",struct:"#3FB7E3",tag:"#3FB7E3",tagAttribute:"#E4A75C",tagAttributeValue:"#B1C74A",typeParameter:"#E4A75C",url:"#66C6F1",variableGlobal:"#3FB7E3",variableLocal:"#0B1015",variableOther:"#78D05C",variableProperty:"#66C6F1"},highlights:{diffAdded:"#78D05C",diffAddedBackground:"#132F27",diffModified:"#66C6F1",diffModifiedBackground:"#1B2632",diffRemoved:"#F58572",diffRemovedBackground:"#361D20",lineNumber:"#415063",lineNumberActive:"#FBFBFD"}},markdown:{heading1:"#D6DAE0",heading2:"#D6DAE0",heading3:"#D6DAE0",heading4:"#D6DAE0",link:"#66C6F1",linkHover:"#3FB7E3",inlineCode:"#B1C74A",inlineCodeBackground:"#161d23",blockquote:"#E4A75C",blockquoteBorder:"#2B3440",listMarker:"#3FB7E399"},chat:{userMessage:"#D6DAE0",userMessageBackground:"#1d2935",assistantMessage:"#D6DAE0",assistantMessageBackground:"#0F1419",timestamp:"#A3ADBA",divider:"#2B3440"},tools:{background:"#18222C80",border:"#414e5f80",headerHover:"#080C10",icon:"#A3ADBA",title:"#D6DAE0",description:"#A3ADBA",edit:{added:"#78D05C",addedBackground:"#78D05C25",removed:"#F58572",removedBackground:"#F5857225",lineNumber:"#415063"}}},MF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},AF={metadata:SF,colors:kF,config:MF},FF={id:"ayu-light",name:"Ayu",description:"Ayu",version:"1.0.0",variant:"light",tags:["light","palette"]},_F={primary:{base:"#4AA8C8",hover:"#6EB8D1",active:"#4394B0",foreground:"#FDFAF4",muted:"#4AA8C880",emphasis:"#6EB8D1"},surface:{background:"#FDFAF4",foreground:"#394049",muted:"#f7f3eb",mutedForeground:"#777e87",elevated:"#faf6ed",elevatedForeground:"#4F5964",overlay:"#1B232B20",subtle:"#FFF7E5"},interactive:{border:"#E6DDCF",borderHover:"#DCD3C5",borderFocus:"#B09F8F",selection:"#9fb2c43e",selectionForeground:"#171e25",focus:"#4AA8C8",focusRing:"#4AA8C840",cursor:"#1B232B",hover:"#9fb2c42c",active:"#9fb2c43e"},status:{error:"#E6656A",errorForeground:"#FDFAF4",errorBackground:"#E6656A20",errorBorder:"#E6656A50",warning:"#EA9F41",warningForeground:"#FDFAF4",warningBackground:"#EA9F4120",warningBorder:"#EA9F4150",success:"#5FB978",successForeground:"#FDFAF4",successBackground:"#5FB97820",successBorder:"#5FB97850",info:"#2F9BCE",infoForeground:"#FDFAF4",infoBackground:"#2F9BCE20",infoBorder:"#2F9BCE50"},pr:{open:"#5FB978",draft:"#77818D",blocked:"#EA9F41",merged:"#7b3cda",closed:"#E6656A"},syntax:{base:{background:"#FCF9F3",foreground:"#4F5964",comment:"#77818D",keyword:"#4AA8C8",string:"#7FAD00",number:"#EF7D71",function:"#4AA8C8",variable:"#4F5964",type:"#ED982E",operator:"#EF7D71"},tokens:{boolean:"#ED982E",class:"#4AA8C8",className:"#4AA8C8",commentDoc:"#BABEC1",constant:"#2F9BCE",decorator:"#ED982E",enum:"#4AA8C8",exception:"#EF7D71",functionCall:"#4AA8C8",interface:"#ED982E",jsxTag:"#4AA8C8",key:"#4AA8C8",keywordImport:"#EF7D71",label:"#EF7D71",macro:"#2F9BCE",method:"#5FB978",module:"#EF7D71",namespace:"#ED982E",parameter:"#4F5964",preprocessor:"#EF7D71",punctuation:"#77818D",regex:"#7FAD00",storageModifier:"#2F9BCE",stringEscape:"#1B232B",struct:"#4AA8C8",tag:"#4AA8C8",tagAttribute:"#ED982E",tagAttributeValue:"#7FAD00",typeParameter:"#ED982E",url:"#2F9BCE",variableGlobal:"#4AA8C8",variableLocal:"#FBF8F2",variableOther:"#5FB978",variableProperty:"#2F9BCE"},highlights:{diffAdded:"#5FB978",diffAddedBackground:"#EEF5E4",diffModified:"#2F9BCE",diffModifiedBackground:"#E3EDF3",diffRemoved:"#E6656A",diffRemovedBackground:"#FDE5E5",lineNumber:"#C6BFAF",lineNumberActive:"#1B232B"}},markdown:{heading1:"#394049",heading2:"#394049",heading3:"#394049",heading4:"#394049",link:"#2F9BCE",linkHover:"#4AA8C8",inlineCode:"#7FAD00",inlineCodeBackground:"#FCF9F3",blockquote:"#ED982E",blockquoteBorder:"#E6DDCF",listMarker:"#4AA8C899"},chat:{userMessage:"#4F5964",userMessageBackground:"#fff7e5",assistantMessage:"#4F5964",assistantMessageBackground:"#FDFAF4",timestamp:"#77818D",divider:"#E6DDCF"},tools:{background:"#FCF9F380",border:"#cec6b980",headerHover:"#FAF7F1",icon:"#77818D",title:"#4F5964",description:"#77818D",edit:{added:"#5FB978",addedBackground:"#5FB97825",removed:"#E6656A",removedBackground:"#E6656A25",lineNumber:"#C6BFAF"}}},BF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},DF={metadata:FF,colors:_F,config:BF},PF={id:"carbonfox-dark",name:"Carbonfox",description:"Carbonfox",version:"1.0.0",variant:"dark",tags:["dark","palette"]},TF={primary:{base:"#33B1FF",hover:"#2F9ADC",active:"#52BDFF",foreground:"#161616",muted:"#33B1FF80",emphasis:"#2F9ADC"},surface:{background:"#161616",foreground:"#F2F4F8",muted:"#222222",mutedForeground:"#8b8a8a",elevated:"#222222",elevatedForeground:"#F2F4F8",overlay:"#FFFFFF20",subtle:"#292828"},interactive:{border:"#393939",borderHover:"#4C4C4C",borderFocus:"#4589FF",selection:"#ffffff20",selectionForeground:"#FFFFFF",focus:"#4589FF",focusRing:"#4589FF40",cursor:"#FFFFFF",hover:"#ffffff12",active:"#ffffff12"},status:{error:"#FF8389",errorForeground:"#161616",errorBackground:"#FF838920",errorBorder:"#FF838950",warning:"#F1C21B",warningForeground:"#161616",warningBackground:"#F1C21B20",warningBorder:"#F1C21B50",success:"#42BE65",successForeground:"#161616",successBackground:"#42BE6520",successBorder:"#42BE6550",info:"#78A9FF",infoForeground:"#161616",infoBackground:"#78A9FF20",infoBorder:"#78A9FF50"},pr:{open:"#42BE65",draft:"#8D8D8D",blocked:"#F1C21B",merged:"#BE95FF",closed:"#FF8389"},syntax:{base:{background:"#262626",foreground:"#F2F4F8",comment:"#8D8D8D",keyword:"#78A9FF",string:"#42BE65",number:"#FF8389",function:"#78A9FF",variable:"#F2F4F8",type:"#08BDBA",operator:"#FF8389"},tokens:{boolean:"#08BDBA",class:"#78A9FF",className:"#78A9FF",commentDoc:"#7B7B7B",constant:"#BE95FF",decorator:"#08BDBA",enum:"#78A9FF",exception:"#FF8389",functionCall:"#78A9FF",interface:"#08BDBA",jsxTag:"#78A9FF",key:"#78A9FF",keywordImport:"#FF8389",label:"#FF8389",macro:"#78A9FF",method:"#42BE65",module:"#FF8389",namespace:"#08BDBA",parameter:"#F2F4F8",preprocessor:"#FF8389",punctuation:"#8D8D8D",regex:"#42BE65",storageModifier:"#78A9FF",stringEscape:"#FFFFFF",struct:"#78A9FF",tag:"#78A9FF",tagAttribute:"#08BDBA",tagAttributeValue:"#42BE65",typeParameter:"#08BDBA",url:"#33B1FF",variableGlobal:"#78A9FF",variableLocal:"#0D0D0D",variableOther:"#42BE65",variableProperty:"#BE95FF"},highlights:{diffAdded:"#42BE65",diffAddedBackground:"#0E3A22",diffModified:"#78A9FF",diffModifiedBackground:"#78A9FF20",diffRemoved:"#FF8389",diffRemovedBackground:"#4D1A1F",lineNumber:"#4C4C4C",lineNumberActive:"#FFFFFF"}},markdown:{heading1:"#F2F4F8",heading2:"#F2F4F8",heading3:"#F2F4F8",heading4:"#F2F4F8",link:"#33B1FF",linkHover:"#78A9FF",inlineCode:"#42BE65",inlineCodeBackground:"#1e1e1e",blockquote:"#8D8D8D",blockquoteBorder:"#393939",listMarker:"#33B1FF99"},chat:{userMessage:"#F2F4F8",userMessageBackground:"#262626",assistantMessage:"#F2F4F8",assistantMessageBackground:"#161616",timestamp:"#8D8D8D",divider:"#393939"},tools:{background:"#26262680",border:"#4e4c4c80",headerHover:"#000000",icon:"#8D8D8D",title:"#F2F4F8",description:"#8D8D8D",edit:{added:"#42BE65",addedBackground:"#42BE6525",removed:"#FF8389",removedBackground:"#FF838925",lineNumber:"#4C4C4C"}}},HF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},IF={metadata:PF,colors:TF,config:HF},EF={id:"carbonfox-light",name:"Carbonfox",description:"Carbonfox",version:"1.0.0",variant:"light",tags:["light","palette"]},jF={primary:{base:"#0072C3",hover:"#338ECF",active:"#0061A6",foreground:"#FFFFFF",muted:"#0072C380",emphasis:"#338ECF"},surface:{background:"#FFFFFF",foreground:"#161616",muted:"#F4F4F4",mutedForeground:"#868585",elevated:"#f4f4f7",elevatedForeground:"#161616",overlay:"#00000020",subtle:"#f2f2f8"},interactive:{border:"#DCDCDC",borderHover:"#D0D0D0",borderFocus:"#0F62FE",selection:"#cacfd87f",selectionForeground:"#000000",focus:"#0F62FE",focusRing:"#0F62FE40",cursor:"#000000",hover:"#43424214",active:"#43424212"},status:{error:"#DA1E28",errorForeground:"#FFFFFF",errorBackground:"#DA1E2820",errorBorder:"#DA1E2850",warning:"#F1C21B",warningForeground:"#FFFFFF",warningBackground:"#F1C21B20",warningBorder:"#F1C21B50",success:"#198038",successForeground:"#FFFFFF",successBackground:"#19803820",successBorder:"#19803850",info:"#0043CE",infoForeground:"#FFFFFF",infoBackground:"#0043CE20",infoBorder:"#0043CE50"},pr:{open:"#42BE65",draft:"#8D8D8D",blocked:"#F1C21B",merged:"#BE95FF",closed:"#FF8389"},syntax:{base:{background:"#F4F4F4",foreground:"#161616",comment:"#525252",keyword:"#0043CE",string:"#198038",number:"#DA1E28",function:"#0043CE",variable:"#161616",type:"#007D79",operator:"#DA1E28"},tokens:{boolean:"#007D79",class:"#0043CE",className:"#0043CE",commentDoc:"#A9A9A9",constant:"#6929C4",decorator:"#007D79",enum:"#0043CE",exception:"#DA1E28",functionCall:"#0043CE",interface:"#007D79",jsxTag:"#0043CE",key:"#0043CE",keywordImport:"#DA1E28",label:"#DA1E28",macro:"#0043CE",method:"#198038",module:"#DA1E28",namespace:"#007D79",parameter:"#161616",preprocessor:"#DA1E28",punctuation:"#525252",regex:"#198038",storageModifier:"#0043CE",stringEscape:"#000000",struct:"#0043CE",tag:"#0043CE",tagAttribute:"#007D79",tagAttributeValue:"#198038",typeParameter:"#007D79",url:"#0072C3",variableGlobal:"#0043CE",variableLocal:"#E8E8E8",variableOther:"#198038",variableProperty:"#6929C4"},highlights:{diffAdded:"#198038",diffAddedBackground:"#19803820",diffModified:"#0043CE",diffModifiedBackground:"#0043CE20",diffRemoved:"#DA1E28",diffRemovedBackground:"#DA1E2820",lineNumber:"#D0D0D0",lineNumberActive:"#000000"}},markdown:{heading1:"#161616",heading2:"#161616",heading3:"#161616",heading4:"#161616",link:"#0072C3",linkHover:"#0043CE",inlineCode:"#198038",inlineCodeBackground:"#F4F4F4",blockquote:"#525252",blockquoteBorder:"#DCDCDC",listMarker:"#0072C399"},chat:{userMessage:"#161616",userMessageBackground:"#f4f4f7",assistantMessage:"#161616",assistantMessageBackground:"#FFFFFF",timestamp:"#525252",divider:"#DCDCDC"},tools:{background:"#F4F4F480",border:"#bdbbbb80",headerHover:"#DCDCDC",icon:"#525252",title:"#161616",description:"#525252",edit:{added:"#198038",addedBackground:"#19803825",removed:"#DA1E28",removedBackground:"#DA1E2825",lineNumber:"#D0D0D0"}}},LF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},VF={metadata:EF,colors:jF,config:LF},NF={id:"catppuccin-dark",name:"Catppuccin",description:"Catppuccin",version:"1.0.0",variant:"dark",tags:["dark","palette"]},RF={primary:{base:"#7d8fff",hover:"#9EA6DF",active:"#BEC6FE",foreground:"#1E1E2E",muted:"#B4BEFE80",emphasis:"#9EA6DF"},surface:{background:"#1E1E2E",foreground:"#CDD6F4",muted:"#2a273b",mutedForeground:"#969cb1",elevated:"#282841",elevatedForeground:"#CDD6F4",overlay:"#F4F2FF20",subtle:"#2f2f50"},interactive:{border:"#35324A",borderHover:"#393655",borderFocus:"#575379",selection:"#8883ae5c",selectionForeground:"#F4F2FF",focus:"#B4BEFE",focusRing:"#B4BEFE40",cursor:"#F4F2FF",hover:"#a19ace20",active:"#a19ace20"},status:{error:"#F38BA8",errorForeground:"#1E1E2E",errorBackground:"#F38BA820",errorBorder:"#F38BA850",warning:"#F4B8E4",warningForeground:"#1E1E2E",warningBackground:"#F4B8E420",warningBorder:"#F4B8E450",success:"#A6D189",successForeground:"#1E1E2E",successBackground:"#A6D18920",successBorder:"#A6D18950",info:"#89DCEB",infoForeground:"#1E1E2E",infoBackground:"#89DCEB20",infoBorder:"#89DCEB50"},pr:{open:"#A6D189",draft:"#A6ADC8",blocked:"#F9E2AF",merged:"#d8b4fe",closed:"#F38BA8"},syntax:{base:{background:"#211F31",foreground:"#CDD6F4",comment:"#A6ADC8",keyword:"#B4BEFE",string:"#A6E3A1",number:"#F38BA8",function:"#B4BEFE",variable:"#CDD6F4",type:"#F9E2AF",operator:"#F38BA8"},tokens:{boolean:"#F9E2AF",class:"#B4BEFE",className:"#B4BEFE",commentDoc:"#9298B1",constant:"#89DCEB",decorator:"#F9E2AF",enum:"#B4BEFE",exception:"#F38BA8",functionCall:"#B4BEFE",interface:"#F9E2AF",jsxTag:"#B4BEFE",key:"#B4BEFE",keywordImport:"#F38BA8",label:"#F38BA8",macro:"#89DCEB",method:"#A6D189",module:"#F38BA8",namespace:"#F9E2AF",parameter:"#CDD6F4",preprocessor:"#F38BA8",punctuation:"#A6ADC8",regex:"#A6E3A1",storageModifier:"#89DCEB",stringEscape:"#F4F2FF",struct:"#B4BEFE",tag:"#B4BEFE",tagAttribute:"#F9E2AF",tagAttributeValue:"#A6E3A1",typeParameter:"#F9E2AF",url:"#89DCEB",variableGlobal:"#B4BEFE",variableLocal:"#1C1C29",variableOther:"#A6D189",variableProperty:"#89DCEB"},highlights:{diffAdded:"#A6D189",diffAddedBackground:"#1D2C30",diffModified:"#89DCEB",diffModifiedBackground:"#232538",diffRemoved:"#F38BA8",diffRemovedBackground:"#2C1F2A",lineNumber:"#47436D",lineNumberActive:"#F4F2FF"}},markdown:{heading1:"#CDD6F4",heading2:"#CDD6F4",heading3:"#CDD6F4",heading4:"#CDD6F4",link:"#89DCEB",linkHover:"#B4BEFE",inlineCode:"#A6E3A1",inlineCodeBackground:"#2d2a42",blockquote:"#F9E2AF",blockquoteBorder:"#35324A",listMarker:"#B4BEFE99"},chat:{userMessage:"#CDD6F4",userMessageBackground:"#3a3a5b",assistantMessage:"#CDD6F4",assistantMessageBackground:"#1E1E2E",timestamp:"#A6ADC8",divider:"#35324A"},tools:{background:"#211F3180",border:"#534e7180",headerHover:"#191926",icon:"#A6ADC8",title:"#CDD6F4",description:"#A6ADC8",edit:{added:"#A6D189",addedBackground:"#A6D18925",removed:"#F38BA8",removedBackground:"#F38BA825",lineNumber:"#47436D"}}},zF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},OF={metadata:NF,colors:RF,config:zF},$F={id:"catppuccin-light",name:"Catppuccin",description:"Catppuccin",version:"1.0.0",variant:"light",tags:["light","palette"]},ZF={primary:{base:"#7287FD",hover:"#8C99F6",active:"#6677DD",foreground:"#F5E0DC",muted:"#7287FD80",emphasis:"#8C99F6"},surface:{background:"#fff6f4",foreground:"#2e314a",muted:"#f8ebe9",mutedForeground:"#888992",elevated:"#fbefea",elevatedForeground:"#4C4F69",overlay:"#1F1F2A20",subtle:"#FDEEEE"},interactive:{border:"#E0CFD3",borderHover:"#D6C4C8",borderFocus:"#AB97A1",selection:"#ffffff",selectionForeground:"#1F1F2A",focus:"#7287FD",focusRing:"#7287FD40",cursor:"#1F1F2A",hover:"#ffffff8f",active:"#ffffff"},status:{error:"#D20F39",errorForeground:"#F5E0DC",errorBackground:"#D20F3920",errorBorder:"#D20F3950",warning:"#DF8E1D",warningForeground:"#F5E0DC",warningBackground:"#DF8E1D20",warningBorder:"#DF8E1D50",success:"#40A02B",successForeground:"#F5E0DC",successBackground:"#40A02B20",successBorder:"#40A02B50",info:"#04A5E5",infoForeground:"#F5E0DC",infoBackground:"#04A5E520",infoBorder:"#04A5E550"},pr:{open:"#40A02B",draft:"#6C6F85",blocked:"#DF8E1D",merged:"#9572fd",closed:"#D20F39"},syntax:{base:{background:"#F2D8D4",foreground:"#4C4F69",comment:"#6C6F85",keyword:"#7287FD",string:"#40A02B",number:"#D20F39",function:"#7287FD",variable:"#4C4F69",type:"#DF8E1D",operator:"#D20F39"},tokens:{boolean:"#DF8E1D",class:"#7287FD",className:"#7287FD",commentDoc:"#B1A8B1",constant:"#04A5E5",decorator:"#DF8E1D",enum:"#7287FD",exception:"#D20F39",functionCall:"#7287FD",interface:"#DF8E1D",jsxTag:"#7287FD",key:"#7287FD",keywordImport:"#D20F39",label:"#D20F39",macro:"#04A5E5",method:"#40A02B",module:"#D20F39",namespace:"#DF8E1D",parameter:"#4C4F69",preprocessor:"#D20F39",punctuation:"#6C6F85",regex:"#40A02B",storageModifier:"#04A5E5",stringEscape:"#1F1F2A",struct:"#7287FD",tag:"#7287FD",tagAttribute:"#DF8E1D",tagAttributeValue:"#40A02B",typeParameter:"#DF8E1D",url:"#04A5E5",variableGlobal:"#7287FD",variableLocal:"#F9E8E4",variableOther:"#40A02B",variableProperty:"#04A5E5"},highlights:{diffAdded:"#40A02B",diffAddedBackground:"#EDF5E6",diffModified:"#04A5E5",diffModifiedBackground:"#E4E2F6",diffRemoved:"#D20F39",diffRemovedBackground:"#FDE1E3",lineNumber:"#C2AEB4",lineNumberActive:"#1F1F2A"}},markdown:{heading1:"#2e314a",heading2:"#2e314a",heading3:"#2e314a",heading4:"#2e314a",link:"#04A5E5",linkHover:"#7287FD",inlineCode:"#40A02B",inlineCodeBackground:"#f6eeec",blockquote:"#DF8E1D",blockquoteBorder:"#E0CFD3",listMarker:"#7287FD99"},chat:{userMessage:"#2e314a",userMessageBackground:"#ffffff",assistantMessage:"#4C4F69",assistantMessageBackground:"#F5E0DC",timestamp:"#6C6F85",divider:"#E0CFD3"},tools:{background:"#F2D8D480",border:"#cbbec180",headerHover:"#FDEEEE",icon:"#6C6F85",title:"#4C4F69",description:"#6C6F85",edit:{added:"#40A02B",addedBackground:"#40A02B25",removed:"#D20F39",removedBackground:"#D20F3925",lineNumber:"#C2AEB4"}}},UF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},qF={metadata:$F,colors:ZF,config:UF},WF={id:"dracula-dark",name:"Dracula",description:"Dracula",version:"1.0.0",variant:"dark",tags:["dark","palette"]},GF={primary:{base:"#BD93F9",hover:"#A480D8",active:"#C7A3FA",foreground:"#14151F",muted:"#BD93F980",emphasis:"#A480D8"},surface:{background:"#14151F",foreground:"#F8F8F2",muted:"#181926",mutedForeground:"#7c7e9c",elevated:"#161722",elevatedForeground:"#F8F8F2",overlay:"#FFFFFF20",subtle:"#222436"},interactive:{border:"#2D2F3C",borderHover:"#303244",borderFocus:"#4A4D6D",selection:"#30334b",selectionForeground:"#FFFFFF",focus:"#BD93F9",focusRing:"#BD93F940",cursor:"#FFFFFF",hover:"#30334ba3",active:"#30334b"},status:{error:"#FF5555",errorForeground:"#14151F",errorBackground:"#FF555520",errorBorder:"#FF555550",warning:"#FFB86C",warningForeground:"#14151F",warningBackground:"#FFB86C20",warningBorder:"#FFB86C50",success:"#50FA7B",successForeground:"#14151F",successBackground:"#50FA7B20",successBorder:"#50FA7B50",info:"#8BE9FD",infoForeground:"#14151F",infoBackground:"#8BE9FD20",infoBorder:"#8BE9FD50"},pr:{open:"#50FA7B",draft:"#B6B9E4",blocked:"#FFB86C",merged:"#BD93F9",closed:"#FF5555"},syntax:{base:{background:"#181926",foreground:"#F8F8F2",comment:"#B6B9E4",keyword:"#BD93F9",string:"#50FA7B",number:"#FF79C6",function:"#BD93F9",variable:"#F8F8F2",type:"#FFB86C",operator:"#FF79C6"},tokens:{boolean:"#FFB86C",class:"#BD93F9",className:"#BD93F9",commentDoc:"#9EA0C6",constant:"#8BE9FD",decorator:"#FFB86C",enum:"#BD93F9",exception:"#FF79C6",functionCall:"#BD93F9",interface:"#FFB86C",jsxTag:"#BD93F9",key:"#BD93F9",keywordImport:"#FF79C6",label:"#FF79C6",macro:"#8BE9FD",method:"#50FA7B",module:"#FF79C6",namespace:"#FFB86C",parameter:"#F8F8F2",preprocessor:"#FF79C6",punctuation:"#B6B9E4",regex:"#50FA7B",storageModifier:"#8BE9FD",stringEscape:"#FFFFFF",struct:"#BD93F9",tag:"#BD93F9",tagAttribute:"#FFB86C",tagAttributeValue:"#50FA7B",typeParameter:"#FFB86C",url:"#8BE9FD",variableGlobal:"#BD93F9",variableLocal:"#161722",variableOther:"#50FA7B",variableProperty:"#8BE9FD"},highlights:{diffAdded:"#50FA7B",diffAddedBackground:"#1F2A2F",diffModified:"#8BE9FD",diffModifiedBackground:"#24253A",diffRemoved:"#FF5555",diffRemovedBackground:"#2D1F27",lineNumber:"#3B3D55",lineNumberActive:"#FFFFFF"}},markdown:{heading1:"#F8F8F2",heading2:"#F8F8F2",heading3:"#F8F8F2",heading4:"#F8F8F2",link:"#8BE9FD",linkHover:"#BD93F9",inlineCode:"#4aeb72",inlineCodeBackground:"#202132",blockquote:"#FFB86C",blockquoteBorder:"#2D2F3C",listMarker:"#BD93F999"},chat:{userMessage:"#F8F8F2",userMessageBackground:"#222436",assistantMessage:"#F8F8F2",assistantMessageBackground:"#14151F",timestamp:"#B6B9E4",divider:"#2D2F3C"},tools:{background:"#18192680",border:"#494c6180",headerHover:"#191A26",icon:"#B6B9E4",title:"#F8F8F2",description:"#B6B9E4",edit:{added:"#50FA7B",addedBackground:"#50FA7B25",removed:"#FF5555",removedBackground:"#FF555525",lineNumber:"#3B3D55"}}},KF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},YF={metadata:WF,colors:GF,config:KF},JF={id:"dracula-light",name:"Dracula",description:"Dracula",version:"1.0.0",variant:"light",tags:["light","palette"]},QF={primary:{base:"#7C6BF5",hover:"#9587F4",active:"#6A5CD2",foreground:"#F8F8F2",muted:"#7C6BF580",emphasis:"#9587F4"},surface:{background:"#F8F8F2",foreground:"#1F1F2F",muted:"#eff1eb",mutedForeground:"#6c6c7a",elevated:"#eeeee5",elevatedForeground:"#1F1F2F",overlay:"#05040C20",subtle:"#edeee7"},interactive:{border:"#E2E3DA",borderHover:"#D8D9D0",borderFocus:"#B0B2A7",selection:"#c2bcea63",selectionForeground:"#05040C",focus:"#7C6BF5",focusRing:"#7C6BF540",cursor:"#05040C",hover:"#c2bcea38",active:"#c2bcea63"},status:{error:"#D9536F",errorForeground:"#F8F8F2",errorBackground:"#D9536F20",errorBorder:"#D9536F50",warning:"#F7A14D",warningForeground:"#F8F8F2",warningBackground:"#F7A14D20",warningBorder:"#F7A14D50",success:"#2FBF71",successForeground:"#F8F8F2",successBackground:"#2FBF7120",successBorder:"#2FBF7150",info:"#1D7FC5",infoForeground:"#F8F8F2",infoBackground:"#1D7FC520",infoBorder:"#1D7FC550"},pr:{open:"#2FBF71",draft:"#52526B",blocked:"#F7A14D",merged:"#7C6BF5",closed:"#D9536F"},syntax:{base:{background:"#F1F2ED",foreground:"#1F1F2F",comment:"#52526B",keyword:"#7C6BF5",string:"#2FBF71",number:"#D16090",function:"#7C6BF5",variable:"#1F1F2F",type:"#F7A14D",operator:"#D16090"},tokens:{boolean:"#F7A14D",class:"#7C6BF5",className:"#7C6BF5",commentDoc:"#A5A5AF",constant:"#1D7FC5",decorator:"#F7A14D",enum:"#7C6BF5",exception:"#D16090",functionCall:"#7C6BF5",interface:"#F7A14D",jsxTag:"#7C6BF5",key:"#7C6BF5",keywordImport:"#D16090",label:"#D16090",macro:"#1D7FC5",method:"#2FBF71",module:"#D16090",namespace:"#F7A14D",parameter:"#1F1F2F",preprocessor:"#D16090",punctuation:"#52526B",regex:"#2FBF71",storageModifier:"#1D7FC5",stringEscape:"#05040C",struct:"#7C6BF5",tag:"#7C6BF5",tagAttribute:"#F7A14D",tagAttributeValue:"#2FBF71",typeParameter:"#F7A14D",url:"#1D7FC5",variableGlobal:"#7C6BF5",variableLocal:"#F6F6F1",variableOther:"#2FBF71",variableProperty:"#1D7FC5"},highlights:{diffAdded:"#2FBF71",diffAddedBackground:"#E4F5E6",diffModified:"#1D7FC5",diffModifiedBackground:"#DEDFE9",diffRemoved:"#D9536F",diffRemovedBackground:"#FAE4EB",lineNumber:"#C4C6BC",lineNumberActive:"#05040C"}},markdown:{heading1:"#1F1F2F",heading2:"#1F1F2F",heading3:"#1F1F2F",heading4:"#1F1F2F",link:"#1D7FC5",linkHover:"#7C6BF5",inlineCode:"#2FBF71",inlineCodeBackground:"#F1F2ED",blockquote:"#F7A14D",blockquoteBorder:"#E2E3DA",listMarker:"#7C6BF599"},chat:{userMessage:"#1F1F2F",userMessageBackground:"#F1F2ED",assistantMessage:"#1F1F2F",assistantMessageBackground:"#F8F8F2",timestamp:"#52526B",divider:"#E2E3DA"},tools:{background:"#F1F2ED80",border:"#E2E3DA80",headerHover:"#F2F2EC",icon:"#52526B",title:"#1F1F2F",description:"#52526B",edit:{added:"#2FBF71",addedBackground:"#2FBF7125",removed:"#D9536F",removedBackground:"#D9536F25",lineNumber:"#C4C6BC"}}},XF={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},e_={metadata:JF,colors:QF,config:XF},t_={id:"gruvbox-dark",name:"Gruvbox",description:"Gruvbox",version:"1.0.0",variant:"dark",tags:["dark","palette"]},o_={primary:{base:"#83A598",hover:"#759287",active:"#95B09F",foreground:"#282828",muted:"#83A59880",emphasis:"#759287"},surface:{background:"#282828",foreground:"#EBDBB2",muted:"#32302F",mutedForeground:"#918574",elevated:"#25292b",elevatedForeground:"#EBDBB2",overlay:"#FBF1C720",subtle:"#3e3c3a"},interactive:{border:"#504945",borderHover:"#5A524B",borderFocus:"#7C6F64",selection:"#5a5647db",selectionForeground:"#FBF1C7",focus:"#83A598",focusRing:"#83A59840",cursor:"#FBF1C7",hover:"#5a5647d9",active:"#5a5647ec"},status:{error:"#FB4934",errorForeground:"#282828",errorBackground:"#FB493420",errorBorder:"#FB493450",warning:"#FABD2F",warningForeground:"#282828",warningBackground:"#FABD2F20",warningBorder:"#FABD2F50",success:"#B8BB26",successForeground:"#282828",successBackground:"#B8BB2620",successBorder:"#B8BB2650",info:"#D3869B",infoForeground:"#282828",infoBackground:"#D3869B20",infoBorder:"#D3869B50"},pr:{open:"#B8BB26",draft:"#A89984",blocked:"#FABD2F",merged:"#8973a8",closed:"#FB4934"},syntax:{base:{background:"#32302F",foreground:"#EBDBB2",comment:"#A89984",keyword:"#83A598",string:"#B8BB26",number:"#FB4934",function:"#83A598",variable:"#EBDBB2",type:"#FABD2F",operator:"#FB4934"},tokens:{boolean:"#FABD2F",class:"#83A598",className:"#83A598",commentDoc:"#958876",constant:"#D3869B",decorator:"#FABD2F",enum:"#83A598",exception:"#FB4934",functionCall:"#83A598",interface:"#FABD2F",jsxTag:"#83A598",key:"#83A598",keywordImport:"#FB4934",label:"#FB4934",macro:"#8EC07C",method:"#B8BB26",module:"#FB4934",namespace:"#FABD2F",parameter:"#EBDBB2",preprocessor:"#FB4934",punctuation:"#A89984",regex:"#B8BB26",storageModifier:"#8EC07C",stringEscape:"#FBF1C7",struct:"#83A598",tag:"#83A598",tagAttribute:"#FABD2F",tagAttributeValue:"#B8BB26",typeParameter:"#FABD2F",url:"#8EC07C",variableGlobal:"#83A598",variableLocal:"#1D2021",variableOther:"#B8BB26",variableProperty:"#D3869B"},highlights:{diffAdded:"#B8BB26",diffAddedBackground:"#2A3325",diffModified:"#D3869B",diffModifiedBackground:"#32302F",diffRemoved:"#FB4934",diffRemovedBackground:"#3C2222",lineNumber:"#70665D",lineNumberActive:"#FBF1C7"}},markdown:{heading1:"#EBDBB2",heading2:"#EBDBB2",heading3:"#EBDBB2",heading4:"#EBDBB2",link:"#8EC07C",linkHover:"#83A598",inlineCode:"#B8BB26",inlineCodeBackground:"#32302F",blockquote:"#928374",blockquoteBorder:"#504945",listMarker:"#83A59899"},chat:{userMessage:"#EBDBB2",userMessageBackground:"#3e3c3a",assistantMessage:"#EBDBB2",assistantMessageBackground:"#282828",timestamp:"#A89984",divider:"#504945"},tools:{background:"#32302F80",border:"#6e645e80",headerHover:"#141617",icon:"#A89984",title:"#EBDBB2",description:"#A89984",edit:{added:"#B8BB26",addedBackground:"#B8BB2625",removed:"#FB4934",removedBackground:"#FB493425",lineNumber:"#70665D"}}},n_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},s_={metadata:t_,colors:o_,config:n_},r_={id:"gruvbox-light",name:"Gruvbox",description:"Gruvbox",version:"1.0.0",variant:"light",tags:["light","palette"]},i_={primary:{base:"#076678",hover:"#388288",active:"#0C5D6C",foreground:"#FBF1C7",muted:"#07667880",emphasis:"#388288"},surface:{background:"#FBF1C7",foreground:"#3C3836",muted:"#F2E5BC",mutedForeground:"#7C6F64",elevated:"#efebcd",elevatedForeground:"#3C3836",overlay:"#28282820",subtle:"#FDF9E8"},interactive:{border:"#D5C4A1",borderHover:"#C9B897",borderFocus:"#A89984",selection:"#fffdfdec",selectionForeground:"#282828",focus:"#076678",focusRing:"#07667840",cursor:"#282828",hover:"#fffdfdb3",active:"#fffdfdcf"},status:{error:"#9D0006",errorForeground:"#FBF1C7",errorBackground:"#9D000620",errorBorder:"#9D000650",warning:"#B57614",warningForeground:"#FBF1C7",warningBackground:"#B5761420",warningBorder:"#B5761450",success:"#79740E",successForeground:"#FBF1C7",successBackground:"#79740E20",successBorder:"#79740E50",info:"#8F3F71",infoForeground:"#FBF1C7",infoBackground:"#8F3F7120",infoBorder:"#8F3F7150"},pr:{open:"#79740E",draft:"#7C6F64",blocked:"#B57614",merged:"#5e4c76",closed:"#9D0006"},syntax:{base:{background:"#F2E5BC",foreground:"#3C3836",comment:"#7C6F64",keyword:"#076678",string:"#79740E",number:"#9D0006",function:"#076678",variable:"#3C3836",type:"#B57614",operator:"#9D0006"},tokens:{boolean:"#B57614",class:"#076678",className:"#076678",commentDoc:"#BCB096",constant:"#8F3F71",decorator:"#B57614",enum:"#076678",exception:"#9D0006",functionCall:"#076678",interface:"#B57614",jsxTag:"#076678",key:"#076678",keywordImport:"#9D0006",label:"#9D0006",macro:"#427B58",method:"#79740E",module:"#9D0006",namespace:"#B57614",parameter:"#3C3836",preprocessor:"#9D0006",punctuation:"#7C6F64",regex:"#79740E",storageModifier:"#427B58",stringEscape:"#282828",struct:"#076678",tag:"#076678",tagAttribute:"#B57614",tagAttributeValue:"#79740E",typeParameter:"#B57614",url:"#427B58",variableGlobal:"#076678",variableLocal:"#F9F5D7",variableOther:"#79740E",variableProperty:"#8F3F71"},highlights:{diffAdded:"#79740E",diffAddedBackground:"#DDE3B1",diffModified:"#8F3F71",diffModifiedBackground:"#EBDFB5",diffRemoved:"#9D0006",diffRemovedBackground:"#E8C7C3",lineNumber:"#B0A285",lineNumberActive:"#282828"}},markdown:{heading1:"#3C3836",heading2:"#3C3836",heading3:"#3C3836",heading4:"#3C3836",link:"#427B58",linkHover:"#076678",inlineCode:"#79740E",inlineCodeBackground:"#F2E5BC",blockquote:"#928374",blockquoteBorder:"#D5C4A1",listMarker:"#07667899"},chat:{userMessage:"#3C3836",userMessageBackground:"#FDF9E8",assistantMessage:"#3C3836",assistantMessageBackground:"#FBF1C7",timestamp:"#7C6F64",divider:"#D5C4A1"},tools:{background:"#F2E5BC80",border:"#a6997e80",headerHover:"#FDF9E8",icon:"#7C6F64",title:"#3C3836",description:"#7C6F64",edit:{added:"#79740E",addedBackground:"#79740E25",removed:"#9D0006",removedBackground:"#9D000625",lineNumber:"#B0A285"}}},a_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},l_={metadata:r_,colors:i_,config:a_},c_={id:"kanagawa-dark",name:"Kanagawa",description:"A color scheme inspired by Japanese art and ink painting - dark variant",version:"1.0.0",variant:"dark",tags:["dark","japanese","ink","elegant"]},d_={primary:{base:"#7FB4CA",hover:"#9DC5E0",active:"#658594",foreground:"#1F1F28",muted:"#7FB4CA80",emphasis:"#7E9CD8"},surface:{background:"#1F1F28",foreground:"#DCD7BA",muted:"#23232d",mutedForeground:"#7e7e77",elevated:"#2A2A37",elevatedForeground:"#DCD7BA",overlay:"#16161DCC",subtle:"#2f2f3d"},interactive:{border:"#363646",borderHover:"#54546D",borderFocus:"#7FB4CA",selection:"#729fb333",selectionForeground:"#DCD7BA",focus:"#7FB4CA",focusRing:"#7FB4CA50",cursor:"#DCD7BA",hover:"#363646",active:"#54546D"},status:{error:"#E82424",errorForeground:"#DCD7BA",errorBackground:"#E8242420",errorBorder:"#E8242450",warning:"#FF9E3B",warningForeground:"#1F1F28",warningBackground:"#FF9E3B20",warningBorder:"#FF9E3B50",success:"#98BB6C",successForeground:"#1F1F28",successBackground:"#98BB6C20",successBorder:"#98BB6C50",info:"#7E9CD8",infoForeground:"#1F1F28",infoBackground:"#7E9CD820",infoBorder:"#7E9CD850"},pr:{open:"#98BB6C",draft:"#54546D",blocked:"#FF9E3B",merged:"#957FB8",closed:"#E82424"},syntax:{base:{background:"#16161D",foreground:"#DCD7BA",comment:"#54546D",keyword:"#7E9CD8",string:"#98BB6C",number:"#FF9E3B",function:"#E6C384",variable:"#DCD7BA",type:"#C8C093",operator:"#C34043"},tokens:{commentDoc:"#727169",stringEscape:"#DCD7BA",keywordImport:"#957FB8",storageModifier:"#7E9CD8",functionCall:"#E6C384",method:"#76946A",variableProperty:"#7E9CD8",variableOther:"#76946A",variableGlobal:"#D27E99",variableLocal:"#2A2A37",parameter:"#DCD7BA",constant:"#DCD7BA",class:"#E6C384",className:"#E6C384",interface:"#C8C093",struct:"#E6C384",enum:"#E6C384",typeParameter:"#E6C384",namespace:"#C8C093",module:"#C34043",tag:"#7E9CD8",jsxTag:"#D27E99",tagAttribute:"#C8C093",tagAttributeValue:"#98BB6C",boolean:"#C8C093",decorator:"#C8C093",label:"#D27E99",punctuation:"#54546D",macro:"#7E9CD8",preprocessor:"#D27E99",regex:"#98BB6C",url:"#7E9CD8",key:"#E6C384",exception:"#D27E99"},highlights:{diffAdded:"#98BB6C",diffAddedBackground:"#76946A20",diffRemoved:"#C34043",diffRemovedBackground:"#E8242420",diffModified:"#7E9CD8",diffModifiedBackground:"#7E9CD820",lineNumber:"#363646",lineNumberActive:"#DCD7BA"}},markdown:{heading1:"#DCD7BA",heading2:"#DCD7BA",heading3:"#DCD7BA",heading4:"#DCD7BA",link:"#7FB4CA",linkHover:"#7E9CD8",inlineCode:"#98BB6C",inlineCodeBackground:"#16161D",blockquote:"#54546D",blockquoteBorder:"#363646",listMarker:"#FF9E3B99"},chat:{userMessage:"#DCD7BA",userMessageBackground:"#2A2A37",assistantMessage:"#DCD7BA",assistantMessageBackground:"#2f2f3d",timestamp:"#54546D",divider:"#363646"},tools:{background:"#16161D50",border:"#4a4a5f80",headerHover:"#36364650",icon:"#afad9c",title:"#DCD7BA",description:"#5A595B",edit:{added:"#98BB6C",addedBackground:"#98BB6C25",removed:"#C34043",removedBackground:"#C3404325",lineNumber:"#56566d"}}},u_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},f_={metadata:c_,colors:d_,config:u_},m_={id:"kanagawa-light",name:"Kanagawa",description:"A color scheme inspired by Japanese art and ink painting - light variant (Lotus)",version:"1.0.0",variant:"light",tags:["light","japanese","lotus","elegant"]},h_={primary:{base:"#4D699B",hover:"#6693BF",active:"#5D57A3",foreground:"#F2ECBC",muted:"#4D699B80",emphasis:"#6693BF"},surface:{background:"#F2ECBC",foreground:"#545464",muted:"#E7DBA0",mutedForeground:"#6c6c67",elevated:"#eae4bf",elevatedForeground:"#545464",overlay:"#54546433",subtle:"#f4fff0"},interactive:{border:"#bfbaa4",borderHover:"#8A8980",borderFocus:"#4D699B",selection:"#e9f3e5cf",selectionForeground:"#545464",focus:"#4D699B",focusRing:"#4D699B40",cursor:"#545464",hover:"#e9f3e5a9",active:"#e9f3e5cf"},status:{error:"#E82424",errorForeground:"#F2ECBC",errorBackground:"#E8242420",errorBorder:"#E8242450",warning:"#DE9800",warningForeground:"#545464",warningBackground:"#DE980020",warningBorder:"#DE980050",success:"#6F894E",successForeground:"#F2ECBC",successBackground:"#98BB6C20",successBorder:"#6F894E50",info:"#4D699B",infoForeground:"#F2ECBC",infoBackground:"#6693BF20",infoBorder:"#4D699B50"},pr:{open:"#6F894E",draft:"#716E61",blocked:"#DE9800",merged:"#624C83",closed:"#E82424"},syntax:{base:{background:"#DCD5AC",foreground:"#545464",comment:"#716E61",keyword:"#4D699B",string:"#6F894E",number:"#836F4A",function:"#CC6D00",variable:"#545464",type:"#77713F",operator:"#C84053"},tokens:{commentDoc:"#8A8980",stringEscape:"#545464",keywordImport:"#624C83",storageModifier:"#4D699B",functionCall:"#CC6D00",method:"#6E915F",variableProperty:"#4D699B",variableOther:"#6E915F",variableGlobal:"#B35B79",variableLocal:"#D5CEA3",parameter:"#545464",constant:"#545464",class:"#CC6D00",className:"#CC6D00",interface:"#77713F",struct:"#CC6D00",enum:"#CC6D00",typeParameter:"#CC6D00",namespace:"#77713F",module:"#C84053",tag:"#4D699B",jsxTag:"#B35B79",tagAttribute:"#77713F",tagAttributeValue:"#6F894E",boolean:"#77713F",decorator:"#77713F",label:"#B35B79",punctuation:"#716E61",macro:"#4D699B",preprocessor:"#B35B79",regex:"#6F894E",url:"#4D699B",key:"#CC6D00",exception:"#B35B79"},highlights:{diffAdded:"#6F894E",diffAddedBackground:"#6F894E20",diffRemoved:"#C84053",diffRemovedBackground:"#C8405320",diffModified:"#4D699B",diffModifiedBackground:"#4D699B20",lineNumber:"#8A8980",lineNumberActive:"#545464"}},markdown:{heading1:"#545464",heading2:"#545464",heading3:"#545464",heading4:"#545464",link:"#5D57A3",linkHover:"#4D699B",inlineCode:"#6F894E",inlineCodeBackground:"#e7e2c7",blockquote:"#716E61",blockquoteBorder:"#716E61",listMarker:"#836F4A99"},chat:{userMessage:"#545464",userMessageBackground:"#e6f2e1",assistantMessage:"#545464",assistantMessageBackground:"#F2ECBC",timestamp:"#716E61",divider:"#716E61"},tools:{background:"#DCD5AC50",border:"#716E6180",headerHover:"#716E61",icon:"#8A8980",title:"#545464",description:"#8A8980",edit:{added:"#6F894E",addedBackground:"#6F894E25",removed:"#C84053",removedBackground:"#C8405325",lineNumber:"#8A8980"}}},p_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},g_={metadata:m_,colors:h_,config:p_},v_={id:"monokai-dark",name:"Monokai",description:"Monokai",version:"1.0.0",variant:"dark",tags:["dark","palette"]},b_={primary:{base:"#AE81FF",hover:"#9973DD",active:"#BA94FF",foreground:"#23241E",muted:"#AE81FF80",emphasis:"#9973DD"},surface:{background:"#23241E",foreground:"#F8F8F2",muted:"#282a20",mutedForeground:"#939390",elevated:"#21221a",elevatedForeground:"#F8F8F2",overlay:"#FFFFFF20",subtle:"#36372a"},interactive:{border:"#343528",borderHover:"#393A2D",borderFocus:"#555741",selection:"#434d3cfe",selectionForeground:"#FFFFFF",focus:"#AE81FF",focusRing:"#AE81FF40",cursor:"#FFFFFF",hover:"#36372a",active:"#36382e"},status:{error:"#F92672",errorForeground:"#23241E",errorBackground:"#F9267220",errorBorder:"#F9267250",warning:"#FD971F",warningForeground:"#23241E",warningBackground:"#FD971F20",warningBorder:"#FD971F50",success:"#A6E22E",successForeground:"#23241E",successBackground:"#A6E22E20",successBorder:"#A6E22E50",info:"#66D9EF",infoForeground:"#23241E",infoBackground:"#66D9EF20",infoBorder:"#66D9EF50"},pr:{open:"#A6E22E",draft:"#C5C5C0",blocked:"#FD971F",merged:"#AE81FF",closed:"#F92672"},syntax:{base:{background:"#27281F",foreground:"#F8F8F2",comment:"#C5C5C0",keyword:"#AE81FF",string:"#A6E22E",number:"#F92672",function:"#AE81FF",variable:"#F8F8F2",type:"#FD971F",operator:"#F92672"},tokens:{boolean:"#FD971F",class:"#AE81FF",className:"#AE81FF",commentDoc:"#ADADA8",constant:"#66D9EF",decorator:"#FD971F",enum:"#AE81FF",exception:"#F92672",functionCall:"#AE81FF",interface:"#FD971F",jsxTag:"#AE81FF",key:"#AE81FF",keywordImport:"#F92672",label:"#F92672",macro:"#66D9EF",method:"#A6E22E",module:"#F92672",namespace:"#FD971F",parameter:"#F8F8F2",preprocessor:"#F92672",punctuation:"#C5C5C0",regex:"#A6E22E",storageModifier:"#66D9EF",stringEscape:"#FFFFFF",struct:"#AE81FF",tag:"#AE81FF",tagAttribute:"#FD971F",tagAttributeValue:"#A6E22E",typeParameter:"#FD971F",url:"#66D9EF",variableGlobal:"#AE81FF",variableLocal:"#25261F",variableOther:"#A6E22E",variableProperty:"#66D9EF"},highlights:{diffAdded:"#A6E22E",diffAddedBackground:"#1E2A1D",diffModified:"#66D9EF",diffModifiedBackground:"#2F2F24",diffRemoved:"#F92672",diffRemovedBackground:"#301C24",lineNumber:"#454639",lineNumberActive:"#FFFFFF"}},markdown:{heading1:"#F8F8F2",heading2:"#F8F8F2",heading3:"#F8F8F2",heading4:"#F8F8F2",link:"#66D9EF",linkHover:"#AE81FF",inlineCode:"#A6E22E",inlineCodeBackground:"#27281F",blockquote:"#FD971F",blockquoteBorder:"#343528",listMarker:"#AE81FF99"},chat:{userMessage:"#F8F8F2",userMessageBackground:"#36372a",assistantMessage:"#F8F8F2",assistantMessageBackground:"#23241E",timestamp:"#C5C5C0",divider:"#343528"},tools:{background:"#27281F80",border:"#4d4f3c80",headerHover:"#292A23",icon:"#C5C5C0",title:"#F8F8F2",description:"#C5C5C0",edit:{added:"#A6E22E",addedBackground:"#A6E22E25",removed:"#bd215a",removedBackground:"#F9267225",lineNumber:"#505142"}}},y_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},w_={metadata:v_,colors:b_,config:y_},x_={id:"monokai-light",name:"Monokai",description:"Monokai",version:"1.0.0",variant:"light",tags:["light","palette"]},C_={primary:{base:"#BF7BFF",hover:"#CB94FB",active:"#A76CDB",foreground:"#FDF8EC",muted:"#BF7BFF80",emphasis:"#CB94FB"},surface:{background:"#FDF8EC",foreground:"#292318",muted:"#F8F2E6",mutedForeground:"#887c6a",elevated:"#FBF5E8",elevatedForeground:"#292318",overlay:"#1C150C20",subtle:"#F7EFDD"},interactive:{border:"#E9E0CF",borderHover:"#DFD5C3",borderFocus:"#B6A893",selection:"#1C150C22",selectionForeground:"#1C150C",focus:"#BF7BFF",focusRing:"#BF7BFF40",cursor:"#1C150C",hover:"#e6e0d5",active:"#FBF5E8"},status:{error:"#E54B4B",errorForeground:"#FDF8EC",errorBackground:"#E54B4B20",errorBorder:"#E54B4B50",warning:"#F1A948",warningForeground:"#FDF8EC",warningBackground:"#F1A94820",warningBorder:"#F1A94850",success:"#4FB54B",successForeground:"#FDF8EC",successBackground:"#4FB54B20",successBorder:"#4FB54B50",info:"#2D9AD7",infoForeground:"#FDF8EC",infoBackground:"#2D9AD720",infoBorder:"#2D9AD750"},pr:{open:"#4FB54B",draft:"#6D5C40",blocked:"#F1A948",merged:"#BF7BFF",closed:"#E54B4B"},syntax:{base:{background:"#F8F2E6",foreground:"#292318",comment:"#6D5C40",keyword:"#BF7BFF",string:"#4FB54B",number:"#D9487C",function:"#BF7BFF",variable:"#292318",type:"#F1A948",operator:"#D9487C"},tokens:{boolean:"#F1A948",class:"#BF7BFF",className:"#BF7BFF",commentDoc:"#B5AA96",constant:"#2D9AD7",decorator:"#F1A948",enum:"#BF7BFF",exception:"#D9487C",functionCall:"#BF7BFF",interface:"#F1A948",jsxTag:"#BF7BFF",key:"#BF7BFF",keywordImport:"#D9487C",label:"#D9487C",macro:"#2D9AD7",method:"#4FB54B",module:"#D9487C",namespace:"#F1A948",parameter:"#292318",preprocessor:"#D9487C",punctuation:"#6D5C40",regex:"#4FB54B",storageModifier:"#2D9AD7",stringEscape:"#1C150C",struct:"#BF7BFF",tag:"#BF7BFF",tagAttribute:"#F1A948",tagAttributeValue:"#4FB54B",typeParameter:"#F1A948",url:"#2D9AD7",variableGlobal:"#BF7BFF",variableLocal:"#FBF5E8",variableOther:"#4FB54B",variableProperty:"#2D9AD7"},highlights:{diffAdded:"#4FB54B",diffAddedBackground:"#E8F7E1",diffModified:"#2D9AD7",diffModifiedBackground:"#E9E0D0",diffRemoved:"#E54B4B",diffRemovedBackground:"#FDE5E4",lineNumber:"#CABFAD",lineNumberActive:"#1C150C"}},markdown:{heading1:"#292318",heading2:"#292318",heading3:"#292318",heading4:"#292318",link:"#2D9AD7",linkHover:"#BF7BFF",inlineCode:"#4FB54B",inlineCodeBackground:"#F8F2E6",blockquote:"#F1A948",blockquoteBorder:"#E9E0CF",listMarker:"#BF7BFF99"},chat:{userMessage:"#292318",userMessageBackground:"#F8F2E6",assistantMessage:"#292318",assistantMessageBackground:"#FDF8EC",timestamp:"#6D5C40",divider:"#E9E0CF"},tools:{background:"#F8F2E680",border:"#d0c8b880",headerHover:"#F7EFDD",icon:"#6D5C40",title:"#292318",description:"#6D5C40",edit:{added:"#4FB54B",addedBackground:"#4FB54B25",removed:"#E54B4B",removedBackground:"#E54B4B25",lineNumber:"#bfb5a4"}}},S_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},k_={metadata:x_,colors:C_,config:S_},M_={id:"nightowl-dark",name:"Night Owl",description:"Night Owl",version:"1.0.0",variant:"dark",tags:["dark","palette"]},A_={primary:{base:"#82AAFF",hover:"#6F94DF",active:"#95B7FF",foreground:"#011627",muted:"#82AAFF80",emphasis:"#6F94DF"},surface:{background:"#011627",foreground:"#D6DEEB",muted:"#0B253A",mutedForeground:"#7d8892",elevated:"#001122",elevatedForeground:"#D6DEEB",overlay:"#FFFFFF20",subtle:"#0f283f"},interactive:{border:"#1D3B53",borderHover:"#234561",borderFocus:"#82AAFF",selection:"#555d6d94",selectionForeground:"#FFFFFF",focus:"#82AAFF",focusRing:"#82AAFF40",cursor:"#FFFFFF",hover:"#555d6d68",active:"#555d6d94"},status:{error:"#EF5350",errorForeground:"#011627",errorBackground:"#EF535020",errorBorder:"#EF535050",warning:"#ECC48D",warningForeground:"#011627",warningBackground:"#ECC48D20",warningBorder:"#ECC48D50",success:"#C5E478",successForeground:"#011627",successBackground:"#C5E47820",successBorder:"#C5E47850",info:"#82AAFF",infoForeground:"#011627",infoBackground:"#82AAFF20",infoBorder:"#82AAFF50"},pr:{open:"#C5E478",draft:"#5F7E97",blocked:"#ECC48D",merged:"#BC82FF",closed:"#EF5350"},syntax:{base:{background:"#0B253A",foreground:"#D6DEEB",comment:"#5F7E97",keyword:"#82AAFF",string:"#ECC48D",number:"#F78C6C",function:"#82AAFF",variable:"#D6DEEB",type:"#C5E478",operator:"#F78C6C"},tokens:{boolean:"#C5E478",class:"#82AAFF",className:"#82AAFF",commentDoc:"#516E86",constant:"#7FDBCA",decorator:"#C5E478",enum:"#82AAFF",exception:"#F78C6C",functionCall:"#82AAFF",interface:"#C5E478",jsxTag:"#82AAFF",key:"#82AAFF",keywordImport:"#F78C6C",label:"#F78C6C",macro:"#82AAFF",method:"#C5E478",module:"#F78C6C",namespace:"#C5E478",parameter:"#D6DEEB",preprocessor:"#F78C6C",punctuation:"#5F7E97",regex:"#ECC48D",storageModifier:"#82AAFF",stringEscape:"#FFFFFF",struct:"#82AAFF",tag:"#82AAFF",tagAttribute:"#C5E478",tagAttributeValue:"#ECC48D",typeParameter:"#C5E478",url:"#7FDBCA",variableGlobal:"#82AAFF",variableLocal:"#001122",variableOther:"#C5E478",variableProperty:"#7FDBCA"},highlights:{diffAdded:"#C5E478",diffAddedBackground:"#0A2E1A",diffModified:"#82AAFF",diffModifiedBackground:"#0B253A",diffRemoved:"#EF5350",diffRemovedBackground:"#2D1B1B",lineNumber:"#82AAFF",lineNumberActive:"#FFFFFF"}},markdown:{heading1:"#D6DEEB",heading2:"#D6DEEB",heading3:"#D6DEEB",heading4:"#D6DEEB",link:"#7FDBCA",linkHover:"#82AAFF",inlineCode:"#C5E478",inlineCodeBackground:"#0B253A",blockquote:"#5F7E97",blockquoteBorder:"#1D3B53",listMarker:"#82AAFF99"},chat:{userMessage:"#D6DEEB",userMessageBackground:"#0f283f",assistantMessage:"#D6DEEB",assistantMessageBackground:"#011627",timestamp:"#5F7E97",divider:"#1D3B53"},tools:{background:"#0B253A80",border:"#24496780",headerHover:"#000C17",icon:"#5F7E97",title:"#D6DEEB",description:"#5F7E97",edit:{added:"#C5E478",addedBackground:"#C5E47825",removed:"#EF5350",removedBackground:"#EF535025",lineNumber:"#58698f"}}},F_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},__={metadata:M_,colors:A_,config:F_},B_={id:"nightowl-light",name:"Night Owl",description:"Night Owl",version:"1.0.0",variant:"light",tags:["light","palette"]},D_={primary:{base:"#4876D6",hover:"#6C91DD",active:"#4168BA",foreground:"#FBFBFB",muted:"#4876D680",emphasis:"#6C91DD"},surface:{background:"#FBFBFB",foreground:"#403F53",muted:"#F0F0F0",mutedForeground:"#747a7a",elevated:"#FFFFFF",elevatedForeground:"#403F53",overlay:"#1A1A1A20",subtle:"#F0F0F0"},interactive:{border:"#D9D9D9",borderHover:"#CCCCCC",borderFocus:"#4876D6",selection:"#706e6e22",selectionForeground:"#1A1A1A",focus:"#4876D6",focusRing:"#4876D640",cursor:"#1A1A1A",hover:"#706e6e16",active:"#706e6e22"},status:{error:"#DE3D3B",errorForeground:"#FBFBFB",errorBackground:"#DE3D3B20",errorBorder:"#DE3D3B50",warning:"#C96765",warningForeground:"#FBFBFB",warningBackground:"#C9676520",warningBorder:"#C9676550",success:"#2AA298",successForeground:"#FBFBFB",successBackground:"#2AA29820",successBorder:"#2AA29850",info:"#4876D6",infoForeground:"#FBFBFB",infoBackground:"#4876D620",infoBorder:"#4876D650"},pr:{open:"#2AA298",draft:"#7A8181",blocked:"#c98f65",merged:"#994CC3",closed:"#DE3D3B"},syntax:{base:{background:"#F0F0F0",foreground:"#403F53",comment:"#7A8181",keyword:"#4876D6",string:"#C96765",number:"#AA0982",function:"#4876D6",variable:"#403F53",type:"#994CC3",operator:"#AA0982"},tokens:{boolean:"#994CC3",class:"#4876D6",className:"#4876D6",commentDoc:"#BBBEBE",constant:"#2AA298",decorator:"#994CC3",enum:"#4876D6",exception:"#AA0982",functionCall:"#4876D6",interface:"#994CC3",jsxTag:"#4876D6",key:"#4876D6",keywordImport:"#AA0982",label:"#AA0982",macro:"#4876D6",method:"#2AA298",module:"#AA0982",namespace:"#994CC3",parameter:"#403F53",preprocessor:"#AA0982",punctuation:"#7A8181",regex:"#C96765",storageModifier:"#4876D6",stringEscape:"#1A1A1A",struct:"#4876D6",tag:"#4876D6",tagAttribute:"#994CC3",tagAttributeValue:"#C96765",typeParameter:"#994CC3",url:"#2AA298",variableGlobal:"#4876D6",variableLocal:"#FFFFFF",variableOther:"#2AA298",variableProperty:"#2AA298"},highlights:{diffAdded:"#2AA298",diffAddedBackground:"#EAF8F6",diffModified:"#4876D6",diffModifiedBackground:"#E8F0FC",diffRemoved:"#DE3D3B",diffRemovedBackground:"#FBE9E9",lineNumber:"#4876D6",lineNumberActive:"#1A1A1A"}},markdown:{heading1:"#403F53",heading2:"#403F53",heading3:"#403F53",heading4:"#403F53",link:"#2AA298",linkHover:"#4876D6",inlineCode:"#2AA298",inlineCodeBackground:"#F0F0F0",blockquote:"#7A8181",blockquoteBorder:"#D9D9D9",listMarker:"#4876D699"},chat:{userMessage:"#403F53",userMessageBackground:"#F0F0F0",assistantMessage:"#403F53",assistantMessageBackground:"#FBFBFB",timestamp:"#7A8181",divider:"#D9D9D9"},tools:{background:"#F0F0F080",border:"#D9D9D980",headerHover:"#FFFFFF",icon:"#7A8181",title:"#403F53",description:"#7A8181",edit:{added:"#2AA298",addedBackground:"#2AA29825",removed:"#DE3D3B",removedBackground:"#DE3D3B25",lineNumber:"#4876D6"}}},P_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},T_={metadata:B_,colors:D_,config:P_},H_={id:"nord-dark",name:"Nord",description:"Nord",version:"1.0.0",variant:"dark",tags:["dark","palette"]},I_={primary:{base:"#88C0D0",hover:"#78A9B8",active:"#99C9D7",foreground:"#1F2430",muted:"#88C0D080",emphasis:"#78A9B8"},surface:{background:"#1F2430",foreground:"#E5E9F0",muted:"#222938",mutedForeground:"#7c828e",elevated:"#1C202A",elevatedForeground:"#E5E9F0",overlay:"#F8FAFC20",subtle:"#272f40"},interactive:{border:"#414755",borderHover:"#383F50",borderFocus:"#545B78",selection:"#3e4a56fe",selectionForeground:"#F8FAFC",focus:"#88C0D0",focusRing:"#88C0D040",cursor:"#F8FAFC",hover:"#3e4a5692",active:"#3e4a56fe"},status:{error:"#BF616A",errorForeground:"#1F2430",errorBackground:"#BF616A20",errorBorder:"#BF616A50",warning:"#D08770",warningForeground:"#1F2430",warningBackground:"#D0877020",warningBorder:"#D0877050",success:"#A3BE8C",successForeground:"#1F2430",successBackground:"#A3BE8C20",successBorder:"#A3BE8C50",info:"#81A1C1",infoForeground:"#1F2430",infoBackground:"#81A1C120",infoBorder:"#81A1C150"},pr:{open:"#A3BE8C",draft:"#A4ADBF",blocked:"#D08770",merged:"#b788d0",closed:"#BF616A"},syntax:{base:{background:"#222938",foreground:"#E5E9F0",comment:"#A4ADBF",keyword:"#88C0D0",string:"#A3BE8C",number:"#D57780",function:"#88C0D0",variable:"#E5E9F0",type:"#EAC196",operator:"#D57780"},tokens:{boolean:"#EAC196",class:"#88C0D0",className:"#88C0D0",commentDoc:"#9098AA",constant:"#81A1C1",decorator:"#EAC196",enum:"#88C0D0",exception:"#D57780",functionCall:"#88C0D0",interface:"#EAC196",jsxTag:"#88C0D0",key:"#88C0D0",keywordImport:"#D57780",label:"#D57780",macro:"#81A1C1",method:"#A3BE8C",module:"#D57780",namespace:"#EAC196",parameter:"#E5E9F0",preprocessor:"#D57780",punctuation:"#A4ADBF",regex:"#A3BE8C",storageModifier:"#81A1C1",stringEscape:"#F8FAFC",struct:"#88C0D0",tag:"#88C0D0",tagAttribute:"#EAC196",tagAttributeValue:"#A3BE8C",typeParameter:"#EAC196",url:"#81A1C1",variableGlobal:"#88C0D0",variableLocal:"#1C202A",variableOther:"#A3BE8C",variableProperty:"#81A1C1"},highlights:{diffAdded:"#A3BE8C",diffAddedBackground:"#1F2E33",diffModified:"#81A1C1",diffModifiedBackground:"#222B3A",diffRemoved:"#BF616A",diffRemovedBackground:"#2E212A",lineNumber:"#434A62",lineNumberActive:"#F8FAFC"}},markdown:{heading1:"#E5E9F0",heading2:"#E5E9F0",heading3:"#E5E9F0",heading4:"#E5E9F0",link:"#81A1C1",linkHover:"#88C0D0",inlineCode:"#A3BE8C",inlineCodeBackground:"#252c3c",blockquote:"#D08770",blockquoteBorder:"#343A47",listMarker:"#88C0D099"},chat:{userMessage:"#E5E9F0",userMessageBackground:"#272f40",assistantMessage:"#E5E9F0",assistantMessageBackground:"#1F2430",timestamp:"#A4ADBF",divider:"#343A47"},tools:{background:"#22293880",border:"#454e5f80",headerHover:"#181C24",icon:"#A4ADBF",title:"#E5E9F0",description:"#A4ADBF",edit:{added:"#A3BE8C",addedBackground:"#A3BE8C25",removed:"#BF616A",removedBackground:"#BF616A25",lineNumber:"#4a526b"}}},E_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},j_={metadata:H_,colors:I_,config:E_},L_={id:"nord-light",name:"Nord",description:"Nord",version:"1.0.0",variant:"light",tags:["light","palette"]},V_={primary:{base:"#5E81AC",hover:"#7A97BA",active:"#557399",foreground:"#ECEFF4",muted:"#5E81AC80",emphasis:"#7A97BA"},surface:{background:"#ECEFF4",foreground:"#2E3440",muted:"#E4E8F0",mutedForeground:"#6e7481",elevated:"#e7ebf5",elevatedForeground:"#2E3440",overlay:"#1F253020",subtle:"#dee4f0"},interactive:{border:"#c5cbd6",borderHover:"#C9D0DE",borderFocus:"#9CA4BA",selection:"#c6ccd881",selectionForeground:"#1F2530",focus:"#5E81AC",focusRing:"#5E81AC40",cursor:"#1F2530",hover:"#c6ccd84a",active:"#c6ccd881"},status:{error:"#BF616A",errorForeground:"#ECEFF4",errorBackground:"#BF616A20",errorBorder:"#BF616A50",warning:"#D08770",warningForeground:"#ECEFF4",warningBackground:"#D0877020",warningBorder:"#D0877050",success:"#8FBCBB",successForeground:"#ECEFF4",successBackground:"#8FBCBB20",successBorder:"#8FBCBB50",info:"#81A1C1",infoForeground:"#ECEFF4",infoBackground:"#81A1C120",infoBorder:"#81A1C150"},pr:{open:"#8FBCBB",draft:"#4C566A",blocked:"#D08770",merged:"#9b5eac",closed:"#BF616A"},syntax:{base:{background:"#E4E8F0",foreground:"#2E3440",comment:"#4C566A",keyword:"#5E81AC",string:"#A3BE8C",number:"#BF616A",function:"#5E81AC",variable:"#2E3440",type:"#D08770",operator:"#BF616A"},tokens:{boolean:"#D08770",class:"#5E81AC",className:"#5E81AC",commentDoc:"#9CA3AF",constant:"#81A1C1",decorator:"#D08770",enum:"#5E81AC",exception:"#BF616A",functionCall:"#5E81AC",interface:"#D08770",jsxTag:"#5E81AC",key:"#5E81AC",keywordImport:"#BF616A",label:"#BF616A",macro:"#81A1C1",method:"#8FBCBB",module:"#BF616A",namespace:"#D08770",parameter:"#2E3440",preprocessor:"#BF616A",punctuation:"#4C566A",regex:"#A3BE8C",storageModifier:"#81A1C1",stringEscape:"#1F2530",struct:"#5E81AC",tag:"#5E81AC",tagAttribute:"#D08770",tagAttributeValue:"#A3BE8C",typeParameter:"#D08770",url:"#81A1C1",variableGlobal:"#5E81AC",variableLocal:"#F1F3F8",variableOther:"#8FBCBB",variableProperty:"#81A1C1"},highlights:{diffAdded:"#8FBCBB",diffAddedBackground:"#E4F0E4",diffModified:"#81A1C1",diffModifiedBackground:"#DFE6F2",diffRemoved:"#BF616A",diffRemovedBackground:"#F4E1E4",lineNumber:"#B2BACC",lineNumberActive:"#1F2530"}},markdown:{heading1:"#2E3440",heading2:"#2E3440",heading3:"#2E3440",heading4:"#2E3440",link:"#81A1C1",linkHover:"#5E81AC",inlineCode:"#4f7034",inlineCodeBackground:"#E4E8F0",blockquote:"#D08770",blockquoteBorder:"#D5DBE7",listMarker:"#5E81AC99"},chat:{userMessage:"#2E3440",userMessageBackground:"#dee4f0",assistantMessage:"#2E3440",assistantMessageBackground:"#ECEFF4",timestamp:"#4C566A",divider:"#D5DBE7"},tools:{background:"#E4E8F080",border:"#b8bfcc80",headerHover:"#F6F8FC",icon:"#4C566A",title:"#2E3440",description:"#4C566A",edit:{added:"#8FBCBB",addedBackground:"#8FBCBB25",removed:"#BF616A",removedBackground:"#BF616A25",lineNumber:"#b7bfd1"}}},N_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},R_={metadata:L_,colors:V_,config:N_},z_={id:"vinci-dark",name:"Fields of the Shire",description:"Fields of the Shire theme - dark variant",author:"Vinci",version:"1.0.0",variant:"dark",tags:["dark","warm","earthy","brand"]},O_={primary:{base:"#7a8a5a",hover:"#93a56b",active:"#a4b67d",foreground:"#0c0a08",muted:"#7a8a5a80",emphasis:"#93a56b"},surface:{background:"#1b1815",foreground:"#ebe0d1",muted:"#23201c",mutedForeground:"#83796f",elevated:"#2b2622",elevatedForeground:"#ebe0d1",overlay:"#1b1815cc",subtle:"#332d28"},interactive:{border:"#413e3a",borderHover:"#f0e6d830",borderFocus:"#373d2c",selection:"#f0e6d81f",selectionForeground:"#ebe0d1",focus:"#7a8a5a",focusRing:"#7a8a5a4d",cursor:"#ebe0d1",hover:"#332d28",active:"#f0e6d824"},status:{error:"#b34d3b",errorForeground:"#0c0a08",errorBackground:"#b85a4a20",errorBorder:"#b85a4a50",warning:"#c47a3a",warningForeground:"#0c0a08",warningBackground:"#c47a3a20",warningBorder:"#c47a3a50",success:"#7f905e",successForeground:"#0c0a08",successBackground:"#7a8a5a20",successBorder:"#7a8a5a50",info:"#667c8a",infoForeground:"#f0e6d8",infoBackground:"#5a6d7a20",infoBorder:"#5a6d7a50"},pr:{open:"#7a8a5a",draft:"#6a5e52",blocked:"#c47a3a",merged:"#5a6d7a",closed:"#b85a4a"},syntax:{base:{background:"#23201c",foreground:"#ebe0d1",comment:"#6a5e52",keyword:"#5a6d7a",string:"#93a56b",number:"#c47a3a",function:"#c47a3a",variable:"#ebe0d1",type:"#7a8a5a",operator:"#a89888"},tokens:{commentDoc:"#4a4238",stringEscape:"#ebe0d1",keywordImport:"#5a6d7a",storageModifier:"#5a6d7a",functionCall:"#c47a3a",method:"#93a56b",variableProperty:"#5a6d7a",variableOther:"#ebe0d1",variableGlobal:"#c47a3a",variableLocal:"#a89888",parameter:"#ebe0d1",constant:"#c47a3a",class:"#7a8a5a",className:"#7a8a5a",interface:"#7a8a5a",struct:"#7a8a5a",enum:"#7a8a5a",typeParameter:"#93a56b",namespace:"#5a6d7a",module:"#5a6d7a",tag:"#c47a3a",jsxTag:"#c47a3a",tagAttribute:"#93a56b",tagAttributeValue:"#93a56b",boolean:"#7a8a5a",decorator:"#5a6d7a",label:"#c47a3a",punctuation:"#a89888",macro:"#5a6d7a",preprocessor:"#5a6d7a",regex:"#93a56b",url:"#5a6d7a",key:"#c47a3a",exception:"#b85a4a"},highlights:{diffAdded:"#7a8a5a",diffAddedBackground:"#7a8a5a20",diffRemoved:"#b85a4a",diffRemovedBackground:"#b85a4a20",diffModified:"#5a6d7a",diffModifiedBackground:"#5a6d7a20",lineNumber:"#6a5e52",lineNumberActive:"#ebe0d1"}},markdown:{heading1:"#c47a3a",heading2:"#93a56b",heading3:"#ebe0d1",heading4:"#ebe0d1",link:"#5a6d7a",linkHover:"#93a56b",inlineCode:"#93a56b",inlineCodeBackground:"#23201c",blockquote:"#a89888",blockquoteBorder:"#f0e6d830",listMarker:"#c47a3a99"},chat:{userMessage:"#ebe0d1",userMessageBackground:"#272a25",assistantMessage:"#ebe0d1",assistantMessageBackground:"#1b1815",timestamp:"#6a5e52",divider:"#f0e6d81c"},tools:{background:"#23201c80",border:"#f0e6d830",headerHover:"#2a252180",icon:"#a89888",title:"#ebe0d1",description:"#a19a96",edit:{added:"#7a8a5a",addedBackground:"#7a8a5a25",removed:"#b85a4a",removedBackground:"#b85a4a25",lineNumber:"#6a5e52"}}},$_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},Sf={metadata:z_,colors:O_,config:$_},Z_={id:"vinci-light",name:"Fields of the Shire",description:"Fields of the Shire theme - light variant",author:"Vinci",version:"1.0.0",variant:"light",tags:["light","warm","earthy","brand"]},U_={primary:{base:"#4a6030",hover:"#5e773f",active:"#708a50",foreground:"#faf8f5",muted:"#4a603080",emphasis:"#5e773f"},surface:{background:"#f9f5eb",foreground:"#1a1612",muted:"#f4efe3",mutedForeground:"#5a5048",elevated:"#fcf9f0",elevatedForeground:"#1a1612",overlay:"#1a161220",subtle:"#efe8da"},interactive:{border:"#1a16121c",borderHover:"#1a161230",borderFocus:"#4a6030",selection:"#1a16121a",selectionForeground:"#1a1612",focus:"#4a6030",focusRing:"#4a603040",cursor:"#1a1612",hover:"#efe8da",active:"#1a16121f"},status:{error:"#a24d3f",errorForeground:"#faf8f5",errorBackground:"#a24d3f20",errorBorder:"#a24d3f50",warning:"#8c5520",warningForeground:"#faf8f5",warningBackground:"#8c552020",warningBorder:"#8c552050",success:"#4a6030",successForeground:"#faf8f5",successBackground:"#4a603020",successBorder:"#4a603050",info:"#3d4f5a",infoForeground:"#faf8f5",infoBackground:"#3d4f5a20",infoBorder:"#3d4f5a50"},pr:{open:"#4a6030",draft:"#8a7e72",blocked:"#8c5520",merged:"#3d4f5a",closed:"#a24d3f"},syntax:{base:{background:"#ece5d6",foreground:"#1a1612",comment:"#8a7e72",keyword:"#3d4f5a",string:"#5e773f",number:"#8c5520",function:"#8c5520",variable:"#1a1612",type:"#4a6030",operator:"#5a5048"},tokens:{commentDoc:"#b8b0a4",stringEscape:"#1a1612",keywordImport:"#3d4f5a",storageModifier:"#3d4f5a",functionCall:"#8c5520",method:"#5e773f",variableProperty:"#3d4f5a",variableOther:"#1a1612",variableGlobal:"#8c5520",variableLocal:"#5a5048",parameter:"#1a1612",constant:"#8c5520",class:"#4a6030",className:"#4a6030",interface:"#4a6030",struct:"#4a6030",enum:"#4a6030",typeParameter:"#5e773f",namespace:"#3d4f5a",module:"#3d4f5a",tag:"#8c5520",jsxTag:"#8c5520",tagAttribute:"#4a6030",tagAttributeValue:"#5e773f",boolean:"#4a6030",decorator:"#3d4f5a",label:"#8c5520",punctuation:"#5a5048",macro:"#3d4f5a",preprocessor:"#3d4f5a",regex:"#5e773f",url:"#3d4f5a",key:"#8c5520",exception:"#a24d3f"},highlights:{diffAdded:"#4a6030",diffAddedBackground:"#4a603020",diffRemoved:"#a24d3f",diffRemovedBackground:"#a24d3f20",diffModified:"#3d4f5a",diffModifiedBackground:"#3d4f5a20",lineNumber:"#8a7e72",lineNumberActive:"#1a1612"}},markdown:{heading1:"#8c5520",heading2:"#4a6030",heading3:"#1a1612",heading4:"#1a1612",link:"#3d4f5a",linkHover:"#4a6030",inlineCode:"#4a6030",inlineCodeBackground:"#ece5d6",blockquote:"#5a5048",blockquoteBorder:"#1a161230",listMarker:"#8c552099"},chat:{userMessage:"#1a1612",userMessageBackground:"#efe8da",assistantMessage:"#1a1612",assistantMessageBackground:"#f9f5eb",timestamp:"#8a7e72",divider:"#1a16121c"},tools:{background:"#f4efe380",border:"#1a161230",headerHover:"#efe8da",icon:"#5a5048",title:"#1a1612",description:"#5a5048",edit:{added:"#4a6030",addedBackground:"#4a603025",removed:"#a24d3f",removedBackground:"#a24d3f25",lineNumber:"#8a7e72"}}},q_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},kf={metadata:Z_,colors:U_,config:q_},W_={id:"onedarkpro-dark",name:"One Dark Pro",description:"One Dark Pro",version:"1.0.0",variant:"dark",tags:["dark","palette"]},G_={primary:{base:"#61AFEF",hover:"#579AD1",active:"#77BAF1",foreground:"#1E222A",muted:"#61AFEF80",emphasis:"#579AD1"},surface:{background:"#1E222A",foreground:"#ABB2BF",muted:"#212631",mutedForeground:"#737a89",elevated:"#232832",elevatedForeground:"#ABB2BF",overlay:"#F6F7FB20",subtle:"#2E3442"},interactive:{border:"#373e4f",borderHover:"#363D52",borderFocus:"#555C79",selection:"#a8aec533",selectionForeground:"#F6F7FB",focus:"#61AFEF",focusRing:"#61AFEF40",cursor:"#F6F7FB",hover:"#a8aec525",active:"#a8aec533"},status:{error:"#E06C75",errorForeground:"#1E222A",errorBackground:"#E06C7520",errorBorder:"#E06C7550",warning:"#E5C07B",warningForeground:"#1E222A",warningBackground:"#E5C07B20",warningBorder:"#E5C07B50",success:"#98C379",successForeground:"#1E222A",successBackground:"#98C37920",successBorder:"#98C37950",info:"#56B6C2",infoForeground:"#1E222A",infoBackground:"#56B6C220",infoBorder:"#56B6C250"},pr:{open:"#98C379",draft:"#818899",blocked:"#E5C07B",merged:"#bb61ef",closed:"#E06C75"},syntax:{base:{background:"#212631",foreground:"#ABB2BF",comment:"#818899",keyword:"#61AFEF",string:"#98C379",number:"#E06C75",function:"#61AFEF",variable:"#ABB2BF",type:"#E5C07B",operator:"#E06C75"},tokens:{boolean:"#E5C07B",class:"#61AFEF",className:"#61AFEF",commentDoc:"#727988",constant:"#56B6C2",decorator:"#E5C07B",enum:"#61AFEF",exception:"#E06C75",functionCall:"#61AFEF",interface:"#E5C07B",jsxTag:"#61AFEF",key:"#61AFEF",keywordImport:"#E06C75",label:"#E06C75",macro:"#56B6C2",method:"#98C379",module:"#E06C75",namespace:"#E5C07B",parameter:"#ABB2BF",preprocessor:"#E06C75",punctuation:"#818899",regex:"#98C379",storageModifier:"#56B6C2",stringEscape:"#F6F7FB",struct:"#61AFEF",tag:"#61AFEF",tagAttribute:"#E5C07B",tagAttributeValue:"#98C379",typeParameter:"#E5C07B",url:"#56B6C2",variableGlobal:"#61AFEF",variableLocal:"#1B1F27",variableOther:"#98C379",variableProperty:"#56B6C2"},highlights:{diffAdded:"#98C379",diffAddedBackground:"#1C2A26",diffModified:"#56B6C2",diffModifiedBackground:"#232836",diffRemoved:"#E06C75",diffRemovedBackground:"#2A1C22",lineNumber:"#424967",lineNumberActive:"#F6F7FB"}},markdown:{heading1:"#ABB2BF",heading2:"#ABB2BF",heading3:"#ABB2BF",heading4:"#ABB2BF",link:"#56B6C2",linkHover:"#61AFEF",inlineCode:"#a0c288",inlineCodeBackground:"#232937",blockquote:"#E5C07B",blockquoteBorder:"#323848",listMarker:"#61AFEF99"},chat:{userMessage:"#ABB2BF",userMessageBackground:"#2e3442",assistantMessage:"#ABB2BF",assistantMessageBackground:"#1E222A",timestamp:"#818899",divider:"#323848"},tools:{background:"#21263180",border:"#41495e80",headerHover:"#171B23",icon:"#818899",title:"#ABB2BF",description:"#818899",edit:{added:"#98C379",addedBackground:"#98C37925",removed:"#E06C75",removedBackground:"#E06C7525",lineNumber:"#545c81"}}},K_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},Y_={metadata:W_,colors:G_,config:K_},J_={id:"onedarkpro-light",name:"One Dark Pro",description:"One Dark Pro",version:"1.0.0",variant:"light",tags:["light","palette"]},Q_={primary:{base:"#528BFF",hover:"#73A0FE",active:"#4879DC",foreground:"#F5F6F8",muted:"#528BFF80",emphasis:"#73A0FE"},surface:{background:"#F5F6F8",foreground:"#2B303B",muted:"#EEF0F4",mutedForeground:"#6e727b",elevated:"#f0f5fa",elevatedForeground:"#2B303B",overlay:"#0E111820",subtle:"#eaedf4"},interactive:{border:"#cccfd6",borderHover:"#D4D9E3",borderFocus:"#A6ADBF",selection:"#d8dde6",selectionForeground:"#0E1118",focus:"#528BFF",focusRing:"#528BFF40",cursor:"#0E1118",hover:"#d8dde6c2",active:"#FAFBFC"},status:{error:"#E06C75",errorForeground:"#F5F6F8",errorBackground:"#E06C7520",errorBorder:"#E06C7550",warning:"#D19A66",warningForeground:"#F5F6F8",warningBackground:"#D19A6620",warningBorder:"#D19A6650",success:"#4FA66D",successForeground:"#F5F6F8",successBackground:"#4FA66D20",successBorder:"#4FA66D50",info:"#61AFEF",infoForeground:"#F5F6F8",infoBackground:"#61AFEF20",infoBorder:"#61AFEF50"},pr:{open:"#4FA66D",draft:"#6B717F",blocked:"#D19A66",merged:"#a052ff",closed:"#E06C75"},syntax:{base:{background:"#EEF0F4",foreground:"#2B303B",comment:"#6B717F",keyword:"#528BFF",string:"#4FA66D",number:"#D85462",function:"#528BFF",variable:"#2B303B",type:"#D19A66",operator:"#D85462"},tokens:{boolean:"#D19A66",class:"#528BFF",className:"#528BFF",commentDoc:"#B0B4BC",constant:"#61AFEF",decorator:"#D19A66",enum:"#528BFF",exception:"#D85462",functionCall:"#528BFF",interface:"#D19A66",jsxTag:"#528BFF",key:"#528BFF",keywordImport:"#D85462",label:"#D85462",macro:"#61AFEF",method:"#4FA66D",module:"#D85462",namespace:"#D19A66",parameter:"#2B303B",preprocessor:"#D85462",punctuation:"#6B717F",regex:"#4FA66D",storageModifier:"#61AFEF",stringEscape:"#0E1118",struct:"#528BFF",tag:"#528BFF",tagAttribute:"#D19A66",tagAttributeValue:"#4FA66D",typeParameter:"#D19A66",url:"#61AFEF",variableGlobal:"#528BFF",variableLocal:"#FAFBFC",variableOther:"#4FA66D",variableProperty:"#61AFEF"},highlights:{diffAdded:"#4FA66D",diffAddedBackground:"#E5F4EA",diffModified:"#61AFEF",diffModifiedBackground:"#E4E8F4",diffRemoved:"#E06C75",diffRemovedBackground:"#FDE7EA",lineNumber:"#BEC4D0",lineNumberActive:"#0E1118"}},markdown:{heading1:"#2B303B",heading2:"#2B303B",heading3:"#2B303B",heading4:"#2B303B",link:"#61AFEF",linkHover:"#528BFF",inlineCode:"#327d4c",inlineCodeBackground:"#EEF0F4",blockquote:"#D19A66",blockquoteBorder:"#DEE2EB",listMarker:"#528BFF99"},chat:{userMessage:"#2B303B",userMessageBackground:"#eaedf4",assistantMessage:"#2B303B",assistantMessageBackground:"#F5F6F8",timestamp:"#6B717F",divider:"#DEE2EB"},tools:{background:"#EEF0F480",border:"#c4c8d080",headerHover:"#FFFFFF",icon:"#6B717F",title:"#2B303B",description:"#6B717F",edit:{added:"#4FA66D",addedBackground:"#4FA66D25",removed:"#E06C75",removedBackground:"#E06C7525",lineNumber:"#afb5c1"}}},X_={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},eB={metadata:J_,colors:Q_,config:X_},tB={id:"solarized-dark",name:"Solarized",description:"Solarized",version:"1.0.0",variant:"dark",tags:["dark","palette"]},oB={primary:{base:"#278BD2",hover:"#5C65AC",active:"#8285C9",foreground:"#001F27",muted:"#6C71C480",emphasis:"#5C65AC"},surface:{background:"#001e25",foreground:"#93A1A1",muted:"#02232e",mutedForeground:"#6f7475",elevated:"#052832",elevatedForeground:"#93A1A1",overlay:"#FDF6E320",subtle:"#042b34"},interactive:{border:"#253f47",borderHover:"#243E47",borderFocus:"#3A5A6B",selection:"#98afbd33",selectionForeground:"#FDF6E3",focus:"#6C71C4",focusRing:"#6C71C440",cursor:"#FDF6E3",hover:"#98afbd25",active:"#98afbd33"},status:{error:"#DC322F",errorForeground:"#001F27",errorBackground:"#DC322F20",errorBorder:"#DC322F50",warning:"#B58900",warningForeground:"#001F27",warningBackground:"#B5890020",warningBorder:"#B5890050",success:"#859900",successForeground:"#001F27",successBackground:"#85990020",successBorder:"#85990050",info:"#2AA198",infoForeground:"#001F27",infoBackground:"#2AA19820",infoBorder:"#2AA19850"},pr:{open:"#859900",draft:"#6C7F80",blocked:"#B58900",merged:"#7f6cc4",closed:"#DC322F"},syntax:{base:{background:"#022733",foreground:"#93A1A1",comment:"#6C7F80",keyword:"#6C71C4",string:"#859900",number:"#D33682",function:"#6C71C4",variable:"#93A1A1",type:"#B58900",operator:"#D33682"},tokens:{boolean:"#B58900",class:"#6C71C4",className:"#6C71C4",commentDoc:"#5C7173",constant:"#2AA198",decorator:"#B58900",enum:"#6C71C4",exception:"#D33682",functionCall:"#6C71C4",interface:"#B58900",jsxTag:"#6C71C4",key:"#6C71C4",keywordImport:"#D33682",label:"#D33682",macro:"#2AA198",method:"#859900",module:"#D33682",namespace:"#B58900",parameter:"#93A1A1",preprocessor:"#D33682",punctuation:"#6C7F80",regex:"#859900",storageModifier:"#2AA198",stringEscape:"#FDF6E3",struct:"#6C71C4",tag:"#6C71C4",tagAttribute:"#B58900",tagAttributeValue:"#859900",typeParameter:"#B58900",url:"#2AA198",variableGlobal:"#6C71C4",variableLocal:"#01222B",variableOther:"#859900",variableProperty:"#2AA198"},highlights:{diffAdded:"#859900",diffAddedBackground:"#0F2F29",diffModified:"#2AA198",diffModifiedBackground:"#0F3844",diffRemoved:"#DC322F",diffRemovedBackground:"#321C1C",lineNumber:"#2D4958",lineNumberActive:"#FDF6E3"}},markdown:{heading1:"#93A1A1",heading2:"#93A1A1",heading3:"#93A1A1",heading4:"#93A1A1",link:"#2AA198",linkHover:"#6C71C4",inlineCode:"#859900",inlineCodeBackground:"#022733",blockquote:"#B58900",blockquoteBorder:"#20373F",listMarker:"#6C71C499"},chat:{userMessage:"#93A1A1",userMessageBackground:"#042B34",assistantMessage:"#93A1A1",assistantMessageBackground:"#001F27",timestamp:"#6C7F80",divider:"#20373F"},tools:{background:"#02273380",border:"#2b495380",headerHover:"#032830",icon:"#6C7F80",title:"#93A1A1",description:"#6C7F80",edit:{added:"#859900",addedBackground:"#85990025",removed:"#DC322F",removedBackground:"#DC322F25",lineNumber:"#345567"}}},nB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},sB={metadata:tB,colors:oB,config:nB},rB={id:"solarized-light",name:"Solarized",description:"Solarized",version:"1.0.0",variant:"light",tags:["light","palette"]},iB={primary:{base:"#268BD2",hover:"#51A0D5",active:"#217EBC",foreground:"#FDF6E3",muted:"#268BD280",emphasis:"#51A0D5"},surface:{background:"#FDF6E3",foreground:"#586E75",muted:"#F6EFDA",mutedForeground:"#7a8587",elevated:"#FAF3DC",elevatedForeground:"#586E75",overlay:"#07364220",subtle:"#F6EFDA"},interactive:{border:"#e0decc",borderHover:"#D9D4C2",borderFocus:"#ACA58F",selection:"#10647a22",selectionForeground:"#073642",focus:"#268BD2",focusRing:"#268BD240",cursor:"#073642",hover:"#10647a14",active:"#10647a22"},status:{error:"#DC322F",errorForeground:"#FDF6E3",errorBackground:"#DC322F20",errorBorder:"#DC322F50",warning:"#B58900",warningForeground:"#FDF6E3",warningBackground:"#B5890020",warningBorder:"#B5890050",success:"#859900",successForeground:"#FDF6E3",successBackground:"#85990020",successBorder:"#85990050",info:"#2AA198",infoForeground:"#FDF6E3",infoBackground:"#2AA19820",infoBorder:"#2AA19850"},pr:{open:"#859900",draft:"#7A8C8E",blocked:"#B58900",merged:"#6e26d2",closed:"#DC322F"},syntax:{base:{background:"#F6EFDA",foreground:"#586E75",comment:"#7A8C8E",keyword:"#268BD2",string:"#859900",number:"#D33682",function:"#268BD2",variable:"#586E75",type:"#B58900",operator:"#D33682"},tokens:{boolean:"#B58900",class:"#268BD2",className:"#268BD2",commentDoc:"#BCC1B9",constant:"#2AA198",decorator:"#B58900",enum:"#268BD2",exception:"#D33682",functionCall:"#268BD2",interface:"#B58900",jsxTag:"#268BD2",key:"#268BD2",keywordImport:"#D33682",label:"#D33682",macro:"#2AA198",method:"#859900",module:"#D33682",namespace:"#B58900",parameter:"#586E75",preprocessor:"#D33682",punctuation:"#7A8C8E",regex:"#859900",storageModifier:"#2AA198",stringEscape:"#073642",struct:"#268BD2",tag:"#268BD2",tagAttribute:"#B58900",tagAttributeValue:"#859900",typeParameter:"#B58900",url:"#2AA198",variableGlobal:"#268BD2",variableLocal:"#FAF3DC",variableOther:"#859900",variableProperty:"#2AA198"},highlights:{diffAdded:"#859900",diffAddedBackground:"#EEF5D6",diffModified:"#2AA198",diffModifiedBackground:"#E3ECF3",diffRemoved:"#DC322F",diffRemovedBackground:"#FDE4DD",lineNumber:"#C5C0AD",lineNumberActive:"#073642"}},markdown:{heading1:"#586E75",heading2:"#586E75",heading3:"#586E75",heading4:"#586E75",link:"#2AA198",linkHover:"#268BD2",inlineCode:"#859900",inlineCodeBackground:"#F6EFDA",blockquote:"#B58900",blockquoteBorder:"#E3E0CD",listMarker:"#268BD299"},chat:{userMessage:"#586E75",userMessageBackground:"#F6EFDA",assistantMessage:"#586E75",assistantMessageBackground:"#FDF6E3",timestamp:"#7A8C8E",divider:"#E3E0CD"},tools:{background:"#F6EFDA80",border:"#d1cebc80",headerHover:"#F6EDD4",icon:"#7A8C8E",title:"#586E75",description:"#7A8C8E",edit:{added:"#859900",addedBackground:"#85990025",removed:"#DC322F",removedBackground:"#DC322F25",lineNumber:"#c3bead"}}},aB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},lB={metadata:rB,colors:iB,config:aB},cB={id:"tokyonight-dark",name:"Tokyonight",description:"Tokyonight",version:"1.0.0",variant:"dark",tags:["dark","palette"]},dB={primary:{base:"#7AA2F7",hover:"#6A8CD6",active:"#8BADF8",foreground:"#0F111A",muted:"#7AA2F780",emphasis:"#6A8CD6"},surface:{background:"#0F111A",foreground:"#C0CAF5",muted:"#111428",mutedForeground:"#6a739d",elevated:"#131629",elevatedForeground:"#C0CAF5",overlay:"#EAEAFF20",subtle:"#171b30"},interactive:{border:"#31344a",borderHover:"#292C43",borderFocus:"#45496F",selection:"#b3b3cc33",selectionForeground:"#EAEAFF",focus:"#7AA2F7",focusRing:"#7AA2F740",cursor:"#EAEAFF",hover:"#272E49",active:"#262C46"},status:{error:"#F7768E",errorForeground:"#0F111A",errorBackground:"#F7768E20",errorBorder:"#F7768E50",warning:"#E0AF68",warningForeground:"#0F111A",warningBackground:"#E0AF6820",warningBorder:"#E0AF6850",success:"#9ECE6A",successForeground:"#0F111A",successBackground:"#9ECE6A20",successBorder:"#9ECE6A50",info:"#7DCFFF",infoForeground:"#0F111A",infoBackground:"#7DCFFF20",infoBorder:"#7DCFFF50"},pr:{open:"#9ECE6A",draft:"#7A88CF",blocked:"#E0AF68",merged:"#BB9AF7",closed:"#F7768E"},syntax:{base:{background:"#111428",foreground:"#C0CAF5",comment:"#7A88CF",keyword:"#BB9AF7",string:"#9ECE6A",number:"#FF9E64",function:"#BB9AF7",variable:"#C0CAF5",type:"#E0AF68",operator:"#FF9E64"},tokens:{boolean:"#E0AF68",class:"#BB9AF7",className:"#BB9AF7",commentDoc:"#6A76B4",constant:"#7DCFFF",decorator:"#E0AF68",enum:"#BB9AF7",exception:"#FF9E64",functionCall:"#BB9AF7",interface:"#E0AF68",jsxTag:"#BB9AF7",key:"#BB9AF7",keywordImport:"#FF9E64",label:"#FF9E64",macro:"#7DCFFF",method:"#9ECE6A",module:"#FF9E64",namespace:"#E0AF68",parameter:"#C0CAF5",preprocessor:"#FF9E64",punctuation:"#7A88CF",regex:"#9ECE6A",storageModifier:"#7DCFFF",stringEscape:"#EAEAFF",struct:"#BB9AF7",tag:"#BB9AF7",tagAttribute:"#E0AF68",tagAttributeValue:"#9ECE6A",typeParameter:"#E0AF68",url:"#7DCFFF",variableGlobal:"#BB9AF7",variableLocal:"#101324",variableOther:"#9ECE6A",variableProperty:"#7DCFFF"},highlights:{diffAdded:"#9ECE6A",diffAddedBackground:"#1C2A38",diffModified:"#7DCFFF",diffModifiedBackground:"#24283B",diffRemoved:"#F7768E",diffRemovedBackground:"#2A1F32",lineNumber:"#343755",lineNumberActive:"#EAEAFF"}},markdown:{heading1:"#C0CAF5",heading2:"#C0CAF5",heading3:"#C0CAF5",heading4:"#C0CAF5",link:"#7DCFFF",linkHover:"#7AA2F7",inlineCode:"#9ECE6A",inlineCodeBackground:"#111428",blockquote:"#E0AF68",blockquoteBorder:"#25283B",listMarker:"#7AA2F799"},chat:{userMessage:"#C0CAF5",userMessageBackground:"#171b30",assistantMessage:"#C0CAF5",assistantMessageBackground:"#0F111A",timestamp:"#7A88CF",divider:"#25283B"},tools:{background:"#11142880",border:"#393e5c80",headerHover:"#13172A",icon:"#7A88CF",title:"#C0CAF5",description:"#7A88CF",edit:{added:"#9ECE6A",addedBackground:"#9ECE6A25",removed:"#F7768E",removedBackground:"#F7768E25",lineNumber:"#3e4266"}}},uB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},fB={metadata:cB,colors:dB,config:uB},mB={id:"tokyonight-light",name:"Tokyonight",description:"Tokyonight",version:"1.0.0",variant:"light",tags:["light","palette"]},hB={primary:{base:"#2E7DE9",hover:"#5291E9",active:"#2B70D0",foreground:"#E1E2E7",muted:"#2E7DE980",emphasis:"#5291E9"},surface:{background:"#E1E2E7",foreground:"#273153",muted:"#DEE0EA",mutedForeground:"#686e9b",elevated:"#dee0ee",elevatedForeground:"#273153",overlay:"#1C254420",subtle:"#dadce6"},interactive:{border:"#bbbdc9",borderHover:"#C3C6D2",borderFocus:"#9599A8",selection:"#939cbf47",selectionForeground:"#1C2544",focus:"#2E7DE9",focusRing:"#2E7DE940",cursor:"#1C2544",hover:"#7b86ad2a",active:"#7b86ad47"},status:{error:"#C94060",errorForeground:"#E1E2E7",errorBackground:"#C9406020",errorBorder:"#C9406050",warning:"#8C6C3E",warningForeground:"#E1E2E7",warningBackground:"#8C6C3E20",warningBorder:"#8C6C3E50",success:"#587539",successForeground:"#E1E2E7",successBackground:"#58753920",successBorder:"#58753950",info:"#007197",infoForeground:"#E1E2E7",infoBackground:"#00719720",infoBorder:"#00719750"},pr:{open:"#587539",draft:"#5C6390",blocked:"#8C6C3E",merged:"#9854F1",closed:"#C94060"},syntax:{base:{background:"#DEE0EA",foreground:"#273153",comment:"#5C6390",keyword:"#9854F1",string:"#587539",number:"#B15C00",function:"#9854F1",variable:"#273153",type:"#3760BF",operator:"#B15C00"},tokens:{boolean:"#3760BF",class:"#9854F1",className:"#9854F1",commentDoc:"#9FA3BC",constant:"#007197",decorator:"#3760BF",enum:"#9854F1",exception:"#B15C00",functionCall:"#9854F1",interface:"#3760BF",jsxTag:"#9854F1",key:"#9854F1",keywordImport:"#B15C00",label:"#B15C00",macro:"#007197",method:"#587539",module:"#B15C00",namespace:"#3760BF",parameter:"#273153",preprocessor:"#B15C00",punctuation:"#5C6390",regex:"#587539",storageModifier:"#007197",stringEscape:"#1C2544",struct:"#9854F1",tag:"#9854F1",tagAttribute:"#3760BF",tagAttributeValue:"#587539",typeParameter:"#3760BF",url:"#007197",variableGlobal:"#9854F1",variableLocal:"#E5E6EE",variableOther:"#587539",variableProperty:"#007197"},highlights:{diffAdded:"#587539",diffAddedBackground:"#DFE7DA",diffModified:"#007197",diffModifiedBackground:"#CFD1DD",diffRemoved:"#C94060",diffRemovedBackground:"#F4DADD",lineNumber:"#AEB2BF",lineNumberActive:"#1C2544"}},markdown:{heading1:"#9854F1",heading2:"#B15C00",heading3:"#8C6C3E",heading4:"#273153",link:"#007197",linkHover:"#2E7DE9",inlineCode:"#587539",inlineCodeBackground:"#DEE0EA",blockquote:"#8C6C3E",blockquoteBorder:"#CDD0DC",listMarker:"#2E7DE999"},chat:{userMessage:"#273153",userMessageBackground:"#dcdee9",assistantMessage:"#273153",assistantMessageBackground:"#E1E2E7",timestamp:"#5C6390",divider:"#CDD0DC"},tools:{background:"#DEE0EA80",border:"#a5a8b580",headerHover:"#E9EAF1",icon:"#5C6390",title:"#273153",description:"#5C6390",edit:{added:"#587539",addedBackground:"#58753925",removed:"#C94060",removedBackground:"#C9406025",lineNumber:"#9b9ea9"}}},pB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},gB={metadata:mB,colors:hB,config:pB},vB={id:"vesper-dark",name:"Vesper",description:"Vesper",version:"1.0.0",variant:"dark",tags:["dark","palette"]},bB={primary:{base:"#FFC799",hover:"#DBAC84",active:"#FFCFA8",foreground:"#101010",muted:"#FFC79980",emphasis:"#DBAC84"},surface:{background:"#151515",foreground:"#e8e5e5",muted:"#1c1b1b",mutedForeground:"#848484",elevated:"#242121",elevatedForeground:"#FFFFFF",overlay:"#FFFFFF20",subtle:"#232323"},interactive:{border:"#494949",borderHover:"#202020",borderFocus:"#383838",selection:"#b1adad33",selectionForeground:"#FFFFFF",focus:"#FFC799",focusRing:"#FFC79940",cursor:"#FFFFFF",hover:"#ffffff1c",active:"#ffffff33"},status:{error:"#FF8080",errorForeground:"#101010",errorBackground:"#FF808020",errorBorder:"#FF808050",warning:"#FFC799",warningForeground:"#101010",warningBackground:"#FFC79920",warningBorder:"#FFC79950",success:"#99FFE4",successForeground:"#101010",successBackground:"#99FFE420",successBorder:"#99FFE450",info:"#FFC799",infoForeground:"#101010",infoBackground:"#FFC79920",infoBorder:"#FFC79950"},pr:{open:"#99FFE4",draft:"#A0A0A0",blocked:"#FFC799",merged:"#ca99ff",closed:"#FF8080"},syntax:{base:{background:"#141414",foreground:"#FFFFFF",comment:"#A0A0A0",keyword:"#FFC799",string:"#99FFE4",number:"#FF8080",function:"#FFC799",variable:"#FFFFFF",type:"#FFC799",operator:"#FF8080"},tokens:{boolean:"#FFC799",class:"#FFC799",className:"#FFC799",commentDoc:"#8A8A8A",constant:"#A0A0A0",decorator:"#FFC799",enum:"#FFC799",exception:"#FF8080",functionCall:"#FFC799",interface:"#FFC799",jsxTag:"#FFC799",key:"#FFC799",keywordImport:"#FF8080",label:"#FF8080",macro:"#8B8B8B",method:"#99FFE4",module:"#FF8080",namespace:"#FFC799",parameter:"#FFFFFF",preprocessor:"#FF8080",punctuation:"#A0A0A0",regex:"#99FFE4",storageModifier:"#8B8B8B",stringEscape:"#FFFFFF",struct:"#FFC799",tag:"#FFC799",tagAttribute:"#FFC799",tagAttributeValue:"#99FFE4",typeParameter:"#FFC799",url:"#A0A0A0",variableGlobal:"#FFC799",variableLocal:"#0C0C0C",variableOther:"#99FFE4",variableProperty:"#A0A0A0"},highlights:{diffAdded:"#99FFE4",diffAddedBackground:"#0D2818",diffModified:"#FFC799",diffModifiedBackground:"#141414",diffRemoved:"#FF8080",diffRemovedBackground:"#281A1A",lineNumber:"#282828",lineNumberActive:"#FFFFFF"}},markdown:{heading1:"#FFFFFF",heading2:"#FFFFFF",heading3:"#FFFFFF",heading4:"#FFFFFF",link:"#A0A0A0",linkHover:"#FFC799",inlineCode:"#bba2a2",inlineCodeBackground:"#292727",blockquote:"#FFFFFF",blockquoteBorder:"#1C1C1C",listMarker:"#FFFFFF99"},chat:{userMessage:"#FFFFFF",userMessageBackground:"#2b2a2a",assistantMessage:"#FFFFFF",assistantMessageBackground:"#101010",timestamp:"#A0A0A0",divider:"#1C1C1C"},tools:{background:"#14141480",border:"#48474780",headerHover:"#080808",icon:"#A0A0A0",title:"#FFFFFF",description:"#A0A0A0",edit:{added:"#99FFE4",addedBackground:"#99FFE425",removed:"#FF8080",removedBackground:"#FF808025",lineNumber:"#615f5f"}}},yB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},wB={metadata:vB,colors:bB,config:yB},xB={id:"vesper-light",name:"Vesper",description:"Vesper",version:"1.0.0",variant:"light",tags:["light","palette"]},CB={primary:{base:"#a06535",hover:"#FFD2AD",active:"#D9A982",foreground:"#FFFFFF",muted:"#cf9c7280",emphasis:"#FFD2AD"},surface:{background:"#FFFFFF",foreground:"#101010",muted:"#F8F8F8",mutedForeground:"#6e6d6d",elevated:"#f6f5f5",elevatedForeground:"#101010",overlay:"#00000020",subtle:"#f5f3f3"},interactive:{border:"#d0cece",borderHover:"#E0E0E0",borderFocus:"#C0C0C0",selection:"#5e5b5b22",selectionForeground:"#000000",focus:"#be875b",focusRing:"#cf9c7240",cursor:"#000000",hover:"#5e5c5c22",active:"#48474722"},status:{error:"#d46868",errorForeground:"#FFFFFF",errorBackground:"#b95f5f20",errorBorder:"#b95f5f50",warning:"#cb7f40",warningForeground:"#FFFFFF",warningBackground:"#cf9c7220",warningBorder:"#cf9c7250",success:"#109b76",successForeground:"#FFFFFF",successBackground:"#99FFE420",successBorder:"#99FFE450",info:"#62bced",infoForeground:"#FFFFFF",infoBackground:"#cf9c7220",infoBorder:"#cf9c7250"},pr:{open:"#0f926f",draft:"#888787",blocked:"#bf6f2e",merged:"#9f5fc1",closed:"#c56161"},syntax:{base:{background:"#F8F8F8",foreground:"#101010",comment:"#868686",keyword:"#cf9c72",string:"#43ae91",number:"#b95f5f",function:"#cf9c72",variable:"#101010",type:"#cf9c72",operator:"#b95f5f"},tokens:{boolean:"#cf9c72",class:"#cf9c72",className:"#cf9c72",commentDoc:"#D0D0D0",constant:"#838282",decorator:"#cf9c72",enum:"#cf9c72",exception:"#b95f5f",functionCall:"#cf9c72",interface:"#cf9c72",jsxTag:"#cf9c72",key:"#cf9c72",keywordImport:"#b95f5f",label:"#b95f5f",macro:"#717070",method:"#74e8c9",module:"#b95f5f",namespace:"#cf9c72",parameter:"#101010",preprocessor:"#b95f5f",punctuation:"#717070",regex:"#67e7c5",storageModifier:"#7b7b7b",stringEscape:"#000000",struct:"#cf9c72",tag:"#cf9c72",tagAttribute:"#cf9c72",tagAttributeValue:"#6adebf",typeParameter:"#cf9c72",url:"#797878",variableGlobal:"#cf9c72",variableLocal:"#F0F0F0",variableOther:"#49dcb5",variableProperty:"#717070"},highlights:{diffAdded:"#56d8b5",diffAddedBackground:"#E8F5E8",diffModified:"#cf9c72",diffModifiedBackground:"#F0F0F0",diffRemoved:"#b95f5f",diffRemovedBackground:"#F5E8E8",lineNumber:"#D0D0D0",lineNumberActive:"#000000"}},markdown:{heading1:"#101010",heading2:"#101010",heading3:"#101010",heading4:"#101010",link:"#717070",linkHover:"#c48959",inlineCode:"#665050",inlineCodeBackground:"#f3f1f1",blockquote:"#101010",blockquoteBorder:"#E8E8E8",listMarker:"#10101099"},chat:{userMessage:"#101010",userMessageBackground:"#f4f1f1",assistantMessage:"#101010",assistantMessageBackground:"#FFFFFF",timestamp:"#717070",divider:"#E8E8E8"},tools:{background:"#F8F8F880",border:"#d0cece80",headerHover:"#E8E8E8",icon:"#717070",title:"#101010",description:"#717070",edit:{added:"#40d7af",addedBackground:"#99FFE425",removed:"#b95f5f",removedBackground:"#b95f5f25",lineNumber:"#b4b2b2"}}},SB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},kB={metadata:xB,colors:CB,config:SB},MB={id:"mono-plus-dark",name:"Mono Plus",description:"A pure monochromatic theme - dark variant with slight colors added",version:"1.0.0",variant:"dark",tags:["dark","monochrome","minimal"]},AB={primary:{base:"#a2bee8",hover:"#E5E5E5",active:"#CCCCCC",foreground:"#000000",muted:"#FFFFFF80",emphasis:"#FFFFFF"},surface:{background:"#000000",foreground:"#E5E5E5",muted:"#0A0A0A",mutedForeground:"#808080",elevated:"#141414",elevatedForeground:"#E5E5E5",overlay:"#00000080",subtle:"#1A1A1A"},interactive:{border:"#454545",borderHover:"#333333",borderFocus:"#FFFFFF",selection:"#ffffff1f",selectionForeground:"#E5E5E5",focus:"#FFFFFF",focusRing:"#FFFFFF50",cursor:"#E5E5E5",hover:"#ffffff1f",active:"#ffffff1f"},status:{error:"#9e6a6a",errorForeground:"#0a0a0a",errorBackground:"#9e6a6a20",errorBorder:"#9e6a6a50",warning:"#9e8a6a",warningForeground:"#0a0a0a",warningBackground:"#9e8a6a20",warningBorder:"#9e8a6a50",success:"#6a8e6a",successForeground:"#0a0a0a",successBackground:"#6a8e6a20",successBorder:"#6a8e6a50",info:"#6a7e9e",infoForeground:"#0a0a0a",infoBackground:"#6a7e9e20",infoBorder:"#6a7e9e50"},pr:{open:"#6a8e6a",draft:"#8c8c8c",blocked:"#9e8a6a",merged:"#bda2e8",closed:"#9e6a6a"},syntax:{base:{background:"#0a0a0a",foreground:"#d4d4d4",comment:"#8c8c8c",keyword:"#dccdbeff",string:"#b6d8e6ff",number:"#e3bdadff",function:"#a2bee8",variable:"#d4d4d4",type:"#edcbb8ff",operator:"#dccdbeff"},tokens:{commentDoc:"#8c8c8c",stringEscape:"#b6d8e6ff",keywordImport:"#dccdbeff",storageModifier:"#dccdbeff",functionCall:"#a2bee8",method:"#a2bee8",variableProperty:"#c0dcc0ff",variableOther:"#d4d4d4",class:"#edcbb8ff",className:"#edcbb8ff",interface:"#edcbb8ff",tag:"#a2bee8",boolean:"#e3bdadff",url:"#b6d8e6ff",key:"#c0dcc0ff"},highlights:{diffAdded:"#6a8e6a",diffAddedBackground:"#6a8e6a20",diffRemoved:"#9e6a6a",diffRemovedBackground:"#9e6a6a20",lineNumber:"#7c7c7c",lineNumberActive:"#d4d4d4"}},markdown:{heading1:"#FFFFFF",heading2:"#F2F2F2",heading3:"#E5E5E5",heading4:"#D9D9D9",link:"#CCCCCC",linkHover:"#a2bee8",inlineCode:"#a2bee8",inlineCodeBackground:"#1A1A1A",blockquote:"#808080",blockquoteBorder:"#333333",listMarker:"#99999999"},chat:{userMessage:"#E5E5E5",userMessageBackground:"#1A1A1A",assistantMessage:"#E5E5E5",assistantMessageBackground:"#000000",timestamp:"#808080",divider:"#333333"},tools:{background:"#0A0A0A50",border:"#4040409d",headerHover:"#33333350",icon:"#A6A6A6",title:"#E5E5E5",description:"#808080",edit:{added:"#6a8e6a",addedBackground:"#6a8e6a20",removed:"#9e6a6a",removedBackground:"#9e6a6a20",lineNumber:"#2a2a2a"}}},FB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},_B={metadata:MB,colors:AB,config:FB},BB={id:"mono-plus-light",name:"Mono Plus",description:"A pure monochromatic theme - light variant with slight colors added",version:"1.0.0",variant:"light",tags:["light","monochrome","minimal"]},DB={primary:{base:"#4a6a9e",hover:"#1A1A1A",active:"#333333",foreground:"#FFFFFF",muted:"#00000080",emphasis:"#000000"},surface:{background:"#FFFFFF",foreground:"#1A1A1A",muted:"#F5F5F5",mutedForeground:"#6f6f6f",elevated:"#FAFAFA",elevatedForeground:"#1A1A1A",overlay:"#00000020",subtle:"#F0F0F0"},interactive:{border:"#D9D9D9",borderHover:"#B3B3B3",borderFocus:"#000000",selection:"#00000015",selectionForeground:"#1A1A1A",focus:"#000000",focusRing:"#00000040",cursor:"#1A1A1A",hover:"#00000010",active:"#00000015"},status:{error:"#8a5a5a",errorForeground:"#fafafa",errorBackground:"#8a5a5a18",errorBorder:"#8a5a5a40",warning:"#8a7a5a",warningForeground:"#fafafa",warningBackground:"#8a7a5a18",warningBorder:"#8a7a5a40",success:"#5a7a5a",successForeground:"#fafafa",successBackground:"#5a7a5a18",successBorder:"#5a7a5a40",info:"#5a6a8a",infoForeground:"#fafafa",infoBackground:"#5a6a8a18",infoBorder:"#5a6a8a40"},pr:{open:"#6a8e6a",draft:"#8c8c8c",blocked:"#8a7a5a",merged:"#8769b6",closed:"#8a5a5a"},syntax:{base:{background:"#f5f5f5",foreground:"#2a2a2a",comment:"#8c8c8c",keyword:"#6a5a4a",string:"#4a6a7a",number:"#7a5a4a",function:"#4a6a9e",variable:"#2a2a2a",type:"#6a5040",operator:"#6a5a4a"},tokens:{commentDoc:"#8c8c8c",stringEscape:"#4a6a7a",keywordImport:"#6a5a4a",storageModifier:"#6a5a4a",functionCall:"#4a6a9e",method:"#4a6a9e",variableProperty:"#4a6a4a",variableOther:"#2a2a2a",class:"#6a5040",className:"#6a5040",interface:"#6a5040",tag:"#4a6a9e",boolean:"#7a5a4a",url:"#4a6a7a",key:"#4a6a4a"},highlights:{diffAdded:"#5a7a5a",diffAddedBackground:"#5a7a5a18",diffRemoved:"#8a5a5a",diffRemovedBackground:"#8a5a5a18",lineNumber:"#b0b0b0",lineNumberActive:"#2a2a2a"}},markdown:{heading1:"#000000",heading2:"#0D0D0D",heading3:"#1A1A1A",heading4:"#262626",link:"#333333",linkHover:"#4a6a9e",inlineCode:"#4a6a9e",inlineCodeBackground:"#f1f1f1",blockquote:"#808080",blockquoteBorder:"#D9D9D9",listMarker:"#66666699"},chat:{userMessage:"#1A1A1A",userMessageBackground:"#E5E5E5",assistantMessage:"#1A1A1A",assistantMessageBackground:"#FFFFFF",timestamp:"#808080",divider:"#D9D9D9"},tools:{background:"#F5F5F550",border:"#B3B3B380",headerHover:"#D9D9D9",icon:"#666666",title:"#1A1A1A",description:"#808080",edit:{added:"#5a7a5a",addedBackground:"#5a7a5a18",removed:"#8a5a5a",removedBackground:"#8a5a5a18",lineNumber:"#d0d0d0"}}},PB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},TB={metadata:BB,colors:DB,config:PB},HB={id:"mono-dark",name:"Mono",description:"A pure monochromatic theme - dark variant with shades of grey",version:"1.0.0",variant:"dark",tags:["dark","monochrome","minimal","grayscale"]},IB={primary:{base:"#FFFFFF",hover:"#E5E5E5",active:"#CCCCCC",foreground:"#000000",muted:"#FFFFFF80",emphasis:"#FFFFFF"},surface:{background:"#000000",foreground:"#E5E5E5",muted:"#0A0A0A",mutedForeground:"#808080",elevated:"#141414",elevatedForeground:"#E5E5E5",overlay:"#00000080",subtle:"#1A1A1A"},interactive:{border:"#454545",borderHover:"#333333",borderFocus:"#FFFFFF",selection:"#ffffff1f",selectionForeground:"#E5E5E5",focus:"#FFFFFF",focusRing:"#FFFFFF50",cursor:"#E5E5E5",hover:"#ffffff1f",active:"#ffffff1f"},status:{error:"#666666",errorForeground:"#000000",errorBackground:"#ffffff10",errorBorder:"#ffffff20",warning:"#999999",warningForeground:"#000000",warningBackground:"#ffffff12",warningBorder:"#ffffff25",success:"#E5E5E5",successForeground:"#000000",successBackground:"#ffffff18",successBorder:"#ffffff30",info:"#A6A6A6",infoForeground:"#000000",infoBackground:"#ffffff14",infoBorder:"#ffffff28"},pr:{open:"#E5E5E5",draft:"#B3B3B3",blocked:"#999999",merged:"#CCCCCC",closed:"#666666"},syntax:{base:{background:"#0A0A0A",foreground:"#E5E5E5",comment:"#666666",keyword:"#FFFFFF",string:"#B3B3B3",number:"#999999",function:"#E5E5E5",variable:"#CCCCCC",type:"#D9D9D9",operator:"#808080"},tokens:{commentDoc:"#595959",stringEscape:"#E5E5E5",keywordImport:"#FFFFFF",storageModifier:"#E5E5E5",functionCall:"#D9D9D9",method:"#CCCCCC",variableProperty:"#B3B3B3",variableOther:"#CCCCCC",variableGlobal:"#999999",variableLocal:"#1A1A1A",parameter:"#CCCCCC",constant:"#E5E5E5",class:"#FFFFFF",className:"#FFFFFF",interface:"#D9D9D9",struct:"#E5E5E5",enum:"#E5E5E5",typeParameter:"#D9D9D9",namespace:"#CCCCCC",module:"#B3B3B3",tag:"#E5E5E5",jsxTag:"#FFFFFF",tagAttribute:"#B3B3B3",tagAttributeValue:"#999999",boolean:"#CCCCCC",decorator:"#999999",label:"#808080",punctuation:"#666666",macro:"#D9D9D9",preprocessor:"#B3B3B3",regex:"#A6A6A6",url:"#CCCCCC",key:"#E5E5E5",exception:"#999999"},highlights:{diffAdded:"#E5E5E5",diffAddedBackground:"#ffffff18",diffRemoved:"#666666",diffRemovedBackground:"#ffffff0d",diffModified:"#B3B3B3",diffModifiedBackground:"#ffffff12",lineNumber:"#404040",lineNumberActive:"#E5E5E5"}},markdown:{heading1:"#FFFFFF",heading2:"#F2F2F2",heading3:"#E5E5E5",heading4:"#D9D9D9",link:"#CCCCCC",linkHover:"#FFFFFF",inlineCode:"#B3B3B3",inlineCodeBackground:"#1A1A1A",blockquote:"#808080",blockquoteBorder:"#333333",listMarker:"#99999999"},chat:{userMessage:"#E5E5E5",userMessageBackground:"#1A1A1A",assistantMessage:"#E5E5E5",assistantMessageBackground:"#000000",timestamp:"#808080",divider:"#333333"},tools:{background:"#0A0A0A50",border:"#4040409d",headerHover:"#33333350",icon:"#A6A6A6",title:"#E5E5E5",description:"#808080",edit:{added:"#E5E5E5",addedBackground:"#ffffff20",removed:"#666666",removedBackground:"#ffffff10",lineNumber:"#404040"}}},EB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},jB={metadata:HB,colors:IB,config:EB},LB={id:"mono-light",name:"Mono",description:"A pure monochromatic theme - light variant with shades of grey",version:"1.0.0",variant:"light",tags:["light","monochrome","minimal","grayscale"]},VB={primary:{base:"#000000",hover:"#1A1A1A",active:"#333333",foreground:"#FFFFFF",muted:"#00000080",emphasis:"#000000"},surface:{background:"#FFFFFF",foreground:"#1A1A1A",muted:"#F5F5F5",mutedForeground:"#757575",elevated:"#FAFAFA",elevatedForeground:"#1A1A1A",overlay:"#00000020",subtle:"#F0F0F0"},interactive:{border:"#D9D9D9",borderHover:"#B3B3B3",borderFocus:"#000000",selection:"#00000015",selectionForeground:"#1A1A1A",focus:"#000000",focusRing:"#00000040",cursor:"#1A1A1A",hover:"#00000010",active:"#00000015"},status:{error:"#999999",errorForeground:"#FFFFFF",errorBackground:"#00000008",errorBorder:"#00000015",warning:"#666666",warningForeground:"#FFFFFF",warningBackground:"#0000000a",warningBorder:"#00000018",success:"#1A1A1A",successForeground:"#FFFFFF",successBackground:"#00000012",successBorder:"#00000020",info:"#595959",infoForeground:"#FFFFFF",infoBackground:"#0000000c",infoBorder:"#0000001a"},pr:{open:"#1A1A1A",draft:"#4D4D4D",blocked:"#999999",merged:"#333333",closed:"#666666"},syntax:{base:{background:"#F5F5F5",foreground:"#1A1A1A",comment:"#999999",keyword:"#000000",string:"#4D4D4D",number:"#666666",function:"#1A1A1A",variable:"#333333",type:"#262626",operator:"#808080"},tokens:{commentDoc:"#ABABAB",stringEscape:"#1A1A1A",keywordImport:"#000000",storageModifier:"#1A1A1A",functionCall:"#262626",method:"#333333",variableProperty:"#4D4D4D",variableOther:"#333333",variableGlobal:"#666666",variableLocal:"#E5E5E5",parameter:"#333333",constant:"#1A1A1A",class:"#000000",className:"#000000",interface:"#262626",struct:"#1A1A1A",enum:"#1A1A1A",typeParameter:"#262626",namespace:"#333333",module:"#4D4D4D",tag:"#1A1A1A",jsxTag:"#000000",tagAttribute:"#4D4D4D",tagAttributeValue:"#666666",boolean:"#333333",decorator:"#666666",label:"#808080",punctuation:"#999999",macro:"#262626",preprocessor:"#4D4D4D",regex:"#595959",url:"#333333",key:"#1A1A1A",exception:"#666666"},highlights:{diffAdded:"#1A1A1A",diffAddedBackground:"#00000012",diffRemoved:"#999999",diffRemovedBackground:"#00000008",diffModified:"#595959",diffModifiedBackground:"#0000000c",lineNumber:"#CCCCCC",lineNumberActive:"#1A1A1A"}},markdown:{heading1:"#000000",heading2:"#0D0D0D",heading3:"#1A1A1A",heading4:"#262626",link:"#333333",linkHover:"#000000",inlineCode:"#4D4D4D",inlineCodeBackground:"#f1f1f1",blockquote:"#808080",blockquoteBorder:"#D9D9D9",listMarker:"#66666699"},chat:{userMessage:"#1A1A1A",userMessageBackground:"#E5E5E5",assistantMessage:"#1A1A1A",assistantMessageBackground:"#FFFFFF",timestamp:"#808080",divider:"#D9D9D9"},tools:{background:"#F5F5F550",border:"#B3B3B380",headerHover:"#D9D9D9",icon:"#666666",title:"#1A1A1A",description:"#808080",edit:{added:"#1A1A1A",addedBackground:"#00000015",removed:"#999999",removedBackground:"#0000000a",lineNumber:"#CCCCCC"}}},NB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},RB={metadata:LB,colors:VB,config:NB},zB={id:"vitesse-dark-dark",name:"Vitesse Dark",description:"Converted from VS Code theme",version:"1.0.0",variant:"dark",tags:["dark","converted","vscode"]},OB={primary:{base:"#4d9375",hover:"#4d9375",active:"#5cb08c",foreground:"#121212",muted:"#4d937580",emphasis:"#64bf98"},surface:{background:"#121212",foreground:"#dbd7caee",muted:"#171717",mutedForeground:"#c0beb99c",elevated:"#1a1a1a",elevatedForeground:"#dbd7caee",overlay:"#12121280",subtle:"#212020"},interactive:{border:"#393939",borderHover:"#3c3c3c",borderFocus:"#00000000",selection:"#eeeeee18",selectionForeground:"#dbd7caee",focus:"#00000000",focusRing:"#0000000050",cursor:"#CECDC3",hover:"#eeeeee14",active:"#eeeeee18"},status:{error:"#cb7676",errorForeground:"#121212",errorBackground:"#cb767620",errorBorder:"#cb767650",warning:"#d4976c",warningForeground:"#121212",warningBackground:"#d4976c20",warningBorder:"#d4976c50",success:"#4d9375",successForeground:"#121212",successBackground:"#4d937520",successBorder:"#4d937550",info:"#6394bf",infoForeground:"#121212",infoBackground:"#6394bf20",infoBorder:"#6394bf50"},pr:{open:"#4d9375",draft:"#747f74",blocked:"#d4976c",merged:"#6c43be",closed:"#cb7676"},syntax:{base:{background:"#121212",foreground:"#dbd7caee",comment:"#758575dd",keyword:"#4d9375",string:"#c98a7d",number:"#4C9A91",function:"#80a665",variable:"#bd976a",type:"#5d99a9",operator:"#cb7676"},tokens:{commentDoc:"#575653",stringEscape:"#dbd7caee",keywordImport:"#D14D41",storageModifier:"#4385BE",functionCall:"#80a665",method:"#879A39",variableProperty:"#b8a965",variableOther:"#879A39",class:"#6872ab",className:"#6872ab",interface:"#5d99a9",tag:"#4d9375",boolean:"#4d9375",url:"#c98a7d",key:"#b8a965"},highlights:{diffAdded:"#4d9375",diffAddedBackground:"#4d937520",diffRemoved:"#cb7676",diffRemovedBackground:"#cb767620",lineNumber:"#dedcd550",lineNumberActive:"#bfbaaa"}},markdown:{heading1:"#4d9375",heading2:"#4d9375",heading3:"#4d9375",heading4:"#dbd7caee",link:"#4d9375",linkHover:"#4d9375",inlineCode:"#80a665",inlineCodeBackground:"#121212",blockquote:"#dedcd550",blockquoteBorder:"#ffffff15",listMarker:"#4d937599"},chat:{userMessage:"#dbd7caee",userMessageBackground:"#252525",assistantMessage:"#dbd7caee",assistantMessageBackground:"#121212",timestamp:"#dedcd550",divider:"#ffffff15"},tools:{background:"#12121250",border:"#2d2c2c",headerHover:"#ffffff1550",icon:"#dedcd5a4",title:"#dbd7caee",description:"#dedcd550",edit:{added:"#4d9375",addedBackground:"#4d937520",removed:"#cb7676",removedBackground:"#cb767620",lineNumber:"#ffffff24"}}},$B={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},ZB={metadata:zB,colors:OB,config:$B},UB={id:"vitesse-light-light",name:"Vitesse Light",description:"Converted from VS Code theme",version:"1.0.0",variant:"light",tags:["light","converted","vscode"]},qB={primary:{base:"#1c6b48",hover:"#1c6b48",active:"#228056",foreground:"#ffffff",muted:"#1c6b4880",emphasis:"#248b5e"},surface:{background:"#ffffff",foreground:"#2c2c28",muted:"#ecebeb",mutedForeground:"#5b5c54cb",elevated:"#f7f7f7",elevatedForeground:"#393a34",overlay:"#ffffff80",subtle:"#ecebeb"},interactive:{border:"#d4d0d0",borderHover:"#cbc7c7",borderFocus:"#00000013",selection:"#22222218",selectionForeground:"#393a34",focus:"#00000000",focusRing:"#0000000050",cursor:"#CECDC3",hover:"#22222218",active:"#22222218"},status:{error:"#ab5959",errorForeground:"#ffffff",errorBackground:"#ab595920",errorBorder:"#ab595950",warning:"#a65e2b",warningForeground:"#ffffff",warningBackground:"#a65e2b20",warningBorder:"#a65e2b50",success:"#1e754f",successForeground:"#ffffff",successBackground:"#1e754f20",successBorder:"#1e754f50",info:"#296aa3",infoForeground:"#ffffff",infoBackground:"#296aa320",infoBorder:"#296aa350"},pr:{open:"#1e754f",draft:"#a0ada0",blocked:"#a65e2b",merged:"#5843be",closed:"#ab5959"},syntax:{base:{background:"#ffffff",foreground:"#393a34",comment:"#a0ada0",keyword:"#1e754f",string:"#b56959",number:"#2f798a",function:"#59873a",variable:"#b07d48",type:"#2e808f",operator:"#ab5959"},tokens:{commentDoc:"#575653",stringEscape:"#393a34",keywordImport:"#D14D41",storageModifier:"#4385BE",functionCall:"#59873a",method:"#879A39",variableProperty:"#998418",variableOther:"#879A39",class:"#5a6aa6",className:"#5a6aa6",interface:"#2e808f",tag:"#1e754f",boolean:"#1e754f",url:"#b56959",key:"#998418"},highlights:{diffAdded:"#1e754f",diffAddedBackground:"#1e754f20",diffRemoved:"#ab5959",diffRemovedBackground:"#ab595920",lineNumber:"#393a3450",lineNumberActive:"#4e4f47"}},markdown:{heading1:"#2c2c28",heading2:"#2c2c28",heading3:"#2c2c28",heading4:"#2c2c28",link:"#1e754f",linkHover:"#1c6b48",inlineCode:"#3a631e",inlineCodeBackground:"#f7f3f395",blockquote:"#2c2c2850",blockquoteBorder:"#00000015",listMarker:"#1c6b4899"},chat:{userMessage:"#2c2c28",userMessageBackground:"#f4f1f1",assistantMessage:"#393a34",assistantMessageBackground:"#ffffff",timestamp:"#393a3450",divider:"#00000015"},tools:{background:"#ffffff50",border:"#dbd7d7",headerHover:"#0000001550",icon:"#21221e86",title:"#393a34",description:"#404139b6",edit:{added:"#1e754f",addedBackground:"#1e754f20",removed:"#ab5959",removedBackground:"#ab595920",lineNumber:"#b9b6b6"}}},WB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},GB={metadata:UB,colors:qB,config:WB},KB=[Sf,kf,bF,CF,AF,DF,IF,VF,OF,qF,YF,e_,s_,l_,f_,g_,w_,k_,__,T_,j_,R_,Y_,eB,sB,lB,fB,gB,wB,kB,_B,TB,jB,RB,ZB,GB].map(t=>la(t)),YB={id:"flexoki-light",name:"Flexoki",description:"An inky color scheme for prose and code - light variant",version:"1.0.0",variant:"light",tags:["light","warm","natural","paper"]},JB={primary:{base:"#BC5215",hover:"#F9AE77",active:"#DA702C",foreground:"#FFFCF0",muted:"#BC521580",emphasis:"#F9AE77"},surface:{background:"#FFFCF0",foreground:"#100F0F",muted:"#F2F0E5",mutedForeground:"#686663",elevated:"#fdf6ec",elevatedForeground:"#100F0F",overlay:"#100F0F20",subtle:"#F6F0E6"},interactive:{border:"#DAD8CE",borderHover:"#CECDC3",borderFocus:"#BC5215",selection:"#76736f30",selectionForeground:"#100F0F",focus:"#BC5215",focusRing:"#BC521540",cursor:"#100F0F",hover:"#76736f20",active:"#76736f20"},status:{error:"#AF3029",errorForeground:"#FFFCF0",errorBackground:"#D14D4120",errorBorder:"#D14D4150",warning:"#BC5215",warningForeground:"#FFFCF0",warningBackground:"#DA702C20",warningBorder:"#DA702C50",success:"#66800B",successForeground:"#FFFCF0",successBackground:"#879A3920",successBorder:"#879A3950",info:"#205EA6",infoForeground:"#FFFCF0",infoBackground:"#4385BE20",infoBorder:"#4385BE50"},pr:{open:"#66800B",draft:"#6F6E69",blocked:"#BC5215",merged:"#5E409D",closed:"#AF3029"},syntax:{base:{background:"#F2F0E5",foreground:"#100F0F",comment:"#6F6E69",keyword:"#205EA6",string:"#24837B",number:"#5E409D",function:"#BC5215",variable:"#100F0F",type:"#AD8301",operator:"#AF3029"},tokens:{commentDoc:"#B7B5AC",stringEscape:"#100F0F",keywordImport:"#AF3029",storageModifier:"#205EA6",functionCall:"#BC5215",method:"#66800B",variableProperty:"#205EA6",variableOther:"#66800B",variableGlobal:"#A02F6F",variableLocal:"#E6E4D9",parameter:"#100F0F",constant:"#100F0F",class:"#BC5215",className:"#BC5215",interface:"#AD8301",struct:"#BC5215",enum:"#BC5215",typeParameter:"#BC5215",namespace:"#AD8301",module:"#AF3029",tag:"#205EA6",jsxTag:"#A02F6F",tagAttribute:"#AD8301",tagAttributeValue:"#24837B",boolean:"#AD8301",decorator:"#AD8301",label:"#A02F6F",punctuation:"#6F6E69",macro:"#205EA6",preprocessor:"#A02F6F",regex:"#24837B",url:"#205EA6",key:"#BC5215",exception:"#A02F6F"},highlights:{diffAdded:"#66800B",diffAddedBackground:"#879A3920",diffRemoved:"#AF3029",diffRemovedBackground:"#D14D4120",diffModified:"#205EA6",diffModifiedBackground:"#4385BE20",lineNumber:"#CECDC3",lineNumberActive:"#100F0F"}},markdown:{heading1:"#100F0F",heading2:"#100F0F",heading3:"#100F0F",heading4:"#100F0F",link:"#205EA6",linkHover:"#4385BE",inlineCode:"#24837B",inlineCodeBackground:"#F2F0E5",blockquote:"#6F6E69",blockquoteBorder:"#DAD8CE",listMarker:"#AD830199"},chat:{userMessage:"#100F0F",userMessageBackground:"#F6F0E6",assistantMessage:"#100F0F",assistantMessageBackground:"#FFFCF0",timestamp:"#6F6E69",divider:"#DAD8CE"},tools:{background:"#F2F0E550",border:"#b4b2a980",headerHover:"#DAD8CE",icon:"#6F6E69",title:"#100F0F",description:"#6F6E69",edit:{added:"#66800B",addedBackground:"#66800B25",removed:"#AF3029",removedBackground:"#AF302925",lineNumber:"#CECDC3"}}},QB={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},XB={metadata:YB,colors:JB,config:QB},eD={id:"flexoki-dark",name:"Flexoki",description:"An inky color scheme for prose and code - dark variant",version:"1.0.0",variant:"dark",tags:["dark","warm","natural","ink"]},tD={primary:{base:"#DA702C",hover:"#DA702C",active:"#F9AE77",foreground:"#151313",muted:"#DA702C80",emphasis:"#F9AE77"},surface:{background:"#151313",foreground:"#CECDC3",muted:"#1C1B1A",mutedForeground:"#807e79",elevated:"#1c1a19",elevatedForeground:"#CECDC3",overlay:"#00000080",subtle:"#1e1d1c"},interactive:{border:"#343331",borderHover:"#403E3C",borderFocus:"#DA702C",selection:"#f4f4f41f",selectionForeground:"#CECDC3",focus:"#DA702C",focusRing:"#DA702C50",cursor:"#CECDC3",hover:"#ffffff18",active:"#ffffff1f"},status:{error:"#D14D41",errorForeground:"#151313",errorBackground:"#AF302920",errorBorder:"#AF302950",warning:"#DA702C",warningForeground:"#151313",warningBackground:"#BC521520",warningBorder:"#BC521550",success:"#A0AF54",successForeground:"#151313",successBackground:"#66800B20",successBorder:"#66800B50",info:"#4385BE",infoForeground:"#151313",infoBackground:"#205EA620",infoBorder:"#205EA650"},pr:{open:"#A0AF54",draft:"#878580",blocked:"#DA702C",merged:"#8B7EC8",closed:"#D14D41"},syntax:{base:{background:"#1C1B1A",foreground:"#CECDC3",comment:"#878580",keyword:"#4385BE",string:"#3AA99F",number:"#8B7EC8",function:"#DA702C",variable:"#CECDC3",type:"#D0A215",operator:"#D14D41"},tokens:{commentDoc:"#575653",stringEscape:"#CECDC3",keywordImport:"#D14D41",storageModifier:"#4385BE",functionCall:"#DA702C",method:"#879A39",variableProperty:"#4385BE",variableOther:"#879A39",variableGlobal:"#CE5D97",variableLocal:"#282726",parameter:"#CECDC3",constant:"#CECDC3",class:"#DA702C",className:"#DA702C",interface:"#D0A215",struct:"#DA702C",enum:"#DA702C",typeParameter:"#DA702C",namespace:"#D0A215",module:"#D14D41",tag:"#4385BE",jsxTag:"#CE5D97",tagAttribute:"#D0A215",tagAttributeValue:"#3AA99F",boolean:"#D0A215",decorator:"#D0A215",label:"#CE5D97",punctuation:"#878580",macro:"#4385BE",preprocessor:"#CE5D97",regex:"#3AA99F",url:"#4385BE",key:"#DA702C",exception:"#CE5D97"},highlights:{diffAdded:"#879A39",diffAddedBackground:"#66800B20",diffRemoved:"#D14D41",diffRemovedBackground:"#AF302920",diffModified:"#4385BE",diffModifiedBackground:"#205EA620",lineNumber:"#403E3C",lineNumberActive:"#CECDC3"}},markdown:{heading1:"#fbf9e6",heading2:"#e6e4d2",heading3:"#CECDC3",heading4:"#CECDC3",link:"#4385BE",linkHover:"#205EA6",inlineCode:"#A0AF53",inlineCodeBackground:"#1C1B1A",blockquote:"#878580",blockquoteBorder:"#343331",listMarker:"#D0A21599"},chat:{userMessage:"#CECDC3",userMessageBackground:"#27180E",assistantMessage:"#CECDC3",assistantMessageBackground:"#151313",timestamp:"#878580",divider:"#343331"},tools:{background:"#1C1B1A50",border:"#42403e9d",headerHover:"#34333150",icon:"#aca7a1",title:"#CECDC3",description:"#878580",edit:{added:"#879A39",addedBackground:"#66800B25",removed:"#D14D41",removedBackground:"#AF302925",lineNumber:"#403E3C"}}},oD={fonts:{sans:'"IBM Plex Mono", monospace',mono:'"IBM Plex Mono", monospace',heading:'"IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},nD={metadata:eD,colors:tD,config:oD},Mf=la(XB),sD=la(nD),rD=la(kf),iD=la(Sf),Af="flexoki-light",Ff="flexoki-dark",z2=[rD,iD,Mf,sD,...KB.filter(t=>t.metadata.id!=="vinci-light"&&t.metadata.id!=="vinci-dark")];function kc(t){const e=t==="app-light"?"flexoki-light":t==="app-dark"?"flexoki-dark":t;return z2.find(o=>o.metadata.id===e)}function Mc(t){const e=t?"dark":"light",n=kc(t?Ff:Af);return n&&n.metadata.variant===e?n:z2.find(s=>s.metadata.variant===e)??z2[0]??Mf}const E5="vinci:chunk-import-reload",aD=250,lD=3e4,cD=[/Importing a module script failed/i,/Failed to fetch dynamically imported module/i,/error loading dynamically imported module/i,/Loading chunk \S+ failed/i,/ChunkLoadError/i];function _f(t){if(t instanceof Error)return`${t.name}
|
|
6834
6834
|
${t.message}
|
|
6835
|
-
${t.stack??""}`;if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function j5(t){const e=_f(t);return cD.some(o=>o.test(e))}function dD(t){return`1.0.1:${_f(t).slice(0,500)}`}function uD(t){if(typeof window>"u")return;const e=Date.now(),o=dD(t);let n=null;try{const r=window.sessionStorage.getItem(E5);if(r)try{n=JSON.parse(r)}catch{n=null}}catch{return}const s=typeof n?.timestamp=="number"?n.timestamp:0;if(!(n?.signature===o&&e-s<lD)){try{window.sessionStorage.setItem(E5,JSON.stringify({signature:o,timestamp:e}))}catch{return}window.setTimeout(()=>{window.location.reload()},0)}}async function fD(t,e={}){const o=e.retries??1;let n;for(let s=0;s<=o;s+=1)try{return await t()}catch(r){if(n=r,!j5(r)||s>=o)break;await new Promise(i=>setTimeout(i,aD*(s+1)))}throw j5(n)&&uD(n),n}const T4=t=>ie.lazy(()=>fD(t)),mD=T4(()=>zt(()=>import("./MarkdownRendererImpl-Dnzxw6uY.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.MarkdownRenderer}))),hD=T4(()=>zt(()=>import("./MarkdownRendererImpl-Dnzxw6uY.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.SimpleMarkdownRenderer}))),Bf=a.jsx("div",{className:"break-words w-full min-w-0"}),Ac=t=>{const e=de.c(2);let o;return e[0]!==t?(o=a.jsx(g.Suspense,{fallback:Bf,children:a.jsx(mD,{...t})}),e[0]=t,e[1]=o):o=e[1],o},ca=t=>{const e=de.c(2);let o;return e[0]!==t?(o=a.jsx(g.Suspense,{fallback:Bf,children:a.jsx(hD,{...t})}),e[0]=t,e[1]=o):o=e[1],o},pl=new Set,gl=new Set,vl=new Set,bl=new Set,H4={onDeleteRequest(t){return pl.add(t),()=>{pl.delete(t)}},requestDelete(t){!t.sessions.length&&t.mode!=="worktree"||pl.forEach(e=>e(t))},onCreateRequest(t){return gl.add(t),()=>{gl.delete(t)}},requestCreate(t){const e=t??{};gl.forEach(o=>o(e))},onDirectoryRequest(t){return vl.add(t),()=>{vl.delete(t)}},requestDirectoryDialog(){vl.forEach(t=>t())},onGitRefreshHint(t){return bl.add(t),()=>{bl.delete(t)}},requestGitRefresh(t){t.directory.trim()&&bl.forEach(e=>e(t))}},pD=(t,e)=>{const o=de.c(4),n=e===void 0?200:e,[s,r]=ie.useState(t);let i,l;return o[0]!==n||o[1]!==t?(i=()=>{const c=window.setTimeout(()=>{r(t)},n);return()=>{window.clearTimeout(c)}},l=[t,n],o[0]=n,o[1]=t,o[2]=i,o[3]=l):(i=o[2],l=o[3]),ie.useEffect(i,l),s},$o=t=>{if(!t)return"";const e=t.replace(/\\/g,"/"),o=e.startsWith("//");let n=e.replace(/\/+/g,"/");o&&!n.startsWith("//")&&(n=`/${n}`);const s=n==="/",r=/^[A-Za-z]:\/$/.test(n);return!s&&!r&&(n=n.replace(/\/+$/,"")),n},gi=t=>/^[A-Za-z]:\//.test(t)?t.toLowerCase():t,Ks=(t,e)=>{const o=$o(e),n=$o(t);if(!o||!n)return!1;const s=gi(o),r=gi(n);return r===s||r.startsWith(`${s}/`)},gD=t=>{if(!t||typeof t!="object")return{};const e=t,o={};for(const[n,s]of Object.entries(e)){const r=$o(n);if(!r||!s||typeof s!="object")continue;const i=s,l=Array.isArray(i.openPaths)?Array.from(new Set(i.openPaths.filter(h=>typeof h=="string").map(h=>$o(h)).filter(h=>Ks(h,r)))):[],c=Array.isArray(i.expandedPaths)?Array.from(new Set(i.expandedPaths.filter(h=>typeof h=="string").map(h=>$o(h)).filter(h=>Ks(h,r)))):[],d=typeof i.selectedPath=="string"?$o(i.selectedPath):null,u=d&&Ks(d,r)?d:l[0]??null,f=typeof i.touchedAt=="number"&&Number.isFinite(i.touchedAt)?i.touchedAt:Date.now(),m=o[r];if(m){const h=Array.from(new Set([...m.openPaths,...l])),p=Array.from(new Set([...m.expandedPaths,...c])),v=m.selectedPath??u??h[0]??null;o[r]={openPaths:h,selectedPath:v,expandedPaths:p,touchedAt:Math.max(m.touchedAt,f)};continue}o[r]={openPaths:l,selectedPath:u,expandedPaths:c,touchedAt:f}}return o},kr=(t,e)=>{const o=Object.entries(t);if(o.length<=e)return t;o.sort((s,r)=>(r[1]?.touchedAt??0)-(s[1]?.touchedAt??0));const n={};for(const[s,r]of o.slice(0,e))n[s]=r;return n},l1=t=>t?{...t,touchedAt:Date.now()}:{openPaths:[],selectedPath:null,expandedPaths:[],touchedAt:Date.now()},vD=uo()(an($n((t,e)=>({byRoot:{},addOpenPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l),d=c.openPaths.includes(r),u=d?c.openPaths:[...c.openPaths,r],f=c.selectedPath??r;if(l&&d&&l.selectedPath===f)return i;const m={...i.byRoot,[s]:{...c,openPaths:u,selectedPath:f}};return{byRoot:kr(m,20)}})},removeOpenPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||t(i=>{const l=i.byRoot[s];if(!l)return i;const c=gi(r),d=p=>gi(p)===c,u=l.selectedPath?d(l.selectedPath):!1;if(!l.openPaths.some(d)&&!u)return i;const f=l.openPaths.filter(p=>!d(p)),m=u?f[0]??null:l.selectedPath,h={...i.byRoot,[s]:{...l,openPaths:f,selectedPath:m,touchedAt:Date.now()}};return{byRoot:kr(h,20)}})},removeOpenPathsByPrefix:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||t(i=>{const l=i.byRoot[s];if(!l)return i;const c=gi(r),d=c.endsWith("/")?c:`${c}/`,u=p=>{const v=gi(p);return v===c||v.startsWith(d)},f=l.openPaths.filter(p=>!u(p));if(f.length===l.openPaths.length)return i;const m=l.selectedPath&&u(l.selectedPath)?f[0]??null:l.selectedPath,h={...i.byRoot,[s]:{...l,openPaths:f,selectedPath:m,touchedAt:Date.now()}};return{byRoot:kr(h,20)}})},setSelectedPath:(o,n)=>{const s=$o((o||"").trim()),r=n?$o(n.trim()):null;!s||r&&!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l),d=r&&!c.openPaths.includes(r)?[...c.openPaths,r]:c.openPaths;if(l&&l.selectedPath===r&&d===l.openPaths)return i;const u={...i.byRoot,[s]:{...c,openPaths:d,selectedPath:r}};return{byRoot:kr(u,20)}})},ensureSelectedPath:o=>{const n=$o((o||"").trim());if(!n)return;const s=e().byRoot[n];if(!s||s.selectedPath)return;const r=s.openPaths[0]??null;r&&e().setSelectedPath(n,r)},toggleExpandedPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l),u=c.expandedPaths.includes(r)?c.expandedPaths.filter(m=>m!==r):[...c.expandedPaths,r];if(l&&l.expandedPaths===u&&l.selectedPath===c.selectedPath&&l.openPaths===c.openPaths)return i;const f={...i.byRoot,[s]:{...c,expandedPaths:u}};return{byRoot:kr(f,20)}})},expandPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l);if(c.expandedPaths.includes(r)&&l)return i;const u={...i.byRoot,[s]:{...c,expandedPaths:[...c.expandedPaths,r]}};return{byRoot:kr(u,20)}})},expandPaths:(o,n)=>{const s=$o((o||"").trim());if(!s||!n||n.length===0)return;const r=n.map(i=>$o((i||"").trim())).filter(i=>i&&Ks(i,s));r.length!==0&&t(i=>{const l=i.byRoot[s],c=l1(l),d=new Set(c.expandedPaths),u=r.filter(m=>!d.has(m));if(u.length===0)return i;const f={...i.byRoot,[s]:{...c,expandedPaths:[...c.expandedPaths,...u]}};return{byRoot:kr(f,20)}})}}),{name:"files-view-tabs-store",version:2,storage:Zn(()=>Uo()),migrate:t=>{if(!t||typeof t!="object")return{byRoot:{}};const e=t.byRoot;return{byRoot:gD(e)}},partialize:t=>({byRoot:t.byRoot})}),{name:"files-view-tabs-store"})),bD=t=>{const e=de.c(12),{mode:o,onModeChange:n,className:s}=t;let r;e[0]!==o||e[1]!==n?(r=f=>{f.stopPropagation(),n(o==="side-by-side"?"unified":"side-by-side")},e[0]=o,e[1]=n,e[2]=r):r=e[2];const i=r;let l;e[3]!==s?(l=U("h-5 w-5 p-0 opacity-60 hover:opacity-100",s),e[3]=s,e[4]=l):l=e[4];const c=o==="side-by-side"?"Switch to unified view":"Switch to side-by-side view";let d;e[5]!==o?(d=o==="side-by-side"?a.jsx(G,{name:"align-justify",className:"h-3 w-3"}):a.jsx(G,{name:"layout-column",className:"h-3 w-3"}),e[5]=o,e[6]=d):d=e[6];let u;return e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==d?(u=a.jsx(yt,{size:"sm",variant:"ghost",className:l,onClick:i,title:c,children:d}),e[7]=i,e[8]=l,e[9]=c,e[10]=d,e[11]=u):u=e[11],u},yD={maxDepth:50,maxNodes:1e5,initiallyExpandedDepth:2};function wD(t){return t===null?"null":Array.isArray(t)?"array":typeof t=="object"?"object":typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":"null"}function xD(t){if(t.length===0)return"root";let e="root";for(const o of t)/^\d+$/.test(o)?e+=`[${o}]`:e+=`.${o}`;return e}let Fc=0;function Df(t,e,o,n,s){if(Fc>=s.maxNodes)return null;Fc++;const r=wD(t),i=xD(o),l=r==="object"||r==="array",c={id:i,key:e,value:t,type:r,depth:n,path:o,isExpandable:l};if(l&&n<s.maxDepth){const d=r==="array"?t.map((u,f)=>[String(f),u]):Object.entries(t);c.childCount=d.length,c.children=[];for(const[u,f]of d){const m=[...o,u],h=Df(f,u,m,n+1,s);h&&c.children.push(h)}}else l&&(c.childCount=r==="array"?t.length:Object.keys(t).length);return c}function CD(t,e){const o={...yD,...e};Fc=0;try{const n=t.trim();if(!n)return null;const s=JSON.parse(n);return Df(s,"root",[],0,o)}catch{return null}}function SD(t,e){if(!t)return[];const o=[];function n(s){const r=!e.has(s.id);if(o.push({node:s,isExpanded:r}),s.isExpandable&&r&&s.children)for(const i of s.children)n(i)}return n(t),o}function kD(t){if(!t)return[];const e=[];function o(n){if(n.isExpandable&&(e.push(n.id),n.children))for(const s of n.children)o(s)}return o(t),e}function MD(t,e){if(!t)return[];const o=[];function n(s){if(s.isExpandable&&s.depth>=e&&o.push(s.id),s.children)for(const r of s.children)n(r)}return n(t),o}const L5=["var(--syntax-key)","color-mix(in oklch, var(--syntax-key) 85%, var(--syntax-string))","color-mix(in oklch, var(--syntax-key) 70%, var(--syntax-number))","color-mix(in oklch, var(--syntax-key) 55%, var(--syntax-function))","color-mix(in oklch, var(--syntax-key) 40%, var(--syntax-type))","color-mix(in oklch, var(--syntax-key) 30%, var(--syntax-keyword))"];function AD(t){return L5[t%L5.length]}function FD(t){switch(t.type){case"string":return"var(--syntax-string)";case"number":return"var(--syntax-number)";case"boolean":return"var(--syntax-keyword)";case"null":return"var(--syntax-comment)";default:return"var(--surface-foreground)"}}function _c(t){switch(t.type){case"string":{const e=t.value;return e.length>60?`"${e.slice(0,57)}..."`:`"${e}"`}case"number":case"boolean":return String(t.value);case"null":return"null";case"object":return`{${t.childCount??0} ${t.childCount===1?"item":"items"}}`;case"array":return`[${t.childCount??0}]`;default:return String(t.value)}}function _D(t){if(t.type==="object"){const e=t.children?.map(n=>n.key).slice(0,3)??[],o=(t.childCount??0)>3?", ...":"";return`{ ${e.map(n=>`"${n}": ...`).join(", ")}${o} }`}if(t.type==="array"){const e=t.childCount??0;return e<=3?`[${t.children?.map(n=>_c(n)).join(", ")??""}]`:`[${e} items]`}return _c(t)}const Bc=g.memo(t=>{const e=de.c(29),{flatNode:o,onToggle:n,onCopyPath:s}=t,{node:r,isExpanded:i}=o,l=r.depth*20;let c;e[0]!==r.id||e[1]!==n?(c=()=>{n(r.id)},e[0]=r.id,e[1]=n,e[2]=c):c=e[2];const d=c;let u;e[3]!==r.id||e[4]!==s?(u=k=>{s&&(k.preventDefault(),s(r.id))},e[3]=r.id,e[4]=s,e[5]=u):u=e[5];const f=u;let m;e[6]!==r.depth?(m=AD(r.depth),e[6]=r.depth,e[7]=m):m=e[7];const h=m;let p;e[8]!==r?(p=FD(r),e[8]=r,e[9]=p):p=e[9];const v=p,b=r.isExpandable&&r.children&&r.children.length>0,y=`${l+8}px`;let w;e[10]!==y?(w={paddingLeft:y},e[10]=y,e[11]=w):w=e[11];let S;e[12]!==d||e[13]!==b||e[14]!==i?(S=b?a.jsx("button",{type:"button",onClick:d,className:"mr-1 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm hover:bg-[var(--interactive-hover)] text-muted-foreground",children:i?a.jsx(G,{name:"arrow-down-s",className:"h-3 w-3"}):a.jsx(G,{name:"arrow-right-s",className:"h-3 w-3"})}):a.jsx("span",{className:"mr-1 w-4"}),e[12]=d,e[13]=b,e[14]=i,e[15]=S):S=e[15];let C;e[16]!==h||e[17]!==r.key?(C=r.key!=="root"&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"mr-1 font-semibold",style:{color:h},children:/^\d+$/.test(r.key)?r.key:`"${r.key}"`}),a.jsx("span",{className:"mr-1 text-[var(--surface-foreground)]",children:":"})]}),e[16]=h,e[17]=r.key,e[18]=C):C=e[18];let x;e[19]!==i||e[20]!==r||e[21]!==v?(x=r.isExpandable?i?a.jsx("span",{className:"text-[var(--surface-foreground)]",children:r.type==="object"?"{":"["}):a.jsx("span",{style:{color:"var(--surface-mutedForeground)"},children:_D(r)}):a.jsx("span",{style:{color:v},children:_c(r)}),e[19]=i,e[20]=r,e[21]=v,e[22]=x):x=e[22];let _;return e[23]!==f||e[24]!==w||e[25]!==S||e[26]!==C||e[27]!==x?(_=a.jsxs("div",{className:"flex items-center py-0.5 px-2 hover:bg-[var(--surface-hover)] rounded-sm cursor-default font-mono text-xs leading-5 whitespace-nowrap",style:w,onContextMenu:f,children:[S,C,x]}),e[23]=f,e[24]=w,e[25]=S,e[26]=C,e[27]=x,e[28]=_):_=e[28],_});Bc.displayName="JsonRow";const BD=200,DD=22,PD=g.forwardRef(function({data:e,className:o,maxHeight:n="100%",initiallyExpandedDepth:s=2,onCopyPath:r},i){const l=g.useMemo(()=>{try{return JSON.stringify(e)}catch{return null}},[e]),c=g.useMemo(()=>l?CD(l):null,[l]),[d,u]=g.useState(()=>c?new Set(MD(c,s)):new Set),f=g.useMemo(()=>SD(c,d),[c,d]),m=f.length>BD,h=g.useRef(null),p=O8({count:f.length,getScrollElement:()=>h.current,estimateSize:()=>DD,overscan:20,enabled:m}),v=g.useCallback(w=>{u(S=>{const C=new Set(S);return C.has(w)?C.delete(w):C.add(w),C})},[]),b=g.useCallback(()=>{u(new Set)},[]),y=g.useCallback(()=>{c&&u(new Set(kD(c)))},[c]);return g.useImperativeHandle(i,()=>({expandAll:b,collapseAll:y}),[b,y]),c?m?a.jsx("div",{ref:h,className:o,style:{maxHeight:n,overflow:"auto"},children:a.jsx("div",{style:{height:`${p.getTotalSize()}px`,width:"100%",position:"relative"},children:p.getVirtualItems().map(w=>{const S=f[w.index];return S?a.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${w.size}px`,transform:`translateY(${w.start}px)`},children:a.jsx(Bc,{flatNode:S,onToggle:v,onCopyPath:r})},S.node.id):null})})}):a.jsx("div",{ref:h,className:o,style:{maxHeight:n,overflow:"auto"},children:f.map(w=>a.jsx(Bc,{flatNode:w,onToggle:v,onCopyPath:r},w.node.id))}):null});function Pf(t){const e=t.colors.syntax,o=t.colors.surface;return{'code[class*="language-"]':{color:e.base.foreground,background:"transparent",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:e.base.foreground,background:"transparent",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"0",margin:"0",overflow:"auto"},comment:{color:e.base.comment,fontStyle:"italic"},prolog:{color:e.base.comment},doctype:{color:e.base.comment},cdata:{color:e.base.comment},punctuation:{color:e.tokens?.punctuation||o.mutedForeground},property:{color:e.tokens?.variableProperty||e.base.variable},tag:{color:e.tokens?.tag||e.base.keyword},"attr-name":{color:e.tokens?.tagAttribute||e.base.variable},"attr-value":{color:e.tokens?.tagAttributeValue||e.base.string},boolean:{color:e.tokens?.boolean||e.base.number},number:{color:e.base.number},constant:{color:e.tokens?.constant||e.base.number},symbol:{color:e.tokens?.constant||e.base.number},string:{color:e.base.string},char:{color:e.base.string},function:{color:e.base.function},builtin:{color:e.tokens?.functionBuiltin||e.base.function},"class-name":{color:e.tokens?.className||e.base.type},namespace:{color:e.tokens?.namespace||e.base.type,opacity:.8},keyword:{color:e.base.keyword},atrule:{color:e.base.keyword},selector:{color:e.base.function},operator:{color:e.base.operator},variable:{color:e.base.variable},regex:{color:e.tokens?.regex||e.base.string},url:{color:e.base.function,textDecoration:"underline"},entity:{color:e.base.function,cursor:"help"},".language-css .token.string":{color:e.base.string},".style .token.string":{color:e.base.string},deleted:{color:t.colors.status.error,backgroundColor:t.colors.status.errorBackground},inserted:{color:t.colors.status.success,backgroundColor:t.colors.status.successBackground},title:{color:t.colors.primary.base,fontWeight:"bold"},"code-block":{color:e.base.string},"code-snippet":{color:e.base.string},list:{color:e.base.variable},hr:{color:o.mutedForeground},table:{color:e.base.function},blockquote:{color:o.mutedForeground,fontStyle:"italic"},important:{color:e.base.keyword,fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},strike:{textDecoration:"line-through"},decorator:{color:e.tokens?.decorator||e.base.function},annotation:{color:e.tokens?.decorator||e.base.function}}}const Dc=t=>{const e=t,o=e?.clientRole,n=e?.role;return e?.userMessageMarker===!0||o==="user"||n==="user"||e?.origin==="user"||e?.source==="user"?{role:"user",isUser:!0}:{role:o||n||"assistant",isUser:!1}},Tf=t=>{const e=de.c(8),{className:o,width:n,height:s}=t,r=o===void 0?"":o,i=n===void 0?70:n,l=s===void 0?70:s;let c;e[0]!==l||e[1]!==i?(c={maxWidth:i,maxHeight:l},e[0]=l,e[1]=i,e[2]=c):c=e[2];let d;return e[3]!==r||e[4]!==l||e[5]!==c||e[6]!==i?(d=a.jsx("img",{src:"/logo-dark-512x512.svg",alt:"Vinci",width:i,height:l,className:r,style:c}),e[3]=r,e[4]=l,e[5]=c,e[6]=i,e[7]=d):d=e[7],d},da=()=>typeof window<"u"&&!!window.__APP_ELECTRON__,TD=()=>{if(typeof window>"u")return null;const t=window.__TAURI__;return typeof t?.core?.invoke=="function"?t.core.invoke:null},ua=async(t,e)=>{const o=TD();if(!o)throw new Error("Desktop runtime is not available");return o(t,e)},dZ=async()=>{if(hn())try{if(da()){await ua("desktop_start_window_drag");return}const{getCurrentWindow:t}=await zt(async()=>{const{getCurrentWindow:e}=await import("./vendor-.bun-B9l0ZNi2.js").then(o=>o.bM);return{getCurrentWindow:e}},__vite__mapDeps([0,1]));await t().startDragging()}catch{}},uZ=async()=>{if(!hn())return!1;try{if(!da()){const{getCurrentWindow:t}=await zt(async()=>{const{getCurrentWindow:e}=await import("./vendor-.bun-B9l0ZNi2.js").then(o=>o.bM);return{getCurrentWindow:e}},__vite__mapDeps([0,1]));return await t().isFullscreen()}return!!await ua("desktop_is_window_fullscreen")}catch{return!1}},fZ=t=>typeof window>"u"?()=>{}:(window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)),HD=async t=>{if(hn())try{if(!da()){const{getCurrentWindow:e}=await zt(async()=>{const{getCurrentWindow:o}=await import("./vendor-.bun-B9l0ZNi2.js").then(n=>n.bM);return{getCurrentWindow:o}},__vite__mapDeps([0,1]));await e().setTitle(t);return}await ua("desktop_set_window_title",{title:t})}catch{}},ID=async(t,e)=>{if(hn())try{if(!da()){const{invoke:o}=await zt(async()=>{const{invoke:n}=await import("./vendor-.bun-B9l0ZNi2.js").then(s=>s.aK);return{invoke:n}},__vite__mapDeps([0,1]));await o("desktop_set_window_theme",{themeMode:t,themeVariant:e});return}await ua("desktop_set_window_theme",{themeMode:t,themeVariant:e})}catch{}},mZ=async()=>{if(!hn())return null;try{if(!da()){const{getVersion:e}=await zt(async()=>{const{getVersion:o}=await import("./vendor-.bun-B9l0ZNi2.js").then(n=>n.aA);return{getVersion:o}},__vite__mapDeps([0,1]));return await e()}const t=await ua("desktop_get_app_version");return typeof t=="string"&&t.trim().length>0?t:null}catch{return null}},ED=["concise","detailed","mentor","pushback","noFiller","matchEnergy","warmPeer"],jD=t=>typeof t=="string"&&ED.includes(t),LD=t=>{switch(t){case"concise":return"Keep replies short. Answer first, no preamble or recap of the question. Write like you're texting a colleague who already has the context — plain sentences, not headings or bullets. Reach for a list only when the content is genuinely a list; never use one to look organised.";case"detailed":return"Take the space you need to actually explain things. Walk through what's going on, why it matters, and where the real tradeoffs are. Prefer flowing prose over bullet points and headings — structure the answer with paragraphs and let the reasoning carry it. Lists are fine when something really is enumerable, but don't fragment a normal explanation into bullets.";case"mentor":return"Talk like a patient senior engineer pairing with someone less experienced. Explain the underlying idea before the answer, think out loud about how you'd approach it, and drop in a small concrete example when it actually helps. Keep it conversational — no lecture format, no checklists, no numbered steps unless the task literally is a sequence.";case"pushback":return"Don't agree automatically. If something I say sounds off — a wrong assumption, a flawed approach, a request that won't actually do what I think it will — push back first. Explain what you disagree with and why, and only proceed once I've responded. Disagreement is welcome; sycophancy is not. Don't soften it with 'you might want to consider' — just say it.";case"noFiller":return"Cut the filler. No 'Great question', no 'Certainly', no 'I'll help you with that', no restating what I just asked. No closing summary of what you did when the diff or output already shows it. No trailing 'let me know if you need anything else'. Open with the actual content and stop when you're done.";case"matchEnergy":return"Mirror the size and register of my message. A one-line question gets a one-line answer. A casual aside gets a casual reply, not a structured breakdown. If I write three words, don't respond with three paragraphs. Match the tone too — informal stays informal, technical stays technical. Don't inflate small asks into full essays.";case"warmPeer":return"Talk like a colleague, not an assistant. First person is fine and encouraged — 'I'd do this', 'I don't love that approach', 'that was sloppy of me'. Have actual opinions and share them. Push back when you disagree. Admit when you screwed up without grovelling. Skip the corporate helpfulness and performative politeness — just be a person."}},VD=({enabled:t,preset:e,customInstructions:o})=>t?e==="custom"?(typeof o=="string"?o.trim():"")||null:jD(e)?LD(e):null:null,ND=async()=>{const t=await fetch("/api/config/settings",{method:"GET",headers:{Accept:"application/json"}});if(!t.ok)return null;const e=await t.json().catch(()=>null);return e?VD({enabled:e.responseStyleEnabled===!0,preset:e.responseStylePreset,customInstructions:e.responseStyleCustomInstructions}):null},RD=g.memo(function(e){const o=de.c(24),{checked:n,onChange:s,disabled:r,ariaLabel:i,className:l,iconClassName:c}=e,d=r===void 0?!1:r;let u;o[0]!==n||o[1]!==d||o[2]!==s?(u=C=>{C.preventDefault(),C.stopPropagation(),!d&&!n&&s()},o[0]=n,o[1]=d,o[2]=s,o[3]=u):u=o[3];const f=u;let m;o[4]!==n||o[5]!==d||o[6]!==s?(m=C=>{(C.key===" "||C.key==="Enter")&&(C.preventDefault(),!d&&!n&&s())},o[4]=n,o[5]=d,o[6]=s,o[7]=m):m=o[7];const h=m,p=n?"bg-[color-mix(in_srgb,var(--primary-base)_80%,transparent)] shadow-none hover:bg-[var(--primary-base)]":"bg-[var(--surface-muted)] shadow-[inset_0_0_0_1px_var(--interactive-border)] hover:bg-[var(--interactive-hover)]";let v;o[8]!==l||o[9]!==p?(v=U("group/radio relative flex h-[14px] w-[14px] min-h-[14px] min-w-[14px] shrink-0 self-center items-center justify-center rounded-full outline-none","transition-[background-color,box-shadow] duration-200 ease-out",p,"focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] focus-visible:ring-offset-1 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50",l),o[8]=l,o[9]=p,o[10]=v):v=o[10];const b=!n&&"opacity-0";let y;o[11]!==c||o[12]!==b?(y=U("block h-[5px] w-[5px] rounded-full bg-white",b,c),o[11]=c,o[12]=b,o[13]=y):y=o[13];let w;o[14]!==y?(w=a.jsx("span",{"aria-hidden":!0,className:y}),o[14]=y,o[15]=w):w=o[15];let S;return o[16]!==i||o[17]!==n||o[18]!==d||o[19]!==f||o[20]!==h||o[21]!==v||o[22]!==w?(S=a.jsx("button",{type:"button",role:"radio",onClick:f,onKeyDown:h,disabled:d,"aria-checked":n,"aria-label":i,className:v,children:w}),o[16]=i,o[17]=n,o[18]=d,o[19]=f,o[20]=h,o[21]=v,o[22]=w,o[23]=S):S=o[23],S}),zD=["standalone","minimal-ui","fullscreen","window-controls-overlay"],V5="vinci.pwaRecentSessions",OD=t=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(`(display-mode: ${t})`).matches,hZ=()=>typeof window>"u"?"browser":typeof document<"u"&&document.referrer.startsWith("android-app://")?"twa":window.navigator.standalone?"standalone":zD.find(o=>OD(o))??"browser",$D=1440*60*1e3,Hf=5,N5=1440*60*1e3,yl=t=>t.time?.updated??t.time?.created??0,R5=({sessions:t,currentSessionId:e,cutoffDays:o,keepRecent:n=Hf,now:s=Date.now()})=>{if(!Array.isArray(t)||o<=0)return[];const r=s-o*$D,i=[...t].sort((c,d)=>yl(d)-yl(c)),l=new Set(i.slice(0,n).map(c=>c.id));return i.filter(c=>{if(!c?.id||l.has(c.id)||c.id===e||c.share)return!1;const d=yl(c);return d?d<r:!1}).map(c=>c.id)},ZD=t=>{const e=typeof t=="object"?t:void 0,o=e?.autoRun!==!1,n=typeof t=="boolean"?t:e?.enabled??!0,s=Te(w=>w.currentSessionId),r=Te(w=>w.isLoading),i=yn(w=>w.activeSessions),l=yn(w=>w.hasLoaded),c=Me(w=>w.autoDeleteEnabled),d=Me(w=>w.autoDeleteAfterDays),u=Me(w=>w.sessionRetentionAction),f=Me(w=>w.autoDeleteLastRunAt),m=Me(w=>w.setAutoDeleteLastRunAt),[h,p]=g.useState(!1),v=g.useRef(!1);g.useEffect(()=>{Pd(ir())},[]);const b=g.useMemo(()=>d<=0?[]:R5({sessions:i,currentSessionId:s,cutoffDays:d}),[d,s,i]),y=g.useCallback(async({force:w=!1}={})=>{if(v.current)return{completedIds:[],failedIds:[],action:u,skippedReason:"running"};if((!c||d<=0)&&!w)return{completedIds:[],failedIds:[],action:u,skippedReason:"disabled"};if(r)return{completedIds:[],failedIds:[],action:u,skippedReason:"loading"};const S=Date.now();if(!w&&f&&S-f<N5)return{completedIds:[],failedIds:[],action:u,skippedReason:"cooldown"};const{activeSessions:C}=await Pd(ir());if(C.length===0)return{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};const x=R5({sessions:C,currentSessionId:s,cutoffDays:d,now:S});if(x.length===0)return m(S),{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};v.current=!0,p(!0);try{const _=new Map(C.map(F=>[F.id,F])),k=[],D=[];for(const F of x){const A=_.get(F),B=A?rr(A):null;if(!B){D.push(F);continue}const M=it.getScopedSdkClient(B);try{u==="archive"?await M.session.update({sessionID:F,directory:B,time:{archived:Date.now()}}):await M.session.delete({sessionID:F,directory:B}),k.push(F)}catch{D.push(F)}}return u==="archive"?yn.getState().archiveSessions(k):yn.getState().removeSessions(k),{completedIds:k,failedIds:D,action:u}}finally{v.current=!1,p(!1),m(Date.now())}},[d,c,f,s,r,u,m]);return g.useEffect(()=>{if(!n||!o||!c||d<=0||r||!l||i.length===0)return;const w=Date.now();f&&w-f<N5||y()},[d,c,f,o,n,l,i.length,r,y]),{candidates:b,isRunning:h,runCleanup:y,keepRecentCount:Hf,action:u}},UD="/auth/passkey/authenticate/options",qD="/auth/passkey/authenticate/verify",WD="/auth/passkey/register/options",GD="/auth/passkey/register/verify",If="/api/passkeys",KD="/auth/passkey/status",YD="/api/auth/reset",v1={enabled:!1,hasPasskeys:!1,passkeyCount:0,rpID:null},U1=async(t,e)=>fetch(t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e===void 0?void 0:JSON.stringify(e)}),jr=async(t,e)=>{try{const o=await t.json();if(o&&typeof o.error=="string"&&o.error.trim())return o.error}catch{}return e},wl=t=>t instanceof dh&&t.code==="ERROR_CEREMONY_ABORTED",JD=()=>{ch.cancelCeremony()},Ef=()=>typeof window>"u"?{supported:!1,reason:"Passkeys are unavailable outside the browser."}:window.isSecureContext?{supported:!0,reason:""}:{supported:!1,reason:"Passkeys require HTTPS or localhost."},QD=async()=>{const t=Ef();if(!t.supported)throw new Error(t.reason);const e=typeof navigator.userAgent=="string"&&navigator.userAgent.trim()?navigator.userAgent:"This device",o=await U1(WD,{label:e});if(!o.ok)throw new Error(await jr(o,"Could not start passkey setup."));const{requestId:n,optionsJSON:s}=await o.json(),r=await lh({optionsJSON:s}),i=await U1(GD,{requestId:n,response:r});if(!i.ok)throw new Error(await jr(i,"Could not finish passkey setup."));return i.json().catch(()=>null)},XD=async t=>{const e=Ef();if(!e.supported)throw new Error(e.reason);const o=await U1(UD);if(!o.ok)throw new Error(await jr(o,"Passkey sign-in is not available right now."));const{requestId:n,optionsJSON:s}=await o.json(),r=await uh({optionsJSON:s}),i=await U1(qD,{requestId:n,response:r,trustDevice:t});if(!i.ok)throw new Error(await jr(i,"Passkey sign-in failed."));return i.json().catch(()=>null)},eP=async()=>{const t=await fetch(KD,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)return v1;const e=await t.json().catch(()=>null);return{enabled:e?.enabled===!0,hasPasskeys:e?.hasPasskeys===!0,passkeyCount:typeof e?.passkeyCount=="number"?e.passkeyCount:0,rpID:typeof e?.rpID=="string"&&e.rpID?e.rpID:null}},pZ=async()=>{const t=await fetch(If,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)throw new Error(await jr(t,"Could not load passkeys."));const e=await t.json().catch(()=>null);return Array.isArray(e?.passkeys)?e.passkeys:[]},gZ=async t=>{const e=await fetch(`${If}/${encodeURIComponent(t)}`,{method:"DELETE",credentials:"include",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(await jr(e,"Could not remove passkey."));return e.json().catch(()=>null)},vZ=async()=>{const t=await U1(YD);if(!t.ok)throw new Error(await jr(t,"Could not clear saved authentication."));return t.json().catch(()=>null)};class tP{recognition=null;isListening=!1;currentLang="en-US";onResultCallback=null;onErrorCallback=null;restartOnEnd=!1;conversationMode=!1;isSpeaking=!1;audioContext=null;audioUnlockRequired=!1;isSupported(){const e="SpeechRecognition"in window||"webkitSpeechRecognition"in window,o="speechSynthesis"in window;return e&&o}getSupportDetails(){return{recognition:"SpeechRecognition"in window||"webkitSpeechRecognition"in window,synthesis:"speechSynthesis"in window,prefixed:!("SpeechRecognition"in window)&&"webkitSpeechRecognition"in window,secureContext:window.isSecureContext}}setConversationMode(e){this.conversationMode=e,e||(this.restartOnEnd=!1)}isConversationMode(){return this.conversationMode}pauseListening(){if(this.restartOnEnd=!1,this.recognition)try{this.recognition.stop()}catch{}this.isListening=!1}resumeListening(){if(console.log("[BrowserVoiceService] resumeListening called:",{conversationMode:this.conversationMode,hasCallback:!!this.onResultCallback,isSpeaking:this.isSpeaking,currentLang:this.currentLang}),this.conversationMode&&this.onResultCallback&&!this.isSpeaking)try{console.log("[BrowserVoiceService] Resuming listening..."),this.startListeningSync(this.currentLang,this.onResultCallback,this.onErrorCallback||void 0)}catch(e){console.error("[BrowserVoiceService] Failed to resume listening:",e)}else console.log("[BrowserVoiceService] Not resuming - conditions not met")}async checkMicrophonePermission(){try{return"permissions"in navigator?(await navigator.permissions.query({name:"microphone"})).state==="granted":!1}catch{return!1}}async prepareListening(){if(!this.isSupported())throw new Error("Web Speech API not supported in this browser");if(typeof navigator>"u"||typeof navigator.mediaDevices?.getUserMedia!="function")return!0;try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(o=>o.stop()),!0}catch(e){const o=typeof e=="object"&&e&&"name"in e?String(e.name):"";if(o==="NotAllowedError")throw new Error("Microphone permission denied");if(o==="NotFoundError")throw new Error("No microphone found");const n=e instanceof Error?e.message:"Unable to access microphone";throw new Error(n)}}startListeningSync(e,o,n){if(!this.isSupported()){const r="Web Speech API not supported in this browser";throw n?.(r),new Error(r)}this.stopListening();const s=window.SpeechRecognition||window.webkitSpeechRecognition;this.recognition=new s,this.currentLang=e,this.onResultCallback=o,this.onErrorCallback=n||null,this.recognition.continuous=!0,this.recognition.interimResults=!0,this.recognition.lang=e,this.recognition.onstart=()=>{console.log("[BrowserVoiceService] Recognition started"),this.isListening=!0,this.restartOnEnd=!0},this.recognition.onaudiostart=()=>{console.log("[BrowserVoiceService] Audio recording started")},this.recognition.onsoundstart=()=>{console.log("[BrowserVoiceService] Sound detected")},this.recognition.onresult=r=>{console.log("[BrowserVoiceService] Got result:",r.results.length,"results");let i="",l="";for(let c=r.resultIndex;c<r.results.length;c++){const d=r.results[c];d.isFinal?i+=d[0].transcript:l+=d[0].transcript}console.log("[BrowserVoiceService] Transcripts - interim:",l,"final:",i),l&&(console.log("[BrowserVoiceService] Calling onResultCallback with interim"),this.onResultCallback?.(l,!1)),i&&(console.log("[BrowserVoiceService] Calling onResultCallback with final"),this.onResultCallback?.(i,!0))},this.recognition.onerror=r=>{if(r.error==="aborted")return;const i=this.getErrorMessage(r.error);this.onErrorCallback?.(i),(r.error==="not-allowed"||r.error==="service-not-allowed"||r.error==="network")&&(this.restartOnEnd=!1,this.isListening=!1)},this.recognition.onend=()=>{if(this.isListening=!1,this.restartOnEnd&&this.recognition&&!this.isSpeaking)try{this.recognition.start()}catch{}};try{this.recognition.start()}catch(r){const i=r instanceof Error?r.message:"Failed to start speech recognition";throw n?.(i),new Error(i)}}async startListening(e,o,n){this.startListeningSync(e,o,n)}stopListening(){if(this.restartOnEnd=!1,this.recognition){try{this.recognition.stop()}catch{}this.recognition=null}this.isListening=!1}getIsListening(){return this.isListening}getCurrentLang(){return this.currentLang}async resumeAudioContext(){this.audioContext||(this.audioContext=new(window.AudioContext||window.webkitAudioContext)),this.audioContext.state==="suspended"&&await this.audioContext.resume()}isAudioUnlockRequired(){return this.audioUnlockRequired}async unlockAudio(){try{const e=new Audio;if(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA",e.volume=.01,await e.play(),await this.resumeAudioContext(),this.isMobileDevice()&&"speechSynthesis"in window){const o=new SpeechSynthesisUtterance("");o.volume=0,window.speechSynthesis.speak(o),window.speechSynthesis.cancel(),console.log("[BrowserVoiceService] Speech synthesis unlocked for mobile")}return this.audioUnlockRequired=!1,console.log("[BrowserVoiceService] Audio unlocked successfully"),!0}catch(e){return console.error("[BrowserVoiceService] Failed to unlock audio:",e),!1}}async speakText(e,o,n,s){if(!("speechSynthesis"in window))throw new Error("Speech synthesis not supported");await this.resumeAudioContext();const r=await this.waitForVoices();await new Promise(c=>setTimeout(c,50)),this.isSpeaking=!0,this.pauseListening(),window.speechSynthesis.cancel();const i=new SpeechSynthesisUtterance(e);i.lang=o,i.rate=s?.rate??1,i.pitch=s?.pitch??1,i.volume=s?.volume??1;let l=null;return s?.voiceName&&(l=r.find(c=>c.name===s.voiceName)||null,l?console.log(`[BrowserVoiceService] Using selected voice: ${l.name} (${l.lang})`):console.warn(`[BrowserVoiceService] Selected voice "${s.voiceName}" not found, falling back to language match`)),l||(l=this.findBestVoice(r,o),l?console.log(`[BrowserVoiceService] Using language-matched voice: ${l.name} (${l.lang})`):console.warn(`[BrowserVoiceService] No voice found for language: ${o}, using default`)),l&&(i.voice=l),console.log(`[BrowserVoiceService] Speaking text (${e.length} chars) in ${o}`),new Promise((c,d)=>{let u=!1;i.onstart=()=>{u=!0,console.log("[BrowserVoiceService] Speech started"),c()},i.onend=()=>{this.isSpeaking=!1,console.log("[BrowserVoiceService] Speech ended"),n?.()},i.onerror=f=>{this.isSpeaking=!1,console.error("[BrowserVoiceService] Speech synthesis error:",f.error),(f.error==="not-allowed"||f.error==="interrupted")&&(this.audioUnlockRequired=!0);let m=`Speech synthesis error: ${f.error||"unknown"}`;f.error==="not-allowed"?m="Audio blocked by browser autoplay policy. Please interact with the page first.":f.error==="interrupted"&&(m="Speech was interrupted. Please try again."),d(new Error(m))},setTimeout(()=>{u||(console.warn("[BrowserVoiceService] Speech start timeout - audio may be blocked"),this.audioUnlockRequired=!0)},2e3),window.speechSynthesis.speak(i)})}cancelSpeech(){"speechSynthesis"in window&&window.speechSynthesis.cancel()}getVoices(){return"speechSynthesis"in window?window.speechSynthesis.getVoices():[]}async waitForVoices(){if(!("speechSynthesis"in window))return[];const e=window.speechSynthesis.getVoices();return e.length>0?e:new Promise(o=>{const n=()=>{o(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null};window.speechSynthesis.onvoiceschanged=n,setTimeout(()=>{o(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null},1e3)})}findBestVoice(e,o){let n=e.find(s=>s.lang===o);if(!n){const s=o.split("-")[0];n=e.find(r=>r.lang.startsWith(s))}return n||(n=e.find(s=>s.lang.startsWith(o.split("-")[0])&&s.localService)),n||null}isMobileDevice(){if(typeof navigator>"u")return!1;const e=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod|android|mobile|webos|blackberry|iemobile|opera mini/i.test(e)}isIOSSafari(){if(typeof navigator>"u")return!1;const e=navigator.userAgent.toLowerCase(),o=/iphone|ipad|ipod/i.test(e),n=/safari/i.test(e)&&!/chrome|crios|crmo/i.test(e);return o&&n}getErrorMessage(e){const o=this.isMobileDevice(),n=this.isIOSSafari();return{"no-speech":"No speech detected",aborted:"Speech recognition aborted","audio-capture":"No microphone found",network:"Network error - check connection","not-allowed":o?"Microphone permission denied. Check Settings > Safari > Microphone":"Microphone permission denied","service-not-allowed":n?"Speech recognition requires a user gesture. Please tap the microphone button again.":"Speech recognition service not allowed","bad-grammar":"Grammar error","language-not-supported":"Language not supported"}[e]||`Speech recognition error: ${e}`}}const _o=new tP,oP=80,nP=300;class sP{stream=null;mediaRecorder=null;audioContext=null;analyser=null;vadTimer=null;chunks=[];recordingStartMs=0;isActive=!1;isSpeaking=!1;silenceSince=null;onResult=null;onError=null;finishResolver=null;lang="en";cfg={baseURL:"",model:"deepdml/faster-whisper-large-v3-turbo-ct2",language:"",silenceThresholdDb:-45,silenceHoldMs:1500};configure(e){this.cfg={silenceThresholdDb:-45,silenceHoldMs:1500,language:"",...e}}isSupported(){return typeof window<"u"&&typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof window.MediaRecorder<"u"&&typeof window.AudioContext<"u"}async startListening(e,o,n){this.isActive&&this.stopListening(),this.lang=e,this.onResult=o,this.onError=n??null,this.isActive=!0;try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1})}catch(s){this.isActive=!1;const r=s instanceof Error?s.message:"Microphone access denied";n?.(r);return}this._setupAudioContext(),this._startRecorder(),this._startVAD()}stopListening(){this._stopVAD(),this._stopRecorder(),this._cleanupAfterStop(!0)}async finishListening(){if(this.isActive){if(this._stopVAD(),this.isSpeaking=!1,this.silenceSince=null,!this.mediaRecorder||this.mediaRecorder.state==="inactive"){this._cleanupAfterStop(!0);return}await new Promise(e=>{this.finishResolver=e,this._finaliseUtterance(!1)}),this._cleanupAfterStop(!0)}}getIsListening(){return this.isActive}_setupAudioContext(){if(!this.stream)return;const e=window.AudioContext??window.webkitAudioContext;this.audioContext=new e;const o=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=512,o.connect(this.analyser)}_teardownAudioContext(){try{this.audioContext?.close()}catch{}this.audioContext=null,this.analyser=null}_startRecorder(){if(!this.stream)return;const e=this._pickMimeType(),o={};e&&MediaRecorder.isTypeSupported(e)&&(o.mimeType=e),this.mediaRecorder=new MediaRecorder(this.stream,o),this.chunks=[],this.recordingStartMs=Date.now(),this.mediaRecorder.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},this.mediaRecorder.onstop=()=>{const n=this.chunks.splice(0),s=Date.now()-this.recordingStartMs;if(n.length===0||s<nP){this.finishResolver?.(),this.finishResolver=null;return}const r=n[0].type||e||"audio/webm",i=new Blob(n,{type:r});this._upload(i,r).finally(()=>{this.finishResolver?.(),this.finishResolver=null})},this.mediaRecorder.start(250)}_stopRecorder(){if(this.mediaRecorder&&this.mediaRecorder.state!=="inactive")try{this.mediaRecorder.stop()}catch{this.finishResolver?.(),this.finishResolver=null}this.mediaRecorder=null}_releaseStream(){this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null)}_startVAD(){this._stopVAD(),this.silenceSince=null,this.isSpeaking=!1,this.vadTimer=setInterval(()=>{if(!this.isActive||!this.analyser)return;this._getRmsDb()<this.cfg.silenceThresholdDb?this.isSpeaking&&(this.silenceSince===null?this.silenceSince=Date.now():Date.now()-this.silenceSince>=this.cfg.silenceHoldMs&&(this.isSpeaking=!1,this.silenceSince=null,this._finaliseUtterance(!0))):(this.silenceSince=null,this.isSpeaking||(this.isSpeaking=!0,this.mediaRecorder?.state==="recording"&&(this.recordingStartMs=Date.now())))},oP)}_stopVAD(){this.vadTimer!==null&&(clearInterval(this.vadTimer),this.vadTimer=null)}_cleanupAfterStop(e){const o=this.finishResolver;this.isActive=!1,this.finishResolver=null,this.mediaRecorder=null,this._teardownAudioContext(),this._releaseStream(),e&&(this.chunks=[]),this.isSpeaking=!1,this.silenceSince=null,this.onResult=null,this.onError=null,o?.()}_finaliseUtterance(e){this.isActive&&(this.mediaRecorder&&this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),e&&setTimeout(()=>{this.isActive&&this.stream&&this._startRecorder()},100))}_getRmsDb(){if(!this.analyser)return-1/0;const e=new Float32Array(this.analyser.fftSize);this.analyser.getFloatTimeDomainData(e);let o=0;for(const s of e)o+=s*s;const n=Math.sqrt(o/e.length);return n===0?-1/0:20*Math.log10(n)}async _upload(e,o){if(this.onResult)try{const n={"Content-Type":o,"X-Base-URL":this.cfg.baseURL,"X-Model":this.cfg.model};if(this.cfg.language)n["X-Language"]=this.cfg.language;else if(this.lang&&this.lang!=="auto"){const l=this.lang.split("-")[0];n["X-Language"]=l}const s=await fetch("/api/stt/transcribe",{method:"POST",headers:n,body:e});if(!s.ok){const l=await s.json().catch(()=>({error:"Unknown error"}));throw new Error(l.error??`HTTP ${s.status}`)}const i=((await s.json()).transcript??"").trim();i&&this.onResult(i,!0)}catch(n){if(!this.isActive)return;const s=n instanceof Error?n.message:"Transcription upload failed";console.error("[AudioStreamService] Upload error:",s),this.onError?.(s)}}_pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"];return typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?e.find(o=>MediaRecorder.isTypeSupported(o))??"":""}}const ls=new sP,bZ=[{id:"Xenova/whisper-tiny.en",name:"Whisper Tiny (EN)",size:"~39 MB",languages:"English",description:"Fastest, lowest accuracy. Good for quick dictation."},{id:"Xenova/whisper-base.en",name:"Whisper Base (EN)",size:"~73 MB",languages:"English",description:"Balanced speed and accuracy. Default for English."},{id:"Xenova/whisper-small.en",name:"Whisper Small (EN)",size:"~166 MB",languages:"English",description:"Higher accuracy, slower. Best for noisy environments."}],rP=80,iP=300,aP=16e3;class lP{transcriber=null;worker=null;modelStatus={state:"unloaded"};currentModelId=null;stream=null;mediaRecorder=null;audioContext=null;analyser=null;vadTimer=null;chunks=[];recordingStartMs=0;isActive=!1;isSpeaking=!1;silenceSince=null;onResult=null;onError=null;finishResolver=null;lang="en";cfg={silenceThresholdDb:-45,silenceHoldMs:1500};onModelStatusChange=null;configure(e){this.cfg={...this.cfg,...e}}isSupported(){return typeof window<"u"&&typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof window.MediaRecorder<"u"&&typeof window.AudioContext<"u"}getModelStatus(){return this.modelStatus}getCurrentModelId(){return this.currentModelId}setModelStatus(e){this.modelStatus=e,this.onModelStatusChange?.(e)}async loadModel(e){if(!(this.currentModelId===e&&this.modelStatus.state==="ready")&&!(this.modelStatus.state==="downloading"||this.modelStatus.state==="loading")){this._terminateWorker(),this.transcriber=null,this.setModelStatus({state:"downloading",progress:0}),this.currentModelId=e;try{const n=(await zt(()=>import("./wasmSttWorker-Dtlxac_K.js"),[])).default;this.worker=new n,await new Promise((s,r)=>{const i=setTimeout(()=>r(new Error("Worker init timed out")),1e4);this.worker.onmessage=l=>{const c=l.data;c.type==="progress"?this.setModelStatus({state:"downloading",progress:c.progress??0}):c.type==="loaded"?(clearTimeout(i),s()):c.type==="error"&&(clearTimeout(i),r(new Error(c.error??"Worker load failed")))},this.worker.onerror=l=>{clearTimeout(i),r(new Error(l.message||"Worker error"))},this.worker.postMessage({type:"load",modelId:e})}),this.setModelStatus({state:"ready"});return}catch(o){console.warn("[WasmStt] Worker failed, using main-thread:",o instanceof Error?o.message:o),this._terminateWorker()}try{const{pipeline:o,env:n}=await zt(async()=>{const{pipeline:l,env:c}=await import("./vendor-.bun-B9l0ZNi2.js").then(d=>d.bz);return{pipeline:l,env:c}},__vite__mapDeps([0,1]));n.backends.onnx.wasm.numThreads=1,n.allowLocalModels=!1;const s=new Map;let r=0,i=0;this.transcriber=await o("automatic-speech-recognition",e,{progress_callback:l=>{if(l.status==="progress"&&l.file){const c=s.get(l.file)??0,d=l.loaded??0,u=Math.max(0,d-c);s.set(l.file,d),r+=u,l.total&&l.total>i&&(i=l.total);const f=Math.max(i,r),m=f>0?Math.min(100,Math.round(r/f*100)):0;this.setModelStatus({state:"downloading",progress:m})}}}),this.setModelStatus({state:"ready"})}catch(o){const n=o instanceof Error?o.message:"Unknown error loading model";throw this.setModelStatus({state:"error",error:n}),this.transcriber=null,this.currentModelId=null,o}}}_terminateWorker(){this.worker&&(this.worker.terminate(),this.worker=null)}async unloadModel(){this._terminateWorker(),this.transcriber=null,this.currentModelId=null,this.setModelStatus({state:"unloaded"})}async startListening(e,o,n){if(this.isActive&&this.stopListening(),!this.transcriber&&!this.worker){n?.("Whisper model not loaded. Select a model in Voice Settings first.");return}this.lang=e,this.onResult=o,this.onError=n??null,this.isActive=!0;try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1})}catch(s){this.isActive=!1;const r=s instanceof Error?s.message:"Microphone access denied";n?.(r);return}this._setupAudioContext(),this._startRecorder(),this._startVAD()}stopListening(){if(this._stopVAD(),this.mediaRecorder&&this.mediaRecorder.state==="recording")try{this.mediaRecorder.stop()}catch{}this._cleanupAfterStop(!0)}async finishListening(){if(this.isActive){if(this._stopVAD(),this.isSpeaking=!1,this.silenceSince=null,!this.mediaRecorder||this.mediaRecorder.state==="inactive"){this._cleanupAfterStop(!0);return}await new Promise(e=>{this.finishResolver=e,this._finaliseUtterance(!1)}),this._cleanupAfterStop(!0)}}getIsListening(){return this.isActive}_setupAudioContext(){if(!this.stream)return;const e=window.AudioContext??window.webkitAudioContext;this.audioContext=new e;const o=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=512,o.connect(this.analyser)}_teardownAudioContext(){try{this.audioContext?.close()}catch{}this.audioContext=null,this.analyser=null}_startRecorder(){if(!this.stream)return;const e=this._pickMimeType(),o={};e&&MediaRecorder.isTypeSupported(e)&&(o.mimeType=e),this.mediaRecorder=new MediaRecorder(this.stream,o),this.chunks=[],this.recordingStartMs=Date.now(),this.mediaRecorder.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},this.mediaRecorder.onstop=()=>{const n=this.chunks.splice(0),s=Date.now()-this.recordingStartMs;if(n.length===0||s<iP){this.finishResolver?.(),this.finishResolver=null;return}const r=n[0].type||e||"audio/webm",i=new Blob(n,{type:r});this._transcribe(i).finally(()=>{this.finishResolver?.(),this.finishResolver=null})},this.mediaRecorder.start(250)}_releaseStream(){this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null)}_startVAD(){this._stopVAD(),this.silenceSince=null,this.isSpeaking=!1,this.vadTimer=setInterval(()=>{if(!this.isActive||!this.analyser)return;this._getRmsDb()<this.cfg.silenceThresholdDb?this.isSpeaking&&(this.silenceSince===null?this.silenceSince=Date.now():Date.now()-this.silenceSince>=this.cfg.silenceHoldMs&&(this.isSpeaking=!1,this.silenceSince=null,this._finaliseUtterance(!0))):(this.silenceSince=null,this.isSpeaking||(this.isSpeaking=!0,this.mediaRecorder?.state==="recording"&&(this.recordingStartMs=Date.now())))},rP)}_stopVAD(){this.vadTimer!==null&&(clearInterval(this.vadTimer),this.vadTimer=null)}_cleanupAfterStop(e){const o=this.finishResolver;this.isActive=!1,this.finishResolver=null,this.mediaRecorder=null,this._teardownAudioContext(),this._releaseStream(),e&&(this.chunks=[]),this.isSpeaking=!1,this.silenceSince=null,this.onResult=null,this.onError=null,o?.()}_finaliseUtterance(e){this.isActive&&(this.mediaRecorder&&this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),e&&setTimeout(()=>{this.isActive&&this.stream&&this._startRecorder()},100))}_getRmsDb(){if(!this.analyser)return-1/0;const e=new Float32Array(this.analyser.fftSize);this.analyser.getFloatTimeDomainData(e);let o=0;for(const s of e)o+=s*s;const n=Math.sqrt(o/e.length);return n===0?-1/0:20*Math.log10(n)}async _transcribe(e){if(this.onResult){if(!this.transcriber&&!this.worker){this.onError?.("Model not loaded");return}try{const o=await this._decodeToFloat32(e);if(!o||o.length===0){this.onError?.(`Failed to decode audio (${e.size} bytes)`);return}const n=this._resolveLanguageHint(),s=this.worker?await this._transcribeViaWorker(o,n):await this._transcribeMainThread(o,n);s&&this.onResult(s,!0)}catch(o){if(!this.isActive)return;const n=o instanceof Error?o.message:"Local transcription failed";this.onError?.(n)}}}_transcribeViaWorker(e,o){return new Promise((n,s)=>{if(!this.worker)return s(new Error("Worker gone"));const r=i=>{const l=i.data;l.type==="result"?(this.worker.removeEventListener("message",r),n(l.transcript??"")):l.type==="log"?console.log("[WasmStt Worker]",l.text):l.type==="error"&&(this.worker.removeEventListener("message",r),s(new Error(l.error??"Transcription failed")))};this.worker.addEventListener("message",r),this.worker.postMessage({type:"transcribe",audio:e.buffer,language:o},[e.buffer]),setTimeout(()=>{this.worker?.removeEventListener("message",r),s(new Error("Transcription timed out"))},3e4)})}async _transcribeMainThread(e,o){const n=this.transcriber;return((await n(e,{task:"transcribe",...o?{language:o}:{}}))?.text??"").trim()}async _decodeToFloat32(e){if(!this.audioContext)return null;const o=await e.arrayBuffer();let n;try{n=await this.audioContext.decodeAudioData(o)}catch{return null}const s=n.sampleRate,r=n.getChannelData(0),i=aP;if(s===i)return new Float32Array(r);const l=s/i,c=Math.ceil(r.length/l),d=new Float32Array(c);for(let u=0;u<c;u++){const f=u*l,m=Math.floor(f),h=Math.min(m+1,r.length-1),p=f-m;d[u]=r[m]*(1-p)+r[h]*p}return d}_resolveLanguageHint(){if(this.lang&&this.lang!=="auto")return this.lang.split("-")[0]}_pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"];return typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?e.find(o=>MediaRecorder.isTypeSupported(o))??"":""}}const Ss=new lP,cP=3e4;let Qr=null,c1=null;async function dP(){const t=Date.now();return Qr&&t-Qr.checkedAt<cP?Qr.available:c1||(c1=(async()=>{try{const e=await fetch("/api/tts/status");if(!e.ok)return Qr={available:!1,checkedAt:Date.now()},!1;const n=!!(await e.json()).available;return Qr={available:n,checkedAt:Date.now()},n}catch{return Qr={available:!1,checkedAt:Date.now()},!1}finally{c1=null}})(),c1)}let xl=null;function z5(){return xl||(xl=new(window.AudioContext||window.webkitAudioContext)),xl}function jf(t={}){const e=t.enabled??!0,o=t.availabilityMode??"auto",[n,s]=ie.useState(!1),[r,i]=ie.useState(!1),[l,c]=ie.useState(null),d=ie.useRef(null),u=ie.useRef(null),f=Ee(S=>S.currentProviderId),m=Ee(S=>S.currentModelId),h=Ee(S=>S.openaiApiKey),p=Ee(S=>S.openaiCompatibleUrl),v=ie.useCallback(async()=>{if(!e)return i(!1),!1;const S=!!(h&&h.trim().length>0),C=!!(p&&p.trim().length>0);if(o==="openai-compatible")return i(C),C;if(S||o==="auto"&&C)return i(!0),!0;try{const x=await dP();return i(x),x}catch{return i(!1),!1}},[o,e,h,p]);ie.useEffect(()=>{v()},[v]);const b=ie.useCallback(()=>{if(d.current){try{d.current.stop()}catch{}d.current=null}u.current&&(u.current.abort(),u.current=null),s(!1)},[]),y=ie.useCallback(async()=>{try{const S=z5();S.state==="suspended"&&(await S.resume(),console.log("[useServerTTS] AudioContext resumed"));const C=S.createBuffer(1,1,22050),x=S.createBufferSource();x.buffer=C,x.connect(S.destination),x.start(0),console.log("[useServerTTS] Audio unlocked for mobile playback")}catch(S){console.error("[useServerTTS] Failed to unlock audio:",S)}},[]),w=ie.useCallback(async(S,C)=>{if(b(),!S.trim()){c("No text to speak"),C?.onError?.("No text to speak");return}c(null);try{const x=z5();x.state==="suspended"&&(await x.resume(),console.log("[useServerTTS] AudioContext resumed"));const _=x.createBuffer(1,1,22050),k=x.createBufferSource();k.buffer=_,k.connect(x.destination),k.start(0),u.current=new AbortController;const D=C?.voice||"nova";console.log("[useServerTTS] Speaking with voice:",D,"options:",C);const F=await fetch("/api/tts/speak",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:S.trim(),voice:D,model:C?.model||void 0,speed:C?.speed||.9,instructions:C?.instructions,summarize:!1,providerId:C?.providerId||f||void 0,modelId:C?.modelId||m||void 0,apiKey:h||void 0,baseURL:C?.baseURL||void 0}),signal:u.current.signal});if(!F.ok){const O=await F.json().catch(()=>({error:"Unknown error"}));throw new Error(O.error||`HTTP ${F.status}`)}const B=await(await F.blob()).arrayBuffer();console.log("[useServerTTS] Decoding audio data...");const M=await x.decodeAudioData(B),H=x.createBufferSource();H.buffer=M;const P=C?.pitch??1;P!==1&&(H.detune.value=(P-1)*1200);const T=C?.volume??1,E=x.createGain();E.gain.value=T,H.connect(E),E.connect(x.destination),d.current=H,H.onended=()=>{console.log("[useServerTTS] Audio playback ended"),s(!1),d.current=null,C?.onEnd?.()},console.log("[useServerTTS] Starting audio playback via Web Audio API..."),s(!0),C?.onStart?.(),H.start(0)}catch(x){if(x.name==="AbortError")return;const _=x instanceof Error?x.message:"Failed to speak";console.error("[useServerTTS] Error:",_),c(_),C?.onError?.(_),s(!1)}},[b,f,m,h]);return ie.useEffect(()=>()=>{b()},[b]),{isPlaying:n,isAvailable:r,error:l,speak:w,stop:b,checkAvailability:v,unlockAudio:y}}const uP=3e4;let Xr=null,d1=null;async function fP(){const t=Date.now();return Xr&&t-Xr.checkedAt<uP?Xr:d1||(d1=(async()=>{try{const e=await fetch("/api/tts/say/status");if(!e.ok){const s={available:!1,voices:[],checkedAt:Date.now()};return Xr=s,s}const o=await e.json(),n={available:!!o.available,voices:Array.isArray(o.voices)?o.voices:[],checkedAt:Date.now()};return Xr=n,n}catch{const e={available:!1,voices:[],checkedAt:Date.now()};return Xr=e,e}finally{d1=null}})(),d1)}let Cl=null;function O5(){return Cl||(Cl=new(window.AudioContext||window.webkitAudioContext)),Cl}function Lf(t={}){const e=t.enabled??!0,[o,n]=ie.useState(!1),[s,r]=ie.useState(!1),[i,l]=ie.useState([]),[c,d]=ie.useState(null),u=ie.useRef(null),f=ie.useRef(null),m=ie.useCallback(async()=>{try{const b=O5();b.state==="suspended"&&(await b.resume(),console.log("[useSayTTS] AudioContext resumed"));const y=b.createBuffer(1,1,22050),w=b.createBufferSource();w.buffer=y,w.connect(b.destination),w.start(0),console.log("[useSayTTS] Audio unlocked for mobile playback")}catch(b){console.error("[useSayTTS] Failed to unlock audio:",b)}},[]),h=ie.useCallback(async()=>{if(!e)return r(!1),l([]),!1;try{const b=await fP();return r(b.available),l(b.voices),b.available}catch{return r(!1),l([]),!1}},[e]);ie.useEffect(()=>{h()},[h]);const p=ie.useCallback(()=>{if(u.current){try{u.current.stop()}catch{}u.current=null}f.current&&(f.current.abort(),f.current=null),n(!1)},[]),v=ie.useCallback(async(b,y)=>{if(p(),!b.trim()){d("No text to speak"),y?.onError?.("No text to speak");return}d(null);try{f.current=new AbortController;const w=await fetch("/api/tts/say/speak",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b.trim(),voice:y?.voice||"Samantha",rate:y?.rate||200}),signal:f.current.signal});if(!w.ok){const D=await w.json().catch(()=>({error:"Unknown error"}));throw new Error(D.error||`HTTP ${w.status}`)}const S=await w.blob(),C=await S.arrayBuffer();console.log("[useSayTTS] Received audio:",S.size,"bytes");const x=O5();x.state==="suspended"&&(await x.resume(),console.log("[useSayTTS] AudioContext resumed before playback")),console.log("[useSayTTS] Decoding audio data...");const _=await x.decodeAudioData(C),k=x.createBufferSource();k.buffer=_,k.connect(x.destination),u.current=k,k.onended=()=>{console.log("[useSayTTS] Audio playback ended"),n(!1),u.current=null,y?.onEnd?.()},console.log("[useSayTTS] Starting audio playback via Web Audio API..."),n(!0),y?.onStart?.(),k.start(0)}catch(w){if(w.name==="AbortError")return;const S=w instanceof Error?w.message:"Failed to speak";console.error("[useSayTTS] Error:",S),d(S),y?.onError?.(S),n(!1)}},[p]);return ie.useEffect(()=>()=>{p()},[p]),{isPlaying:o,isAvailable:s,voices:i,error:c,speak:v,stop:p,checkAvailability:h,unlockAudio:m}}function Vf(t){return t?t.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,"").replace(/[*_~#]/g,"").replace(/https?:\/\/[^\s]+/g,"").replace(/\/[\w\-./]+/g,"").replace(/^\s*[$#>]\s*/gm,"").replace(/[[\]{}()<>|&;]/g," ").replace(/\\/g,"").replace(/\s+/g," ").trim():""}const Oa="browserVoiceLanguage",Sl="browserVoiceConversationMode",kl="vinci:voice-language-changed",Ml="vinci:voice-conversation-mode-changed",$a=1200,mP=700,$5=new Set(["ru","ru-RU"]),u1=t=>{const e=(t||"").trim();if(!e)return"en-US";const o=e.split("-")[0].toLowerCase();return $5.has(e)||$5.has(o)?"en-US":e};function hP(){const[t,e]=ie.useState("idle"),[o,n]=ie.useState(null),[s,r]=ie.useState(()=>{if(typeof window<"u"){const X=localStorage.getItem(Oa);if(X)return u1(X)}return u1(navigator.language||"en-US")}),[i,l]=ie.useState(()=>typeof window<"u"?localStorage.getItem(Sl)==="true":!1),c=ie.useMemo(()=>{if(typeof navigator>"u")return!1;const X=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod|android|mobile|webos|blackberry|iemobile|opera mini/i.test(X)},[]),d=ie.useRef(!1),u=ie.useRef(!1),f=ie.useRef(""),m=ie.useRef(!1),h=ie.useRef(""),p=ie.useRef(null),v=ie.useRef(null),b=ie.useRef(0),y=ie.useRef(null),w=ie.useRef(!1),S=Te(X=>X.currentSessionId),C=Te(X=>X.sendMessage),x=Qt(X=>X.setPendingInputText),_=Te(X=>X.createSession),k=Ee(X=>X.currentProviderId),D=Ee(X=>X.currentModelId),F=Ee(X=>X.currentAgentName),A=Ee(X=>X.voiceModeEnabled),B=Ee(X=>X.voiceProvider),M=Ee(X=>X.speechRate),H=Ee(X=>X.speechPitch),P=Ee(X=>X.speechVolume),T=Ee(X=>X.sayVoice),E=Ee(X=>X.browserVoice),O=Ee(X=>X.openaiVoice),L=Ee(X=>X.openaiCompatibleVoice),Z=Ee(X=>X.openaiCompatibleUrl),oe=Ee(X=>X.openaiCompatibleTtsModel),V=A&&(B==="openai"||B==="openai-compatible"),$=A&&B==="say",N=Ee(X=>X.sttProvider),ee=Ee(X=>X.sttServerUrl),z=Ee(X=>X.sttModel),q=Ee(X=>X.wasmSttModel),ae=Ee(X=>X.sttLanguage),R=Ee(X=>X.sttSilenceThresholdDb),we=Ee(X=>X.sttSilenceHoldMs),ve=N==="server"?ls.isSupported():N==="wasm"?Ss.isSupported():_o.isSupported(),{speak:Ce,stop:Pe,isAvailable:De,unlockAudio:pe}=jf({enabled:V,availabilityMode:B==="openai-compatible"?"openai-compatible":"openai"}),{speak:K,stop:re,isAvailable:Q,unlockAudio:W}=Lf({enabled:$}),J=ie.useRef(null);ie.useEffect(()=>{J.current!==null&&J.current!==S&&d.current&&(console.log("[useBrowserVoice] Session changed, stopping voice"),d.current=!1,u.current=!1,_o.stopListening(),ls.stopListening(),_o.cancelSpeech(),e("idle"),n(null)),J.current=S},[S]);const j=ie.useCallback(X=>{const me=u1(X);r(me),typeof window<"u"&&(localStorage.setItem(Oa,me),window.dispatchEvent(new CustomEvent(kl,{detail:me})))},[]);ie.useEffect(()=>{if(typeof window>"u")return;const X=Ae=>{const ze=u1(Ae.detail||localStorage.getItem(Oa)||"en-US");r(Oe=>Oe===ze?Oe:ze)},me=Ae=>{if(Ae.key!==Oa||!Ae.newValue)return;const qe=u1(Ae.newValue);r(ze=>ze===qe?ze:qe)};return window.addEventListener(kl,X),window.addEventListener("storage",me),()=>{window.removeEventListener(kl,X),window.removeEventListener("storage",me)}},[]);const se=ie.useCallback(()=>{l(X=>{const me=!X;return _o.setConversationMode(me),typeof window<"u"&&(localStorage.setItem(Sl,String(me)),window.dispatchEvent(new CustomEvent(Ml,{detail:me}))),me})},[]);ie.useEffect(()=>{if(typeof window>"u")return;const X=Ae=>{const ze=Ae.detail;typeof ze=="boolean"&&l(Oe=>Oe===ze?Oe:ze)},me=Ae=>{if(Ae.key!==Sl||Ae.newValue==null)return;const qe=Ae.newValue==="true";l(ze=>ze===qe?ze:qe)};return window.addEventListener(Ml,X),window.addEventListener("storage",me),()=>{window.removeEventListener(Ml,X),window.removeEventListener("storage",me)}},[]),ie.useEffect(()=>{_o.setConversationMode(i)},[i]);const ne=ie.useRef(null),le=ie.useRef(null),he=ie.useCallback(X=>{N==="server"?ls.startListening(X,le.current,ne.current):N==="wasm"?Ss.startListening(X,le.current,ne.current):c?_o.startListeningSync(X,le.current,ne.current):_o.startListening(X,le.current,ne.current)},[N,c]),be=ie.useCallback(X=>{if(!d.current){console.log("[useBrowserVoice] Ignoring error after voice stopped:",X);return}const me=X.toLowerCase();if(me.includes("aborted")){console.log("[useBrowserVoice] Ignoring non-fatal aborted error"),n(null),e("listening");return}const Ae=typeof document<"u"&&document.visibilityState!=="visible",qe=me.includes("permission")||me.includes("not allowed")||me.includes("service not allowed");if(Ae&&qe&&i){console.log("[useBrowserVoice] Suppressing permission error while app hidden; will resume on visibility"),m.current=!0,n(null),e("idle");return}if(me.includes("network")||me.includes("connection")||me.includes("check connection")){console.error("[useBrowserVoice] Network error — staying in error state:",X),n(X),e("error"),b.current=0,y.current!==null&&(clearTimeout(y.current),y.current=null);return}if(console.error("[useBrowserVoice] Recognition error:",X),n(X),e("error"),qe||w.current){b.current=0;return}const Oe=b.current+1;b.current=Oe;const Xe=3;if(Oe<=Xe){const mt=Math.min(1e3*Math.pow(2,Oe-1),8e3);console.log(`[useBrowserVoice] Scheduling recovery retry ${Oe}/${Xe} in ${mt}ms`),y.current!==null&&clearTimeout(y.current),y.current=setTimeout(()=>{y.current=null,d.current&&(e("listening"),n(null),he(s))},mt)}else console.log("[useBrowserVoice] Max recovery retries reached — staying in error state")},[s,i,he]);ie.useEffect(()=>{ne.current=be},[be]);const ce=ie.useCallback(async X=>{if(!(!X.trim()||!d.current)&&X.trim()!==f.current){if(f.current=X.trim(),!k||!D){n("No provider or model configured. Please configure them in settings."),e("error");return}if(_o.stopListening(),ls.stopListening(),!i){x(X.trim(),"append-inline"),u.current=!1,d.current=!1,e("idle");return}e("processing"),u.current=!0;try{let me=S;if(!me){console.log("[useBrowserVoice] No active session, creating new session...");const qe=await _();if(!qe){n("Failed to create session"),e("error"),u.current=!1;return}me=qe.id,console.log("[useBrowserVoice] Created new session:",me)}await C(X.trim(),k,D,F??void 0);const Ae=async()=>{if(!d.current||!me)return;const ze=Hn(me).filter(Oe=>Oe.role==="assistant").sort((Oe,Xe)=>{const mt=Oe.time?.created??0;return(Xe.time?.created??0)-mt});if(ze.length>0){const Oe=ze[0],mt=Wn(Oe.id).filter(Ge=>Ge.type==="text").map(Ge=>Ge.text??"").join(" ");if(mt.trim()){e("speaking");try{const Ge=Vf(mt),ot=()=>{if(d.current&&i){if(typeof document<"u"&&document.visibilityState!=="visible"){m.current=!0,e("idle");return}e("listening"),he(s)}else d.current=!1,e("idle")};if((B==="openai"||B==="openai-compatible")&&De){const ct=B==="openai-compatible"?L:O,Ft=B==="openai-compatible"?Z:void 0,Le=B==="openai-compatible"?oe:void 0;console.log("[useBrowserVoice] Using server TTS with voice:",ct,"provider:",B),await Ce(Ge,{voice:ct,model:Le,speed:M,pitch:H,volume:P,baseURL:Ft,onStart:()=>console.log("[useBrowserVoice] Server TTS started"),onEnd:()=>{console.log("[useBrowserVoice] Server TTS ended"),ot()},onError:Ye=>{console.error("[useBrowserVoice] Server TTS error:",Ye),n(`Voice TTS failed: ${Ye}. Please check your settings or switch to Browser voice.`),e("error"),ot()}})}else if(B==="say"&&Q){console.log("[useBrowserVoice] Using macOS Say TTS with voice:",T);const ct=Math.round(100+(M-.5)*200);await K(Ge,{voice:T,rate:ct,onStart:()=>console.log("[useBrowserVoice] Say TTS started"),onEnd:()=>{console.log("[useBrowserVoice] Say TTS ended"),ot()},onError:Ft=>{console.error("[useBrowserVoice] Say TTS error:",Ft),ot()}})}else console.log("[useBrowserVoice] Using browser TTS"),B==="openai"&&!De&&(console.warn("[useBrowserVoice] OpenAI voice selected but unavailable, falling back to browser voice"),n("OpenAI voice unavailable (API key not configured). Using browser voice instead.")),await _o.waitForVoices(),await _o.resumeAudioContext(),await _o.speakText(Ge,s,()=>{ot()},{rate:M,pitch:H,volume:P,voiceName:E||void 0})}catch(Ge){const ot=Ge instanceof Error?Ge.message:"Speech failed";if(!d.current){console.log("[useBrowserVoice] Ignoring speech error after voice stopped:",ot);return}console.error("[useBrowserVoice] Speech error:",ot),(ot.includes("not-allowed")||ot.includes("autoplay"))&&n("Audio blocked by browser. Please click the voice button again to enable audio."),i?(e("listening"),he(s)):(d.current=!1,e("idle"))}return}}setTimeout(Ae,500)};setTimeout(Ae,1e3)}catch(me){console.error("[useBrowserVoice] Send message error:",me),n(me instanceof Error?me.message:"Failed to send message"),e("error"),u.current=!1}}},[S,k,D,F,s,C,x,_,M,H,P,De,Ce,Q,K,B,T,E,O,L,Z,oe,i,he]),ye=ie.useCallback(async(X,me)=>{if(!d.current)return;const Ae=X.trim();!me||!Ae||(console.log("[useBrowserVoice] Speech result:",Ae),h.current=Ae,p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null;const qe=h.current.trim();h.current="",qe&&ce(qe)},$a))},[ce]);ie.useEffect(()=>{if(typeof document>"u")return;const X=()=>{if(document.visibilityState==="visible"&&m.current){if(!d.current||!i){m.current=!1;return}m.current=!1,e("listening");try{he(s)}catch(me){const Ae=me instanceof Error?me.message:"Failed to resume voice";n(Ae),e("error")}}};return document.addEventListener("visibilitychange",X),()=>{document.removeEventListener("visibilitychange",X)}},[i,c,s,N,he]),ie.useEffect(()=>{if(typeof navigator>"u")return;const X=navigator.mediaDevices;if(!X||typeof X.addEventListener!="function")return;const me=()=>{!d.current||t!=="listening"||(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{if(v.current=null,!d.current||t!=="listening")return;if(typeof document<"u"&&document.visibilityState!=="visible"){m.current=!0,e("idle");return}try{_o.stopListening(),ls.stopListening(),Ss.stopListening(),he(s)}catch(qe){const ze=qe instanceof Error?qe.message:"Microphone source changed. Tap mic to continue.";n(ze),e("error"),d.current=!1}},mP))};return X.addEventListener("devicechange",me),()=>{X.removeEventListener("devicechange",me),v.current&&(clearTimeout(v.current),v.current=null)}},[c,s,t,N,he]),ie.useEffect(()=>{le.current=ye},[ye]);const _e=ie.useCallback(async()=>{if(!ve)return!1;if(N==="server"||N==="wasm")return!0;try{return await _o.prepareListening(),!0}catch(X){const me=X instanceof Error?X.message:"Microphone permission denied";return n(me),!1}},[ve,N]),te=ie.useCallback(async()=>{if(!ve){n("Voice input not supported in this browser"),e("error");return}if(!S){n("No active session"),e("error");return}if(d.current=!0,f.current="",b.current=0,w.current=!1,y.current!==null&&(clearTimeout(y.current),y.current=null),n(null),e("listening"),N==="server"){ls.configure({baseURL:ee,model:z,language:ae||void 0,silenceThresholdDb:R,silenceHoldMs:we});try{await ls.startListening(s,ye,be)}catch(X){const me=X instanceof Error?X.message:"Failed to start voice";console.error("[useBrowserVoice] Server STT start error:",me),n(me),e("error"),d.current=!1}return}if(N==="wasm"){const X=Ss.getModelStatus();if(console.log("[useBrowserVoice] WASM model status:",X.state),X.state!=="ready")try{e("processing"),await Ss.loadModel(q)}catch(me){const Ae=me instanceof Error?me.message:"Failed to load Whisper model";console.error("[useBrowserVoice] WASM model load error:",Ae),n(Ae),e("error"),d.current=!1;return}Ss.configure({silenceThresholdDb:R,silenceHoldMs:we});try{await Ss.startListening(s,ye,be),console.log("[useBrowserVoice] WASM listening started")}catch(me){const Ae=me instanceof Error?me.message:"Failed to start voice";console.error("[useBrowserVoice] WASM STT start error:",Ae),n(Ae),e("error"),d.current=!1}return}if(c)try{_o.unlockAudio().catch(()=>{}),pe().catch(()=>{}),W().catch(()=>{}),_o.startListeningSync(s,ye,be)}catch(X){const me=X instanceof Error?X.message:"Failed to start voice";console.error("[useBrowserVoice] Mobile voice start error:",me),n(me),e("error"),d.current=!1}else try{await _o.startListening(s,ye,be)}catch(X){const me=X instanceof Error?X.message:"Failed to start voice";console.error("[useBrowserVoice] Desktop voice start error:",me),n(me),e("error"),d.current=!1}},[ve,S,s,ye,be,c,pe,W,N,ee,z,q,ae,R,we]),xe=ie.useCallback(()=>{d.current=!1,u.current=!1,m.current=!1,b.current=0,w.current=!1,v.current&&(clearTimeout(v.current),v.current=null),y.current!==null&&(clearTimeout(y.current),y.current=null),h.current="",p.current&&(clearTimeout(p.current),p.current=null),_o.stopListening(),ls.stopListening(),Ss.stopListening(),_o.cancelSpeech(),Pe(),re(),e("idle"),n(null)},[Pe,re]),Fe=ie.useCallback(()=>{if(d.current){if(w.current=!0,m.current=!1,v.current&&(clearTimeout(v.current),v.current=null),e("processing"),N==="server"){ls.finishListening().then(()=>{window.setTimeout(()=>{d.current&&(h.current||p.current||u.current||(d.current=!1,u.current=!1,e("idle")))},$a+200)});return}if(N==="wasm"){Ss.finishListening().then(()=>{window.setTimeout(()=>{d.current&&(h.current||p.current||u.current||(d.current=!1,u.current=!1,e("idle"),w.current=!1))},$a+200)});return}_o.stopListening(),window.setTimeout(()=>{d.current&&(h.current||p.current||u.current||(d.current=!1,u.current=!1,e("idle")))},$a+300)}},[N]);return ie.useEffect(()=>()=>{d.current=!1,v.current&&(clearTimeout(v.current),v.current=null),h.current="",p.current&&(clearTimeout(p.current),p.current=null),_o.setConversationMode(!1),_o.stopListening(),ls.stopListening(),_o.cancelSpeech()},[]),{status:t,isSupported:ve,error:o,language:s,setLanguage:j,startVoice:te,stopVoice:xe,finishVoiceInput:Fe,conversationMode:i,toggleConversationMode:se,prepareVoice:_e,isMobile:c,voiceProvider:B}}const w0="text-[10px] leading-none uppercase font-bold tracking-tight px-1.5 py-1 rounded border flex-shrink-0",Z5=U(w0,"bg-[color-mix(in_srgb,var(--primary-base)_12%,transparent)] text-[color-mix(in_srgb,var(--primary-base)_70%,transparent)] border-[color-mix(in_srgb,var(--primary-base)_24%,transparent)]"),pP=U(w0,"bg-[color-mix(in_srgb,var(--status-success)_12%,transparent)] text-[color-mix(in_srgb,var(--status-success)_70%,transparent)] border-[color-mix(in_srgb,var(--status-success)_24%,transparent)]"),gP=U(w0,"bg-[color-mix(in_srgb,var(--status-info)_12%,transparent)] text-[color-mix(in_srgb,var(--status-info)_70%,transparent)] border-[color-mix(in_srgb,var(--status-info)_24%,transparent)]"),Al=U(w0,"bg-[var(--surface-muted)] text-muted-foreground border-[var(--interactive-border)]/60"),Nf=g.forwardRef(({searchQuery:t,onCommandSelect:e,onClose:o,showTabs:n,activeTab:s="commands",onTabSelect:r,style:i},l)=>{const{t:c}=ft(),d=Te(L=>L.currentSessionId),f=n0(d??"").length>0,m=!!d,h=Te(L=>!!L.newSessionDraft?.open),p=m||h,[v,b]=g.useState([]),[y,w]=g.useState(!1),S=Hr(L=>L.commands),C=Hr(L=>L.loadCommands),x=On(L=>L.skills),_=On(L=>L.loadSkills),[k,D]=g.useState(0),F=g.useRef(0),A=g.useRef(!1),B=g.useRef([]),M=g.useRef(null),H=g.useRef(!1),P=g.useRef(null),T=g.useRef(!1),E=g.useRef(!1);g.useEffect(()=>{const L=Z=>{const oe=Z.target;!oe||!M.current||M.current.contains(oe)||o()};return document.addEventListener("pointerdown",L,!0),()=>{document.removeEventListener("pointerdown",L,!0)}},[o]),g.useEffect(()=>{C(),_()},[C,_]),g.useEffect(()=>{(async()=>{w(!0);try{const Z=new Set(x.map(q=>q.name)),oe=S.map((q,ae)=>({id:`opencode:${q.scope??"global"}:${q.name}:${q.agent??""}:${q.model??""}:${ae}`,name:q.name,source:"opencode",description:q.description,agent:q.agent??void 0,model:q.model??void 0,isBuiltIn:q.name==="init"||q.name==="review",isSkill:q.source==="skill"||Z.has(q.name),scope:q.scope})),V=x.map((q,ae)=>({id:`skill:${q.scope}:${q.source??"opencode"}:${q.name}:${ae}`,name:q.name,source:"skill",description:q.description,isSkill:!0,scope:q.scope})),N=[...[...m&&!f?[{id:"vinci:init",name:"init",source:"vinci",description:c("chat.commandAutocomplete.command.initDescription"),isBuiltIn:!0}]:[],...m?[{id:"vinci:undo",name:"undo",source:"vinci",description:c("chat.commandAutocomplete.command.undoDescription"),isBuiltIn:!0},{id:"vinci:redo",name:"redo",source:"vinci",description:c("chat.commandAutocomplete.command.redoDescription"),isBuiltIn:!0},{id:"vinci:timeline",name:"timeline",source:"vinci",description:c("chat.commandAutocomplete.command.timelineDescription"),isBuiltIn:!0}]:[],{id:"vinci:compact",name:"compact",source:"vinci",description:c("chat.commandAutocomplete.command.compactDescription"),isBuiltIn:!0},...m?[{id:"vinci:summary",name:"summary",source:"vinci",description:c("chat.commandAutocomplete.command.summaryDescription"),isVinci:!0}]:[],...p?[{id:"vinci:workspace-review",name:"workspace-review",source:"vinci",description:c("chat.commandAutocomplete.command.workspaceReviewDescription"),isVinci:!0}]:[]],...oe,...V],ee=!f,z=(t?N.filter(q=>Fr(q.name,t)||q.description&&Fr(q.description,t)):N).filter(q=>ee||q.name!=="init");z.sort((q,ae)=>{const R=q.name.toLowerCase().startsWith(t.toLowerCase()),we=ae.name.toLowerCase().startsWith(t.toLowerCase());return R&&!we?-1:!R&&we?1:q.name.localeCompare(ae.name)}),b(z)}catch{const Z=!f,oe=[...m&&!f?[{id:"vinci:init",name:"init",source:"vinci",description:c("chat.commandAutocomplete.command.initDescription"),isBuiltIn:!0}]:[],...m?[{id:"vinci:undo",name:"undo",source:"vinci",description:c("chat.commandAutocomplete.command.undoDescription"),isBuiltIn:!0},{id:"vinci:redo",name:"redo",source:"vinci",description:c("chat.commandAutocomplete.command.redoDescription"),isBuiltIn:!0},{id:"vinci:timeline",name:"timeline",source:"vinci",description:c("chat.commandAutocomplete.command.timelineDescription"),isBuiltIn:!0}]:[],{id:"vinci:compact",name:"compact",source:"vinci",description:c("chat.commandAutocomplete.command.compactDescription"),isBuiltIn:!0},...m?[{id:"vinci:summary",name:"summary",source:"vinci",description:c("chat.commandAutocomplete.command.summaryDescription"),isVinci:!0}]:[],...p?[{id:"vinci:workspace-review",name:"workspace-review",source:"vinci",description:c("chat.commandAutocomplete.command.workspaceReviewDescription"),isVinci:!0}]:[]],V=(t?oe.filter($=>Fr($.name,t)||$.description&&Fr($.description,t)):oe).filter($=>Z||$.name!=="init");b(V)}finally{w(!1)}})()},[t,f,m,p,S,x,c]),g.useEffect(()=>{D(0)},[v]),g.useEffect(()=>{F.current=k},[k]),g.useEffect(()=>{B.current[k]?.scrollIntoView({block:"nearest"})},[k]),g.useImperativeHandle(l,()=>({handleKeyDown:L=>{const Z=v.length;if(L==="Escape"){o();return}if(Z!==0){if(L==="ArrowDown"){A.current=!0,D(oe=>(oe+1)%Z);return}if(L==="ArrowUp"){A.current=!0,D(oe=>(oe-1+Z)%Z);return}if(L==="Enter"||L==="Tab"){const oe=(F.current%Z+Z)%Z,V=v[oe];V&&e(V)}}}}),[v,o,e]);const O=L=>{switch(L.name){case"init":return a.jsx(G,{name:"file",className:"h-3.5 w-3.5 text-green-500"});case"undo":return a.jsx(G,{name:"arrow-go-back",className:"h-3.5 w-3.5 text-orange-500"});case"redo":return a.jsx(G,{name:"arrow-go-forward",className:"h-3.5 w-3.5 text-orange-500"});case"timeline":return a.jsx(G,{name:"time",className:"h-3.5 w-3.5"});case"compact":return a.jsx(G,{name:"scissors",className:"h-3.5 w-3.5 text-purple-500"});case"review":return a.jsx(G,{name:"search-eye",className:"h-3.5 w-3.5 text-blue-500"});case"test":case"build":case"run":return a.jsx(G,{name:"terminal-box",className:"h-3.5 w-3.5 text-cyan-500"});default:return L.isBuiltIn?a.jsx(G,{name:"flashlight",className:"h-3.5 w-3.5 text-yellow-500"}):a.jsx(G,{name:"command",className:"h-3.5 w-3.5 text-muted-foreground"})}};return a.jsxs("div",{ref:M,className:"absolute z-[100] min-w-0 w-full max-w-[450px] max-h-64 bg-background border-2 border-border/60 rounded-xl shadow-none bottom-full mb-2 left-0 flex flex-col",style:i,children:[n?a.jsx("div",{className:"px-2 pt-2 pb-1 border-b border-border/60",children:a.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-[var(--surface-elevated)] p-1",children:[{id:"commands",label:c("chat.autocomplete.tabs.commands")},{id:"agents",label:c("chat.autocomplete.tabs.agents")},{id:"files",label:c("chat.autocomplete.tabs.files")}].map(L=>a.jsx("button",{type:"button",className:U("flex-1 px-2.5 py-1 rounded-md typography-meta font-semibold transition-none",s===L.id?"bg-interactive-selection text-interactive-selection-foreground shadow-none":"text-muted-foreground hover:bg-interactive-hover/50"),onPointerDown:Z=>{Z.pointerType==="touch"&&(Z.preventDefault(),Z.stopPropagation(),E.current=!0,r?.(L.id))},onClick:()=>{if(E.current){E.current=!1;return}r?.(L.id)},children:L.label},L.id))})}):null,a.jsx(mn,{outerClassName:"flex-1 min-h-0",className:"px-0 pb-2",children:y?a.jsx("div",{className:"flex items-center justify-center py-4",children:a.jsx(G,{name:"refresh",className:"h-4 w-4 animate-spin text-muted-foreground"})}):a.jsxs("div",{children:[v.map((L,Z)=>{const oe=L.isBuiltIn,V=L.isVinci;return a.jsxs("div",{ref:$=>{B.current[Z]=$},className:U("flex items-start gap-2 px-3 py-2 cursor-pointer rounded-lg",Z===k&&"bg-interactive-selection"),onPointerDown:$=>{$.pointerType==="touch"&&(P.current={x:$.clientX,y:$.clientY},T.current=!1)},onPointerMove:$=>{if($.pointerType!=="touch"||!P.current)return;const N=$.clientX-P.current.x,ee=$.clientY-P.current.y;Math.hypot(N,ee)>6&&(T.current=!0)},onPointerUp:$=>{if($.pointerType!=="touch")return;const N=T.current;P.current=null,T.current=!1,!N&&($.preventDefault(),$.stopPropagation(),H.current=!0,e(L,{dismissKeyboard:!0}))},onPointerCancel:()=>{P.current=null,T.current=!1},onClick:()=>{if(H.current){H.current=!1;return}e(L)},onMouseMove:()=>{A.current=!1,D(Z)},children:[a.jsx("div",{className:"mt-0.5",children:O(L)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"typography-ui-label font-medium",children:["/",L.name]}),L.isSkill?a.jsx("span",{className:Z5,children:c("chat.commandAutocomplete.badge.skill")}):a.jsx("span",{className:Z5,children:c("chat.commandAutocomplete.badge.command")}),V?a.jsx("span",{className:Al,children:"Vinci"}):oe?a.jsx("span",{className:Al,children:c("chat.commandAutocomplete.badge.system")}):L.scope?a.jsx("span",{className:L.scope==="project"?gP:pP,children:L.scope}):null,L.agent&&a.jsx("span",{className:Al,children:L.agent})]}),L.description&&a.jsx("div",{className:"typography-meta text-muted-foreground mt-0.5 truncate",children:L.description})]})]},L.id)}),v.length===0&&a.jsx("div",{className:"px-3 py-2 typography-ui-label text-muted-foreground",children:c("chat.commandAutocomplete.empty")})]})}),a.jsx("div",{className:"px-3 pt-1 pb-1.5 border-t typography-meta text-muted-foreground",children:c("chat.autocomplete.keyboardHint")})]})});Nf.displayName="CommandAutocomplete";const Rf=()=>{const t=de.c(17),e=Te(vP),o=ur();let n;t[0]!==e?(n=u=>e?u.getAttachment(e):void 0,t[0]=e,t[1]=n):n=t[1];const s=z1(n),r=Te(bP),i=Te(yP),l=$t(wP),c=$t(xP),d=Bo(CP);if(e){let u;t[2]!==s?(u=s0(s),t[2]=s,t[3]=u):u=t[3];const f=u;if(f)return f;let m;t[4]!==e||t[5]!==r?(m=r.get(e),t[4]=e,t[5]=r,t[6]=m):m=t[6];const h=m;if(h?.path)return h.path;let p;if(t[7]!==e||t[8]!==o){let b;t[10]!==e?(b=y=>y.id===e,t[10]=e,t[11]=b):b=t[11],p=o.find(b),t[7]=e,t[8]=o,t[9]=p}else p=t[9];const v=p;if(v?.directory)return v.directory}if(i?.open&&(i.bootstrapPendingDirectory||i.directoryOverride))return(i.bootstrapPendingDirectory||i.directoryOverride)??void 0;if(l){let u;if(t[12]!==l||t[13]!==c){let m;t[15]!==l?(m=h=>h.id===l,t[15]=l,t[16]=m):m=t[16],u=c.find(m),t[12]=l,t[13]=c,t[14]=u}else u=t[14];const f=u;if(f?.path)return f.path}return d??void 0};function vP(t){return t.currentSessionId}function bP(t){return t.worktreeMetadata}function yP(t){return t.newSessionDraft}function wP(t){return t.activeProjectId}function xP(t){return t.projects}function CP(t){return t.currentDirectory}const Fl=[],SP=[],kP=g.forwardRef(({searchQuery:t,onFileSelect:e,onAgentSelect:o,onClose:n,showTabs:s,activeTab:r="files",onTabSelect:i,style:l},c)=>{const{t:d}=ft(),u=Rf()??"",f=$t(W=>W.activeProjectId),m=$t(g.useCallback(W=>W.projects.find(J=>J.id===f)?.path??null,[f])),h=g.useMemo(()=>{const W=m||u;return W?W.replace(/\\/g,"/").replace(/\/+$/,""):null},[m,u]),p=vD(g.useCallback(W=>h?W.byRoot[h]:void 0,[h])),v=Ee(W=>W.getVisibleAgents),b=D7(W=>W.searchFiles),y=pD(t,180),w=qg(),S=Kg(),[C,x]=g.useState([]),[_,k]=g.useState([]),[D,F]=g.useState([]),[A,B]=g.useState(!1),M=g.useRef(0),[H,P]=g.useState(0),T=g.useRef(0),[E,O]=g.useState(360),[L,Z]=g.useState({}),[oe,V]=g.useState({}),$=g.useRef([]),N=g.useRef([]),ee=g.useRef([]),z=g.useRef(null),q=g.useRef(!1),ae=(t??"").trim(),R=s===!0,we=g.useMemo(()=>{if(!h||!p)return[];const W=[p.selectedPath,...p.openPaths.slice().reverse()].filter(ne=>typeof ne=="string"&&ne.length>0),J=new Set,j=ae.toLowerCase();return W.filter(ne=>{if(J.has(ne))return!1;J.add(ne);const le=ne.startsWith(`${h}/`)?ne.slice(h.length+1):ne;return j?le.toLowerCase().includes(j):!0}).slice(0,6).map(ne=>{const le=ne.replace(/\\/g,"/"),he=le.split("/").filter(Boolean).pop()||le,be=le.startsWith(`${h}/`)?le.slice(h.length+1):le;return{name:he,path:le,relativePath:be,extension:he.includes(".")?he.split(".").pop()?.toLowerCase():void 0}})},[ae,h,p]),ve=g.useMemo(()=>!R||r==="agents"?ae.length>0?D:D.slice(0,2):SP,[r,D,ae.length,R]),Ce=!R||r==="files"?_:Fl,Pe=!R||r==="files"?we:Fl,De=!R||r==="files"?C:Fl;g.useEffect(()=>{const W=J=>{const j=J.target;!j||!z.current||z.current.contains(j)||n()};return document.addEventListener("pointerdown",W,!0),()=>{document.removeEventListener("pointerdown",W,!0)}},[n]),g.useEffect(()=>{if(!u){x([]);return}const J=(y??"").trim().replace(/^\.\//,"").replace(/^\/+/,"").toLowerCase();if(!J){x([]);return}let j=!1;return M.current++,B(!0),b(u,J,80,{includeHidden:w,respectGitignore:!S,type:"file"}).then(se=>{if(j)return;const ne=new Set(we.map(le=>le.path));x(se.filter(le=>!ne.has(le.path)).slice(0,15))}).catch(()=>{j||x([])}).finally(()=>{j||(M.current--,M.current<=0&&(M.current=0,B(!1)))}),()=>{j=!0,M.current=Math.max(0,M.current-1),M.current<=0&&B(!1)}},[u,y,we,b,w,S]),g.useEffect(()=>{if(!u){k([]);return}const J=(y??"").trim().replace(/^\.\//,"").replace(/^\/+/,"").toLowerCase();if(!J){k([]);return}let j=!1;return M.current++,B(!0),b(u,J,20,{includeHidden:w,respectGitignore:!S,type:"directory"}).then(se=>{j||k(se.slice(0,10))}).catch(()=>{j||k([])}).finally(()=>{j||(M.current--,M.current<=0&&(M.current=0,B(!1)))}),()=>{j=!0,M.current=Math.max(0,M.current-1),M.current<=0&&B(!1)}},[u,y,b,w,S]),g.useEffect(()=>{const W=v(),J=(t??"").trim().toLowerCase(),j=W.filter(se=>se.mode&&se.mode!=="primary").filter(se=>J?`${se.name} ${se.description??""}`.toLowerCase().includes(J):!0).map(se=>({name:se.name,description:se.description,mode:se.mode})).sort((se,ne)=>se.name.localeCompare(ne.name));F(j)},[v,t]),g.useEffect(()=>{P(0),Z({}),V({})},[De,Ce,Pe.length,ve.length]),g.useEffect(()=>{T.current=H},[H]),g.useEffect(()=>{$.current[H]?.scrollIntoView({block:"nearest"})},[H]),g.useEffect(()=>{let W=null;const J=()=>{W!==null&&cancelAnimationFrame(W),W=requestAnimationFrame(()=>{const j={},se={};N.current.forEach((ne,le)=>{if(!ne)return;const be=ee.current[le]?.offsetWidth??ne.scrollWidth,ce=Math.max(0,be-ne.clientWidth),ye=ce>8;if(j[le]=ye,ye){const _e=Math.max(.6,ce/110);se[le]=_e}}),Z(j),V(se)})};return J(),window.addEventListener("resize",J),()=>{W!==null&&cancelAnimationFrame(W),window.removeEventListener("resize",J)}},[De,Ce]),g.useEffect(()=>{const W=N.current[H];if(!W)return;const J=()=>{const se=W.clientWidth;se>0&&O(se)};if(J(),typeof ResizeObserver>"u")return;const j=new ResizeObserver(J);return j.observe(W),()=>{j.disconnect()}},[H]);const pe=g.useCallback(W=>{e(W)},[e]),K=g.useCallback(W=>{o?.(W)},[o]);g.useImperativeHandle(c,()=>({handleKeyDown:W=>{if(W==="Escape"){n();return}const J=ve.length+Ce.length+Pe.length+De.length;if(J!==0){if(W==="ArrowDown"){P(j=>(j+1)%J);return}if(W==="ArrowUp"){P(j=>(j-1+J)%J);return}if(W==="Enter"||W==="Tab"){const j=(T.current%J+J)%J;if(j<ve.length){const he=ve[j];he&&K(he.name);return}const se=j-ve.length;if(se<Ce.length){const he=Ce[se];he&&pe(he);return}const ne=se-Ce.length,le=ne<Pe.length?Pe[ne]:De[ne-Pe.length];le&&pe(le)}}}}),[De,Ce,Pe,ve,n,pe,K]);const re=W=>{switch(W.extension?.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":return a.jsx(G,{name:"code",className:"h-3.5 w-3.5 text-[var(--status-info)]"});case"json":return a.jsx(G,{name:"code",className:"h-3.5 w-3.5 text-[var(--status-warning)]"});case"md":case"mdx":return a.jsx(G,{name:"file",className:"h-3.5 w-3.5 text-muted-foreground"});case"png":case"jpg":case"jpeg":case"gif":case"svg":return a.jsx(G,{name:"file-image",className:"h-3.5 w-3.5 text-[var(--status-success)]"});default:return a.jsx(G,{name:"file-pdf",className:"h-3.5 w-3.5 text-muted-foreground"})}},Q=g.useMemo(()=>[{id:"commands",label:d("chat.autocomplete.tabs.commands")},{id:"agents",label:d("chat.autocomplete.tabs.agents")},{id:"files",label:d("chat.autocomplete.tabs.files")}],[d]);return a.jsxs("div",{ref:z,className:"absolute z-[100] min-w-0 w-full max-w-[640px] max-h-64 bg-background border-2 border-border/60 rounded-xl shadow-none bottom-full mb-2 left-0 flex flex-col",style:l,children:[s?a.jsx("div",{className:"px-2 pt-2 pb-1 border-b border-border/60",children:a.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-[var(--surface-elevated)] p-1",children:Q.map(W=>a.jsx("button",{type:"button",className:U("flex-1 px-2.5 py-1 rounded-md typography-meta font-semibold transition-none",r===W.id?"bg-interactive-selection text-interactive-selection-foreground shadow-none":"text-muted-foreground hover:bg-interactive-hover/50"),onPointerDown:J=>{J.pointerType==="touch"&&(J.preventDefault(),J.stopPropagation(),q.current=!0,i?.(W.id))},onClick:()=>{if(q.current){q.current=!1;return}i?.(W.id)},children:W.label},W.id))})}):null,a.jsx(mn,{outerClassName:"flex-1 min-h-0",className:"px-0",children:(!R||r==="files")&&A?a.jsx("div",{className:"flex items-center justify-center py-4",children:a.jsx(G,{name:"refresh",className:"h-4 w-4 animate-spin text-muted-foreground"})}):a.jsxs("div",{className:"pb-2",children:[ve.map((W,J)=>{const j=H===J;return a.jsx("div",{ref:se=>{$.current[J]=se},className:U("flex items-start gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",j&&"bg-interactive-selection"),onClick:()=>K(W.name),onMouseMove:()=>P(J),children:a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"font-semibold truncate",children:["@",W.name]}),W.description?a.jsx("div",{className:"typography-meta text-muted-foreground truncate",children:W.description}):null]})},`agent-${W.name}`)}),ve.length===2&&ae.length===0&&D.length>2&&a.jsx("div",{className:"px-3 py-1 typography-meta text-muted-foreground",children:d("chat.fileMentionAutocomplete.searchMoreAgents")}),ve.length>0&&(Ce.length>0||Pe.length>0||De.length>0)&&a.jsx("div",{className:"my-1 border-t border-border/60"}),Ce.map((W,J)=>{const j=ve.length+J,se=W.relativePath||W.name,ne=B0(se,{maxLength:60}),le=H===j;return a.jsxs("div",{ref:he=>{$.current[j]=he},className:U("flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",le&&"bg-interactive-selection"),onClick:()=>pe(W),onMouseMove:()=>P(j),children:[a.jsx(G,{name:"folder-3-fill",className:"h-3.5 w-3.5 text-primary/60"}),a.jsx("span",{className:"flex-1 min-w-0 truncate","aria-label":se,children:ne})]},`dir-${W.path}`)}),Ce.length>0&&(Pe.length>0||De.length>0)&&a.jsx("div",{className:"my-1 border-t border-border/60"}),Pe.map((W,J)=>{const j=ve.length+Ce.length+J,se=W.relativePath||W.name,ne=B0(se,{maxLength:60}),le=H===j,he=L[j]??!1,be=oe[j]??2.6;return a.jsxs("div",{ref:ce=>{$.current[j]=ce},className:U("flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",le&&"bg-interactive-selection"),onClick:()=>pe(W),onMouseMove:()=>P(j),children:[re(W),a.jsxs("span",{ref:ce=>{N.current[j]=ce},className:"relative flex-1 min-w-0 overflow-hidden file-mention-marquee-container",style:le?{"--file-mention-marquee-width":`${E}px`,"--file-mention-marquee-duration":`${be}s`}:void 0,"aria-label":se,children:[a.jsx("span",{ref:ce=>{ee.current[j]=ce},className:"absolute invisible whitespace-nowrap pointer-events-none","aria-hidden":!0,children:se}),he&&le?a.jsx("span",{className:"inline-block whitespace-nowrap file-mention-marquee",children:se}):a.jsx("span",{className:"block truncate",children:ne})]})]},`recent-${W.path}`)}),Pe.length>0&&De.length>0&&a.jsx("div",{className:"my-1 border-t border-border/60"}),De.map((W,J)=>{const j=ve.length+Ce.length+Pe.length+J,se=W.relativePath||W.name,ne=B0(se,{maxLength:60}),le=H===j,he=L[j]??!1,be=oe[j]??2.6,ce=a.jsxs("div",{ref:ye=>{$.current[j]=ye},className:U("flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",le&&"bg-interactive-selection"),onClick:()=>pe(W),onMouseMove:()=>P(j),children:[re(W),a.jsxs("span",{ref:ye=>{N.current[j]=ye},className:"relative flex-1 min-w-0 overflow-hidden file-mention-marquee-container",style:le?{"--file-mention-marquee-width":`${E}px`,"--file-mention-marquee-duration":`${be}s`}:void 0,"aria-label":se,children:[a.jsx("span",{ref:ye=>{ee.current[j]=ye},className:"absolute invisible whitespace-nowrap pointer-events-none","aria-hidden":!0,children:se}),he&&le?a.jsx("span",{className:"inline-block whitespace-nowrap file-mention-marquee",children:se}):a.jsx("span",{className:"block truncate",children:ne})]})]});return a.jsx(g.Fragment,{children:ce},W.path)}),De.length===0&&Ce.length===0&&Pe.length===0&&ve.length===0&&a.jsx("div",{className:"px-3 py-2 typography-ui-label text-muted-foreground",children:d("chat.fileMentionAutocomplete.empty")})]})}),a.jsx("div",{className:"px-3 pt-1 pb-1.5 border-t typography-meta text-muted-foreground",children:d("chat.autocomplete.keyboardHint")})]})}),MP=/^#(?:[\da-fA-F]{3}|[\da-fA-F]{6})$/,_l=t=>{if(!t)return null;const e=t.trim();return e&&MP.test(e)?e.toLowerCase():null},AP=t=>{const e=de.c(202),{open:o,onOpenChange:n,projectId:s,projectName:r,projectPath:i,initialIcon:l,initialColor:c,initialIconBackground:d,onSave:u}=t,f=l===void 0?null:l,m=c===void 0?null:c,h=d===void 0?null:d,{t:p}=ft(),v=$t(FP),b=$t(_P),y=$t(BP);let w;e[0]!==s?(w=fe=>fe.projects.find(Ie=>Ie.id===s)?.iconImage??null,e[0]=s,e[1]=w):w=e[1];const S=$t(w),{currentTheme:C}=js(),[x,_]=g.useState(r),[k,D]=g.useState(f),[F,A]=g.useState(m);let B;e[2]!==h?(B=_l(h),e[2]=h,e[3]=B):B=e[3];const[M,H]=g.useState(B),[P,T]=g.useState(!1),[E,O]=g.useState(!1),[L,Z]=g.useState(!1),[oe,V]=g.useState(!1),[$,N]=g.useState(null),[ee,z]=g.useState(null),[q,ae]=g.useState(!1),R=g.useRef(null);let we;e[4]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{N(null),z(DP)},e[4]=we):we=e[4];const ve=we;let Ce,Pe;e[5]!==m||e[6]!==f||e[7]!==h||e[8]!==o||e[9]!==r?(Ce=()=>{o&&(_(r),D(f),A(m),H(_l(h)),V(!1),ve(),ae(!1))},Pe=[o,r,f,m,h,ve],e[5]=m,e[6]=f,e[7]=h,e[8]=o,e[9]=r,e[10]=Ce,e[11]=Pe):(Ce=e[10],Pe=e[11]),g.useEffect(Ce,Pe);let De,pe;e[12]===Symbol.for("react.memo_cache_sentinel")?(pe=()=>()=>{ve()},De=[ve],e[12]=De,e[13]=pe):(De=e[12],pe=e[13]),g.useEffect(pe,De);let K,re,Q;if(e[14]!==F||e[15]!==S||e[16]!==k||e[17]!==M||e[18]!==x||e[19]!==n||e[20]!==u||e[21]!==oe||e[22]!==$||e[23]!==s||e[24]!==b||e[25]!==p||e[26]!==v){let fe;e[30]!==F||e[31]!==k||e[32]!==M||e[33]!==x||e[34]!==n||e[35]!==u||e[36]!==oe||e[37]!==$||e[38]!==s||e[39]!==b||e[40]!==p||e[41]!==v?(fe=async()=>{const Ie=x.trim();if(!Ie)return;if($){T(!0);const ke=await v(s,$);if(T(!1),!ke.ok){We.error(ke.error||p("projectEditDialog.toast.failedToUploadIcon"));return}We.success(p("projectEditDialog.toast.iconUpdated")),ve(),V(!1)}const ue=oe&&Q;if(ue){O(!0);const ke=await b(s);if(O(!1),!ke.ok){We.error(ke.error||p("projectEditDialog.toast.failedToRemoveIcon"));return}We.success(p("projectEditDialog.toast.iconRemoved")),V(!1),H(null)}u({label:Ie,icon:k,color:F,iconBackground:_l(ue?null:M)}),n(!1)},e[30]=F,e[31]=k,e[32]=M,e[33]=x,e[34]=n,e[35]=u,e[36]=oe,e[37]=$,e[38]=s,e[39]=b,e[40]=p,e[41]=v,e[42]=fe):fe=e[42],re=fe,K=F?Q1[F]??null:null,Q=!!S,e[14]=F,e[15]=S,e[16]=k,e[17]=M,e[18]=x,e[19]=n,e[20]=u,e[21]=oe,e[22]=$,e[23]=s,e[24]=b,e[25]=p,e[26]=v,e[27]=K,e[28]=re,e[29]=Q}else K=e[27],re=e[28],Q=e[29];const W=!!($&&ee),J=S?.source==="custom",j=Q&&!oe||W,se=j;let ne;e[43]!==S||e[44]!==C||e[45]!==W||e[46]!==Q||e[47]!==oe||e[48]!==ee||e[49]!==q||e[50]!==s?(ne=q?null:W?ee:Q&&!oe?X1({id:s,iconImage:S??null},{themeVariant:C.metadata.variant,iconColor:C.colors.surface.foreground}):null,e[43]=S,e[44]=C,e[45]=W,e[46]=Q,e[47]=oe,e[48]=ee,e[49]=q,e[50]=s,e[51]=ne):ne=e[51];const le=ne;let he;e[52]===Symbol.for("react.memo_cache_sentinel")?(he=()=>{ae(!1)},e[52]=he):he=e[52];const be=S?.updatedAt;let ce;e[53]!==s||e[54]!==be?(ce=[s,be],e[53]=s,e[54]=be,e[55]=ce):ce=e[55],g.useEffect(he,ce);let ye;e[56]!==P||e[57]!==s?(ye=fe=>{!s||!fe||P||(V(!1),ae(!1),N(fe),z(Ie=>(Ie&&URL.revokeObjectURL(Ie),URL.createObjectURL(fe))))},e[56]=P,e[57]=s,e[58]=ye):ye=e[58];const _e=ye;let te;e[59]!==W||e[60]!==se||e[61]!==Q||e[62]!==E||e[63]!==s?(te=()=>{!s||!se||E||(W&&ve(),V(!!Q),ae(!1))},e[59]=W,e[60]=se,e[61]=Q,e[62]=E,e[63]=s,e[64]=te):te=e[64];const xe=te;let Fe;e[65]!==y||e[66]!==L||e[67]!==s||e[68]!==p?(Fe=async()=>{!s||L||(ve(),V(!1),ae(!1),Z(!0),y(s).then(fe=>{if(!fe.ok){We.error(fe.error||p("projectEditDialog.toast.failedToDiscoverIcon"));return}if(fe.skipped){We.success(p("projectEditDialog.toast.customIconAlreadySet"));return}We.success(p("projectEditDialog.toast.iconDiscovered"))}).finally(()=>{Z(!1)}))},e[65]=y,e[66]=L,e[67]=s,e[68]=p,e[69]=Fe):Fe=e[69];const X=Fe;let me;e[70]!==p?(me=p("projectEditDialog.title"),e[70]=p,e[71]=me):me=e[71];let Ae;e[72]!==me?(Ae=a.jsx(cr,{className:"min-w-0",children:a.jsx(dr,{children:me})}),e[72]=me,e[73]=Ae):Ae=e[73];let qe;e[74]!==p?(qe=p("projectEditDialog.field.name"),e[74]=p,e[75]=qe):qe=e[75];let ze;e[76]!==qe?(ze=a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:qe}),e[76]=qe,e[77]=ze):ze=e[77];let Oe;e[78]===Symbol.for("react.memo_cache_sentinel")?(Oe=fe=>_(fe.target.value),e[78]=Oe):Oe=e[78];let Xe;e[79]!==p?(Xe=p("projectEditDialog.field.namePlaceholder"),e[79]=p,e[80]=Xe):Xe=e[80];let mt;e[81]!==re?(mt=fe=>{fe.key==="Enter"&&(fe.preventDefault(),re())},e[81]=re,e[82]=mt):mt=e[82];let Ge;e[83]!==x||e[84]!==Xe||e[85]!==mt?(Ge=a.jsx(Fn,{value:x,onChange:Oe,placeholder:Xe,onKeyDown:mt,autoFocus:!0}),e[83]=x,e[84]=Xe,e[85]=mt,e[86]=Ge):Ge=e[86];let ot;e[87]!==i?(ot=a.jsx("p",{className:"typography-meta text-muted-foreground truncate",title:i,children:i}),e[87]=i,e[88]=ot):ot=e[88];let ct;e[89]!==ze||e[90]!==Ge||e[91]!==ot?(ct=a.jsxs("div",{className:"min-w-0 space-y-1.5",children:[ze,Ge,ot]}),e[89]=ze,e[90]=Ge,e[91]=ot,e[92]=ct):ct=e[92];let Ft;e[93]!==p?(Ft=p("projectEditDialog.field.color"),e[93]=p,e[94]=Ft):Ft=e[94];let Le;e[95]!==Ft?(Le=a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:Ft}),e[95]=Ft,e[96]=Le):Le=e[96];let Ye;e[97]===Symbol.for("react.memo_cache_sentinel")?(Ye=()=>A(null),e[97]=Ye):Ye=e[97];const gt=F===null?"border-foreground scale-110":"border-border hover:border-border/80";let wt;e[98]!==gt?(wt=U("w-8 h-8 rounded-lg border-2 transition-all flex items-center justify-center",gt),e[98]=gt,e[99]=wt):wt=e[99];let et;e[100]!==p?(et=p("projectEditDialog.option.none"),e[100]=p,e[101]=et):et=e[101];let Pt;e[102]===Symbol.for("react.memo_cache_sentinel")?(Pt=a.jsx("span",{className:"w-4 h-0.5 bg-muted-foreground/40 rotate-45 rounded-full"}),e[102]=Pt):Pt=e[102];let st;e[103]!==wt||e[104]!==et?(st=a.jsx("button",{type:"button",onClick:Ye,className:wt,title:et,children:Pt}),e[103]=wt,e[104]=et,e[105]=st):st=e[105];let At;e[106]!==F?(At=Jc.map(fe=>a.jsx("button",{type:"button",onClick:()=>A(fe.key),className:U("w-8 h-8 rounded-lg border-2 transition-all",F===fe.key?"border-foreground scale-110":"border-transparent hover:border-border"),style:{backgroundColor:fe.cssVar},title:fe.label},fe.key)),e[106]=F,e[107]=At):At=e[107];let Dt;e[108]!==st||e[109]!==At?(Dt=a.jsxs("div",{className:"flex gap-2 flex-wrap",children:[st,At]}),e[108]=st,e[109]=At,e[110]=Dt):Dt=e[110];let Wt;e[111]!==Le||e[112]!==Dt?(Wt=a.jsxs("div",{className:"min-w-0 space-y-2",children:[Le,Dt]}),e[111]=Le,e[112]=Dt,e[113]=Wt):Wt=e[113];let Zt;e[114]!==p?(Zt=p("projectEditDialog.field.icon"),e[114]=p,e[115]=Zt):Zt=e[115];let fo;e[116]!==Zt?(fo=a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:Zt}),e[116]=Zt,e[117]=fo):fo=e[117];let Eo;e[118]!==_e?(Eo=a.jsx("input",{ref:R,type:"file",accept:"image/png,image/jpeg,image/svg+xml,.png,.jpg,.jpeg,.svg",className:"hidden",onChange:fe=>{const Ie=fe.target.files?.[0]??null;_e(Ie),fe.currentTarget.value=""}}),e[118]=_e,e[119]=Eo):Eo=e[119];let Gt;e[120]===Symbol.for("react.memo_cache_sentinel")?(Gt=()=>D(null),e[120]=Gt):Gt=e[120];const Et=k===null?"border-foreground scale-110 bg-[var(--surface-elevated)]":"border-border hover:border-border/80";let Vt;e[121]!==Et?(Vt=U("w-8 h-8 rounded-lg border-2 transition-all flex items-center justify-center",Et),e[121]=Et,e[122]=Vt):Vt=e[122];let xt;e[123]!==p?(xt=p("projectEditDialog.option.none"),e[123]=p,e[124]=xt):xt=e[124];let mo;e[125]===Symbol.for("react.memo_cache_sentinel")?(mo=a.jsx("span",{className:"w-4 h-0.5 bg-muted-foreground/40 rotate-45 rounded-full"}),e[125]=mo):mo=e[125];let go;e[126]!==Vt||e[127]!==xt?(go=a.jsx("button",{type:"button",onClick:Gt,className:Vt,title:xt,children:mo}),e[126]=Vt,e[127]=xt,e[128]=go):go=e[128];let to;e[129]!==K||e[130]!==k?(to=H7.map(fe=>{const Ie=fe.Icon;return a.jsx("button",{type:"button",onClick:()=>D(fe.key),className:U("w-8 h-8 rounded-lg border-2 transition-all flex items-center justify-center",k===fe.key?"border-foreground scale-110 bg-[var(--surface-elevated)]":"border-border hover:border-border/80"),title:fe.label,children:a.jsx(G,{name:Ie,className:"w-4 h-4",style:K?{color:K}:void 0})},fe.key)}),e[129]=K,e[130]=k,e[131]=to):to=e[131];let Do;e[132]!==go||e[133]!==to?(Do=a.jsxs("div",{className:"flex gap-2 flex-wrap",children:[go,to]}),e[132]=go,e[133]=to,e[134]=Do):Do=e[134];let Vo;e[135]!==j||e[136]!==M||e[137]!==le||e[138]!==p?(Vo=j&&le&&a.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[a.jsx("span",{className:"typography-meta text-muted-foreground",children:p("projectEditDialog.field.preview")}),a.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border/60 bg-[var(--surface-elevated)] p-1",children:a.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center overflow-hidden rounded-[2px]",style:M?{backgroundColor:M}:void 0,children:a.jsx("img",{src:le,alt:"",className:"h-full w-full object-contain",draggable:!1,onError:()=>ae(!0)})})})]}),e[135]=j,e[136]=M,e[137]=le,e[138]=p,e[139]=Vo):Vo=e[139];let vo;e[140]!==X||e[141]!==J||e[142]!==L||e[143]!==P||e[144]!==p?(vo=!J&&a.jsxs(a.Fragment,{children:[a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>R.current?.click(),disabled:P,children:p(P?"projectEditDialog.actions.uploading":"projectEditDialog.actions.uploadIcon")}),a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>{X()},disabled:L,children:p(L?"projectEditDialog.actions.discovering":"projectEditDialog.actions.discoverFavicon")})]}),e[140]=X,e[141]=J,e[142]=L,e[143]=P,e[144]=p,e[145]=vo):vo=e[145];let zo;e[146]!==xe||e[147]!==se||e[148]!==E||e[149]!==p?(zo=se&&a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>{xe()},disabled:E,children:p(E?"projectEditDialog.actions.removing":"projectEditDialog.actions.removeProjectIcon")}),e[146]=xe,e[147]=se,e[148]=E,e[149]=p,e[150]=zo):zo=e[150];let kt;e[151]!==E||e[152]!==oe||e[153]!==p?(kt=oe&&a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>V(!1),disabled:E,children:p("projectEditDialog.actions.undoRemove")}),e[151]=E,e[152]=oe,e[153]=p,e[154]=kt):kt=e[154];let Po;e[155]!==vo||e[156]!==zo||e[157]!==kt?(Po=a.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[vo,zo,kt]}),e[155]=vo,e[156]=zo,e[157]=kt,e[158]=Po):Po=e[158];let Nt;e[159]!==fo||e[160]!==Eo||e[161]!==Do||e[162]!==Vo||e[163]!==Po?(Nt=a.jsxs("div",{className:"min-w-0 space-y-2",children:[fo,Eo,Do,Vo,Po]}),e[159]=fo,e[160]=Eo,e[161]=Do,e[162]=Vo,e[163]=Po,e[164]=Nt):Nt=e[164];let ro;e[165]!==j||e[166]!==M||e[167]!==p?(ro=j&&a.jsxs("div",{className:"min-w-0 space-y-2",children:[a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:p("projectEditDialog.field.iconBackground")}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("input",{type:"color",value:M??"#000000",onChange:fe=>H(fe.target.value),className:"h-8 w-10 cursor-pointer rounded border border-border bg-transparent p-1","aria-label":p("projectEditDialog.field.iconBackgroundAria")}),a.jsx(Fn,{value:M??"",onChange:fe=>H(fe.target.value),placeholder:"#000000",className:"h-8 w-[8.5rem]"}),a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>H(null),children:p("projectEditDialog.actions.clear")})]})]}),e[165]=j,e[166]=M,e[167]=p,e[168]=ro):ro=e[168];let So;e[169]!==ct||e[170]!==Wt||e[171]!==Nt||e[172]!==ro?(So=a.jsxs("div",{className:"min-w-0 space-y-5 py-1",children:[ct,Wt,Nt,ro]}),e[169]=ct,e[170]=Wt,e[171]=Nt,e[172]=ro,e[173]=So):So=e[173];let at;e[174]!==n?(at=()=>n(!1),e[174]=n,e[175]=at):at=e[175];let io;e[176]!==p?(io=p("projectEditDialog.actions.cancel"),e[176]=p,e[177]=io):io=e[177];let oo;e[178]!==at||e[179]!==io?(oo=a.jsx(yt,{variant:"ghost",onClick:at,children:io}),e[178]=at,e[179]=io,e[180]=oo):oo=e[180];let Rt;e[181]!==E||e[182]!==P||e[183]!==x?(Rt=!x.trim()||P||E,e[181]=E,e[182]=P,e[183]=x,e[184]=Rt):Rt=e[184];let Ct;e[185]!==p?(Ct=p("projectEditDialog.actions.save"),e[185]=p,e[186]=Ct):Ct=e[186];let jo;e[187]!==re||e[188]!==Rt||e[189]!==Ct?(jo=a.jsx(yt,{onClick:re,disabled:Rt,children:Ct}),e[187]=re,e[188]=Rt,e[189]=Ct,e[190]=jo):jo=e[190];let ho;e[191]!==oo||e[192]!==jo?(ho=a.jsxs(y4,{children:[oo,jo]}),e[191]=oo,e[192]=jo,e[193]=ho):ho=e[193];let $e;e[194]!==Ae||e[195]!==So||e[196]!==ho?($e=a.jsxs(lr,{className:"max-w-md",children:[Ae,So,ho]}),e[194]=Ae,e[195]=So,e[196]=ho,e[197]=$e):$e=e[197];let tt;return e[198]!==n||e[199]!==o||e[200]!==$e?(tt=a.jsx(ar,{open:o,onOpenChange:n,children:$e}),e[198]=n,e[199]=o,e[200]=$e,e[201]=tt):tt=e[201],tt};function FP(t){return t.uploadProjectIcon}function _P(t){return t.removeProjectIcon}function BP(t){return t.discoverProjectIcon}function DP(t){return t&&URL.revokeObjectURL(t),null}function PP(t){const e=de.c(3);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx("path",{d:"M232.49,192.49l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,0,1,17-17L180,187V141L128,89,76,141V187l11.51-11.52a12,12,0,0,1,17,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L52,187V136a12,12,0,0,1,3.51-8.49L116,67V24a12,12,0,0,1,24,0V67l60.49,60.48A12,12,0,0,1,204,136v51l11.51-11.52a12,12,0,0,1,17,17Z",transform:"rotate(180 128 128)"}),e[0]=o):o=e[0];let n;return e[1]!==t?(n=a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:o}),e[1]=t,e[2]=n):n=e[2],n}const zf=t=>t.nativeEvent.isComposing||t.nativeEvent.keyCode===229,Of=g.createContext(null),yZ=t=>{const e=de.c(3),{children:o,value:n}=t;let s;return e[0]!==o||e[1]!==n?(s=a.jsx(Of.Provider,{value:n,children:o}),e[0]=o,e[1]=n,e[2]=s):s=e[2],s},TP=()=>g.useContext(Of);function HP(){const t=de.c(11),e=Te(IP),o=Iw(e??""),n=f4(e??""),s=ie.useRef(0);let r,i;t[0]!==e||t[1]!==o?(r=()=>{!e||!o||o.length},i=[e,o],t[0]=e,t[1]=o,t[2]=r,t[3]=i):(r=t[2],i=t[3]),ie.useEffect(r,i);let l,c;t[4]!==e||t[5]!==n?(l=()=>{!e||!n||n.length},c=[e,n],t[4]=e,t[5]=n,t[6]=l,t[7]=c):(l=t[6],c=t[7]),ie.useEffect(l,c);let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{s.current=0},t[8]=d):d=t[8];let u;t[9]!==e?(u=[e],t[9]=e,t[10]=u):u=t[10],ie.useEffect(d,u)}function IP(t){return t.currentSessionId}const EP=g.memo(function(){return HP(),null});function wZ(t){const e=de.c(5),{children:o}=t,n=Ee(jP);let s;e[0]!==n?(s=n?a.jsx(EP,{}):null,e[0]=n,e[1]=s):s=e[1];let r;return e[2]!==o||e[3]!==s?(r=a.jsxs(a.Fragment,{children:[s,o]}),e[2]=o,e[3]=s,e[4]=r):r=e[4],r}function jP(t){return t.voiceModeEnabled}const LP={sm:{icon:"w-4 h-4",container:"gap-1.5"},md:{icon:"w-5 h-5",container:"gap-2"},lg:{icon:"w-6 h-6",container:"gap-2.5"}},VP={idle:{icon:"mic-off",color:"text-muted-foreground",labelKey:"voice.status.idle"},listening:{icon:"mic",color:"text-primary",labelKey:"voice.status.listening",animation:"animate-pulse"},processing:{icon:"loader-4",color:"text-primary",labelKey:"voice.status.processing",animation:"animate-spin"},speaking:{icon:"volume-up",color:"text-green-500",labelKey:"voice.status.speaking"},error:{icon:"alert",color:"text-destructive",labelKey:"voice.status.error"}};function U5(t){const e=de.c(19),{status:o,showLabel:n,size:s,className:r,conversationMode:i}=t,l=n===void 0?!1:n,c=s===void 0?"md":s,d=r===void 0?"":r,u=i===void 0?!1:i,{t:f}=ft(),m=VP[o],h=m.icon,p=LP[c],b=`flex items-center ${l?p.container:""} ${d}`,y=`
|
|
6835
|
+
${t.stack??""}`;if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function j5(t){const e=_f(t);return cD.some(o=>o.test(e))}function dD(t){return`1.0.2:${_f(t).slice(0,500)}`}function uD(t){if(typeof window>"u")return;const e=Date.now(),o=dD(t);let n=null;try{const r=window.sessionStorage.getItem(E5);if(r)try{n=JSON.parse(r)}catch{n=null}}catch{return}const s=typeof n?.timestamp=="number"?n.timestamp:0;if(!(n?.signature===o&&e-s<lD)){try{window.sessionStorage.setItem(E5,JSON.stringify({signature:o,timestamp:e}))}catch{return}window.setTimeout(()=>{window.location.reload()},0)}}async function fD(t,e={}){const o=e.retries??1;let n;for(let s=0;s<=o;s+=1)try{return await t()}catch(r){if(n=r,!j5(r)||s>=o)break;await new Promise(i=>setTimeout(i,aD*(s+1)))}throw j5(n)&&uD(n),n}const T4=t=>ie.lazy(()=>fD(t)),mD=T4(()=>zt(()=>import("./MarkdownRendererImpl-BZjKbBnk.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.MarkdownRenderer}))),hD=T4(()=>zt(()=>import("./MarkdownRendererImpl-BZjKbBnk.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.SimpleMarkdownRenderer}))),Bf=a.jsx("div",{className:"break-words w-full min-w-0"}),Ac=t=>{const e=de.c(2);let o;return e[0]!==t?(o=a.jsx(g.Suspense,{fallback:Bf,children:a.jsx(mD,{...t})}),e[0]=t,e[1]=o):o=e[1],o},ca=t=>{const e=de.c(2);let o;return e[0]!==t?(o=a.jsx(g.Suspense,{fallback:Bf,children:a.jsx(hD,{...t})}),e[0]=t,e[1]=o):o=e[1],o},pl=new Set,gl=new Set,vl=new Set,bl=new Set,H4={onDeleteRequest(t){return pl.add(t),()=>{pl.delete(t)}},requestDelete(t){!t.sessions.length&&t.mode!=="worktree"||pl.forEach(e=>e(t))},onCreateRequest(t){return gl.add(t),()=>{gl.delete(t)}},requestCreate(t){const e=t??{};gl.forEach(o=>o(e))},onDirectoryRequest(t){return vl.add(t),()=>{vl.delete(t)}},requestDirectoryDialog(){vl.forEach(t=>t())},onGitRefreshHint(t){return bl.add(t),()=>{bl.delete(t)}},requestGitRefresh(t){t.directory.trim()&&bl.forEach(e=>e(t))}},pD=(t,e)=>{const o=de.c(4),n=e===void 0?200:e,[s,r]=ie.useState(t);let i,l;return o[0]!==n||o[1]!==t?(i=()=>{const c=window.setTimeout(()=>{r(t)},n);return()=>{window.clearTimeout(c)}},l=[t,n],o[0]=n,o[1]=t,o[2]=i,o[3]=l):(i=o[2],l=o[3]),ie.useEffect(i,l),s},$o=t=>{if(!t)return"";const e=t.replace(/\\/g,"/"),o=e.startsWith("//");let n=e.replace(/\/+/g,"/");o&&!n.startsWith("//")&&(n=`/${n}`);const s=n==="/",r=/^[A-Za-z]:\/$/.test(n);return!s&&!r&&(n=n.replace(/\/+$/,"")),n},gi=t=>/^[A-Za-z]:\//.test(t)?t.toLowerCase():t,Ks=(t,e)=>{const o=$o(e),n=$o(t);if(!o||!n)return!1;const s=gi(o),r=gi(n);return r===s||r.startsWith(`${s}/`)},gD=t=>{if(!t||typeof t!="object")return{};const e=t,o={};for(const[n,s]of Object.entries(e)){const r=$o(n);if(!r||!s||typeof s!="object")continue;const i=s,l=Array.isArray(i.openPaths)?Array.from(new Set(i.openPaths.filter(h=>typeof h=="string").map(h=>$o(h)).filter(h=>Ks(h,r)))):[],c=Array.isArray(i.expandedPaths)?Array.from(new Set(i.expandedPaths.filter(h=>typeof h=="string").map(h=>$o(h)).filter(h=>Ks(h,r)))):[],d=typeof i.selectedPath=="string"?$o(i.selectedPath):null,u=d&&Ks(d,r)?d:l[0]??null,f=typeof i.touchedAt=="number"&&Number.isFinite(i.touchedAt)?i.touchedAt:Date.now(),m=o[r];if(m){const h=Array.from(new Set([...m.openPaths,...l])),p=Array.from(new Set([...m.expandedPaths,...c])),v=m.selectedPath??u??h[0]??null;o[r]={openPaths:h,selectedPath:v,expandedPaths:p,touchedAt:Math.max(m.touchedAt,f)};continue}o[r]={openPaths:l,selectedPath:u,expandedPaths:c,touchedAt:f}}return o},kr=(t,e)=>{const o=Object.entries(t);if(o.length<=e)return t;o.sort((s,r)=>(r[1]?.touchedAt??0)-(s[1]?.touchedAt??0));const n={};for(const[s,r]of o.slice(0,e))n[s]=r;return n},l1=t=>t?{...t,touchedAt:Date.now()}:{openPaths:[],selectedPath:null,expandedPaths:[],touchedAt:Date.now()},vD=uo()(an($n((t,e)=>({byRoot:{},addOpenPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l),d=c.openPaths.includes(r),u=d?c.openPaths:[...c.openPaths,r],f=c.selectedPath??r;if(l&&d&&l.selectedPath===f)return i;const m={...i.byRoot,[s]:{...c,openPaths:u,selectedPath:f}};return{byRoot:kr(m,20)}})},removeOpenPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||t(i=>{const l=i.byRoot[s];if(!l)return i;const c=gi(r),d=p=>gi(p)===c,u=l.selectedPath?d(l.selectedPath):!1;if(!l.openPaths.some(d)&&!u)return i;const f=l.openPaths.filter(p=>!d(p)),m=u?f[0]??null:l.selectedPath,h={...i.byRoot,[s]:{...l,openPaths:f,selectedPath:m,touchedAt:Date.now()}};return{byRoot:kr(h,20)}})},removeOpenPathsByPrefix:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||t(i=>{const l=i.byRoot[s];if(!l)return i;const c=gi(r),d=c.endsWith("/")?c:`${c}/`,u=p=>{const v=gi(p);return v===c||v.startsWith(d)},f=l.openPaths.filter(p=>!u(p));if(f.length===l.openPaths.length)return i;const m=l.selectedPath&&u(l.selectedPath)?f[0]??null:l.selectedPath,h={...i.byRoot,[s]:{...l,openPaths:f,selectedPath:m,touchedAt:Date.now()}};return{byRoot:kr(h,20)}})},setSelectedPath:(o,n)=>{const s=$o((o||"").trim()),r=n?$o(n.trim()):null;!s||r&&!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l),d=r&&!c.openPaths.includes(r)?[...c.openPaths,r]:c.openPaths;if(l&&l.selectedPath===r&&d===l.openPaths)return i;const u={...i.byRoot,[s]:{...c,openPaths:d,selectedPath:r}};return{byRoot:kr(u,20)}})},ensureSelectedPath:o=>{const n=$o((o||"").trim());if(!n)return;const s=e().byRoot[n];if(!s||s.selectedPath)return;const r=s.openPaths[0]??null;r&&e().setSelectedPath(n,r)},toggleExpandedPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l),u=c.expandedPaths.includes(r)?c.expandedPaths.filter(m=>m!==r):[...c.expandedPaths,r];if(l&&l.expandedPaths===u&&l.selectedPath===c.selectedPath&&l.openPaths===c.openPaths)return i;const f={...i.byRoot,[s]:{...c,expandedPaths:u}};return{byRoot:kr(f,20)}})},expandPath:(o,n)=>{const s=$o((o||"").trim()),r=$o((n||"").trim());!s||!r||!Ks(r,s)||t(i=>{const l=i.byRoot[s],c=l1(l);if(c.expandedPaths.includes(r)&&l)return i;const u={...i.byRoot,[s]:{...c,expandedPaths:[...c.expandedPaths,r]}};return{byRoot:kr(u,20)}})},expandPaths:(o,n)=>{const s=$o((o||"").trim());if(!s||!n||n.length===0)return;const r=n.map(i=>$o((i||"").trim())).filter(i=>i&&Ks(i,s));r.length!==0&&t(i=>{const l=i.byRoot[s],c=l1(l),d=new Set(c.expandedPaths),u=r.filter(m=>!d.has(m));if(u.length===0)return i;const f={...i.byRoot,[s]:{...c,expandedPaths:[...c.expandedPaths,...u]}};return{byRoot:kr(f,20)}})}}),{name:"files-view-tabs-store",version:2,storage:Zn(()=>Uo()),migrate:t=>{if(!t||typeof t!="object")return{byRoot:{}};const e=t.byRoot;return{byRoot:gD(e)}},partialize:t=>({byRoot:t.byRoot})}),{name:"files-view-tabs-store"})),bD=t=>{const e=de.c(12),{mode:o,onModeChange:n,className:s}=t;let r;e[0]!==o||e[1]!==n?(r=f=>{f.stopPropagation(),n(o==="side-by-side"?"unified":"side-by-side")},e[0]=o,e[1]=n,e[2]=r):r=e[2];const i=r;let l;e[3]!==s?(l=U("h-5 w-5 p-0 opacity-60 hover:opacity-100",s),e[3]=s,e[4]=l):l=e[4];const c=o==="side-by-side"?"Switch to unified view":"Switch to side-by-side view";let d;e[5]!==o?(d=o==="side-by-side"?a.jsx(G,{name:"align-justify",className:"h-3 w-3"}):a.jsx(G,{name:"layout-column",className:"h-3 w-3"}),e[5]=o,e[6]=d):d=e[6];let u;return e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==d?(u=a.jsx(yt,{size:"sm",variant:"ghost",className:l,onClick:i,title:c,children:d}),e[7]=i,e[8]=l,e[9]=c,e[10]=d,e[11]=u):u=e[11],u},yD={maxDepth:50,maxNodes:1e5,initiallyExpandedDepth:2};function wD(t){return t===null?"null":Array.isArray(t)?"array":typeof t=="object"?"object":typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":"null"}function xD(t){if(t.length===0)return"root";let e="root";for(const o of t)/^\d+$/.test(o)?e+=`[${o}]`:e+=`.${o}`;return e}let Fc=0;function Df(t,e,o,n,s){if(Fc>=s.maxNodes)return null;Fc++;const r=wD(t),i=xD(o),l=r==="object"||r==="array",c={id:i,key:e,value:t,type:r,depth:n,path:o,isExpandable:l};if(l&&n<s.maxDepth){const d=r==="array"?t.map((u,f)=>[String(f),u]):Object.entries(t);c.childCount=d.length,c.children=[];for(const[u,f]of d){const m=[...o,u],h=Df(f,u,m,n+1,s);h&&c.children.push(h)}}else l&&(c.childCount=r==="array"?t.length:Object.keys(t).length);return c}function CD(t,e){const o={...yD,...e};Fc=0;try{const n=t.trim();if(!n)return null;const s=JSON.parse(n);return Df(s,"root",[],0,o)}catch{return null}}function SD(t,e){if(!t)return[];const o=[];function n(s){const r=!e.has(s.id);if(o.push({node:s,isExpanded:r}),s.isExpandable&&r&&s.children)for(const i of s.children)n(i)}return n(t),o}function kD(t){if(!t)return[];const e=[];function o(n){if(n.isExpandable&&(e.push(n.id),n.children))for(const s of n.children)o(s)}return o(t),e}function MD(t,e){if(!t)return[];const o=[];function n(s){if(s.isExpandable&&s.depth>=e&&o.push(s.id),s.children)for(const r of s.children)n(r)}return n(t),o}const L5=["var(--syntax-key)","color-mix(in oklch, var(--syntax-key) 85%, var(--syntax-string))","color-mix(in oklch, var(--syntax-key) 70%, var(--syntax-number))","color-mix(in oklch, var(--syntax-key) 55%, var(--syntax-function))","color-mix(in oklch, var(--syntax-key) 40%, var(--syntax-type))","color-mix(in oklch, var(--syntax-key) 30%, var(--syntax-keyword))"];function AD(t){return L5[t%L5.length]}function FD(t){switch(t.type){case"string":return"var(--syntax-string)";case"number":return"var(--syntax-number)";case"boolean":return"var(--syntax-keyword)";case"null":return"var(--syntax-comment)";default:return"var(--surface-foreground)"}}function _c(t){switch(t.type){case"string":{const e=t.value;return e.length>60?`"${e.slice(0,57)}..."`:`"${e}"`}case"number":case"boolean":return String(t.value);case"null":return"null";case"object":return`{${t.childCount??0} ${t.childCount===1?"item":"items"}}`;case"array":return`[${t.childCount??0}]`;default:return String(t.value)}}function _D(t){if(t.type==="object"){const e=t.children?.map(n=>n.key).slice(0,3)??[],o=(t.childCount??0)>3?", ...":"";return`{ ${e.map(n=>`"${n}": ...`).join(", ")}${o} }`}if(t.type==="array"){const e=t.childCount??0;return e<=3?`[${t.children?.map(n=>_c(n)).join(", ")??""}]`:`[${e} items]`}return _c(t)}const Bc=g.memo(t=>{const e=de.c(29),{flatNode:o,onToggle:n,onCopyPath:s}=t,{node:r,isExpanded:i}=o,l=r.depth*20;let c;e[0]!==r.id||e[1]!==n?(c=()=>{n(r.id)},e[0]=r.id,e[1]=n,e[2]=c):c=e[2];const d=c;let u;e[3]!==r.id||e[4]!==s?(u=k=>{s&&(k.preventDefault(),s(r.id))},e[3]=r.id,e[4]=s,e[5]=u):u=e[5];const f=u;let m;e[6]!==r.depth?(m=AD(r.depth),e[6]=r.depth,e[7]=m):m=e[7];const h=m;let p;e[8]!==r?(p=FD(r),e[8]=r,e[9]=p):p=e[9];const v=p,b=r.isExpandable&&r.children&&r.children.length>0,y=`${l+8}px`;let w;e[10]!==y?(w={paddingLeft:y},e[10]=y,e[11]=w):w=e[11];let S;e[12]!==d||e[13]!==b||e[14]!==i?(S=b?a.jsx("button",{type:"button",onClick:d,className:"mr-1 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm hover:bg-[var(--interactive-hover)] text-muted-foreground",children:i?a.jsx(G,{name:"arrow-down-s",className:"h-3 w-3"}):a.jsx(G,{name:"arrow-right-s",className:"h-3 w-3"})}):a.jsx("span",{className:"mr-1 w-4"}),e[12]=d,e[13]=b,e[14]=i,e[15]=S):S=e[15];let C;e[16]!==h||e[17]!==r.key?(C=r.key!=="root"&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"mr-1 font-semibold",style:{color:h},children:/^\d+$/.test(r.key)?r.key:`"${r.key}"`}),a.jsx("span",{className:"mr-1 text-[var(--surface-foreground)]",children:":"})]}),e[16]=h,e[17]=r.key,e[18]=C):C=e[18];let x;e[19]!==i||e[20]!==r||e[21]!==v?(x=r.isExpandable?i?a.jsx("span",{className:"text-[var(--surface-foreground)]",children:r.type==="object"?"{":"["}):a.jsx("span",{style:{color:"var(--surface-mutedForeground)"},children:_D(r)}):a.jsx("span",{style:{color:v},children:_c(r)}),e[19]=i,e[20]=r,e[21]=v,e[22]=x):x=e[22];let _;return e[23]!==f||e[24]!==w||e[25]!==S||e[26]!==C||e[27]!==x?(_=a.jsxs("div",{className:"flex items-center py-0.5 px-2 hover:bg-[var(--surface-hover)] rounded-sm cursor-default font-mono text-xs leading-5 whitespace-nowrap",style:w,onContextMenu:f,children:[S,C,x]}),e[23]=f,e[24]=w,e[25]=S,e[26]=C,e[27]=x,e[28]=_):_=e[28],_});Bc.displayName="JsonRow";const BD=200,DD=22,PD=g.forwardRef(function({data:e,className:o,maxHeight:n="100%",initiallyExpandedDepth:s=2,onCopyPath:r},i){const l=g.useMemo(()=>{try{return JSON.stringify(e)}catch{return null}},[e]),c=g.useMemo(()=>l?CD(l):null,[l]),[d,u]=g.useState(()=>c?new Set(MD(c,s)):new Set),f=g.useMemo(()=>SD(c,d),[c,d]),m=f.length>BD,h=g.useRef(null),p=O8({count:f.length,getScrollElement:()=>h.current,estimateSize:()=>DD,overscan:20,enabled:m}),v=g.useCallback(w=>{u(S=>{const C=new Set(S);return C.has(w)?C.delete(w):C.add(w),C})},[]),b=g.useCallback(()=>{u(new Set)},[]),y=g.useCallback(()=>{c&&u(new Set(kD(c)))},[c]);return g.useImperativeHandle(i,()=>({expandAll:b,collapseAll:y}),[b,y]),c?m?a.jsx("div",{ref:h,className:o,style:{maxHeight:n,overflow:"auto"},children:a.jsx("div",{style:{height:`${p.getTotalSize()}px`,width:"100%",position:"relative"},children:p.getVirtualItems().map(w=>{const S=f[w.index];return S?a.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${w.size}px`,transform:`translateY(${w.start}px)`},children:a.jsx(Bc,{flatNode:S,onToggle:v,onCopyPath:r})},S.node.id):null})})}):a.jsx("div",{ref:h,className:o,style:{maxHeight:n,overflow:"auto"},children:f.map(w=>a.jsx(Bc,{flatNode:w,onToggle:v,onCopyPath:r},w.node.id))}):null});function Pf(t){const e=t.colors.syntax,o=t.colors.surface;return{'code[class*="language-"]':{color:e.base.foreground,background:"transparent",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:e.base.foreground,background:"transparent",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"0",margin:"0",overflow:"auto"},comment:{color:e.base.comment,fontStyle:"italic"},prolog:{color:e.base.comment},doctype:{color:e.base.comment},cdata:{color:e.base.comment},punctuation:{color:e.tokens?.punctuation||o.mutedForeground},property:{color:e.tokens?.variableProperty||e.base.variable},tag:{color:e.tokens?.tag||e.base.keyword},"attr-name":{color:e.tokens?.tagAttribute||e.base.variable},"attr-value":{color:e.tokens?.tagAttributeValue||e.base.string},boolean:{color:e.tokens?.boolean||e.base.number},number:{color:e.base.number},constant:{color:e.tokens?.constant||e.base.number},symbol:{color:e.tokens?.constant||e.base.number},string:{color:e.base.string},char:{color:e.base.string},function:{color:e.base.function},builtin:{color:e.tokens?.functionBuiltin||e.base.function},"class-name":{color:e.tokens?.className||e.base.type},namespace:{color:e.tokens?.namespace||e.base.type,opacity:.8},keyword:{color:e.base.keyword},atrule:{color:e.base.keyword},selector:{color:e.base.function},operator:{color:e.base.operator},variable:{color:e.base.variable},regex:{color:e.tokens?.regex||e.base.string},url:{color:e.base.function,textDecoration:"underline"},entity:{color:e.base.function,cursor:"help"},".language-css .token.string":{color:e.base.string},".style .token.string":{color:e.base.string},deleted:{color:t.colors.status.error,backgroundColor:t.colors.status.errorBackground},inserted:{color:t.colors.status.success,backgroundColor:t.colors.status.successBackground},title:{color:t.colors.primary.base,fontWeight:"bold"},"code-block":{color:e.base.string},"code-snippet":{color:e.base.string},list:{color:e.base.variable},hr:{color:o.mutedForeground},table:{color:e.base.function},blockquote:{color:o.mutedForeground,fontStyle:"italic"},important:{color:e.base.keyword,fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},strike:{textDecoration:"line-through"},decorator:{color:e.tokens?.decorator||e.base.function},annotation:{color:e.tokens?.decorator||e.base.function}}}const Dc=t=>{const e=t,o=e?.clientRole,n=e?.role;return e?.userMessageMarker===!0||o==="user"||n==="user"||e?.origin==="user"||e?.source==="user"?{role:"user",isUser:!0}:{role:o||n||"assistant",isUser:!1}},Tf=t=>{const e=de.c(8),{className:o,width:n,height:s}=t,r=o===void 0?"":o,i=n===void 0?70:n,l=s===void 0?70:s;let c;e[0]!==l||e[1]!==i?(c={maxWidth:i,maxHeight:l},e[0]=l,e[1]=i,e[2]=c):c=e[2];let d;return e[3]!==r||e[4]!==l||e[5]!==c||e[6]!==i?(d=a.jsx("img",{src:"/logo-dark-512x512.svg",alt:"Vinci",width:i,height:l,className:r,style:c}),e[3]=r,e[4]=l,e[5]=c,e[6]=i,e[7]=d):d=e[7],d},da=()=>typeof window<"u"&&!!window.__APP_ELECTRON__,TD=()=>{if(typeof window>"u")return null;const t=window.__TAURI__;return typeof t?.core?.invoke=="function"?t.core.invoke:null},ua=async(t,e)=>{const o=TD();if(!o)throw new Error("Desktop runtime is not available");return o(t,e)},dZ=async()=>{if(hn())try{if(da()){await ua("desktop_start_window_drag");return}const{getCurrentWindow:t}=await zt(async()=>{const{getCurrentWindow:e}=await import("./vendor-.bun-B9l0ZNi2.js").then(o=>o.bM);return{getCurrentWindow:e}},__vite__mapDeps([0,1]));await t().startDragging()}catch{}},uZ=async()=>{if(!hn())return!1;try{if(!da()){const{getCurrentWindow:t}=await zt(async()=>{const{getCurrentWindow:e}=await import("./vendor-.bun-B9l0ZNi2.js").then(o=>o.bM);return{getCurrentWindow:e}},__vite__mapDeps([0,1]));return await t().isFullscreen()}return!!await ua("desktop_is_window_fullscreen")}catch{return!1}},fZ=t=>typeof window>"u"?()=>{}:(window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)),HD=async t=>{if(hn())try{if(!da()){const{getCurrentWindow:e}=await zt(async()=>{const{getCurrentWindow:o}=await import("./vendor-.bun-B9l0ZNi2.js").then(n=>n.bM);return{getCurrentWindow:o}},__vite__mapDeps([0,1]));await e().setTitle(t);return}await ua("desktop_set_window_title",{title:t})}catch{}},ID=async(t,e)=>{if(hn())try{if(!da()){const{invoke:o}=await zt(async()=>{const{invoke:n}=await import("./vendor-.bun-B9l0ZNi2.js").then(s=>s.aK);return{invoke:n}},__vite__mapDeps([0,1]));await o("desktop_set_window_theme",{themeMode:t,themeVariant:e});return}await ua("desktop_set_window_theme",{themeMode:t,themeVariant:e})}catch{}},mZ=async()=>{if(!hn())return null;try{if(!da()){const{getVersion:e}=await zt(async()=>{const{getVersion:o}=await import("./vendor-.bun-B9l0ZNi2.js").then(n=>n.aA);return{getVersion:o}},__vite__mapDeps([0,1]));return await e()}const t=await ua("desktop_get_app_version");return typeof t=="string"&&t.trim().length>0?t:null}catch{return null}},ED=["concise","detailed","mentor","pushback","noFiller","matchEnergy","warmPeer"],jD=t=>typeof t=="string"&&ED.includes(t),LD=t=>{switch(t){case"concise":return"Keep replies short. Answer first, no preamble or recap of the question. Write like you're texting a colleague who already has the context — plain sentences, not headings or bullets. Reach for a list only when the content is genuinely a list; never use one to look organised.";case"detailed":return"Take the space you need to actually explain things. Walk through what's going on, why it matters, and where the real tradeoffs are. Prefer flowing prose over bullet points and headings — structure the answer with paragraphs and let the reasoning carry it. Lists are fine when something really is enumerable, but don't fragment a normal explanation into bullets.";case"mentor":return"Talk like a patient senior engineer pairing with someone less experienced. Explain the underlying idea before the answer, think out loud about how you'd approach it, and drop in a small concrete example when it actually helps. Keep it conversational — no lecture format, no checklists, no numbered steps unless the task literally is a sequence.";case"pushback":return"Don't agree automatically. If something I say sounds off — a wrong assumption, a flawed approach, a request that won't actually do what I think it will — push back first. Explain what you disagree with and why, and only proceed once I've responded. Disagreement is welcome; sycophancy is not. Don't soften it with 'you might want to consider' — just say it.";case"noFiller":return"Cut the filler. No 'Great question', no 'Certainly', no 'I'll help you with that', no restating what I just asked. No closing summary of what you did when the diff or output already shows it. No trailing 'let me know if you need anything else'. Open with the actual content and stop when you're done.";case"matchEnergy":return"Mirror the size and register of my message. A one-line question gets a one-line answer. A casual aside gets a casual reply, not a structured breakdown. If I write three words, don't respond with three paragraphs. Match the tone too — informal stays informal, technical stays technical. Don't inflate small asks into full essays.";case"warmPeer":return"Talk like a colleague, not an assistant. First person is fine and encouraged — 'I'd do this', 'I don't love that approach', 'that was sloppy of me'. Have actual opinions and share them. Push back when you disagree. Admit when you screwed up without grovelling. Skip the corporate helpfulness and performative politeness — just be a person."}},VD=({enabled:t,preset:e,customInstructions:o})=>t?e==="custom"?(typeof o=="string"?o.trim():"")||null:jD(e)?LD(e):null:null,ND=async()=>{const t=await fetch("/api/config/settings",{method:"GET",headers:{Accept:"application/json"}});if(!t.ok)return null;const e=await t.json().catch(()=>null);return e?VD({enabled:e.responseStyleEnabled===!0,preset:e.responseStylePreset,customInstructions:e.responseStyleCustomInstructions}):null},RD=g.memo(function(e){const o=de.c(24),{checked:n,onChange:s,disabled:r,ariaLabel:i,className:l,iconClassName:c}=e,d=r===void 0?!1:r;let u;o[0]!==n||o[1]!==d||o[2]!==s?(u=C=>{C.preventDefault(),C.stopPropagation(),!d&&!n&&s()},o[0]=n,o[1]=d,o[2]=s,o[3]=u):u=o[3];const f=u;let m;o[4]!==n||o[5]!==d||o[6]!==s?(m=C=>{(C.key===" "||C.key==="Enter")&&(C.preventDefault(),!d&&!n&&s())},o[4]=n,o[5]=d,o[6]=s,o[7]=m):m=o[7];const h=m,p=n?"bg-[color-mix(in_srgb,var(--primary-base)_80%,transparent)] shadow-none hover:bg-[var(--primary-base)]":"bg-[var(--surface-muted)] shadow-[inset_0_0_0_1px_var(--interactive-border)] hover:bg-[var(--interactive-hover)]";let v;o[8]!==l||o[9]!==p?(v=U("group/radio relative flex h-[14px] w-[14px] min-h-[14px] min-w-[14px] shrink-0 self-center items-center justify-center rounded-full outline-none","transition-[background-color,box-shadow] duration-200 ease-out",p,"focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] focus-visible:ring-offset-1 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50",l),o[8]=l,o[9]=p,o[10]=v):v=o[10];const b=!n&&"opacity-0";let y;o[11]!==c||o[12]!==b?(y=U("block h-[5px] w-[5px] rounded-full bg-white",b,c),o[11]=c,o[12]=b,o[13]=y):y=o[13];let w;o[14]!==y?(w=a.jsx("span",{"aria-hidden":!0,className:y}),o[14]=y,o[15]=w):w=o[15];let S;return o[16]!==i||o[17]!==n||o[18]!==d||o[19]!==f||o[20]!==h||o[21]!==v||o[22]!==w?(S=a.jsx("button",{type:"button",role:"radio",onClick:f,onKeyDown:h,disabled:d,"aria-checked":n,"aria-label":i,className:v,children:w}),o[16]=i,o[17]=n,o[18]=d,o[19]=f,o[20]=h,o[21]=v,o[22]=w,o[23]=S):S=o[23],S}),zD=["standalone","minimal-ui","fullscreen","window-controls-overlay"],V5="vinci.pwaRecentSessions",OD=t=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(`(display-mode: ${t})`).matches,hZ=()=>typeof window>"u"?"browser":typeof document<"u"&&document.referrer.startsWith("android-app://")?"twa":window.navigator.standalone?"standalone":zD.find(o=>OD(o))??"browser",$D=1440*60*1e3,Hf=5,N5=1440*60*1e3,yl=t=>t.time?.updated??t.time?.created??0,R5=({sessions:t,currentSessionId:e,cutoffDays:o,keepRecent:n=Hf,now:s=Date.now()})=>{if(!Array.isArray(t)||o<=0)return[];const r=s-o*$D,i=[...t].sort((c,d)=>yl(d)-yl(c)),l=new Set(i.slice(0,n).map(c=>c.id));return i.filter(c=>{if(!c?.id||l.has(c.id)||c.id===e||c.share)return!1;const d=yl(c);return d?d<r:!1}).map(c=>c.id)},ZD=t=>{const e=typeof t=="object"?t:void 0,o=e?.autoRun!==!1,n=typeof t=="boolean"?t:e?.enabled??!0,s=Te(w=>w.currentSessionId),r=Te(w=>w.isLoading),i=yn(w=>w.activeSessions),l=yn(w=>w.hasLoaded),c=Me(w=>w.autoDeleteEnabled),d=Me(w=>w.autoDeleteAfterDays),u=Me(w=>w.sessionRetentionAction),f=Me(w=>w.autoDeleteLastRunAt),m=Me(w=>w.setAutoDeleteLastRunAt),[h,p]=g.useState(!1),v=g.useRef(!1);g.useEffect(()=>{Pd(ir())},[]);const b=g.useMemo(()=>d<=0?[]:R5({sessions:i,currentSessionId:s,cutoffDays:d}),[d,s,i]),y=g.useCallback(async({force:w=!1}={})=>{if(v.current)return{completedIds:[],failedIds:[],action:u,skippedReason:"running"};if((!c||d<=0)&&!w)return{completedIds:[],failedIds:[],action:u,skippedReason:"disabled"};if(r)return{completedIds:[],failedIds:[],action:u,skippedReason:"loading"};const S=Date.now();if(!w&&f&&S-f<N5)return{completedIds:[],failedIds:[],action:u,skippedReason:"cooldown"};const{activeSessions:C}=await Pd(ir());if(C.length===0)return{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};const x=R5({sessions:C,currentSessionId:s,cutoffDays:d,now:S});if(x.length===0)return m(S),{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};v.current=!0,p(!0);try{const _=new Map(C.map(F=>[F.id,F])),k=[],D=[];for(const F of x){const A=_.get(F),B=A?rr(A):null;if(!B){D.push(F);continue}const M=it.getScopedSdkClient(B);try{u==="archive"?await M.session.update({sessionID:F,directory:B,time:{archived:Date.now()}}):await M.session.delete({sessionID:F,directory:B}),k.push(F)}catch{D.push(F)}}return u==="archive"?yn.getState().archiveSessions(k):yn.getState().removeSessions(k),{completedIds:k,failedIds:D,action:u}}finally{v.current=!1,p(!1),m(Date.now())}},[d,c,f,s,r,u,m]);return g.useEffect(()=>{if(!n||!o||!c||d<=0||r||!l||i.length===0)return;const w=Date.now();f&&w-f<N5||y()},[d,c,f,o,n,l,i.length,r,y]),{candidates:b,isRunning:h,runCleanup:y,keepRecentCount:Hf,action:u}},UD="/auth/passkey/authenticate/options",qD="/auth/passkey/authenticate/verify",WD="/auth/passkey/register/options",GD="/auth/passkey/register/verify",If="/api/passkeys",KD="/auth/passkey/status",YD="/api/auth/reset",v1={enabled:!1,hasPasskeys:!1,passkeyCount:0,rpID:null},U1=async(t,e)=>fetch(t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e===void 0?void 0:JSON.stringify(e)}),jr=async(t,e)=>{try{const o=await t.json();if(o&&typeof o.error=="string"&&o.error.trim())return o.error}catch{}return e},wl=t=>t instanceof dh&&t.code==="ERROR_CEREMONY_ABORTED",JD=()=>{ch.cancelCeremony()},Ef=()=>typeof window>"u"?{supported:!1,reason:"Passkeys are unavailable outside the browser."}:window.isSecureContext?{supported:!0,reason:""}:{supported:!1,reason:"Passkeys require HTTPS or localhost."},QD=async()=>{const t=Ef();if(!t.supported)throw new Error(t.reason);const e=typeof navigator.userAgent=="string"&&navigator.userAgent.trim()?navigator.userAgent:"This device",o=await U1(WD,{label:e});if(!o.ok)throw new Error(await jr(o,"Could not start passkey setup."));const{requestId:n,optionsJSON:s}=await o.json(),r=await lh({optionsJSON:s}),i=await U1(GD,{requestId:n,response:r});if(!i.ok)throw new Error(await jr(i,"Could not finish passkey setup."));return i.json().catch(()=>null)},XD=async t=>{const e=Ef();if(!e.supported)throw new Error(e.reason);const o=await U1(UD);if(!o.ok)throw new Error(await jr(o,"Passkey sign-in is not available right now."));const{requestId:n,optionsJSON:s}=await o.json(),r=await uh({optionsJSON:s}),i=await U1(qD,{requestId:n,response:r,trustDevice:t});if(!i.ok)throw new Error(await jr(i,"Passkey sign-in failed."));return i.json().catch(()=>null)},eP=async()=>{const t=await fetch(KD,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)return v1;const e=await t.json().catch(()=>null);return{enabled:e?.enabled===!0,hasPasskeys:e?.hasPasskeys===!0,passkeyCount:typeof e?.passkeyCount=="number"?e.passkeyCount:0,rpID:typeof e?.rpID=="string"&&e.rpID?e.rpID:null}},pZ=async()=>{const t=await fetch(If,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)throw new Error(await jr(t,"Could not load passkeys."));const e=await t.json().catch(()=>null);return Array.isArray(e?.passkeys)?e.passkeys:[]},gZ=async t=>{const e=await fetch(`${If}/${encodeURIComponent(t)}`,{method:"DELETE",credentials:"include",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(await jr(e,"Could not remove passkey."));return e.json().catch(()=>null)},vZ=async()=>{const t=await U1(YD);if(!t.ok)throw new Error(await jr(t,"Could not clear saved authentication."));return t.json().catch(()=>null)};class tP{recognition=null;isListening=!1;currentLang="en-US";onResultCallback=null;onErrorCallback=null;restartOnEnd=!1;conversationMode=!1;isSpeaking=!1;audioContext=null;audioUnlockRequired=!1;isSupported(){const e="SpeechRecognition"in window||"webkitSpeechRecognition"in window,o="speechSynthesis"in window;return e&&o}getSupportDetails(){return{recognition:"SpeechRecognition"in window||"webkitSpeechRecognition"in window,synthesis:"speechSynthesis"in window,prefixed:!("SpeechRecognition"in window)&&"webkitSpeechRecognition"in window,secureContext:window.isSecureContext}}setConversationMode(e){this.conversationMode=e,e||(this.restartOnEnd=!1)}isConversationMode(){return this.conversationMode}pauseListening(){if(this.restartOnEnd=!1,this.recognition)try{this.recognition.stop()}catch{}this.isListening=!1}resumeListening(){if(console.log("[BrowserVoiceService] resumeListening called:",{conversationMode:this.conversationMode,hasCallback:!!this.onResultCallback,isSpeaking:this.isSpeaking,currentLang:this.currentLang}),this.conversationMode&&this.onResultCallback&&!this.isSpeaking)try{console.log("[BrowserVoiceService] Resuming listening..."),this.startListeningSync(this.currentLang,this.onResultCallback,this.onErrorCallback||void 0)}catch(e){console.error("[BrowserVoiceService] Failed to resume listening:",e)}else console.log("[BrowserVoiceService] Not resuming - conditions not met")}async checkMicrophonePermission(){try{return"permissions"in navigator?(await navigator.permissions.query({name:"microphone"})).state==="granted":!1}catch{return!1}}async prepareListening(){if(!this.isSupported())throw new Error("Web Speech API not supported in this browser");if(typeof navigator>"u"||typeof navigator.mediaDevices?.getUserMedia!="function")return!0;try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(o=>o.stop()),!0}catch(e){const o=typeof e=="object"&&e&&"name"in e?String(e.name):"";if(o==="NotAllowedError")throw new Error("Microphone permission denied");if(o==="NotFoundError")throw new Error("No microphone found");const n=e instanceof Error?e.message:"Unable to access microphone";throw new Error(n)}}startListeningSync(e,o,n){if(!this.isSupported()){const r="Web Speech API not supported in this browser";throw n?.(r),new Error(r)}this.stopListening();const s=window.SpeechRecognition||window.webkitSpeechRecognition;this.recognition=new s,this.currentLang=e,this.onResultCallback=o,this.onErrorCallback=n||null,this.recognition.continuous=!0,this.recognition.interimResults=!0,this.recognition.lang=e,this.recognition.onstart=()=>{console.log("[BrowserVoiceService] Recognition started"),this.isListening=!0,this.restartOnEnd=!0},this.recognition.onaudiostart=()=>{console.log("[BrowserVoiceService] Audio recording started")},this.recognition.onsoundstart=()=>{console.log("[BrowserVoiceService] Sound detected")},this.recognition.onresult=r=>{console.log("[BrowserVoiceService] Got result:",r.results.length,"results");let i="",l="";for(let c=r.resultIndex;c<r.results.length;c++){const d=r.results[c];d.isFinal?i+=d[0].transcript:l+=d[0].transcript}console.log("[BrowserVoiceService] Transcripts - interim:",l,"final:",i),l&&(console.log("[BrowserVoiceService] Calling onResultCallback with interim"),this.onResultCallback?.(l,!1)),i&&(console.log("[BrowserVoiceService] Calling onResultCallback with final"),this.onResultCallback?.(i,!0))},this.recognition.onerror=r=>{if(r.error==="aborted")return;const i=this.getErrorMessage(r.error);this.onErrorCallback?.(i),(r.error==="not-allowed"||r.error==="service-not-allowed"||r.error==="network")&&(this.restartOnEnd=!1,this.isListening=!1)},this.recognition.onend=()=>{if(this.isListening=!1,this.restartOnEnd&&this.recognition&&!this.isSpeaking)try{this.recognition.start()}catch{}};try{this.recognition.start()}catch(r){const i=r instanceof Error?r.message:"Failed to start speech recognition";throw n?.(i),new Error(i)}}async startListening(e,o,n){this.startListeningSync(e,o,n)}stopListening(){if(this.restartOnEnd=!1,this.recognition){try{this.recognition.stop()}catch{}this.recognition=null}this.isListening=!1}getIsListening(){return this.isListening}getCurrentLang(){return this.currentLang}async resumeAudioContext(){this.audioContext||(this.audioContext=new(window.AudioContext||window.webkitAudioContext)),this.audioContext.state==="suspended"&&await this.audioContext.resume()}isAudioUnlockRequired(){return this.audioUnlockRequired}async unlockAudio(){try{const e=new Audio;if(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA",e.volume=.01,await e.play(),await this.resumeAudioContext(),this.isMobileDevice()&&"speechSynthesis"in window){const o=new SpeechSynthesisUtterance("");o.volume=0,window.speechSynthesis.speak(o),window.speechSynthesis.cancel(),console.log("[BrowserVoiceService] Speech synthesis unlocked for mobile")}return this.audioUnlockRequired=!1,console.log("[BrowserVoiceService] Audio unlocked successfully"),!0}catch(e){return console.error("[BrowserVoiceService] Failed to unlock audio:",e),!1}}async speakText(e,o,n,s){if(!("speechSynthesis"in window))throw new Error("Speech synthesis not supported");await this.resumeAudioContext();const r=await this.waitForVoices();await new Promise(c=>setTimeout(c,50)),this.isSpeaking=!0,this.pauseListening(),window.speechSynthesis.cancel();const i=new SpeechSynthesisUtterance(e);i.lang=o,i.rate=s?.rate??1,i.pitch=s?.pitch??1,i.volume=s?.volume??1;let l=null;return s?.voiceName&&(l=r.find(c=>c.name===s.voiceName)||null,l?console.log(`[BrowserVoiceService] Using selected voice: ${l.name} (${l.lang})`):console.warn(`[BrowserVoiceService] Selected voice "${s.voiceName}" not found, falling back to language match`)),l||(l=this.findBestVoice(r,o),l?console.log(`[BrowserVoiceService] Using language-matched voice: ${l.name} (${l.lang})`):console.warn(`[BrowserVoiceService] No voice found for language: ${o}, using default`)),l&&(i.voice=l),console.log(`[BrowserVoiceService] Speaking text (${e.length} chars) in ${o}`),new Promise((c,d)=>{let u=!1;i.onstart=()=>{u=!0,console.log("[BrowserVoiceService] Speech started"),c()},i.onend=()=>{this.isSpeaking=!1,console.log("[BrowserVoiceService] Speech ended"),n?.()},i.onerror=f=>{this.isSpeaking=!1,console.error("[BrowserVoiceService] Speech synthesis error:",f.error),(f.error==="not-allowed"||f.error==="interrupted")&&(this.audioUnlockRequired=!0);let m=`Speech synthesis error: ${f.error||"unknown"}`;f.error==="not-allowed"?m="Audio blocked by browser autoplay policy. Please interact with the page first.":f.error==="interrupted"&&(m="Speech was interrupted. Please try again."),d(new Error(m))},setTimeout(()=>{u||(console.warn("[BrowserVoiceService] Speech start timeout - audio may be blocked"),this.audioUnlockRequired=!0)},2e3),window.speechSynthesis.speak(i)})}cancelSpeech(){"speechSynthesis"in window&&window.speechSynthesis.cancel()}getVoices(){return"speechSynthesis"in window?window.speechSynthesis.getVoices():[]}async waitForVoices(){if(!("speechSynthesis"in window))return[];const e=window.speechSynthesis.getVoices();return e.length>0?e:new Promise(o=>{const n=()=>{o(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null};window.speechSynthesis.onvoiceschanged=n,setTimeout(()=>{o(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null},1e3)})}findBestVoice(e,o){let n=e.find(s=>s.lang===o);if(!n){const s=o.split("-")[0];n=e.find(r=>r.lang.startsWith(s))}return n||(n=e.find(s=>s.lang.startsWith(o.split("-")[0])&&s.localService)),n||null}isMobileDevice(){if(typeof navigator>"u")return!1;const e=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod|android|mobile|webos|blackberry|iemobile|opera mini/i.test(e)}isIOSSafari(){if(typeof navigator>"u")return!1;const e=navigator.userAgent.toLowerCase(),o=/iphone|ipad|ipod/i.test(e),n=/safari/i.test(e)&&!/chrome|crios|crmo/i.test(e);return o&&n}getErrorMessage(e){const o=this.isMobileDevice(),n=this.isIOSSafari();return{"no-speech":"No speech detected",aborted:"Speech recognition aborted","audio-capture":"No microphone found",network:"Network error - check connection","not-allowed":o?"Microphone permission denied. Check Settings > Safari > Microphone":"Microphone permission denied","service-not-allowed":n?"Speech recognition requires a user gesture. Please tap the microphone button again.":"Speech recognition service not allowed","bad-grammar":"Grammar error","language-not-supported":"Language not supported"}[e]||`Speech recognition error: ${e}`}}const _o=new tP,oP=80,nP=300;class sP{stream=null;mediaRecorder=null;audioContext=null;analyser=null;vadTimer=null;chunks=[];recordingStartMs=0;isActive=!1;isSpeaking=!1;silenceSince=null;onResult=null;onError=null;finishResolver=null;lang="en";cfg={baseURL:"",model:"deepdml/faster-whisper-large-v3-turbo-ct2",language:"",silenceThresholdDb:-45,silenceHoldMs:1500};configure(e){this.cfg={silenceThresholdDb:-45,silenceHoldMs:1500,language:"",...e}}isSupported(){return typeof window<"u"&&typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof window.MediaRecorder<"u"&&typeof window.AudioContext<"u"}async startListening(e,o,n){this.isActive&&this.stopListening(),this.lang=e,this.onResult=o,this.onError=n??null,this.isActive=!0;try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1})}catch(s){this.isActive=!1;const r=s instanceof Error?s.message:"Microphone access denied";n?.(r);return}this._setupAudioContext(),this._startRecorder(),this._startVAD()}stopListening(){this._stopVAD(),this._stopRecorder(),this._cleanupAfterStop(!0)}async finishListening(){if(this.isActive){if(this._stopVAD(),this.isSpeaking=!1,this.silenceSince=null,!this.mediaRecorder||this.mediaRecorder.state==="inactive"){this._cleanupAfterStop(!0);return}await new Promise(e=>{this.finishResolver=e,this._finaliseUtterance(!1)}),this._cleanupAfterStop(!0)}}getIsListening(){return this.isActive}_setupAudioContext(){if(!this.stream)return;const e=window.AudioContext??window.webkitAudioContext;this.audioContext=new e;const o=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=512,o.connect(this.analyser)}_teardownAudioContext(){try{this.audioContext?.close()}catch{}this.audioContext=null,this.analyser=null}_startRecorder(){if(!this.stream)return;const e=this._pickMimeType(),o={};e&&MediaRecorder.isTypeSupported(e)&&(o.mimeType=e),this.mediaRecorder=new MediaRecorder(this.stream,o),this.chunks=[],this.recordingStartMs=Date.now(),this.mediaRecorder.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},this.mediaRecorder.onstop=()=>{const n=this.chunks.splice(0),s=Date.now()-this.recordingStartMs;if(n.length===0||s<nP){this.finishResolver?.(),this.finishResolver=null;return}const r=n[0].type||e||"audio/webm",i=new Blob(n,{type:r});this._upload(i,r).finally(()=>{this.finishResolver?.(),this.finishResolver=null})},this.mediaRecorder.start(250)}_stopRecorder(){if(this.mediaRecorder&&this.mediaRecorder.state!=="inactive")try{this.mediaRecorder.stop()}catch{this.finishResolver?.(),this.finishResolver=null}this.mediaRecorder=null}_releaseStream(){this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null)}_startVAD(){this._stopVAD(),this.silenceSince=null,this.isSpeaking=!1,this.vadTimer=setInterval(()=>{if(!this.isActive||!this.analyser)return;this._getRmsDb()<this.cfg.silenceThresholdDb?this.isSpeaking&&(this.silenceSince===null?this.silenceSince=Date.now():Date.now()-this.silenceSince>=this.cfg.silenceHoldMs&&(this.isSpeaking=!1,this.silenceSince=null,this._finaliseUtterance(!0))):(this.silenceSince=null,this.isSpeaking||(this.isSpeaking=!0,this.mediaRecorder?.state==="recording"&&(this.recordingStartMs=Date.now())))},oP)}_stopVAD(){this.vadTimer!==null&&(clearInterval(this.vadTimer),this.vadTimer=null)}_cleanupAfterStop(e){const o=this.finishResolver;this.isActive=!1,this.finishResolver=null,this.mediaRecorder=null,this._teardownAudioContext(),this._releaseStream(),e&&(this.chunks=[]),this.isSpeaking=!1,this.silenceSince=null,this.onResult=null,this.onError=null,o?.()}_finaliseUtterance(e){this.isActive&&(this.mediaRecorder&&this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),e&&setTimeout(()=>{this.isActive&&this.stream&&this._startRecorder()},100))}_getRmsDb(){if(!this.analyser)return-1/0;const e=new Float32Array(this.analyser.fftSize);this.analyser.getFloatTimeDomainData(e);let o=0;for(const s of e)o+=s*s;const n=Math.sqrt(o/e.length);return n===0?-1/0:20*Math.log10(n)}async _upload(e,o){if(this.onResult)try{const n={"Content-Type":o,"X-Base-URL":this.cfg.baseURL,"X-Model":this.cfg.model};if(this.cfg.language)n["X-Language"]=this.cfg.language;else if(this.lang&&this.lang!=="auto"){const l=this.lang.split("-")[0];n["X-Language"]=l}const s=await fetch("/api/stt/transcribe",{method:"POST",headers:n,body:e});if(!s.ok){const l=await s.json().catch(()=>({error:"Unknown error"}));throw new Error(l.error??`HTTP ${s.status}`)}const i=((await s.json()).transcript??"").trim();i&&this.onResult(i,!0)}catch(n){if(!this.isActive)return;const s=n instanceof Error?n.message:"Transcription upload failed";console.error("[AudioStreamService] Upload error:",s),this.onError?.(s)}}_pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"];return typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?e.find(o=>MediaRecorder.isTypeSupported(o))??"":""}}const ls=new sP,bZ=[{id:"Xenova/whisper-tiny.en",name:"Whisper Tiny (EN)",size:"~39 MB",languages:"English",description:"Fastest, lowest accuracy. Good for quick dictation."},{id:"Xenova/whisper-base.en",name:"Whisper Base (EN)",size:"~73 MB",languages:"English",description:"Balanced speed and accuracy. Default for English."},{id:"Xenova/whisper-small.en",name:"Whisper Small (EN)",size:"~166 MB",languages:"English",description:"Higher accuracy, slower. Best for noisy environments."}],rP=80,iP=300,aP=16e3;class lP{transcriber=null;worker=null;modelStatus={state:"unloaded"};currentModelId=null;stream=null;mediaRecorder=null;audioContext=null;analyser=null;vadTimer=null;chunks=[];recordingStartMs=0;isActive=!1;isSpeaking=!1;silenceSince=null;onResult=null;onError=null;finishResolver=null;lang="en";cfg={silenceThresholdDb:-45,silenceHoldMs:1500};onModelStatusChange=null;configure(e){this.cfg={...this.cfg,...e}}isSupported(){return typeof window<"u"&&typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof window.MediaRecorder<"u"&&typeof window.AudioContext<"u"}getModelStatus(){return this.modelStatus}getCurrentModelId(){return this.currentModelId}setModelStatus(e){this.modelStatus=e,this.onModelStatusChange?.(e)}async loadModel(e){if(!(this.currentModelId===e&&this.modelStatus.state==="ready")&&!(this.modelStatus.state==="downloading"||this.modelStatus.state==="loading")){this._terminateWorker(),this.transcriber=null,this.setModelStatus({state:"downloading",progress:0}),this.currentModelId=e;try{const n=(await zt(()=>import("./wasmSttWorker-Dtlxac_K.js"),[])).default;this.worker=new n,await new Promise((s,r)=>{const i=setTimeout(()=>r(new Error("Worker init timed out")),1e4);this.worker.onmessage=l=>{const c=l.data;c.type==="progress"?this.setModelStatus({state:"downloading",progress:c.progress??0}):c.type==="loaded"?(clearTimeout(i),s()):c.type==="error"&&(clearTimeout(i),r(new Error(c.error??"Worker load failed")))},this.worker.onerror=l=>{clearTimeout(i),r(new Error(l.message||"Worker error"))},this.worker.postMessage({type:"load",modelId:e})}),this.setModelStatus({state:"ready"});return}catch(o){console.warn("[WasmStt] Worker failed, using main-thread:",o instanceof Error?o.message:o),this._terminateWorker()}try{const{pipeline:o,env:n}=await zt(async()=>{const{pipeline:l,env:c}=await import("./vendor-.bun-B9l0ZNi2.js").then(d=>d.bz);return{pipeline:l,env:c}},__vite__mapDeps([0,1]));n.backends.onnx.wasm.numThreads=1,n.allowLocalModels=!1;const s=new Map;let r=0,i=0;this.transcriber=await o("automatic-speech-recognition",e,{progress_callback:l=>{if(l.status==="progress"&&l.file){const c=s.get(l.file)??0,d=l.loaded??0,u=Math.max(0,d-c);s.set(l.file,d),r+=u,l.total&&l.total>i&&(i=l.total);const f=Math.max(i,r),m=f>0?Math.min(100,Math.round(r/f*100)):0;this.setModelStatus({state:"downloading",progress:m})}}}),this.setModelStatus({state:"ready"})}catch(o){const n=o instanceof Error?o.message:"Unknown error loading model";throw this.setModelStatus({state:"error",error:n}),this.transcriber=null,this.currentModelId=null,o}}}_terminateWorker(){this.worker&&(this.worker.terminate(),this.worker=null)}async unloadModel(){this._terminateWorker(),this.transcriber=null,this.currentModelId=null,this.setModelStatus({state:"unloaded"})}async startListening(e,o,n){if(this.isActive&&this.stopListening(),!this.transcriber&&!this.worker){n?.("Whisper model not loaded. Select a model in Voice Settings first.");return}this.lang=e,this.onResult=o,this.onError=n??null,this.isActive=!0;try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1})}catch(s){this.isActive=!1;const r=s instanceof Error?s.message:"Microphone access denied";n?.(r);return}this._setupAudioContext(),this._startRecorder(),this._startVAD()}stopListening(){if(this._stopVAD(),this.mediaRecorder&&this.mediaRecorder.state==="recording")try{this.mediaRecorder.stop()}catch{}this._cleanupAfterStop(!0)}async finishListening(){if(this.isActive){if(this._stopVAD(),this.isSpeaking=!1,this.silenceSince=null,!this.mediaRecorder||this.mediaRecorder.state==="inactive"){this._cleanupAfterStop(!0);return}await new Promise(e=>{this.finishResolver=e,this._finaliseUtterance(!1)}),this._cleanupAfterStop(!0)}}getIsListening(){return this.isActive}_setupAudioContext(){if(!this.stream)return;const e=window.AudioContext??window.webkitAudioContext;this.audioContext=new e;const o=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=512,o.connect(this.analyser)}_teardownAudioContext(){try{this.audioContext?.close()}catch{}this.audioContext=null,this.analyser=null}_startRecorder(){if(!this.stream)return;const e=this._pickMimeType(),o={};e&&MediaRecorder.isTypeSupported(e)&&(o.mimeType=e),this.mediaRecorder=new MediaRecorder(this.stream,o),this.chunks=[],this.recordingStartMs=Date.now(),this.mediaRecorder.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},this.mediaRecorder.onstop=()=>{const n=this.chunks.splice(0),s=Date.now()-this.recordingStartMs;if(n.length===0||s<iP){this.finishResolver?.(),this.finishResolver=null;return}const r=n[0].type||e||"audio/webm",i=new Blob(n,{type:r});this._transcribe(i).finally(()=>{this.finishResolver?.(),this.finishResolver=null})},this.mediaRecorder.start(250)}_releaseStream(){this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null)}_startVAD(){this._stopVAD(),this.silenceSince=null,this.isSpeaking=!1,this.vadTimer=setInterval(()=>{if(!this.isActive||!this.analyser)return;this._getRmsDb()<this.cfg.silenceThresholdDb?this.isSpeaking&&(this.silenceSince===null?this.silenceSince=Date.now():Date.now()-this.silenceSince>=this.cfg.silenceHoldMs&&(this.isSpeaking=!1,this.silenceSince=null,this._finaliseUtterance(!0))):(this.silenceSince=null,this.isSpeaking||(this.isSpeaking=!0,this.mediaRecorder?.state==="recording"&&(this.recordingStartMs=Date.now())))},rP)}_stopVAD(){this.vadTimer!==null&&(clearInterval(this.vadTimer),this.vadTimer=null)}_cleanupAfterStop(e){const o=this.finishResolver;this.isActive=!1,this.finishResolver=null,this.mediaRecorder=null,this._teardownAudioContext(),this._releaseStream(),e&&(this.chunks=[]),this.isSpeaking=!1,this.silenceSince=null,this.onResult=null,this.onError=null,o?.()}_finaliseUtterance(e){this.isActive&&(this.mediaRecorder&&this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),e&&setTimeout(()=>{this.isActive&&this.stream&&this._startRecorder()},100))}_getRmsDb(){if(!this.analyser)return-1/0;const e=new Float32Array(this.analyser.fftSize);this.analyser.getFloatTimeDomainData(e);let o=0;for(const s of e)o+=s*s;const n=Math.sqrt(o/e.length);return n===0?-1/0:20*Math.log10(n)}async _transcribe(e){if(this.onResult){if(!this.transcriber&&!this.worker){this.onError?.("Model not loaded");return}try{const o=await this._decodeToFloat32(e);if(!o||o.length===0){this.onError?.(`Failed to decode audio (${e.size} bytes)`);return}const n=this._resolveLanguageHint(),s=this.worker?await this._transcribeViaWorker(o,n):await this._transcribeMainThread(o,n);s&&this.onResult(s,!0)}catch(o){if(!this.isActive)return;const n=o instanceof Error?o.message:"Local transcription failed";this.onError?.(n)}}}_transcribeViaWorker(e,o){return new Promise((n,s)=>{if(!this.worker)return s(new Error("Worker gone"));const r=i=>{const l=i.data;l.type==="result"?(this.worker.removeEventListener("message",r),n(l.transcript??"")):l.type==="log"?console.log("[WasmStt Worker]",l.text):l.type==="error"&&(this.worker.removeEventListener("message",r),s(new Error(l.error??"Transcription failed")))};this.worker.addEventListener("message",r),this.worker.postMessage({type:"transcribe",audio:e.buffer,language:o},[e.buffer]),setTimeout(()=>{this.worker?.removeEventListener("message",r),s(new Error("Transcription timed out"))},3e4)})}async _transcribeMainThread(e,o){const n=this.transcriber;return((await n(e,{task:"transcribe",...o?{language:o}:{}}))?.text??"").trim()}async _decodeToFloat32(e){if(!this.audioContext)return null;const o=await e.arrayBuffer();let n;try{n=await this.audioContext.decodeAudioData(o)}catch{return null}const s=n.sampleRate,r=n.getChannelData(0),i=aP;if(s===i)return new Float32Array(r);const l=s/i,c=Math.ceil(r.length/l),d=new Float32Array(c);for(let u=0;u<c;u++){const f=u*l,m=Math.floor(f),h=Math.min(m+1,r.length-1),p=f-m;d[u]=r[m]*(1-p)+r[h]*p}return d}_resolveLanguageHint(){if(this.lang&&this.lang!=="auto")return this.lang.split("-")[0]}_pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"];return typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?e.find(o=>MediaRecorder.isTypeSupported(o))??"":""}}const Ss=new lP,cP=3e4;let Qr=null,c1=null;async function dP(){const t=Date.now();return Qr&&t-Qr.checkedAt<cP?Qr.available:c1||(c1=(async()=>{try{const e=await fetch("/api/tts/status");if(!e.ok)return Qr={available:!1,checkedAt:Date.now()},!1;const n=!!(await e.json()).available;return Qr={available:n,checkedAt:Date.now()},n}catch{return Qr={available:!1,checkedAt:Date.now()},!1}finally{c1=null}})(),c1)}let xl=null;function z5(){return xl||(xl=new(window.AudioContext||window.webkitAudioContext)),xl}function jf(t={}){const e=t.enabled??!0,o=t.availabilityMode??"auto",[n,s]=ie.useState(!1),[r,i]=ie.useState(!1),[l,c]=ie.useState(null),d=ie.useRef(null),u=ie.useRef(null),f=Ee(S=>S.currentProviderId),m=Ee(S=>S.currentModelId),h=Ee(S=>S.openaiApiKey),p=Ee(S=>S.openaiCompatibleUrl),v=ie.useCallback(async()=>{if(!e)return i(!1),!1;const S=!!(h&&h.trim().length>0),C=!!(p&&p.trim().length>0);if(o==="openai-compatible")return i(C),C;if(S||o==="auto"&&C)return i(!0),!0;try{const x=await dP();return i(x),x}catch{return i(!1),!1}},[o,e,h,p]);ie.useEffect(()=>{v()},[v]);const b=ie.useCallback(()=>{if(d.current){try{d.current.stop()}catch{}d.current=null}u.current&&(u.current.abort(),u.current=null),s(!1)},[]),y=ie.useCallback(async()=>{try{const S=z5();S.state==="suspended"&&(await S.resume(),console.log("[useServerTTS] AudioContext resumed"));const C=S.createBuffer(1,1,22050),x=S.createBufferSource();x.buffer=C,x.connect(S.destination),x.start(0),console.log("[useServerTTS] Audio unlocked for mobile playback")}catch(S){console.error("[useServerTTS] Failed to unlock audio:",S)}},[]),w=ie.useCallback(async(S,C)=>{if(b(),!S.trim()){c("No text to speak"),C?.onError?.("No text to speak");return}c(null);try{const x=z5();x.state==="suspended"&&(await x.resume(),console.log("[useServerTTS] AudioContext resumed"));const _=x.createBuffer(1,1,22050),k=x.createBufferSource();k.buffer=_,k.connect(x.destination),k.start(0),u.current=new AbortController;const D=C?.voice||"nova";console.log("[useServerTTS] Speaking with voice:",D,"options:",C);const F=await fetch("/api/tts/speak",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:S.trim(),voice:D,model:C?.model||void 0,speed:C?.speed||.9,instructions:C?.instructions,summarize:!1,providerId:C?.providerId||f||void 0,modelId:C?.modelId||m||void 0,apiKey:h||void 0,baseURL:C?.baseURL||void 0}),signal:u.current.signal});if(!F.ok){const O=await F.json().catch(()=>({error:"Unknown error"}));throw new Error(O.error||`HTTP ${F.status}`)}const B=await(await F.blob()).arrayBuffer();console.log("[useServerTTS] Decoding audio data...");const M=await x.decodeAudioData(B),H=x.createBufferSource();H.buffer=M;const P=C?.pitch??1;P!==1&&(H.detune.value=(P-1)*1200);const T=C?.volume??1,E=x.createGain();E.gain.value=T,H.connect(E),E.connect(x.destination),d.current=H,H.onended=()=>{console.log("[useServerTTS] Audio playback ended"),s(!1),d.current=null,C?.onEnd?.()},console.log("[useServerTTS] Starting audio playback via Web Audio API..."),s(!0),C?.onStart?.(),H.start(0)}catch(x){if(x.name==="AbortError")return;const _=x instanceof Error?x.message:"Failed to speak";console.error("[useServerTTS] Error:",_),c(_),C?.onError?.(_),s(!1)}},[b,f,m,h]);return ie.useEffect(()=>()=>{b()},[b]),{isPlaying:n,isAvailable:r,error:l,speak:w,stop:b,checkAvailability:v,unlockAudio:y}}const uP=3e4;let Xr=null,d1=null;async function fP(){const t=Date.now();return Xr&&t-Xr.checkedAt<uP?Xr:d1||(d1=(async()=>{try{const e=await fetch("/api/tts/say/status");if(!e.ok){const s={available:!1,voices:[],checkedAt:Date.now()};return Xr=s,s}const o=await e.json(),n={available:!!o.available,voices:Array.isArray(o.voices)?o.voices:[],checkedAt:Date.now()};return Xr=n,n}catch{const e={available:!1,voices:[],checkedAt:Date.now()};return Xr=e,e}finally{d1=null}})(),d1)}let Cl=null;function O5(){return Cl||(Cl=new(window.AudioContext||window.webkitAudioContext)),Cl}function Lf(t={}){const e=t.enabled??!0,[o,n]=ie.useState(!1),[s,r]=ie.useState(!1),[i,l]=ie.useState([]),[c,d]=ie.useState(null),u=ie.useRef(null),f=ie.useRef(null),m=ie.useCallback(async()=>{try{const b=O5();b.state==="suspended"&&(await b.resume(),console.log("[useSayTTS] AudioContext resumed"));const y=b.createBuffer(1,1,22050),w=b.createBufferSource();w.buffer=y,w.connect(b.destination),w.start(0),console.log("[useSayTTS] Audio unlocked for mobile playback")}catch(b){console.error("[useSayTTS] Failed to unlock audio:",b)}},[]),h=ie.useCallback(async()=>{if(!e)return r(!1),l([]),!1;try{const b=await fP();return r(b.available),l(b.voices),b.available}catch{return r(!1),l([]),!1}},[e]);ie.useEffect(()=>{h()},[h]);const p=ie.useCallback(()=>{if(u.current){try{u.current.stop()}catch{}u.current=null}f.current&&(f.current.abort(),f.current=null),n(!1)},[]),v=ie.useCallback(async(b,y)=>{if(p(),!b.trim()){d("No text to speak"),y?.onError?.("No text to speak");return}d(null);try{f.current=new AbortController;const w=await fetch("/api/tts/say/speak",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b.trim(),voice:y?.voice||"Samantha",rate:y?.rate||200}),signal:f.current.signal});if(!w.ok){const D=await w.json().catch(()=>({error:"Unknown error"}));throw new Error(D.error||`HTTP ${w.status}`)}const S=await w.blob(),C=await S.arrayBuffer();console.log("[useSayTTS] Received audio:",S.size,"bytes");const x=O5();x.state==="suspended"&&(await x.resume(),console.log("[useSayTTS] AudioContext resumed before playback")),console.log("[useSayTTS] Decoding audio data...");const _=await x.decodeAudioData(C),k=x.createBufferSource();k.buffer=_,k.connect(x.destination),u.current=k,k.onended=()=>{console.log("[useSayTTS] Audio playback ended"),n(!1),u.current=null,y?.onEnd?.()},console.log("[useSayTTS] Starting audio playback via Web Audio API..."),n(!0),y?.onStart?.(),k.start(0)}catch(w){if(w.name==="AbortError")return;const S=w instanceof Error?w.message:"Failed to speak";console.error("[useSayTTS] Error:",S),d(S),y?.onError?.(S),n(!1)}},[p]);return ie.useEffect(()=>()=>{p()},[p]),{isPlaying:o,isAvailable:s,voices:i,error:c,speak:v,stop:p,checkAvailability:h,unlockAudio:m}}function Vf(t){return t?t.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,"").replace(/[*_~#]/g,"").replace(/https?:\/\/[^\s]+/g,"").replace(/\/[\w\-./]+/g,"").replace(/^\s*[$#>]\s*/gm,"").replace(/[[\]{}()<>|&;]/g," ").replace(/\\/g,"").replace(/\s+/g," ").trim():""}const Oa="browserVoiceLanguage",Sl="browserVoiceConversationMode",kl="vinci:voice-language-changed",Ml="vinci:voice-conversation-mode-changed",$a=1200,mP=700,$5=new Set(["ru","ru-RU"]),u1=t=>{const e=(t||"").trim();if(!e)return"en-US";const o=e.split("-")[0].toLowerCase();return $5.has(e)||$5.has(o)?"en-US":e};function hP(){const[t,e]=ie.useState("idle"),[o,n]=ie.useState(null),[s,r]=ie.useState(()=>{if(typeof window<"u"){const X=localStorage.getItem(Oa);if(X)return u1(X)}return u1(navigator.language||"en-US")}),[i,l]=ie.useState(()=>typeof window<"u"?localStorage.getItem(Sl)==="true":!1),c=ie.useMemo(()=>{if(typeof navigator>"u")return!1;const X=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod|android|mobile|webos|blackberry|iemobile|opera mini/i.test(X)},[]),d=ie.useRef(!1),u=ie.useRef(!1),f=ie.useRef(""),m=ie.useRef(!1),h=ie.useRef(""),p=ie.useRef(null),v=ie.useRef(null),b=ie.useRef(0),y=ie.useRef(null),w=ie.useRef(!1),S=Te(X=>X.currentSessionId),C=Te(X=>X.sendMessage),x=Qt(X=>X.setPendingInputText),_=Te(X=>X.createSession),k=Ee(X=>X.currentProviderId),D=Ee(X=>X.currentModelId),F=Ee(X=>X.currentAgentName),A=Ee(X=>X.voiceModeEnabled),B=Ee(X=>X.voiceProvider),M=Ee(X=>X.speechRate),H=Ee(X=>X.speechPitch),P=Ee(X=>X.speechVolume),T=Ee(X=>X.sayVoice),E=Ee(X=>X.browserVoice),O=Ee(X=>X.openaiVoice),L=Ee(X=>X.openaiCompatibleVoice),Z=Ee(X=>X.openaiCompatibleUrl),oe=Ee(X=>X.openaiCompatibleTtsModel),V=A&&(B==="openai"||B==="openai-compatible"),$=A&&B==="say",N=Ee(X=>X.sttProvider),ee=Ee(X=>X.sttServerUrl),z=Ee(X=>X.sttModel),q=Ee(X=>X.wasmSttModel),ae=Ee(X=>X.sttLanguage),R=Ee(X=>X.sttSilenceThresholdDb),we=Ee(X=>X.sttSilenceHoldMs),ve=N==="server"?ls.isSupported():N==="wasm"?Ss.isSupported():_o.isSupported(),{speak:Ce,stop:Pe,isAvailable:De,unlockAudio:pe}=jf({enabled:V,availabilityMode:B==="openai-compatible"?"openai-compatible":"openai"}),{speak:K,stop:re,isAvailable:Q,unlockAudio:W}=Lf({enabled:$}),J=ie.useRef(null);ie.useEffect(()=>{J.current!==null&&J.current!==S&&d.current&&(console.log("[useBrowserVoice] Session changed, stopping voice"),d.current=!1,u.current=!1,_o.stopListening(),ls.stopListening(),_o.cancelSpeech(),e("idle"),n(null)),J.current=S},[S]);const j=ie.useCallback(X=>{const me=u1(X);r(me),typeof window<"u"&&(localStorage.setItem(Oa,me),window.dispatchEvent(new CustomEvent(kl,{detail:me})))},[]);ie.useEffect(()=>{if(typeof window>"u")return;const X=Ae=>{const ze=u1(Ae.detail||localStorage.getItem(Oa)||"en-US");r(Oe=>Oe===ze?Oe:ze)},me=Ae=>{if(Ae.key!==Oa||!Ae.newValue)return;const qe=u1(Ae.newValue);r(ze=>ze===qe?ze:qe)};return window.addEventListener(kl,X),window.addEventListener("storage",me),()=>{window.removeEventListener(kl,X),window.removeEventListener("storage",me)}},[]);const se=ie.useCallback(()=>{l(X=>{const me=!X;return _o.setConversationMode(me),typeof window<"u"&&(localStorage.setItem(Sl,String(me)),window.dispatchEvent(new CustomEvent(Ml,{detail:me}))),me})},[]);ie.useEffect(()=>{if(typeof window>"u")return;const X=Ae=>{const ze=Ae.detail;typeof ze=="boolean"&&l(Oe=>Oe===ze?Oe:ze)},me=Ae=>{if(Ae.key!==Sl||Ae.newValue==null)return;const qe=Ae.newValue==="true";l(ze=>ze===qe?ze:qe)};return window.addEventListener(Ml,X),window.addEventListener("storage",me),()=>{window.removeEventListener(Ml,X),window.removeEventListener("storage",me)}},[]),ie.useEffect(()=>{_o.setConversationMode(i)},[i]);const ne=ie.useRef(null),le=ie.useRef(null),he=ie.useCallback(X=>{N==="server"?ls.startListening(X,le.current,ne.current):N==="wasm"?Ss.startListening(X,le.current,ne.current):c?_o.startListeningSync(X,le.current,ne.current):_o.startListening(X,le.current,ne.current)},[N,c]),be=ie.useCallback(X=>{if(!d.current){console.log("[useBrowserVoice] Ignoring error after voice stopped:",X);return}const me=X.toLowerCase();if(me.includes("aborted")){console.log("[useBrowserVoice] Ignoring non-fatal aborted error"),n(null),e("listening");return}const Ae=typeof document<"u"&&document.visibilityState!=="visible",qe=me.includes("permission")||me.includes("not allowed")||me.includes("service not allowed");if(Ae&&qe&&i){console.log("[useBrowserVoice] Suppressing permission error while app hidden; will resume on visibility"),m.current=!0,n(null),e("idle");return}if(me.includes("network")||me.includes("connection")||me.includes("check connection")){console.error("[useBrowserVoice] Network error — staying in error state:",X),n(X),e("error"),b.current=0,y.current!==null&&(clearTimeout(y.current),y.current=null);return}if(console.error("[useBrowserVoice] Recognition error:",X),n(X),e("error"),qe||w.current){b.current=0;return}const Oe=b.current+1;b.current=Oe;const Xe=3;if(Oe<=Xe){const mt=Math.min(1e3*Math.pow(2,Oe-1),8e3);console.log(`[useBrowserVoice] Scheduling recovery retry ${Oe}/${Xe} in ${mt}ms`),y.current!==null&&clearTimeout(y.current),y.current=setTimeout(()=>{y.current=null,d.current&&(e("listening"),n(null),he(s))},mt)}else console.log("[useBrowserVoice] Max recovery retries reached — staying in error state")},[s,i,he]);ie.useEffect(()=>{ne.current=be},[be]);const ce=ie.useCallback(async X=>{if(!(!X.trim()||!d.current)&&X.trim()!==f.current){if(f.current=X.trim(),!k||!D){n("No provider or model configured. Please configure them in settings."),e("error");return}if(_o.stopListening(),ls.stopListening(),!i){x(X.trim(),"append-inline"),u.current=!1,d.current=!1,e("idle");return}e("processing"),u.current=!0;try{let me=S;if(!me){console.log("[useBrowserVoice] No active session, creating new session...");const qe=await _();if(!qe){n("Failed to create session"),e("error"),u.current=!1;return}me=qe.id,console.log("[useBrowserVoice] Created new session:",me)}await C(X.trim(),k,D,F??void 0);const Ae=async()=>{if(!d.current||!me)return;const ze=Hn(me).filter(Oe=>Oe.role==="assistant").sort((Oe,Xe)=>{const mt=Oe.time?.created??0;return(Xe.time?.created??0)-mt});if(ze.length>0){const Oe=ze[0],mt=Wn(Oe.id).filter(Ge=>Ge.type==="text").map(Ge=>Ge.text??"").join(" ");if(mt.trim()){e("speaking");try{const Ge=Vf(mt),ot=()=>{if(d.current&&i){if(typeof document<"u"&&document.visibilityState!=="visible"){m.current=!0,e("idle");return}e("listening"),he(s)}else d.current=!1,e("idle")};if((B==="openai"||B==="openai-compatible")&&De){const ct=B==="openai-compatible"?L:O,Ft=B==="openai-compatible"?Z:void 0,Le=B==="openai-compatible"?oe:void 0;console.log("[useBrowserVoice] Using server TTS with voice:",ct,"provider:",B),await Ce(Ge,{voice:ct,model:Le,speed:M,pitch:H,volume:P,baseURL:Ft,onStart:()=>console.log("[useBrowserVoice] Server TTS started"),onEnd:()=>{console.log("[useBrowserVoice] Server TTS ended"),ot()},onError:Ye=>{console.error("[useBrowserVoice] Server TTS error:",Ye),n(`Voice TTS failed: ${Ye}. Please check your settings or switch to Browser voice.`),e("error"),ot()}})}else if(B==="say"&&Q){console.log("[useBrowserVoice] Using macOS Say TTS with voice:",T);const ct=Math.round(100+(M-.5)*200);await K(Ge,{voice:T,rate:ct,onStart:()=>console.log("[useBrowserVoice] Say TTS started"),onEnd:()=>{console.log("[useBrowserVoice] Say TTS ended"),ot()},onError:Ft=>{console.error("[useBrowserVoice] Say TTS error:",Ft),ot()}})}else console.log("[useBrowserVoice] Using browser TTS"),B==="openai"&&!De&&(console.warn("[useBrowserVoice] OpenAI voice selected but unavailable, falling back to browser voice"),n("OpenAI voice unavailable (API key not configured). Using browser voice instead.")),await _o.waitForVoices(),await _o.resumeAudioContext(),await _o.speakText(Ge,s,()=>{ot()},{rate:M,pitch:H,volume:P,voiceName:E||void 0})}catch(Ge){const ot=Ge instanceof Error?Ge.message:"Speech failed";if(!d.current){console.log("[useBrowserVoice] Ignoring speech error after voice stopped:",ot);return}console.error("[useBrowserVoice] Speech error:",ot),(ot.includes("not-allowed")||ot.includes("autoplay"))&&n("Audio blocked by browser. Please click the voice button again to enable audio."),i?(e("listening"),he(s)):(d.current=!1,e("idle"))}return}}setTimeout(Ae,500)};setTimeout(Ae,1e3)}catch(me){console.error("[useBrowserVoice] Send message error:",me),n(me instanceof Error?me.message:"Failed to send message"),e("error"),u.current=!1}}},[S,k,D,F,s,C,x,_,M,H,P,De,Ce,Q,K,B,T,E,O,L,Z,oe,i,he]),ye=ie.useCallback(async(X,me)=>{if(!d.current)return;const Ae=X.trim();!me||!Ae||(console.log("[useBrowserVoice] Speech result:",Ae),h.current=Ae,p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null;const qe=h.current.trim();h.current="",qe&&ce(qe)},$a))},[ce]);ie.useEffect(()=>{if(typeof document>"u")return;const X=()=>{if(document.visibilityState==="visible"&&m.current){if(!d.current||!i){m.current=!1;return}m.current=!1,e("listening");try{he(s)}catch(me){const Ae=me instanceof Error?me.message:"Failed to resume voice";n(Ae),e("error")}}};return document.addEventListener("visibilitychange",X),()=>{document.removeEventListener("visibilitychange",X)}},[i,c,s,N,he]),ie.useEffect(()=>{if(typeof navigator>"u")return;const X=navigator.mediaDevices;if(!X||typeof X.addEventListener!="function")return;const me=()=>{!d.current||t!=="listening"||(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{if(v.current=null,!d.current||t!=="listening")return;if(typeof document<"u"&&document.visibilityState!=="visible"){m.current=!0,e("idle");return}try{_o.stopListening(),ls.stopListening(),Ss.stopListening(),he(s)}catch(qe){const ze=qe instanceof Error?qe.message:"Microphone source changed. Tap mic to continue.";n(ze),e("error"),d.current=!1}},mP))};return X.addEventListener("devicechange",me),()=>{X.removeEventListener("devicechange",me),v.current&&(clearTimeout(v.current),v.current=null)}},[c,s,t,N,he]),ie.useEffect(()=>{le.current=ye},[ye]);const _e=ie.useCallback(async()=>{if(!ve)return!1;if(N==="server"||N==="wasm")return!0;try{return await _o.prepareListening(),!0}catch(X){const me=X instanceof Error?X.message:"Microphone permission denied";return n(me),!1}},[ve,N]),te=ie.useCallback(async()=>{if(!ve){n("Voice input not supported in this browser"),e("error");return}if(!S){n("No active session"),e("error");return}if(d.current=!0,f.current="",b.current=0,w.current=!1,y.current!==null&&(clearTimeout(y.current),y.current=null),n(null),e("listening"),N==="server"){ls.configure({baseURL:ee,model:z,language:ae||void 0,silenceThresholdDb:R,silenceHoldMs:we});try{await ls.startListening(s,ye,be)}catch(X){const me=X instanceof Error?X.message:"Failed to start voice";console.error("[useBrowserVoice] Server STT start error:",me),n(me),e("error"),d.current=!1}return}if(N==="wasm"){const X=Ss.getModelStatus();if(console.log("[useBrowserVoice] WASM model status:",X.state),X.state!=="ready")try{e("processing"),await Ss.loadModel(q)}catch(me){const Ae=me instanceof Error?me.message:"Failed to load Whisper model";console.error("[useBrowserVoice] WASM model load error:",Ae),n(Ae),e("error"),d.current=!1;return}Ss.configure({silenceThresholdDb:R,silenceHoldMs:we});try{await Ss.startListening(s,ye,be),console.log("[useBrowserVoice] WASM listening started")}catch(me){const Ae=me instanceof Error?me.message:"Failed to start voice";console.error("[useBrowserVoice] WASM STT start error:",Ae),n(Ae),e("error"),d.current=!1}return}if(c)try{_o.unlockAudio().catch(()=>{}),pe().catch(()=>{}),W().catch(()=>{}),_o.startListeningSync(s,ye,be)}catch(X){const me=X instanceof Error?X.message:"Failed to start voice";console.error("[useBrowserVoice] Mobile voice start error:",me),n(me),e("error"),d.current=!1}else try{await _o.startListening(s,ye,be)}catch(X){const me=X instanceof Error?X.message:"Failed to start voice";console.error("[useBrowserVoice] Desktop voice start error:",me),n(me),e("error"),d.current=!1}},[ve,S,s,ye,be,c,pe,W,N,ee,z,q,ae,R,we]),xe=ie.useCallback(()=>{d.current=!1,u.current=!1,m.current=!1,b.current=0,w.current=!1,v.current&&(clearTimeout(v.current),v.current=null),y.current!==null&&(clearTimeout(y.current),y.current=null),h.current="",p.current&&(clearTimeout(p.current),p.current=null),_o.stopListening(),ls.stopListening(),Ss.stopListening(),_o.cancelSpeech(),Pe(),re(),e("idle"),n(null)},[Pe,re]),Fe=ie.useCallback(()=>{if(d.current){if(w.current=!0,m.current=!1,v.current&&(clearTimeout(v.current),v.current=null),e("processing"),N==="server"){ls.finishListening().then(()=>{window.setTimeout(()=>{d.current&&(h.current||p.current||u.current||(d.current=!1,u.current=!1,e("idle")))},$a+200)});return}if(N==="wasm"){Ss.finishListening().then(()=>{window.setTimeout(()=>{d.current&&(h.current||p.current||u.current||(d.current=!1,u.current=!1,e("idle"),w.current=!1))},$a+200)});return}_o.stopListening(),window.setTimeout(()=>{d.current&&(h.current||p.current||u.current||(d.current=!1,u.current=!1,e("idle")))},$a+300)}},[N]);return ie.useEffect(()=>()=>{d.current=!1,v.current&&(clearTimeout(v.current),v.current=null),h.current="",p.current&&(clearTimeout(p.current),p.current=null),_o.setConversationMode(!1),_o.stopListening(),ls.stopListening(),_o.cancelSpeech()},[]),{status:t,isSupported:ve,error:o,language:s,setLanguage:j,startVoice:te,stopVoice:xe,finishVoiceInput:Fe,conversationMode:i,toggleConversationMode:se,prepareVoice:_e,isMobile:c,voiceProvider:B}}const w0="text-[10px] leading-none uppercase font-bold tracking-tight px-1.5 py-1 rounded border flex-shrink-0",Z5=U(w0,"bg-[color-mix(in_srgb,var(--primary-base)_12%,transparent)] text-[color-mix(in_srgb,var(--primary-base)_70%,transparent)] border-[color-mix(in_srgb,var(--primary-base)_24%,transparent)]"),pP=U(w0,"bg-[color-mix(in_srgb,var(--status-success)_12%,transparent)] text-[color-mix(in_srgb,var(--status-success)_70%,transparent)] border-[color-mix(in_srgb,var(--status-success)_24%,transparent)]"),gP=U(w0,"bg-[color-mix(in_srgb,var(--status-info)_12%,transparent)] text-[color-mix(in_srgb,var(--status-info)_70%,transparent)] border-[color-mix(in_srgb,var(--status-info)_24%,transparent)]"),Al=U(w0,"bg-[var(--surface-muted)] text-muted-foreground border-[var(--interactive-border)]/60"),Nf=g.forwardRef(({searchQuery:t,onCommandSelect:e,onClose:o,showTabs:n,activeTab:s="commands",onTabSelect:r,style:i},l)=>{const{t:c}=ft(),d=Te(L=>L.currentSessionId),f=n0(d??"").length>0,m=!!d,h=Te(L=>!!L.newSessionDraft?.open),p=m||h,[v,b]=g.useState([]),[y,w]=g.useState(!1),S=Hr(L=>L.commands),C=Hr(L=>L.loadCommands),x=On(L=>L.skills),_=On(L=>L.loadSkills),[k,D]=g.useState(0),F=g.useRef(0),A=g.useRef(!1),B=g.useRef([]),M=g.useRef(null),H=g.useRef(!1),P=g.useRef(null),T=g.useRef(!1),E=g.useRef(!1);g.useEffect(()=>{const L=Z=>{const oe=Z.target;!oe||!M.current||M.current.contains(oe)||o()};return document.addEventListener("pointerdown",L,!0),()=>{document.removeEventListener("pointerdown",L,!0)}},[o]),g.useEffect(()=>{C(),_()},[C,_]),g.useEffect(()=>{(async()=>{w(!0);try{const Z=new Set(x.map(q=>q.name)),oe=S.map((q,ae)=>({id:`opencode:${q.scope??"global"}:${q.name}:${q.agent??""}:${q.model??""}:${ae}`,name:q.name,source:"opencode",description:q.description,agent:q.agent??void 0,model:q.model??void 0,isBuiltIn:q.name==="init"||q.name==="review",isSkill:q.source==="skill"||Z.has(q.name),scope:q.scope})),V=x.map((q,ae)=>({id:`skill:${q.scope}:${q.source??"opencode"}:${q.name}:${ae}`,name:q.name,source:"skill",description:q.description,isSkill:!0,scope:q.scope})),N=[...[...m&&!f?[{id:"vinci:init",name:"init",source:"vinci",description:c("chat.commandAutocomplete.command.initDescription"),isBuiltIn:!0}]:[],...m?[{id:"vinci:undo",name:"undo",source:"vinci",description:c("chat.commandAutocomplete.command.undoDescription"),isBuiltIn:!0},{id:"vinci:redo",name:"redo",source:"vinci",description:c("chat.commandAutocomplete.command.redoDescription"),isBuiltIn:!0},{id:"vinci:timeline",name:"timeline",source:"vinci",description:c("chat.commandAutocomplete.command.timelineDescription"),isBuiltIn:!0}]:[],{id:"vinci:compact",name:"compact",source:"vinci",description:c("chat.commandAutocomplete.command.compactDescription"),isBuiltIn:!0},...m?[{id:"vinci:summary",name:"summary",source:"vinci",description:c("chat.commandAutocomplete.command.summaryDescription"),isVinci:!0}]:[],...p?[{id:"vinci:workspace-review",name:"workspace-review",source:"vinci",description:c("chat.commandAutocomplete.command.workspaceReviewDescription"),isVinci:!0}]:[]],...oe,...V],ee=!f,z=(t?N.filter(q=>Fr(q.name,t)||q.description&&Fr(q.description,t)):N).filter(q=>ee||q.name!=="init");z.sort((q,ae)=>{const R=q.name.toLowerCase().startsWith(t.toLowerCase()),we=ae.name.toLowerCase().startsWith(t.toLowerCase());return R&&!we?-1:!R&&we?1:q.name.localeCompare(ae.name)}),b(z)}catch{const Z=!f,oe=[...m&&!f?[{id:"vinci:init",name:"init",source:"vinci",description:c("chat.commandAutocomplete.command.initDescription"),isBuiltIn:!0}]:[],...m?[{id:"vinci:undo",name:"undo",source:"vinci",description:c("chat.commandAutocomplete.command.undoDescription"),isBuiltIn:!0},{id:"vinci:redo",name:"redo",source:"vinci",description:c("chat.commandAutocomplete.command.redoDescription"),isBuiltIn:!0},{id:"vinci:timeline",name:"timeline",source:"vinci",description:c("chat.commandAutocomplete.command.timelineDescription"),isBuiltIn:!0}]:[],{id:"vinci:compact",name:"compact",source:"vinci",description:c("chat.commandAutocomplete.command.compactDescription"),isBuiltIn:!0},...m?[{id:"vinci:summary",name:"summary",source:"vinci",description:c("chat.commandAutocomplete.command.summaryDescription"),isVinci:!0}]:[],...p?[{id:"vinci:workspace-review",name:"workspace-review",source:"vinci",description:c("chat.commandAutocomplete.command.workspaceReviewDescription"),isVinci:!0}]:[]],V=(t?oe.filter($=>Fr($.name,t)||$.description&&Fr($.description,t)):oe).filter($=>Z||$.name!=="init");b(V)}finally{w(!1)}})()},[t,f,m,p,S,x,c]),g.useEffect(()=>{D(0)},[v]),g.useEffect(()=>{F.current=k},[k]),g.useEffect(()=>{B.current[k]?.scrollIntoView({block:"nearest"})},[k]),g.useImperativeHandle(l,()=>({handleKeyDown:L=>{const Z=v.length;if(L==="Escape"){o();return}if(Z!==0){if(L==="ArrowDown"){A.current=!0,D(oe=>(oe+1)%Z);return}if(L==="ArrowUp"){A.current=!0,D(oe=>(oe-1+Z)%Z);return}if(L==="Enter"||L==="Tab"){const oe=(F.current%Z+Z)%Z,V=v[oe];V&&e(V)}}}}),[v,o,e]);const O=L=>{switch(L.name){case"init":return a.jsx(G,{name:"file",className:"h-3.5 w-3.5 text-green-500"});case"undo":return a.jsx(G,{name:"arrow-go-back",className:"h-3.5 w-3.5 text-orange-500"});case"redo":return a.jsx(G,{name:"arrow-go-forward",className:"h-3.5 w-3.5 text-orange-500"});case"timeline":return a.jsx(G,{name:"time",className:"h-3.5 w-3.5"});case"compact":return a.jsx(G,{name:"scissors",className:"h-3.5 w-3.5 text-purple-500"});case"review":return a.jsx(G,{name:"search-eye",className:"h-3.5 w-3.5 text-blue-500"});case"test":case"build":case"run":return a.jsx(G,{name:"terminal-box",className:"h-3.5 w-3.5 text-cyan-500"});default:return L.isBuiltIn?a.jsx(G,{name:"flashlight",className:"h-3.5 w-3.5 text-yellow-500"}):a.jsx(G,{name:"command",className:"h-3.5 w-3.5 text-muted-foreground"})}};return a.jsxs("div",{ref:M,className:"absolute z-[100] min-w-0 w-full max-w-[450px] max-h-64 bg-background border-2 border-border/60 rounded-xl shadow-none bottom-full mb-2 left-0 flex flex-col",style:i,children:[n?a.jsx("div",{className:"px-2 pt-2 pb-1 border-b border-border/60",children:a.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-[var(--surface-elevated)] p-1",children:[{id:"commands",label:c("chat.autocomplete.tabs.commands")},{id:"agents",label:c("chat.autocomplete.tabs.agents")},{id:"files",label:c("chat.autocomplete.tabs.files")}].map(L=>a.jsx("button",{type:"button",className:U("flex-1 px-2.5 py-1 rounded-md typography-meta font-semibold transition-none",s===L.id?"bg-interactive-selection text-interactive-selection-foreground shadow-none":"text-muted-foreground hover:bg-interactive-hover/50"),onPointerDown:Z=>{Z.pointerType==="touch"&&(Z.preventDefault(),Z.stopPropagation(),E.current=!0,r?.(L.id))},onClick:()=>{if(E.current){E.current=!1;return}r?.(L.id)},children:L.label},L.id))})}):null,a.jsx(mn,{outerClassName:"flex-1 min-h-0",className:"px-0 pb-2",children:y?a.jsx("div",{className:"flex items-center justify-center py-4",children:a.jsx(G,{name:"refresh",className:"h-4 w-4 animate-spin text-muted-foreground"})}):a.jsxs("div",{children:[v.map((L,Z)=>{const oe=L.isBuiltIn,V=L.isVinci;return a.jsxs("div",{ref:$=>{B.current[Z]=$},className:U("flex items-start gap-2 px-3 py-2 cursor-pointer rounded-lg",Z===k&&"bg-interactive-selection"),onPointerDown:$=>{$.pointerType==="touch"&&(P.current={x:$.clientX,y:$.clientY},T.current=!1)},onPointerMove:$=>{if($.pointerType!=="touch"||!P.current)return;const N=$.clientX-P.current.x,ee=$.clientY-P.current.y;Math.hypot(N,ee)>6&&(T.current=!0)},onPointerUp:$=>{if($.pointerType!=="touch")return;const N=T.current;P.current=null,T.current=!1,!N&&($.preventDefault(),$.stopPropagation(),H.current=!0,e(L,{dismissKeyboard:!0}))},onPointerCancel:()=>{P.current=null,T.current=!1},onClick:()=>{if(H.current){H.current=!1;return}e(L)},onMouseMove:()=>{A.current=!1,D(Z)},children:[a.jsx("div",{className:"mt-0.5",children:O(L)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"typography-ui-label font-medium",children:["/",L.name]}),L.isSkill?a.jsx("span",{className:Z5,children:c("chat.commandAutocomplete.badge.skill")}):a.jsx("span",{className:Z5,children:c("chat.commandAutocomplete.badge.command")}),V?a.jsx("span",{className:Al,children:"Vinci"}):oe?a.jsx("span",{className:Al,children:c("chat.commandAutocomplete.badge.system")}):L.scope?a.jsx("span",{className:L.scope==="project"?gP:pP,children:L.scope}):null,L.agent&&a.jsx("span",{className:Al,children:L.agent})]}),L.description&&a.jsx("div",{className:"typography-meta text-muted-foreground mt-0.5 truncate",children:L.description})]})]},L.id)}),v.length===0&&a.jsx("div",{className:"px-3 py-2 typography-ui-label text-muted-foreground",children:c("chat.commandAutocomplete.empty")})]})}),a.jsx("div",{className:"px-3 pt-1 pb-1.5 border-t typography-meta text-muted-foreground",children:c("chat.autocomplete.keyboardHint")})]})});Nf.displayName="CommandAutocomplete";const Rf=()=>{const t=de.c(17),e=Te(vP),o=ur();let n;t[0]!==e?(n=u=>e?u.getAttachment(e):void 0,t[0]=e,t[1]=n):n=t[1];const s=z1(n),r=Te(bP),i=Te(yP),l=$t(wP),c=$t(xP),d=Bo(CP);if(e){let u;t[2]!==s?(u=s0(s),t[2]=s,t[3]=u):u=t[3];const f=u;if(f)return f;let m;t[4]!==e||t[5]!==r?(m=r.get(e),t[4]=e,t[5]=r,t[6]=m):m=t[6];const h=m;if(h?.path)return h.path;let p;if(t[7]!==e||t[8]!==o){let b;t[10]!==e?(b=y=>y.id===e,t[10]=e,t[11]=b):b=t[11],p=o.find(b),t[7]=e,t[8]=o,t[9]=p}else p=t[9];const v=p;if(v?.directory)return v.directory}if(i?.open&&(i.bootstrapPendingDirectory||i.directoryOverride))return(i.bootstrapPendingDirectory||i.directoryOverride)??void 0;if(l){let u;if(t[12]!==l||t[13]!==c){let m;t[15]!==l?(m=h=>h.id===l,t[15]=l,t[16]=m):m=t[16],u=c.find(m),t[12]=l,t[13]=c,t[14]=u}else u=t[14];const f=u;if(f?.path)return f.path}return d??void 0};function vP(t){return t.currentSessionId}function bP(t){return t.worktreeMetadata}function yP(t){return t.newSessionDraft}function wP(t){return t.activeProjectId}function xP(t){return t.projects}function CP(t){return t.currentDirectory}const Fl=[],SP=[],kP=g.forwardRef(({searchQuery:t,onFileSelect:e,onAgentSelect:o,onClose:n,showTabs:s,activeTab:r="files",onTabSelect:i,style:l},c)=>{const{t:d}=ft(),u=Rf()??"",f=$t(W=>W.activeProjectId),m=$t(g.useCallback(W=>W.projects.find(J=>J.id===f)?.path??null,[f])),h=g.useMemo(()=>{const W=m||u;return W?W.replace(/\\/g,"/").replace(/\/+$/,""):null},[m,u]),p=vD(g.useCallback(W=>h?W.byRoot[h]:void 0,[h])),v=Ee(W=>W.getVisibleAgents),b=D7(W=>W.searchFiles),y=pD(t,180),w=qg(),S=Kg(),[C,x]=g.useState([]),[_,k]=g.useState([]),[D,F]=g.useState([]),[A,B]=g.useState(!1),M=g.useRef(0),[H,P]=g.useState(0),T=g.useRef(0),[E,O]=g.useState(360),[L,Z]=g.useState({}),[oe,V]=g.useState({}),$=g.useRef([]),N=g.useRef([]),ee=g.useRef([]),z=g.useRef(null),q=g.useRef(!1),ae=(t??"").trim(),R=s===!0,we=g.useMemo(()=>{if(!h||!p)return[];const W=[p.selectedPath,...p.openPaths.slice().reverse()].filter(ne=>typeof ne=="string"&&ne.length>0),J=new Set,j=ae.toLowerCase();return W.filter(ne=>{if(J.has(ne))return!1;J.add(ne);const le=ne.startsWith(`${h}/`)?ne.slice(h.length+1):ne;return j?le.toLowerCase().includes(j):!0}).slice(0,6).map(ne=>{const le=ne.replace(/\\/g,"/"),he=le.split("/").filter(Boolean).pop()||le,be=le.startsWith(`${h}/`)?le.slice(h.length+1):le;return{name:he,path:le,relativePath:be,extension:he.includes(".")?he.split(".").pop()?.toLowerCase():void 0}})},[ae,h,p]),ve=g.useMemo(()=>!R||r==="agents"?ae.length>0?D:D.slice(0,2):SP,[r,D,ae.length,R]),Ce=!R||r==="files"?_:Fl,Pe=!R||r==="files"?we:Fl,De=!R||r==="files"?C:Fl;g.useEffect(()=>{const W=J=>{const j=J.target;!j||!z.current||z.current.contains(j)||n()};return document.addEventListener("pointerdown",W,!0),()=>{document.removeEventListener("pointerdown",W,!0)}},[n]),g.useEffect(()=>{if(!u){x([]);return}const J=(y??"").trim().replace(/^\.\//,"").replace(/^\/+/,"").toLowerCase();if(!J){x([]);return}let j=!1;return M.current++,B(!0),b(u,J,80,{includeHidden:w,respectGitignore:!S,type:"file"}).then(se=>{if(j)return;const ne=new Set(we.map(le=>le.path));x(se.filter(le=>!ne.has(le.path)).slice(0,15))}).catch(()=>{j||x([])}).finally(()=>{j||(M.current--,M.current<=0&&(M.current=0,B(!1)))}),()=>{j=!0,M.current=Math.max(0,M.current-1),M.current<=0&&B(!1)}},[u,y,we,b,w,S]),g.useEffect(()=>{if(!u){k([]);return}const J=(y??"").trim().replace(/^\.\//,"").replace(/^\/+/,"").toLowerCase();if(!J){k([]);return}let j=!1;return M.current++,B(!0),b(u,J,20,{includeHidden:w,respectGitignore:!S,type:"directory"}).then(se=>{j||k(se.slice(0,10))}).catch(()=>{j||k([])}).finally(()=>{j||(M.current--,M.current<=0&&(M.current=0,B(!1)))}),()=>{j=!0,M.current=Math.max(0,M.current-1),M.current<=0&&B(!1)}},[u,y,b,w,S]),g.useEffect(()=>{const W=v(),J=(t??"").trim().toLowerCase(),j=W.filter(se=>se.mode&&se.mode!=="primary").filter(se=>J?`${se.name} ${se.description??""}`.toLowerCase().includes(J):!0).map(se=>({name:se.name,description:se.description,mode:se.mode})).sort((se,ne)=>se.name.localeCompare(ne.name));F(j)},[v,t]),g.useEffect(()=>{P(0),Z({}),V({})},[De,Ce,Pe.length,ve.length]),g.useEffect(()=>{T.current=H},[H]),g.useEffect(()=>{$.current[H]?.scrollIntoView({block:"nearest"})},[H]),g.useEffect(()=>{let W=null;const J=()=>{W!==null&&cancelAnimationFrame(W),W=requestAnimationFrame(()=>{const j={},se={};N.current.forEach((ne,le)=>{if(!ne)return;const be=ee.current[le]?.offsetWidth??ne.scrollWidth,ce=Math.max(0,be-ne.clientWidth),ye=ce>8;if(j[le]=ye,ye){const _e=Math.max(.6,ce/110);se[le]=_e}}),Z(j),V(se)})};return J(),window.addEventListener("resize",J),()=>{W!==null&&cancelAnimationFrame(W),window.removeEventListener("resize",J)}},[De,Ce]),g.useEffect(()=>{const W=N.current[H];if(!W)return;const J=()=>{const se=W.clientWidth;se>0&&O(se)};if(J(),typeof ResizeObserver>"u")return;const j=new ResizeObserver(J);return j.observe(W),()=>{j.disconnect()}},[H]);const pe=g.useCallback(W=>{e(W)},[e]),K=g.useCallback(W=>{o?.(W)},[o]);g.useImperativeHandle(c,()=>({handleKeyDown:W=>{if(W==="Escape"){n();return}const J=ve.length+Ce.length+Pe.length+De.length;if(J!==0){if(W==="ArrowDown"){P(j=>(j+1)%J);return}if(W==="ArrowUp"){P(j=>(j-1+J)%J);return}if(W==="Enter"||W==="Tab"){const j=(T.current%J+J)%J;if(j<ve.length){const he=ve[j];he&&K(he.name);return}const se=j-ve.length;if(se<Ce.length){const he=Ce[se];he&&pe(he);return}const ne=se-Ce.length,le=ne<Pe.length?Pe[ne]:De[ne-Pe.length];le&&pe(le)}}}}),[De,Ce,Pe,ve,n,pe,K]);const re=W=>{switch(W.extension?.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":return a.jsx(G,{name:"code",className:"h-3.5 w-3.5 text-[var(--status-info)]"});case"json":return a.jsx(G,{name:"code",className:"h-3.5 w-3.5 text-[var(--status-warning)]"});case"md":case"mdx":return a.jsx(G,{name:"file",className:"h-3.5 w-3.5 text-muted-foreground"});case"png":case"jpg":case"jpeg":case"gif":case"svg":return a.jsx(G,{name:"file-image",className:"h-3.5 w-3.5 text-[var(--status-success)]"});default:return a.jsx(G,{name:"file-pdf",className:"h-3.5 w-3.5 text-muted-foreground"})}},Q=g.useMemo(()=>[{id:"commands",label:d("chat.autocomplete.tabs.commands")},{id:"agents",label:d("chat.autocomplete.tabs.agents")},{id:"files",label:d("chat.autocomplete.tabs.files")}],[d]);return a.jsxs("div",{ref:z,className:"absolute z-[100] min-w-0 w-full max-w-[640px] max-h-64 bg-background border-2 border-border/60 rounded-xl shadow-none bottom-full mb-2 left-0 flex flex-col",style:l,children:[s?a.jsx("div",{className:"px-2 pt-2 pb-1 border-b border-border/60",children:a.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-[var(--surface-elevated)] p-1",children:Q.map(W=>a.jsx("button",{type:"button",className:U("flex-1 px-2.5 py-1 rounded-md typography-meta font-semibold transition-none",r===W.id?"bg-interactive-selection text-interactive-selection-foreground shadow-none":"text-muted-foreground hover:bg-interactive-hover/50"),onPointerDown:J=>{J.pointerType==="touch"&&(J.preventDefault(),J.stopPropagation(),q.current=!0,i?.(W.id))},onClick:()=>{if(q.current){q.current=!1;return}i?.(W.id)},children:W.label},W.id))})}):null,a.jsx(mn,{outerClassName:"flex-1 min-h-0",className:"px-0",children:(!R||r==="files")&&A?a.jsx("div",{className:"flex items-center justify-center py-4",children:a.jsx(G,{name:"refresh",className:"h-4 w-4 animate-spin text-muted-foreground"})}):a.jsxs("div",{className:"pb-2",children:[ve.map((W,J)=>{const j=H===J;return a.jsx("div",{ref:se=>{$.current[J]=se},className:U("flex items-start gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",j&&"bg-interactive-selection"),onClick:()=>K(W.name),onMouseMove:()=>P(J),children:a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"font-semibold truncate",children:["@",W.name]}),W.description?a.jsx("div",{className:"typography-meta text-muted-foreground truncate",children:W.description}):null]})},`agent-${W.name}`)}),ve.length===2&&ae.length===0&&D.length>2&&a.jsx("div",{className:"px-3 py-1 typography-meta text-muted-foreground",children:d("chat.fileMentionAutocomplete.searchMoreAgents")}),ve.length>0&&(Ce.length>0||Pe.length>0||De.length>0)&&a.jsx("div",{className:"my-1 border-t border-border/60"}),Ce.map((W,J)=>{const j=ve.length+J,se=W.relativePath||W.name,ne=B0(se,{maxLength:60}),le=H===j;return a.jsxs("div",{ref:he=>{$.current[j]=he},className:U("flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",le&&"bg-interactive-selection"),onClick:()=>pe(W),onMouseMove:()=>P(j),children:[a.jsx(G,{name:"folder-3-fill",className:"h-3.5 w-3.5 text-primary/60"}),a.jsx("span",{className:"flex-1 min-w-0 truncate","aria-label":se,children:ne})]},`dir-${W.path}`)}),Ce.length>0&&(Pe.length>0||De.length>0)&&a.jsx("div",{className:"my-1 border-t border-border/60"}),Pe.map((W,J)=>{const j=ve.length+Ce.length+J,se=W.relativePath||W.name,ne=B0(se,{maxLength:60}),le=H===j,he=L[j]??!1,be=oe[j]??2.6;return a.jsxs("div",{ref:ce=>{$.current[j]=ce},className:U("flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",le&&"bg-interactive-selection"),onClick:()=>pe(W),onMouseMove:()=>P(j),children:[re(W),a.jsxs("span",{ref:ce=>{N.current[j]=ce},className:"relative flex-1 min-w-0 overflow-hidden file-mention-marquee-container",style:le?{"--file-mention-marquee-width":`${E}px`,"--file-mention-marquee-duration":`${be}s`}:void 0,"aria-label":se,children:[a.jsx("span",{ref:ce=>{ee.current[j]=ce},className:"absolute invisible whitespace-nowrap pointer-events-none","aria-hidden":!0,children:se}),he&&le?a.jsx("span",{className:"inline-block whitespace-nowrap file-mention-marquee",children:se}):a.jsx("span",{className:"block truncate",children:ne})]})]},`recent-${W.path}`)}),Pe.length>0&&De.length>0&&a.jsx("div",{className:"my-1 border-t border-border/60"}),De.map((W,J)=>{const j=ve.length+Ce.length+Pe.length+J,se=W.relativePath||W.name,ne=B0(se,{maxLength:60}),le=H===j,he=L[j]??!1,be=oe[j]??2.6,ce=a.jsxs("div",{ref:ye=>{$.current[j]=ye},className:U("flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg",le&&"bg-interactive-selection"),onClick:()=>pe(W),onMouseMove:()=>P(j),children:[re(W),a.jsxs("span",{ref:ye=>{N.current[j]=ye},className:"relative flex-1 min-w-0 overflow-hidden file-mention-marquee-container",style:le?{"--file-mention-marquee-width":`${E}px`,"--file-mention-marquee-duration":`${be}s`}:void 0,"aria-label":se,children:[a.jsx("span",{ref:ye=>{ee.current[j]=ye},className:"absolute invisible whitespace-nowrap pointer-events-none","aria-hidden":!0,children:se}),he&&le?a.jsx("span",{className:"inline-block whitespace-nowrap file-mention-marquee",children:se}):a.jsx("span",{className:"block truncate",children:ne})]})]});return a.jsx(g.Fragment,{children:ce},W.path)}),De.length===0&&Ce.length===0&&Pe.length===0&&ve.length===0&&a.jsx("div",{className:"px-3 py-2 typography-ui-label text-muted-foreground",children:d("chat.fileMentionAutocomplete.empty")})]})}),a.jsx("div",{className:"px-3 pt-1 pb-1.5 border-t typography-meta text-muted-foreground",children:d("chat.autocomplete.keyboardHint")})]})}),MP=/^#(?:[\da-fA-F]{3}|[\da-fA-F]{6})$/,_l=t=>{if(!t)return null;const e=t.trim();return e&&MP.test(e)?e.toLowerCase():null},AP=t=>{const e=de.c(202),{open:o,onOpenChange:n,projectId:s,projectName:r,projectPath:i,initialIcon:l,initialColor:c,initialIconBackground:d,onSave:u}=t,f=l===void 0?null:l,m=c===void 0?null:c,h=d===void 0?null:d,{t:p}=ft(),v=$t(FP),b=$t(_P),y=$t(BP);let w;e[0]!==s?(w=fe=>fe.projects.find(Ie=>Ie.id===s)?.iconImage??null,e[0]=s,e[1]=w):w=e[1];const S=$t(w),{currentTheme:C}=js(),[x,_]=g.useState(r),[k,D]=g.useState(f),[F,A]=g.useState(m);let B;e[2]!==h?(B=_l(h),e[2]=h,e[3]=B):B=e[3];const[M,H]=g.useState(B),[P,T]=g.useState(!1),[E,O]=g.useState(!1),[L,Z]=g.useState(!1),[oe,V]=g.useState(!1),[$,N]=g.useState(null),[ee,z]=g.useState(null),[q,ae]=g.useState(!1),R=g.useRef(null);let we;e[4]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{N(null),z(DP)},e[4]=we):we=e[4];const ve=we;let Ce,Pe;e[5]!==m||e[6]!==f||e[7]!==h||e[8]!==o||e[9]!==r?(Ce=()=>{o&&(_(r),D(f),A(m),H(_l(h)),V(!1),ve(),ae(!1))},Pe=[o,r,f,m,h,ve],e[5]=m,e[6]=f,e[7]=h,e[8]=o,e[9]=r,e[10]=Ce,e[11]=Pe):(Ce=e[10],Pe=e[11]),g.useEffect(Ce,Pe);let De,pe;e[12]===Symbol.for("react.memo_cache_sentinel")?(pe=()=>()=>{ve()},De=[ve],e[12]=De,e[13]=pe):(De=e[12],pe=e[13]),g.useEffect(pe,De);let K,re,Q;if(e[14]!==F||e[15]!==S||e[16]!==k||e[17]!==M||e[18]!==x||e[19]!==n||e[20]!==u||e[21]!==oe||e[22]!==$||e[23]!==s||e[24]!==b||e[25]!==p||e[26]!==v){let fe;e[30]!==F||e[31]!==k||e[32]!==M||e[33]!==x||e[34]!==n||e[35]!==u||e[36]!==oe||e[37]!==$||e[38]!==s||e[39]!==b||e[40]!==p||e[41]!==v?(fe=async()=>{const Ie=x.trim();if(!Ie)return;if($){T(!0);const ke=await v(s,$);if(T(!1),!ke.ok){We.error(ke.error||p("projectEditDialog.toast.failedToUploadIcon"));return}We.success(p("projectEditDialog.toast.iconUpdated")),ve(),V(!1)}const ue=oe&&Q;if(ue){O(!0);const ke=await b(s);if(O(!1),!ke.ok){We.error(ke.error||p("projectEditDialog.toast.failedToRemoveIcon"));return}We.success(p("projectEditDialog.toast.iconRemoved")),V(!1),H(null)}u({label:Ie,icon:k,color:F,iconBackground:_l(ue?null:M)}),n(!1)},e[30]=F,e[31]=k,e[32]=M,e[33]=x,e[34]=n,e[35]=u,e[36]=oe,e[37]=$,e[38]=s,e[39]=b,e[40]=p,e[41]=v,e[42]=fe):fe=e[42],re=fe,K=F?Q1[F]??null:null,Q=!!S,e[14]=F,e[15]=S,e[16]=k,e[17]=M,e[18]=x,e[19]=n,e[20]=u,e[21]=oe,e[22]=$,e[23]=s,e[24]=b,e[25]=p,e[26]=v,e[27]=K,e[28]=re,e[29]=Q}else K=e[27],re=e[28],Q=e[29];const W=!!($&&ee),J=S?.source==="custom",j=Q&&!oe||W,se=j;let ne;e[43]!==S||e[44]!==C||e[45]!==W||e[46]!==Q||e[47]!==oe||e[48]!==ee||e[49]!==q||e[50]!==s?(ne=q?null:W?ee:Q&&!oe?X1({id:s,iconImage:S??null},{themeVariant:C.metadata.variant,iconColor:C.colors.surface.foreground}):null,e[43]=S,e[44]=C,e[45]=W,e[46]=Q,e[47]=oe,e[48]=ee,e[49]=q,e[50]=s,e[51]=ne):ne=e[51];const le=ne;let he;e[52]===Symbol.for("react.memo_cache_sentinel")?(he=()=>{ae(!1)},e[52]=he):he=e[52];const be=S?.updatedAt;let ce;e[53]!==s||e[54]!==be?(ce=[s,be],e[53]=s,e[54]=be,e[55]=ce):ce=e[55],g.useEffect(he,ce);let ye;e[56]!==P||e[57]!==s?(ye=fe=>{!s||!fe||P||(V(!1),ae(!1),N(fe),z(Ie=>(Ie&&URL.revokeObjectURL(Ie),URL.createObjectURL(fe))))},e[56]=P,e[57]=s,e[58]=ye):ye=e[58];const _e=ye;let te;e[59]!==W||e[60]!==se||e[61]!==Q||e[62]!==E||e[63]!==s?(te=()=>{!s||!se||E||(W&&ve(),V(!!Q),ae(!1))},e[59]=W,e[60]=se,e[61]=Q,e[62]=E,e[63]=s,e[64]=te):te=e[64];const xe=te;let Fe;e[65]!==y||e[66]!==L||e[67]!==s||e[68]!==p?(Fe=async()=>{!s||L||(ve(),V(!1),ae(!1),Z(!0),y(s).then(fe=>{if(!fe.ok){We.error(fe.error||p("projectEditDialog.toast.failedToDiscoverIcon"));return}if(fe.skipped){We.success(p("projectEditDialog.toast.customIconAlreadySet"));return}We.success(p("projectEditDialog.toast.iconDiscovered"))}).finally(()=>{Z(!1)}))},e[65]=y,e[66]=L,e[67]=s,e[68]=p,e[69]=Fe):Fe=e[69];const X=Fe;let me;e[70]!==p?(me=p("projectEditDialog.title"),e[70]=p,e[71]=me):me=e[71];let Ae;e[72]!==me?(Ae=a.jsx(cr,{className:"min-w-0",children:a.jsx(dr,{children:me})}),e[72]=me,e[73]=Ae):Ae=e[73];let qe;e[74]!==p?(qe=p("projectEditDialog.field.name"),e[74]=p,e[75]=qe):qe=e[75];let ze;e[76]!==qe?(ze=a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:qe}),e[76]=qe,e[77]=ze):ze=e[77];let Oe;e[78]===Symbol.for("react.memo_cache_sentinel")?(Oe=fe=>_(fe.target.value),e[78]=Oe):Oe=e[78];let Xe;e[79]!==p?(Xe=p("projectEditDialog.field.namePlaceholder"),e[79]=p,e[80]=Xe):Xe=e[80];let mt;e[81]!==re?(mt=fe=>{fe.key==="Enter"&&(fe.preventDefault(),re())},e[81]=re,e[82]=mt):mt=e[82];let Ge;e[83]!==x||e[84]!==Xe||e[85]!==mt?(Ge=a.jsx(Fn,{value:x,onChange:Oe,placeholder:Xe,onKeyDown:mt,autoFocus:!0}),e[83]=x,e[84]=Xe,e[85]=mt,e[86]=Ge):Ge=e[86];let ot;e[87]!==i?(ot=a.jsx("p",{className:"typography-meta text-muted-foreground truncate",title:i,children:i}),e[87]=i,e[88]=ot):ot=e[88];let ct;e[89]!==ze||e[90]!==Ge||e[91]!==ot?(ct=a.jsxs("div",{className:"min-w-0 space-y-1.5",children:[ze,Ge,ot]}),e[89]=ze,e[90]=Ge,e[91]=ot,e[92]=ct):ct=e[92];let Ft;e[93]!==p?(Ft=p("projectEditDialog.field.color"),e[93]=p,e[94]=Ft):Ft=e[94];let Le;e[95]!==Ft?(Le=a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:Ft}),e[95]=Ft,e[96]=Le):Le=e[96];let Ye;e[97]===Symbol.for("react.memo_cache_sentinel")?(Ye=()=>A(null),e[97]=Ye):Ye=e[97];const gt=F===null?"border-foreground scale-110":"border-border hover:border-border/80";let wt;e[98]!==gt?(wt=U("w-8 h-8 rounded-lg border-2 transition-all flex items-center justify-center",gt),e[98]=gt,e[99]=wt):wt=e[99];let et;e[100]!==p?(et=p("projectEditDialog.option.none"),e[100]=p,e[101]=et):et=e[101];let Pt;e[102]===Symbol.for("react.memo_cache_sentinel")?(Pt=a.jsx("span",{className:"w-4 h-0.5 bg-muted-foreground/40 rotate-45 rounded-full"}),e[102]=Pt):Pt=e[102];let st;e[103]!==wt||e[104]!==et?(st=a.jsx("button",{type:"button",onClick:Ye,className:wt,title:et,children:Pt}),e[103]=wt,e[104]=et,e[105]=st):st=e[105];let At;e[106]!==F?(At=Jc.map(fe=>a.jsx("button",{type:"button",onClick:()=>A(fe.key),className:U("w-8 h-8 rounded-lg border-2 transition-all",F===fe.key?"border-foreground scale-110":"border-transparent hover:border-border"),style:{backgroundColor:fe.cssVar},title:fe.label},fe.key)),e[106]=F,e[107]=At):At=e[107];let Dt;e[108]!==st||e[109]!==At?(Dt=a.jsxs("div",{className:"flex gap-2 flex-wrap",children:[st,At]}),e[108]=st,e[109]=At,e[110]=Dt):Dt=e[110];let Wt;e[111]!==Le||e[112]!==Dt?(Wt=a.jsxs("div",{className:"min-w-0 space-y-2",children:[Le,Dt]}),e[111]=Le,e[112]=Dt,e[113]=Wt):Wt=e[113];let Zt;e[114]!==p?(Zt=p("projectEditDialog.field.icon"),e[114]=p,e[115]=Zt):Zt=e[115];let fo;e[116]!==Zt?(fo=a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:Zt}),e[116]=Zt,e[117]=fo):fo=e[117];let Eo;e[118]!==_e?(Eo=a.jsx("input",{ref:R,type:"file",accept:"image/png,image/jpeg,image/svg+xml,.png,.jpg,.jpeg,.svg",className:"hidden",onChange:fe=>{const Ie=fe.target.files?.[0]??null;_e(Ie),fe.currentTarget.value=""}}),e[118]=_e,e[119]=Eo):Eo=e[119];let Gt;e[120]===Symbol.for("react.memo_cache_sentinel")?(Gt=()=>D(null),e[120]=Gt):Gt=e[120];const Et=k===null?"border-foreground scale-110 bg-[var(--surface-elevated)]":"border-border hover:border-border/80";let Vt;e[121]!==Et?(Vt=U("w-8 h-8 rounded-lg border-2 transition-all flex items-center justify-center",Et),e[121]=Et,e[122]=Vt):Vt=e[122];let xt;e[123]!==p?(xt=p("projectEditDialog.option.none"),e[123]=p,e[124]=xt):xt=e[124];let mo;e[125]===Symbol.for("react.memo_cache_sentinel")?(mo=a.jsx("span",{className:"w-4 h-0.5 bg-muted-foreground/40 rotate-45 rounded-full"}),e[125]=mo):mo=e[125];let go;e[126]!==Vt||e[127]!==xt?(go=a.jsx("button",{type:"button",onClick:Gt,className:Vt,title:xt,children:mo}),e[126]=Vt,e[127]=xt,e[128]=go):go=e[128];let to;e[129]!==K||e[130]!==k?(to=H7.map(fe=>{const Ie=fe.Icon;return a.jsx("button",{type:"button",onClick:()=>D(fe.key),className:U("w-8 h-8 rounded-lg border-2 transition-all flex items-center justify-center",k===fe.key?"border-foreground scale-110 bg-[var(--surface-elevated)]":"border-border hover:border-border/80"),title:fe.label,children:a.jsx(G,{name:Ie,className:"w-4 h-4",style:K?{color:K}:void 0})},fe.key)}),e[129]=K,e[130]=k,e[131]=to):to=e[131];let Do;e[132]!==go||e[133]!==to?(Do=a.jsxs("div",{className:"flex gap-2 flex-wrap",children:[go,to]}),e[132]=go,e[133]=to,e[134]=Do):Do=e[134];let Vo;e[135]!==j||e[136]!==M||e[137]!==le||e[138]!==p?(Vo=j&&le&&a.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[a.jsx("span",{className:"typography-meta text-muted-foreground",children:p("projectEditDialog.field.preview")}),a.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border/60 bg-[var(--surface-elevated)] p-1",children:a.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center overflow-hidden rounded-[2px]",style:M?{backgroundColor:M}:void 0,children:a.jsx("img",{src:le,alt:"",className:"h-full w-full object-contain",draggable:!1,onError:()=>ae(!0)})})})]}),e[135]=j,e[136]=M,e[137]=le,e[138]=p,e[139]=Vo):Vo=e[139];let vo;e[140]!==X||e[141]!==J||e[142]!==L||e[143]!==P||e[144]!==p?(vo=!J&&a.jsxs(a.Fragment,{children:[a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>R.current?.click(),disabled:P,children:p(P?"projectEditDialog.actions.uploading":"projectEditDialog.actions.uploadIcon")}),a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>{X()},disabled:L,children:p(L?"projectEditDialog.actions.discovering":"projectEditDialog.actions.discoverFavicon")})]}),e[140]=X,e[141]=J,e[142]=L,e[143]=P,e[144]=p,e[145]=vo):vo=e[145];let zo;e[146]!==xe||e[147]!==se||e[148]!==E||e[149]!==p?(zo=se&&a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>{xe()},disabled:E,children:p(E?"projectEditDialog.actions.removing":"projectEditDialog.actions.removeProjectIcon")}),e[146]=xe,e[147]=se,e[148]=E,e[149]=p,e[150]=zo):zo=e[150];let kt;e[151]!==E||e[152]!==oe||e[153]!==p?(kt=oe&&a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>V(!1),disabled:E,children:p("projectEditDialog.actions.undoRemove")}),e[151]=E,e[152]=oe,e[153]=p,e[154]=kt):kt=e[154];let Po;e[155]!==vo||e[156]!==zo||e[157]!==kt?(Po=a.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[vo,zo,kt]}),e[155]=vo,e[156]=zo,e[157]=kt,e[158]=Po):Po=e[158];let Nt;e[159]!==fo||e[160]!==Eo||e[161]!==Do||e[162]!==Vo||e[163]!==Po?(Nt=a.jsxs("div",{className:"min-w-0 space-y-2",children:[fo,Eo,Do,Vo,Po]}),e[159]=fo,e[160]=Eo,e[161]=Do,e[162]=Vo,e[163]=Po,e[164]=Nt):Nt=e[164];let ro;e[165]!==j||e[166]!==M||e[167]!==p?(ro=j&&a.jsxs("div",{className:"min-w-0 space-y-2",children:[a.jsx("label",{className:"typography-ui-label font-medium text-foreground",children:p("projectEditDialog.field.iconBackground")}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("input",{type:"color",value:M??"#000000",onChange:fe=>H(fe.target.value),className:"h-8 w-10 cursor-pointer rounded border border-border bg-transparent p-1","aria-label":p("projectEditDialog.field.iconBackgroundAria")}),a.jsx(Fn,{value:M??"",onChange:fe=>H(fe.target.value),placeholder:"#000000",className:"h-8 w-[8.5rem]"}),a.jsx(yt,{size:"sm",variant:"outline",onClick:()=>H(null),children:p("projectEditDialog.actions.clear")})]})]}),e[165]=j,e[166]=M,e[167]=p,e[168]=ro):ro=e[168];let So;e[169]!==ct||e[170]!==Wt||e[171]!==Nt||e[172]!==ro?(So=a.jsxs("div",{className:"min-w-0 space-y-5 py-1",children:[ct,Wt,Nt,ro]}),e[169]=ct,e[170]=Wt,e[171]=Nt,e[172]=ro,e[173]=So):So=e[173];let at;e[174]!==n?(at=()=>n(!1),e[174]=n,e[175]=at):at=e[175];let io;e[176]!==p?(io=p("projectEditDialog.actions.cancel"),e[176]=p,e[177]=io):io=e[177];let oo;e[178]!==at||e[179]!==io?(oo=a.jsx(yt,{variant:"ghost",onClick:at,children:io}),e[178]=at,e[179]=io,e[180]=oo):oo=e[180];let Rt;e[181]!==E||e[182]!==P||e[183]!==x?(Rt=!x.trim()||P||E,e[181]=E,e[182]=P,e[183]=x,e[184]=Rt):Rt=e[184];let Ct;e[185]!==p?(Ct=p("projectEditDialog.actions.save"),e[185]=p,e[186]=Ct):Ct=e[186];let jo;e[187]!==re||e[188]!==Rt||e[189]!==Ct?(jo=a.jsx(yt,{onClick:re,disabled:Rt,children:Ct}),e[187]=re,e[188]=Rt,e[189]=Ct,e[190]=jo):jo=e[190];let ho;e[191]!==oo||e[192]!==jo?(ho=a.jsxs(y4,{children:[oo,jo]}),e[191]=oo,e[192]=jo,e[193]=ho):ho=e[193];let $e;e[194]!==Ae||e[195]!==So||e[196]!==ho?($e=a.jsxs(lr,{className:"max-w-md",children:[Ae,So,ho]}),e[194]=Ae,e[195]=So,e[196]=ho,e[197]=$e):$e=e[197];let tt;return e[198]!==n||e[199]!==o||e[200]!==$e?(tt=a.jsx(ar,{open:o,onOpenChange:n,children:$e}),e[198]=n,e[199]=o,e[200]=$e,e[201]=tt):tt=e[201],tt};function FP(t){return t.uploadProjectIcon}function _P(t){return t.removeProjectIcon}function BP(t){return t.discoverProjectIcon}function DP(t){return t&&URL.revokeObjectURL(t),null}function PP(t){const e=de.c(3);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx("path",{d:"M232.49,192.49l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,0,1,17-17L180,187V141L128,89,76,141V187l11.51-11.52a12,12,0,0,1,17,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L52,187V136a12,12,0,0,1,3.51-8.49L116,67V24a12,12,0,0,1,24,0V67l60.49,60.48A12,12,0,0,1,204,136v51l11.51-11.52a12,12,0,0,1,17,17Z",transform:"rotate(180 128 128)"}),e[0]=o):o=e[0];let n;return e[1]!==t?(n=a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:o}),e[1]=t,e[2]=n):n=e[2],n}const zf=t=>t.nativeEvent.isComposing||t.nativeEvent.keyCode===229,Of=g.createContext(null),yZ=t=>{const e=de.c(3),{children:o,value:n}=t;let s;return e[0]!==o||e[1]!==n?(s=a.jsx(Of.Provider,{value:n,children:o}),e[0]=o,e[1]=n,e[2]=s):s=e[2],s},TP=()=>g.useContext(Of);function HP(){const t=de.c(11),e=Te(IP),o=Iw(e??""),n=f4(e??""),s=ie.useRef(0);let r,i;t[0]!==e||t[1]!==o?(r=()=>{!e||!o||o.length},i=[e,o],t[0]=e,t[1]=o,t[2]=r,t[3]=i):(r=t[2],i=t[3]),ie.useEffect(r,i);let l,c;t[4]!==e||t[5]!==n?(l=()=>{!e||!n||n.length},c=[e,n],t[4]=e,t[5]=n,t[6]=l,t[7]=c):(l=t[6],c=t[7]),ie.useEffect(l,c);let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{s.current=0},t[8]=d):d=t[8];let u;t[9]!==e?(u=[e],t[9]=e,t[10]=u):u=t[10],ie.useEffect(d,u)}function IP(t){return t.currentSessionId}const EP=g.memo(function(){return HP(),null});function wZ(t){const e=de.c(5),{children:o}=t,n=Ee(jP);let s;e[0]!==n?(s=n?a.jsx(EP,{}):null,e[0]=n,e[1]=s):s=e[1];let r;return e[2]!==o||e[3]!==s?(r=a.jsxs(a.Fragment,{children:[s,o]}),e[2]=o,e[3]=s,e[4]=r):r=e[4],r}function jP(t){return t.voiceModeEnabled}const LP={sm:{icon:"w-4 h-4",container:"gap-1.5"},md:{icon:"w-5 h-5",container:"gap-2"},lg:{icon:"w-6 h-6",container:"gap-2.5"}},VP={idle:{icon:"mic-off",color:"text-muted-foreground",labelKey:"voice.status.idle"},listening:{icon:"mic",color:"text-primary",labelKey:"voice.status.listening",animation:"animate-pulse"},processing:{icon:"loader-4",color:"text-primary",labelKey:"voice.status.processing",animation:"animate-spin"},speaking:{icon:"volume-up",color:"text-green-500",labelKey:"voice.status.speaking"},error:{icon:"alert",color:"text-destructive",labelKey:"voice.status.error"}};function U5(t){const e=de.c(19),{status:o,showLabel:n,size:s,className:r,conversationMode:i}=t,l=n===void 0?!1:n,c=s===void 0?"md":s,d=r===void 0?"":r,u=i===void 0?!1:i,{t:f}=ft(),m=VP[o],h=m.icon,p=LP[c],b=`flex items-center ${l?p.container:""} ${d}`,y=`
|
|
6836
6836
|
${p.icon}
|
|
6837
6837
|
${m.color}
|
|
6838
6838
|
${m.animation||""}
|
|
@@ -6951,7 +6951,7 @@ ${R}`;pe(Ie)},[R,pe]),Zt=g.useCallback(fe=>{fe.stopPropagation(),fe.preventDefau
|
|
|
6951
6951
|
${Ue.cssText}
|
|
6952
6952
|
transform: none;
|
|
6953
6953
|
contain: none;
|
|
6954
|
-
`,bo.querySelectorAll('[data-message-actions="true"]').forEach(ko=>{ko.style.display="none"}),bo.querySelectorAll('[data-message-action-group="true"]').forEach(ko=>{ko.style.display="none"});const Ls=bo.querySelectorAll('[aria-label^="Message time:"]'),ts=new Set;Ls.forEach(ko=>{const ao=ko.getAttribute("aria-label")?.replace("Message time:","").trim();if(!ao||ko.textContent?.includes(ao))return;const Go=document.createElement("span");Go.style.marginLeft="4px",Go.textContent=ao,ko.appendChild(Go);const Dn=ko.parentElement?.parentElement;!Dn||ts.has(Dn)||(Dn.style.justifyContent="flex-start",ts.add(Dn))}),ue.appendChild(bo),document.body.appendChild(ue);const xn=await xh(ue,{quality:1,pixelRatio:2,backgroundColor:Ke}),Vs=`message-${e}.png`;if(Io()){const ko=await fetch("/api/vscode/save-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:Vs,dataUrl:xn})});if(!ko.ok)throw new Error("Failed to save image in VS Code");const Un=await ko.json();if(Un.saved!==!0){if(Un.canceled)return;throw new Error(Un.error||"Failed to save image in VS Code")}}else{const ko=document.createElement("a");ko.download=Vs,ko.href=xn,document.body.appendChild(ko),ko.click(),document.body.removeChild(ko)}We.success(D("chat.messageBody.toast.imageSaved"))}catch(ke){console.error("Failed to generate image:",ke),We.error(D("chat.messageBody.toast.generateImageFailed"))}finally{ue&&ue.parentNode&&ue.parentNode.removeChild(ue)}},[e,D]),Gt=g.useMemo(()=>{const fe=x?.activityParts;return!ce||!fe?[]:fe},[ce,x?.activityParts]),Et=g.useMemo(()=>{const fe=x?.activityGroupSegments;return!ce||!fe?[]:fe.filter(Ie=>Ie.anchorMessageId===e)},[ce,e,x?.activityGroupSegments]),Vt=Et.length>0,xt=g.useMemo(()=>{const fe=new Map,Ie=new Map;return Gt.forEach(ue=>{fe.set(ue.part,ue);const ke=ue.part.id;typeof ke=="string"&&ke.length>0&&Ie.set(ke,ue)}),{get:ue=>{const ke=fe.get(ue);if(ke)return ke;const Ue=ue.id;if(typeof Ue=="string"&&Ue.length>0)return Ie.get(Ue)}}},[Gt]),mo=x?.toggleGroup,go=!ce||!x?.activityOwnerMessageId||x.activityOwnerMessageId===e||Vt,to=ce&&go&&Vt&&!!mo,Do=ce&&!xe,Vo=!!_,vo=k==="info"?"information":"error-warning",zo=At,kt=te&&y&&(xe||!!_),Nt=be&&zo&&!kt&&!ce,ro=g.useMemo(()=>a.jsx(e8,{hasCopyableText:At,isTouchContext:P,onCopyMessage:w,onShareImage:Eo,ttsText:R}),[R,At,P,w,Eo]),So=g.useCallback(fe=>{if(!be||!ce)return null;const Ie=S0(fe.part).trim();if(!Ie)return null;const ue=async()=>(await Xn(Ie)).ok;return a.jsx(e8,{hasCopyableText:!0,isTouchContext:P,onCopyMessage:ue,onShareImage:Eo,ttsText:Ie})},[ce,P,Eo,be]),at=g.useMemo(()=>{if(!Nt)return-1;let fe=-1;for(let Ie=0;Ie<L.length;Ie+=1){const ue=L[Ie];!ue||ue.type!=="text"||Do||xt.get(ue)?.kind==="justification"||(fe=Ie)}return fe},[xt,Do,Nt,L]),io=Nt&&at<0,oo=g.useMemo(()=>{const fe=[];to&&mo&&Et.forEach(Ue=>{const Ze=C?Ue.parts:Ue.parts.filter(Ke=>Ke.kind!=="reasoning");Ze.length!==0&&fe.push(a.jsx("div",{className:"mb-3",children:a.jsx(tV,{parts:Ze,isExpanded:x.isGroupExpanded===!0,collapsedPreviewCount:_e,onToggle:mo,syntaxTheme:l,isMobile:c,expandedTools:f,onToggleTool:m,onShowPopup:h,onContentChange:b,streamPhase:A,showHeader:!0,animateRows:O,animatedToolIds:q,diffStats:x.diffStats,renderJustificationActions:So})},`progressive-group-${Ue.id}`))});const Ie=L.filter(Ue=>Ue.type!=="reasoning"?!1:xt.get(Ue)?.kind!=="reasoning");let ue=!1,ke=0;for(;ke<L.length;){const Ue=L[ke];if(Ue.type==="text"){const Ze=xt.get(Ue);if(Do){ke+=1;continue}if(Ze?.kind==="justification"){ke+=1;continue}fe.push(a.jsx("div",{ref:M,"data-message-text-export-source":"true",children:a.jsx($6,{part:Ue,sessionId:t,messageId:e,streamPhase:A,chatRenderMode:ne,onContentChange:b})},`assistant-text-${e}-${ke}`)),Nt&&ke===at&&fe.push(a.jsx("div",{className:Y6,"data-message-actions":"true",children:a.jsx("div",{className:"flex items-center gap-1.5","data-message-action-group":"true",children:ro})},`message-actions-${e}`)),ke++;continue}if(Ue.type==="reasoning"){if(xt.get(Ue)?.kind==="reasoning"){ke+=1;continue}C&&(le?he?ue||(ue=!0,fe.push(a.jsx(Yj,{parts:Ie,messageId:e,onContentChange:b},`reasoning-merged-${e}`))):fe.push(a.jsx(_9,{part:Ue,messageId:e,onContentChange:b},`reasoning-${e}-${ke}`)):fe.push(a.jsx($6,{part:Ue,sessionId:t,messageId:e,streamPhase:A,chatRenderMode:ne,onContentChange:b},`reasoning-${e}-${ke}`))),ke++;continue}if(Ue.type==="tool"){const Ze=Ue,Ke=Ze.tool?.toLowerCase()??"";if(ce&&!go){ke+=1;continue}if(xt.get(Ue)?.kind==="tool"&&(to||!$4(Ke))){ke+=1;continue}if(!Xe(Ze)){ke++;continue}if(O4(Ke)){fe.push(a.jsx(Ps,{children:a.jsx(W1,{animate:q.has(Ze.id),wipe:!0,children:a.jsx(A9,{part:Ze,isExpanded:f.has(Ze.id),onToggle:m,syntaxTheme:l,isMobile:c,alwaysShowActions:T,onContentChange:b,onShowPopup:h,animateTailText:q.has(Ze.id)})})},`tool-${Ze.id}`)),ke++;continue}fe.push(a.jsx(Ps,{children:a.jsx(W1,{animate:q.has(Ze.id),wipe:!0,children:a.jsx(E9,{toolName:Ke,activities:[{id:Ze.id,turnId:"",messageId:e,partIndex:0,part:Ze,kind:"tool"}],animateTailText:q.has(Ze.id)})})},`static-tools-${Ze.id}`)),ke++;continue}ke++}return fe},[xt,Et,T,q,O,ne,le,he,_e,f,c,go,ce,at,e,ro,So,t,b,h,m,to,Nt,Xe,A,C,Do,l,mo,x,L]),Rt=g.useMemo(()=>{if(!te||!xe)return;const fe=x?.userMessageCreatedAt;if(!(typeof fe!="number"||typeof r!="number")&&!(r<=fe))return iV(r-fe)},[te,xe,x?.userMessageCreatedAt,r]),Ct=g.useMemo(()=>{const fe=typeof r=="number"&&r>0?r:typeof i=="number"&&i>0?i:null;if(fe===null)return null;const Ie=yL(fe);return Ie.length>0?Ie:null},[r,i]),jo="text-sm text-muted-foreground/60 tabular-nums flex items-center gap-1",ho=Io(),$e=!ye&&!c&&!ho,tt=a.jsxs(a.Fragment,{children:[$e&&Ce?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50","aria-label":D("chat.messageBody.actions.openPreviewAria"),onPointerDown:fe=>fe.stopPropagation(),onClick:()=>{const fe=re??(typeof Fe?.directory=="string"?Fe.directory:null);fe&&ve(fe,Ce)},children:a.jsx(G,{name:"global",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.openPreview")})]}):null,!ye&&!ho?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",size:"icon",variant:"ghost",disabled:!At||!me,className:U("h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50",(!At||!me)&&"opacity-50"),onPointerDown:fe=>fe.stopPropagation(),onClick:Zt,children:a.jsx(G,{name:"booklet",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.saveAsPlan")})]}):null,ye?null:a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50",onPointerDown:fe=>fe.stopPropagation(),onClick:Dt,children:a.jsx(G,{name:"chat-new",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.startNewSession")})]}),!ye&&!ho?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50",onPointerDown:fe=>fe.stopPropagation(),onClick:Wt,children:a.jsx(PP,{className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.startNewMultiRun")})]}):null]});return a.jsxs("div",{ref:B,"data-message-text-export-root":"true",className:U("relative w-full group/message"),style:j9,children:[a.jsx(gL,{containerRef:B}),a.jsx(lL,{open:W,onOpenChange:J,initialTitle:we,sourceText:R,saving:j,onSave:fo}),a.jsxs("div",{children:[a.jsxs("div",{className:"message-content-text leading-relaxed overflow-hidden text-foreground/90 [&_p:last-child]:mb-0 [&_ul:last-child]:mb-0 [&_ol:last-child]:mb-0",children:[oo,Vo&&a.jsx(Ps,{children:a.jsx("div",{className:U("group/assistant-text relative mt-3 p-3 rounded-lg border break-words max-w-full",k==="info"?"bg-[var(--status-info-background)] border-[var(--status-info-border)]":"bg-[var(--status-error-background)] border-[var(--status-error-border)]"),children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{name:vo,className:U("h-4 w-4 shrink-0",k==="info"?"text-[var(--status-info)]":"text-[var(--status-error)]")}),a.jsx("div",{className:"min-w-0 flex-1 break-words",children:a.jsx(ca,{content:_??"",onShowPopup:h,className:"[&_.markdown-content>*:first-child]:mt-0 [&_.markdown-content>*:last-child]:mb-0"})})]})})},"assistant-error")]}),a.jsx(E4,{files:o,onShowPopup:h}),io&&a.jsx("div",{className:Y6,"data-message-actions":"true",children:a.jsx("div",{className:"flex items-center gap-1.5","data-message-action-group":"true",children:ro})}),kt&&a.jsxs("div",{className:"mt-2 mb-1 flex items-center justify-start gap-1.5",style:oV,children:[a.jsxs("div",{className:"flex items-center gap-1.5","data-message-action-group":"true",children:[ro,tt]}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[Rt?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsxs("span",{className:"text-sm text-muted-foreground/60 tabular-nums flex items-center gap-1",children:[a.jsx(G,{name:"hourglass",className:"h-3.5 w-3.5"}),a.jsx("span",{className:"message-footer__label",children:Rt})]})}),a.jsx(eo,{children:Rt})]}):null,Ct?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsxs("span",{className:jo,"aria-label":`Message time: ${Ct}`,children:[a.jsx(G,{name:"time",className:"h-3.5 w-3.5"}),a.jsx("span",{className:"message-footer__label",children:Ct})]})}),a.jsx(eo,{children:Ct})]}):null,!ye&&te&&xe?a.jsx(B9,{activityParts:x?.activityParts}):null]})]})]})]})}),Il=g.memo(t=>{const e=de.c(20);let o,n;if(e[0]!==t?({isUser:o,...n}=t,e[0]=t,e[1]=o,e[2]=n):(o=e[1],n=e[2]),o){let r;return e[3]!==n.agentMention||e[4]!==n.alwaysShowActions||e[5]!==n.copiedMessage||e[6]!==n.hasTextContent||e[7]!==n.hasTouchInput||e[8]!==n.isMobile||e[9]!==n.messageId||e[10]!==n.onCopyMessage||e[11]!==n.onFork||e[12]!==n.onRevert||e[13]!==n.onShowPopup||e[14]!==n.parts||e[15]!==n.stickyUserHeaderEnabled||e[16]!==n.userActionsMode?(r=a.jsx(cV,{messageId:n.messageId,parts:n.parts,isMobile:n.isMobile,alwaysShowActions:n.alwaysShowActions,hasTouchInput:n.hasTouchInput,hasTextContent:n.hasTextContent,onCopyMessage:n.onCopyMessage,copiedMessage:n.copiedMessage,onShowPopup:n.onShowPopup,agentMention:n.agentMention,onRevert:n.onRevert,onFork:n.onFork,userActionsMode:n.userActionsMode,stickyUserHeaderEnabled:n.stickyUserHeaderEnabled}),e[3]=n.agentMention,e[4]=n.alwaysShowActions,e[5]=n.copiedMessage,e[6]=n.hasTextContent,e[7]=n.hasTouchInput,e[8]=n.isMobile,e[9]=n.messageId,e[10]=n.onCopyMessage,e[11]=n.onFork,e[12]=n.onRevert,e[13]=n.onShowPopup,e[14]=n.parts,e[15]=n.stickyUserHeaderEnabled,e[16]=n.userActionsMode,e[17]=r):r=e[17],r}let s;return e[18]!==n?(s=a.jsx(dV,{...n}),e[18]=n,e[19]=s):s=e[19],s});function uV(t){return t.openContextPanelTab}function fV(t){return!t}function mV(t){return!t}const L9="GitHub issue context (JSON)",V9="GitHub pull request context (JSON)",t8=t=>typeof t=="number"&&Number.isFinite(t)&&t>0,o8=(t,e)=>{const o=t.trimStart();if(!o.startsWith(e))return null;const n=o.indexOf("{");if(n<0)return null;try{return JSON.parse(o.slice(n))}catch{return null}},hV=t=>{const e=o8(t,L9);if(e){const n=e.issue,s=n?.number,r=n?.title,i=n?.url;return!t8(s)||typeof r!="string"||typeof i!="string"?null:{type:"file",mime:"application/vnd.github.issue-link",filename:`Issue #${s}: ${r}`,url:i}}const o=o8(t,V9);if(o){const n=o.pr,s=n?.number,r=n?.title,i=n?.url;return!t8(s)||typeof r!="string"||typeof i!="string"?null:{type:"file",mime:"application/vnd.github.pull-request-link",filename:`PR #${s}: ${r}`,url:i}}return null},pV=(t,e)=>{const o=t.trim();return!!(e&&o.startsWith("User has requested to enter plan mode")||e&&o.startsWith("The plan at ")||o.startsWith("The following tool was executed by the user"))},gV=(t,e)=>{const o=e?.planModeEnabled===!0;return t.filter(n=>{if(!(n.synthetic===!0))return!0;if(n.type!=="text")return!1;const r=n.text;if(typeof r!="string")return!1;const i=r.trimStart();return pV(r,o)||i.startsWith(L9)||i.startsWith(V9)}).map(n=>{const s=n;if(s.type==="compaction")return{type:"text",text:"/compact"};if(s.type==="text"){const r=typeof s.text=="string"?s.text.trim():"";if(s.synthetic===!0){const l=hV(r);if(l)return l}if(r.startsWith("The following tool was executed by the user"))return{type:"text",text:"/shell"}}return n})},vV="Authentication failed for this provider. Please re-authenticate and retry.",bV=t=>{if(typeof t!="string")return!1;const e=t.toLowerCase().trim();if(!e)return!1;if(e.includes("token refresh failed")||e.includes("unauthorized")||e.includes("invalid token")||e.includes("expired token"))return!0;const o=e.includes("oauth"),n=e.includes("failed")||e.includes("invalid")||e.includes("expired");if(o&&n)return!0;const s=/\b401\b/.test(e),r=e.includes("auth")||e.includes("token")||e.includes("unauthorized");return s&&r},yV=T4(()=>zt(()=>import("./ToolOutputDialog-q7JD-9Qg.js"),__vite__mapDeps([5,0,1,6,3,4]))),N9=4e3,ui=new Map,fi=new Map,wV=new Set(["bash","shell","cmd","terminal"]),xV=new Set(["apply_patch","edit","write","multiedit","str_replace","str_replace_based_edit_tool","create","file_write"]),CV=t=>{if(typeof t!="string")return"";const e=t.trim().toLowerCase();if(!e)return"";const o=e.replace(/:\d+$/,"");if(!o.includes("."))return o;const n=o.split(".").filter(Boolean);return n[n.length-1]??o},n8=t=>{const e=ui.get(t);return e?new Set(e):new Set},s8=(t,e)=>{if(ui.size>=N9&&!ui.has(t)){const o=ui.keys().next().value;typeof o=="string"&&ui.delete(o)}ui.set(t,new Set(e))},r8=t=>{const e=fi.get(t);return e?new Set(e):new Set},i8=(t,e)=>{if(fi.size>=N9&&!fi.has(t)){const o=fi.keys().next().value;typeof o=="string"&&fi.delete(o)}fi.set(t,new Set(e))};function El(t){const e=de.c(3),[o,n]=g.useState(t);let s,r;return e[0]!==t?(s=()=>{t!=null&&n(t)},r=[t],e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]),g.useEffect(s,r),t??o}const Vn=(t,e)=>{if(typeof t=="object"&&t!==null)return t[e]},SV=({message:t,previousMessage:e,nextMessage:o,onContentChange:n,animationHandlers:s,turnGroupingContext:r,assistantHeaderMessageId:i,isInActiveTurn:l=!1,activeStreamingPhase:c=null,animateUserOnMount:d=!1,onUserAnimationConsumed:u})=>{const{isMobile:f,isTablet:m,hasTouchInput:h}=Lr(),p=f||m,{currentTheme:v}=js(),b=g.useRef(null),y=Te(ue=>ue.currentSessionId),w=Ot(ue=>ue.getAgentModelForSession),S=Ot(ue=>ue.getSessionModelSelection),C=Te(ue=>ue.revertToMessage),x=Te(ue=>ue.forkFromMessage);Di("ui.chat_message.render"),l&&Di("ui.chat_message.render.streaming");const _=Ee.getState().providers,{showReasoningTraces:k,stickyUserHeader:D,chatRenderMode:F,showExpandedBashTools:A,showExpandedEditTools:B}=Me(rd(ue=>({showReasoningTraces:ue.showReasoningTraces,stickyUserHeader:ue.stickyUserHeader,chatRenderMode:ue.chatRenderMode,showExpandedBashTools:ue.showExpandedBashTools,showExpandedEditTools:ue.showExpandedEditTools})));g.useEffect(()=>{y&&Qs.getInstance().recordSessionStart(y)},[y]);const[M,H]=g.useState(null),[P,T]=g.useState(!1),[E,O]=g.useState(()=>n8(t.info.id)),[L,Z]=g.useState(()=>r8(t.info.id)),[oe,V]=g.useState({open:!1,title:"",content:""});g.useEffect(()=>{O(n8(t.info.id)),Z(r8(t.info.id))},[t.info.id]);const N=g.useMemo(()=>Dc(t.info),[t.info]).isUser,ee=N&&(f||!D),z=N&&!f&&D&&!ee,q=t.info.sessionID,ae=Bu(ue=>ue.planModeEnabled),{currentContextAgent:R,savedSessionAgentSelection:we}=zn(rd(ue=>({currentContextAgent:l&&q?ue.currentAgentContext.get(q):void 0,savedSessionAgentSelection:l&&q?ue.sessionAgentSelections.get(q):void 0}))),ve=g.useMemo(()=>{const ue=z4(t.parts);return N?gV(ue,{planModeEnabled:ae}):ue},[N,t.parts,ae]),Ce=g.useMemo(()=>{if(N||!e)return null;const ue=Vn(e.info,"clientRole"),ke=Vn(e.info,"role");if((typeof ue=="string"?ue:typeof ke=="string"?ke:void 0)!=="user")return null;const Ze=Vn(e.info,"mode"),Ke=Vn(e.info,"agent"),To=Vn(e.info,"providerID"),bo=Vn(e.info,"modelID"),En=Vn(e.info,"variant"),mr=typeof Ze=="string"&&Ze.trim().length>0?Ze:typeof Ke=="string"&&Ke.trim().length>0?Ke:void 0,Ls=typeof To=="string"&&To.trim().length>0?To:void 0,ts=typeof bo=="string"&&bo.trim().length>0?bo:void 0,xn=typeof En=="string"&&En.trim().length>0?En:void 0;return!mr&&!Ls&&!ts&&!xn?null:{agentName:mr,providerId:Ls,modelId:ts,variant:xn}},[N,e]),Pe=g.useMemo(()=>{if(!ae||N||!e)return!1;const ue=Array.isArray(e.parts)?e.parts:[];for(let ke=0;ke<ue.length;ke++){const Ue=ue[ke];if(Ue?.type!=="text"||Ue?.synthetic!==!0)continue;const Ze=typeof Ue.text=="string"?Ue.text.trim():"";if(Ze.startsWith("User has requested to enter plan mode")||Ze.startsWith("The plan at "))return!0}return!1},[N,ae,e]),De=g.useMemo(()=>{if(N)return;const ue=t.info.time;if(!(typeof ue?.completed=="number"&&ue.completed>0)&&Pe&&Ce?.agentName)return Ce.agentName;const Ue=Vn(t.info,"mode");if(typeof Ue=="string"&&Ue.trim().length>0)return Ue;const Ze=Vn(t.info,"agent");if(typeof Ze=="string"&&Ze.trim().length>0)return Ze;if(Ce?.agentName)return Ce.agentName;if(q)return R||(we??void 0)},[N,t.info,Pe,Ce,q,R,we]),pe=N?null:Vn(t.info,"providerID"),K=N?null:Vn(t.info,"modelID"),re=g.useMemo(()=>{if(N||!q)return null;if(Ce?.providerId&&Ce?.modelId)return{providerId:Ce.providerId,modelId:Ce.modelId};if(De){const ke=w(q,De);if(ke?.providerId&&ke?.modelId)return ke}const ue=S(q);return ue?.providerId&&ue?.modelId?ue:null},[N,q,De,Ce,w,S]),Q=g.useMemo(()=>N?null:typeof pe=="string"&&pe.trim().length>0?pe:re?.providerId??null,[N,pe,re]),W=g.useMemo(()=>N?null:typeof K=="string"&&K.trim().length>0?K:re?.modelId??null,[N,K,re]),J=g.useMemo(()=>{if(!N&&Q&&W&&_.length>0){const ue=_.find(ke=>ke.id===Q);if(ue?.models&&Array.isArray(ue.models)){const Ze=ue.models.find(Ke=>Ke.id===W)?.name;return typeof Ze=="string"?Ze:void 0}}},[N,Q,W,_]),j=g.useMemo(()=>{if(N||!Q||!W)return!1;const ue=_.find(Ze=>Ze.id===Q);if(!ue?.models||!Array.isArray(ue.models))return!1;const Ue=ue.models.find(Ze=>Ze.id===W)?.variants;return!!(Ue&&Object.keys(Ue).length>0)},[N,W,Q,_]),se=El(De),ne=El(Q??void 0),le=El(J),he=se??void 0,be=ne??null,ce=le??void 0,ye=g.useMemo(()=>{const ue=t.info.time;return typeof ue?.completed=="number"?ue.completed:null},[t.info.time]),_e=g.useMemo(()=>{const ue=t.info.time;return typeof ue?.created=="number"?ue.created:null},[t.info.time]),te=g.useMemo(()=>N?!0:!!(ye&&ye>0),[N,ye]),xe=g.useMemo(()=>{const ue=t.info.finish;return typeof ue=="string"?ue:void 0},[t.info]),Fe=g.useMemo(()=>iL(ve,{includeReasoning:k}),[ve,k]),X=g.useMemo(()=>N?Fe:!te&&F==="sorted"?[]:Fe,[F,te,N,Fe]),me=g.useMemo(()=>N?[]:Fe.filter(ue=>ue.type==="text"),[N,Fe]),Ae=g.useMemo(()=>N?[]:Fe.filter(ke=>ke.type==="tool"),[N,Fe]),qe=g.useMemo(()=>N?[]:(r?.activityParts??[]).filter(ke=>ke.kind==="tool").map(ke=>ke.part).filter(ke=>ke.type==="tool"),[N,r?.activityParts]),ze=g.useMemo(()=>{if(!A&&!B)return new Set;const ue=new Set;for(const ke of[...Ae,...qe]){const Ue=typeof ke?.id=="string"?ke.id:"";if(!Ue)continue;const Ze=CV(ke.tool);if(Ze){if(A&&wV.has(Ze)){ue.add(Ue);continue}B&&xV.has(Ze)&&ue.add(Ue)}}return ue},[A,B,Ae,qe]),Oe=g.useMemo(()=>{if(ze.size===0&&L.size===0)return E;const ue=new Set(E);return ze.forEach(ke=>{L.has(ke)||ue.add(ke)}),L.forEach(ke=>{ue.delete(ke)}),ue},[L,ze,E]),Xe=g.useMemo(()=>{if(!N)return;const ue=ve.find(Ke=>Ke.type==="agent");if(!ue)return;const ke=ue,Ue=typeof ke.name=="string"?ke.name:void 0;if(!Ue)return;const Ze=ke.source&&typeof ke.source.value=="string"&&ke.source.value.trim().length>0?ke.source.value:`@${Ue}`;return{name:Ue,token:Ze}},[N,ve]),mt=N&&X.length===0,Ge=typeof xe!="string",ot=g.useMemo(()=>N?!1:me.length===0||Ae.length===0?Ge:!0,[me.length,Ae.length,Ge,N]),ct=v?.metadata.variant,Ft=g.useMemo(()=>ct?ct==="dark":typeof document<"u"?document.documentElement.classList.contains("dark"):!1,[ct]),Le=g.useMemo(()=>v?Pf(v):Ft?QI:XI,[v,Ft]),Ye=g.useMemo(()=>N?!1:Qs.getInstance().shouldAnimateMessage(t.info,y||t.info.sessionID),[t.info,y,N]),[gt,wt]=g.useState(!1),et=g.useMemo(()=>o?Dc(o.info):null,[o]),Pt=!!r,st=r?.isLastAssistantInTurn??!1,At=g.useMemo(()=>N?!1:Pt?!st:et?!et.isUser&&et.role==="assistant":!1,[Pt,st,N,et]),Dt=g.useMemo(()=>te?"completed":l?c??"streaming":"completed",[c,l,te]);g.useEffect(()=>{!N||!d||u?.(t.info.id)},[d,N,t.info.id,u]),g.useEffect(()=>{wt(!1)},[t.info.id]),g.useEffect(()=>{const ue=i??r?.headerMessageId;if(N||!ue||ue!==t.info.id)return;(Dt==="streaming"||Dt==="cooldown")&&wt(!0)},[i,N,t.info.id,Dt,r?.headerMessageId]);const Wt=g.useMemo(()=>{if(N)return!0;const ue=i??r?.headerMessageId;return ue?t.info.id===ue?Dt==="completed"?!0:gt||(Dt==="streaming"||Dt==="cooldown"):!1:!0},[i,gt,N,r,Dt,t.info.id]),Zt=g.useCallback(ue=>{Xn(ue).then(ke=>{ke.ok&&(H(ue),setTimeout(()=>H(null),2e3))})},[]),fo=N?void 0:r?.userMessageVariant??Ce?.variant,Eo=!N&&j?fo??"Default":void 0,Gt=g.useMemo(()=>{if(N)return;const ue=t.info?.error;if(!ue)return;const ke=typeof ue.data?.message=="string"?ue.data.message:void 0,Ue=typeof ue.message=="string"?ue.message:void 0,Ze=typeof ue.name=="string"?ue.name:void 0,Ke=ke||Ue||Ze;if(Ke)return Ze==="SessionRetry"?{text:`Opencode failed to send a message. Retry attempt info:
|
|
6954
|
+
`,bo.querySelectorAll('[data-message-actions="true"]').forEach(ko=>{ko.style.display="none"}),bo.querySelectorAll('[data-message-action-group="true"]').forEach(ko=>{ko.style.display="none"});const Ls=bo.querySelectorAll('[aria-label^="Message time:"]'),ts=new Set;Ls.forEach(ko=>{const ao=ko.getAttribute("aria-label")?.replace("Message time:","").trim();if(!ao||ko.textContent?.includes(ao))return;const Go=document.createElement("span");Go.style.marginLeft="4px",Go.textContent=ao,ko.appendChild(Go);const Dn=ko.parentElement?.parentElement;!Dn||ts.has(Dn)||(Dn.style.justifyContent="flex-start",ts.add(Dn))}),ue.appendChild(bo),document.body.appendChild(ue);const xn=await xh(ue,{quality:1,pixelRatio:2,backgroundColor:Ke}),Vs=`message-${e}.png`;if(Io()){const ko=await fetch("/api/vscode/save-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:Vs,dataUrl:xn})});if(!ko.ok)throw new Error("Failed to save image in VS Code");const Un=await ko.json();if(Un.saved!==!0){if(Un.canceled)return;throw new Error(Un.error||"Failed to save image in VS Code")}}else{const ko=document.createElement("a");ko.download=Vs,ko.href=xn,document.body.appendChild(ko),ko.click(),document.body.removeChild(ko)}We.success(D("chat.messageBody.toast.imageSaved"))}catch(ke){console.error("Failed to generate image:",ke),We.error(D("chat.messageBody.toast.generateImageFailed"))}finally{ue&&ue.parentNode&&ue.parentNode.removeChild(ue)}},[e,D]),Gt=g.useMemo(()=>{const fe=x?.activityParts;return!ce||!fe?[]:fe},[ce,x?.activityParts]),Et=g.useMemo(()=>{const fe=x?.activityGroupSegments;return!ce||!fe?[]:fe.filter(Ie=>Ie.anchorMessageId===e)},[ce,e,x?.activityGroupSegments]),Vt=Et.length>0,xt=g.useMemo(()=>{const fe=new Map,Ie=new Map;return Gt.forEach(ue=>{fe.set(ue.part,ue);const ke=ue.part.id;typeof ke=="string"&&ke.length>0&&Ie.set(ke,ue)}),{get:ue=>{const ke=fe.get(ue);if(ke)return ke;const Ue=ue.id;if(typeof Ue=="string"&&Ue.length>0)return Ie.get(Ue)}}},[Gt]),mo=x?.toggleGroup,go=!ce||!x?.activityOwnerMessageId||x.activityOwnerMessageId===e||Vt,to=ce&&go&&Vt&&!!mo,Do=ce&&!xe,Vo=!!_,vo=k==="info"?"information":"error-warning",zo=At,kt=te&&y&&(xe||!!_),Nt=be&&zo&&!kt&&!ce,ro=g.useMemo(()=>a.jsx(e8,{hasCopyableText:At,isTouchContext:P,onCopyMessage:w,onShareImage:Eo,ttsText:R}),[R,At,P,w,Eo]),So=g.useCallback(fe=>{if(!be||!ce)return null;const Ie=S0(fe.part).trim();if(!Ie)return null;const ue=async()=>(await Xn(Ie)).ok;return a.jsx(e8,{hasCopyableText:!0,isTouchContext:P,onCopyMessage:ue,onShareImage:Eo,ttsText:Ie})},[ce,P,Eo,be]),at=g.useMemo(()=>{if(!Nt)return-1;let fe=-1;for(let Ie=0;Ie<L.length;Ie+=1){const ue=L[Ie];!ue||ue.type!=="text"||Do||xt.get(ue)?.kind==="justification"||(fe=Ie)}return fe},[xt,Do,Nt,L]),io=Nt&&at<0,oo=g.useMemo(()=>{const fe=[];to&&mo&&Et.forEach(Ue=>{const Ze=C?Ue.parts:Ue.parts.filter(Ke=>Ke.kind!=="reasoning");Ze.length!==0&&fe.push(a.jsx("div",{className:"mb-3",children:a.jsx(tV,{parts:Ze,isExpanded:x.isGroupExpanded===!0,collapsedPreviewCount:_e,onToggle:mo,syntaxTheme:l,isMobile:c,expandedTools:f,onToggleTool:m,onShowPopup:h,onContentChange:b,streamPhase:A,showHeader:!0,animateRows:O,animatedToolIds:q,diffStats:x.diffStats,renderJustificationActions:So})},`progressive-group-${Ue.id}`))});const Ie=L.filter(Ue=>Ue.type!=="reasoning"?!1:xt.get(Ue)?.kind!=="reasoning");let ue=!1,ke=0;for(;ke<L.length;){const Ue=L[ke];if(Ue.type==="text"){const Ze=xt.get(Ue);if(Do){ke+=1;continue}if(Ze?.kind==="justification"){ke+=1;continue}fe.push(a.jsx("div",{ref:M,"data-message-text-export-source":"true",children:a.jsx($6,{part:Ue,sessionId:t,messageId:e,streamPhase:A,chatRenderMode:ne,onContentChange:b})},`assistant-text-${e}-${ke}`)),Nt&&ke===at&&fe.push(a.jsx("div",{className:Y6,"data-message-actions":"true",children:a.jsx("div",{className:"flex items-center gap-1.5","data-message-action-group":"true",children:ro})},`message-actions-${e}`)),ke++;continue}if(Ue.type==="reasoning"){if(xt.get(Ue)?.kind==="reasoning"){ke+=1;continue}C&&(le?he?ue||(ue=!0,fe.push(a.jsx(Yj,{parts:Ie,messageId:e,onContentChange:b},`reasoning-merged-${e}`))):fe.push(a.jsx(_9,{part:Ue,messageId:e,onContentChange:b},`reasoning-${e}-${ke}`)):fe.push(a.jsx($6,{part:Ue,sessionId:t,messageId:e,streamPhase:A,chatRenderMode:ne,onContentChange:b},`reasoning-${e}-${ke}`))),ke++;continue}if(Ue.type==="tool"){const Ze=Ue,Ke=Ze.tool?.toLowerCase()??"";if(ce&&!go){ke+=1;continue}if(xt.get(Ue)?.kind==="tool"&&(to||!$4(Ke))){ke+=1;continue}if(!Xe(Ze)){ke++;continue}if(O4(Ke)){fe.push(a.jsx(Ps,{children:a.jsx(W1,{animate:q.has(Ze.id),wipe:!0,children:a.jsx(A9,{part:Ze,isExpanded:f.has(Ze.id),onToggle:m,syntaxTheme:l,isMobile:c,alwaysShowActions:T,onContentChange:b,onShowPopup:h,animateTailText:q.has(Ze.id)})})},`tool-${Ze.id}`)),ke++;continue}fe.push(a.jsx(Ps,{children:a.jsx(W1,{animate:q.has(Ze.id),wipe:!0,children:a.jsx(E9,{toolName:Ke,activities:[{id:Ze.id,turnId:"",messageId:e,partIndex:0,part:Ze,kind:"tool"}],animateTailText:q.has(Ze.id)})})},`static-tools-${Ze.id}`)),ke++;continue}ke++}return fe},[xt,Et,T,q,O,ne,le,he,_e,f,c,go,ce,at,e,ro,So,t,b,h,m,to,Nt,Xe,A,C,Do,l,mo,x,L]),Rt=g.useMemo(()=>{if(!te||!xe)return;const fe=x?.userMessageCreatedAt;if(!(typeof fe!="number"||typeof r!="number")&&!(r<=fe))return iV(r-fe)},[te,xe,x?.userMessageCreatedAt,r]),Ct=g.useMemo(()=>{const fe=typeof r=="number"&&r>0?r:typeof i=="number"&&i>0?i:null;if(fe===null)return null;const Ie=yL(fe);return Ie.length>0?Ie:null},[r,i]),jo="text-sm text-muted-foreground/60 tabular-nums flex items-center gap-1",ho=Io(),$e=!ye&&!c&&!ho,tt=a.jsxs(a.Fragment,{children:[$e&&Ce?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50","aria-label":D("chat.messageBody.actions.openPreviewAria"),onPointerDown:fe=>fe.stopPropagation(),onClick:()=>{const fe=re??(typeof Fe?.directory=="string"?Fe.directory:null);fe&&ve(fe,Ce)},children:a.jsx(G,{name:"global",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.openPreview")})]}):null,!ye&&!ho?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",size:"icon",variant:"ghost",disabled:!At||!me,className:U("h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50",(!At||!me)&&"opacity-50"),onPointerDown:fe=>fe.stopPropagation(),onClick:Zt,children:a.jsx(G,{name:"booklet",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.saveAsPlan")})]}):null,ye?null:a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50",onPointerDown:fe=>fe.stopPropagation(),onClick:Dt,children:a.jsx(G,{name:"chat-new",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.startNewSession")})]}),!ye&&!ho?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx(yt,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground bg-transparent hover:text-foreground hover:!bg-transparent active:!bg-transparent focus-visible:!bg-transparent focus-visible:ring-2 focus-visible:ring-primary/50",onPointerDown:fe=>fe.stopPropagation(),onClick:Wt,children:a.jsx(PP,{className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:D("chat.messageBody.actions.startNewMultiRun")})]}):null]});return a.jsxs("div",{ref:B,"data-message-text-export-root":"true",className:U("relative w-full group/message"),style:j9,children:[a.jsx(gL,{containerRef:B}),a.jsx(lL,{open:W,onOpenChange:J,initialTitle:we,sourceText:R,saving:j,onSave:fo}),a.jsxs("div",{children:[a.jsxs("div",{className:"message-content-text leading-relaxed overflow-hidden text-foreground/90 [&_p:last-child]:mb-0 [&_ul:last-child]:mb-0 [&_ol:last-child]:mb-0",children:[oo,Vo&&a.jsx(Ps,{children:a.jsx("div",{className:U("group/assistant-text relative mt-3 p-3 rounded-lg border break-words max-w-full",k==="info"?"bg-[var(--status-info-background)] border-[var(--status-info-border)]":"bg-[var(--status-error-background)] border-[var(--status-error-border)]"),children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{name:vo,className:U("h-4 w-4 shrink-0",k==="info"?"text-[var(--status-info)]":"text-[var(--status-error)]")}),a.jsx("div",{className:"min-w-0 flex-1 break-words",children:a.jsx(ca,{content:_??"",onShowPopup:h,className:"[&_.markdown-content>*:first-child]:mt-0 [&_.markdown-content>*:last-child]:mb-0"})})]})})},"assistant-error")]}),a.jsx(E4,{files:o,onShowPopup:h}),io&&a.jsx("div",{className:Y6,"data-message-actions":"true",children:a.jsx("div",{className:"flex items-center gap-1.5","data-message-action-group":"true",children:ro})}),kt&&a.jsxs("div",{className:"mt-2 mb-1 flex items-center justify-start gap-1.5",style:oV,children:[a.jsxs("div",{className:"flex items-center gap-1.5","data-message-action-group":"true",children:[ro,tt]}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[Rt?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsxs("span",{className:"text-sm text-muted-foreground/60 tabular-nums flex items-center gap-1",children:[a.jsx(G,{name:"hourglass",className:"h-3.5 w-3.5"}),a.jsx("span",{className:"message-footer__label",children:Rt})]})}),a.jsx(eo,{children:Rt})]}):null,Ct?a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsxs("span",{className:jo,"aria-label":`Message time: ${Ct}`,children:[a.jsx(G,{name:"time",className:"h-3.5 w-3.5"}),a.jsx("span",{className:"message-footer__label",children:Ct})]})}),a.jsx(eo,{children:Ct})]}):null,!ye&&te&&xe?a.jsx(B9,{activityParts:x?.activityParts}):null]})]})]})]})}),Il=g.memo(t=>{const e=de.c(20);let o,n;if(e[0]!==t?({isUser:o,...n}=t,e[0]=t,e[1]=o,e[2]=n):(o=e[1],n=e[2]),o){let r;return e[3]!==n.agentMention||e[4]!==n.alwaysShowActions||e[5]!==n.copiedMessage||e[6]!==n.hasTextContent||e[7]!==n.hasTouchInput||e[8]!==n.isMobile||e[9]!==n.messageId||e[10]!==n.onCopyMessage||e[11]!==n.onFork||e[12]!==n.onRevert||e[13]!==n.onShowPopup||e[14]!==n.parts||e[15]!==n.stickyUserHeaderEnabled||e[16]!==n.userActionsMode?(r=a.jsx(cV,{messageId:n.messageId,parts:n.parts,isMobile:n.isMobile,alwaysShowActions:n.alwaysShowActions,hasTouchInput:n.hasTouchInput,hasTextContent:n.hasTextContent,onCopyMessage:n.onCopyMessage,copiedMessage:n.copiedMessage,onShowPopup:n.onShowPopup,agentMention:n.agentMention,onRevert:n.onRevert,onFork:n.onFork,userActionsMode:n.userActionsMode,stickyUserHeaderEnabled:n.stickyUserHeaderEnabled}),e[3]=n.agentMention,e[4]=n.alwaysShowActions,e[5]=n.copiedMessage,e[6]=n.hasTextContent,e[7]=n.hasTouchInput,e[8]=n.isMobile,e[9]=n.messageId,e[10]=n.onCopyMessage,e[11]=n.onFork,e[12]=n.onRevert,e[13]=n.onShowPopup,e[14]=n.parts,e[15]=n.stickyUserHeaderEnabled,e[16]=n.userActionsMode,e[17]=r):r=e[17],r}let s;return e[18]!==n?(s=a.jsx(dV,{...n}),e[18]=n,e[19]=s):s=e[19],s});function uV(t){return t.openContextPanelTab}function fV(t){return!t}function mV(t){return!t}const L9="GitHub issue context (JSON)",V9="GitHub pull request context (JSON)",t8=t=>typeof t=="number"&&Number.isFinite(t)&&t>0,o8=(t,e)=>{const o=t.trimStart();if(!o.startsWith(e))return null;const n=o.indexOf("{");if(n<0)return null;try{return JSON.parse(o.slice(n))}catch{return null}},hV=t=>{const e=o8(t,L9);if(e){const n=e.issue,s=n?.number,r=n?.title,i=n?.url;return!t8(s)||typeof r!="string"||typeof i!="string"?null:{type:"file",mime:"application/vnd.github.issue-link",filename:`Issue #${s}: ${r}`,url:i}}const o=o8(t,V9);if(o){const n=o.pr,s=n?.number,r=n?.title,i=n?.url;return!t8(s)||typeof r!="string"||typeof i!="string"?null:{type:"file",mime:"application/vnd.github.pull-request-link",filename:`PR #${s}: ${r}`,url:i}}return null},pV=(t,e)=>{const o=t.trim();return!!(e&&o.startsWith("User has requested to enter plan mode")||e&&o.startsWith("The plan at ")||o.startsWith("The following tool was executed by the user"))},gV=(t,e)=>{const o=e?.planModeEnabled===!0;return t.filter(n=>{if(!(n.synthetic===!0))return!0;if(n.type!=="text")return!1;const r=n.text;if(typeof r!="string")return!1;const i=r.trimStart();return pV(r,o)||i.startsWith(L9)||i.startsWith(V9)}).map(n=>{const s=n;if(s.type==="compaction")return{type:"text",text:"/compact"};if(s.type==="text"){const r=typeof s.text=="string"?s.text.trim():"";if(s.synthetic===!0){const l=hV(r);if(l)return l}if(r.startsWith("The following tool was executed by the user"))return{type:"text",text:"/shell"}}return n})},vV="Authentication failed for this provider. Please re-authenticate and retry.",bV=t=>{if(typeof t!="string")return!1;const e=t.toLowerCase().trim();if(!e)return!1;if(e.includes("token refresh failed")||e.includes("unauthorized")||e.includes("invalid token")||e.includes("expired token"))return!0;const o=e.includes("oauth"),n=e.includes("failed")||e.includes("invalid")||e.includes("expired");if(o&&n)return!0;const s=/\b401\b/.test(e),r=e.includes("auth")||e.includes("token")||e.includes("unauthorized");return s&&r},yV=T4(()=>zt(()=>import("./ToolOutputDialog-BkrKVyMm.js"),__vite__mapDeps([5,0,1,6,3,4]))),N9=4e3,ui=new Map,fi=new Map,wV=new Set(["bash","shell","cmd","terminal"]),xV=new Set(["apply_patch","edit","write","multiedit","str_replace","str_replace_based_edit_tool","create","file_write"]),CV=t=>{if(typeof t!="string")return"";const e=t.trim().toLowerCase();if(!e)return"";const o=e.replace(/:\d+$/,"");if(!o.includes("."))return o;const n=o.split(".").filter(Boolean);return n[n.length-1]??o},n8=t=>{const e=ui.get(t);return e?new Set(e):new Set},s8=(t,e)=>{if(ui.size>=N9&&!ui.has(t)){const o=ui.keys().next().value;typeof o=="string"&&ui.delete(o)}ui.set(t,new Set(e))},r8=t=>{const e=fi.get(t);return e?new Set(e):new Set},i8=(t,e)=>{if(fi.size>=N9&&!fi.has(t)){const o=fi.keys().next().value;typeof o=="string"&&fi.delete(o)}fi.set(t,new Set(e))};function El(t){const e=de.c(3),[o,n]=g.useState(t);let s,r;return e[0]!==t?(s=()=>{t!=null&&n(t)},r=[t],e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]),g.useEffect(s,r),t??o}const Vn=(t,e)=>{if(typeof t=="object"&&t!==null)return t[e]},SV=({message:t,previousMessage:e,nextMessage:o,onContentChange:n,animationHandlers:s,turnGroupingContext:r,assistantHeaderMessageId:i,isInActiveTurn:l=!1,activeStreamingPhase:c=null,animateUserOnMount:d=!1,onUserAnimationConsumed:u})=>{const{isMobile:f,isTablet:m,hasTouchInput:h}=Lr(),p=f||m,{currentTheme:v}=js(),b=g.useRef(null),y=Te(ue=>ue.currentSessionId),w=Ot(ue=>ue.getAgentModelForSession),S=Ot(ue=>ue.getSessionModelSelection),C=Te(ue=>ue.revertToMessage),x=Te(ue=>ue.forkFromMessage);Di("ui.chat_message.render"),l&&Di("ui.chat_message.render.streaming");const _=Ee.getState().providers,{showReasoningTraces:k,stickyUserHeader:D,chatRenderMode:F,showExpandedBashTools:A,showExpandedEditTools:B}=Me(rd(ue=>({showReasoningTraces:ue.showReasoningTraces,stickyUserHeader:ue.stickyUserHeader,chatRenderMode:ue.chatRenderMode,showExpandedBashTools:ue.showExpandedBashTools,showExpandedEditTools:ue.showExpandedEditTools})));g.useEffect(()=>{y&&Qs.getInstance().recordSessionStart(y)},[y]);const[M,H]=g.useState(null),[P,T]=g.useState(!1),[E,O]=g.useState(()=>n8(t.info.id)),[L,Z]=g.useState(()=>r8(t.info.id)),[oe,V]=g.useState({open:!1,title:"",content:""});g.useEffect(()=>{O(n8(t.info.id)),Z(r8(t.info.id))},[t.info.id]);const N=g.useMemo(()=>Dc(t.info),[t.info]).isUser,ee=N&&(f||!D),z=N&&!f&&D&&!ee,q=t.info.sessionID,ae=Bu(ue=>ue.planModeEnabled),{currentContextAgent:R,savedSessionAgentSelection:we}=zn(rd(ue=>({currentContextAgent:l&&q?ue.currentAgentContext.get(q):void 0,savedSessionAgentSelection:l&&q?ue.sessionAgentSelections.get(q):void 0}))),ve=g.useMemo(()=>{const ue=z4(t.parts);return N?gV(ue,{planModeEnabled:ae}):ue},[N,t.parts,ae]),Ce=g.useMemo(()=>{if(N||!e)return null;const ue=Vn(e.info,"clientRole"),ke=Vn(e.info,"role");if((typeof ue=="string"?ue:typeof ke=="string"?ke:void 0)!=="user")return null;const Ze=Vn(e.info,"mode"),Ke=Vn(e.info,"agent"),To=Vn(e.info,"providerID"),bo=Vn(e.info,"modelID"),En=Vn(e.info,"variant"),mr=typeof Ze=="string"&&Ze.trim().length>0?Ze:typeof Ke=="string"&&Ke.trim().length>0?Ke:void 0,Ls=typeof To=="string"&&To.trim().length>0?To:void 0,ts=typeof bo=="string"&&bo.trim().length>0?bo:void 0,xn=typeof En=="string"&&En.trim().length>0?En:void 0;return!mr&&!Ls&&!ts&&!xn?null:{agentName:mr,providerId:Ls,modelId:ts,variant:xn}},[N,e]),Pe=g.useMemo(()=>{if(!ae||N||!e)return!1;const ue=Array.isArray(e.parts)?e.parts:[];for(let ke=0;ke<ue.length;ke++){const Ue=ue[ke];if(Ue?.type!=="text"||Ue?.synthetic!==!0)continue;const Ze=typeof Ue.text=="string"?Ue.text.trim():"";if(Ze.startsWith("User has requested to enter plan mode")||Ze.startsWith("The plan at "))return!0}return!1},[N,ae,e]),De=g.useMemo(()=>{if(N)return;const ue=t.info.time;if(!(typeof ue?.completed=="number"&&ue.completed>0)&&Pe&&Ce?.agentName)return Ce.agentName;const Ue=Vn(t.info,"mode");if(typeof Ue=="string"&&Ue.trim().length>0)return Ue;const Ze=Vn(t.info,"agent");if(typeof Ze=="string"&&Ze.trim().length>0)return Ze;if(Ce?.agentName)return Ce.agentName;if(q)return R||(we??void 0)},[N,t.info,Pe,Ce,q,R,we]),pe=N?null:Vn(t.info,"providerID"),K=N?null:Vn(t.info,"modelID"),re=g.useMemo(()=>{if(N||!q)return null;if(Ce?.providerId&&Ce?.modelId)return{providerId:Ce.providerId,modelId:Ce.modelId};if(De){const ke=w(q,De);if(ke?.providerId&&ke?.modelId)return ke}const ue=S(q);return ue?.providerId&&ue?.modelId?ue:null},[N,q,De,Ce,w,S]),Q=g.useMemo(()=>N?null:typeof pe=="string"&&pe.trim().length>0?pe:re?.providerId??null,[N,pe,re]),W=g.useMemo(()=>N?null:typeof K=="string"&&K.trim().length>0?K:re?.modelId??null,[N,K,re]),J=g.useMemo(()=>{if(!N&&Q&&W&&_.length>0){const ue=_.find(ke=>ke.id===Q);if(ue?.models&&Array.isArray(ue.models)){const Ze=ue.models.find(Ke=>Ke.id===W)?.name;return typeof Ze=="string"?Ze:void 0}}},[N,Q,W,_]),j=g.useMemo(()=>{if(N||!Q||!W)return!1;const ue=_.find(Ze=>Ze.id===Q);if(!ue?.models||!Array.isArray(ue.models))return!1;const Ue=ue.models.find(Ze=>Ze.id===W)?.variants;return!!(Ue&&Object.keys(Ue).length>0)},[N,W,Q,_]),se=El(De),ne=El(Q??void 0),le=El(J),he=se??void 0,be=ne??null,ce=le??void 0,ye=g.useMemo(()=>{const ue=t.info.time;return typeof ue?.completed=="number"?ue.completed:null},[t.info.time]),_e=g.useMemo(()=>{const ue=t.info.time;return typeof ue?.created=="number"?ue.created:null},[t.info.time]),te=g.useMemo(()=>N?!0:!!(ye&&ye>0),[N,ye]),xe=g.useMemo(()=>{const ue=t.info.finish;return typeof ue=="string"?ue:void 0},[t.info]),Fe=g.useMemo(()=>iL(ve,{includeReasoning:k}),[ve,k]),X=g.useMemo(()=>N?Fe:!te&&F==="sorted"?[]:Fe,[F,te,N,Fe]),me=g.useMemo(()=>N?[]:Fe.filter(ue=>ue.type==="text"),[N,Fe]),Ae=g.useMemo(()=>N?[]:Fe.filter(ke=>ke.type==="tool"),[N,Fe]),qe=g.useMemo(()=>N?[]:(r?.activityParts??[]).filter(ke=>ke.kind==="tool").map(ke=>ke.part).filter(ke=>ke.type==="tool"),[N,r?.activityParts]),ze=g.useMemo(()=>{if(!A&&!B)return new Set;const ue=new Set;for(const ke of[...Ae,...qe]){const Ue=typeof ke?.id=="string"?ke.id:"";if(!Ue)continue;const Ze=CV(ke.tool);if(Ze){if(A&&wV.has(Ze)){ue.add(Ue);continue}B&&xV.has(Ze)&&ue.add(Ue)}}return ue},[A,B,Ae,qe]),Oe=g.useMemo(()=>{if(ze.size===0&&L.size===0)return E;const ue=new Set(E);return ze.forEach(ke=>{L.has(ke)||ue.add(ke)}),L.forEach(ke=>{ue.delete(ke)}),ue},[L,ze,E]),Xe=g.useMemo(()=>{if(!N)return;const ue=ve.find(Ke=>Ke.type==="agent");if(!ue)return;const ke=ue,Ue=typeof ke.name=="string"?ke.name:void 0;if(!Ue)return;const Ze=ke.source&&typeof ke.source.value=="string"&&ke.source.value.trim().length>0?ke.source.value:`@${Ue}`;return{name:Ue,token:Ze}},[N,ve]),mt=N&&X.length===0,Ge=typeof xe!="string",ot=g.useMemo(()=>N?!1:me.length===0||Ae.length===0?Ge:!0,[me.length,Ae.length,Ge,N]),ct=v?.metadata.variant,Ft=g.useMemo(()=>ct?ct==="dark":typeof document<"u"?document.documentElement.classList.contains("dark"):!1,[ct]),Le=g.useMemo(()=>v?Pf(v):Ft?QI:XI,[v,Ft]),Ye=g.useMemo(()=>N?!1:Qs.getInstance().shouldAnimateMessage(t.info,y||t.info.sessionID),[t.info,y,N]),[gt,wt]=g.useState(!1),et=g.useMemo(()=>o?Dc(o.info):null,[o]),Pt=!!r,st=r?.isLastAssistantInTurn??!1,At=g.useMemo(()=>N?!1:Pt?!st:et?!et.isUser&&et.role==="assistant":!1,[Pt,st,N,et]),Dt=g.useMemo(()=>te?"completed":l?c??"streaming":"completed",[c,l,te]);g.useEffect(()=>{!N||!d||u?.(t.info.id)},[d,N,t.info.id,u]),g.useEffect(()=>{wt(!1)},[t.info.id]),g.useEffect(()=>{const ue=i??r?.headerMessageId;if(N||!ue||ue!==t.info.id)return;(Dt==="streaming"||Dt==="cooldown")&&wt(!0)},[i,N,t.info.id,Dt,r?.headerMessageId]);const Wt=g.useMemo(()=>{if(N)return!0;const ue=i??r?.headerMessageId;return ue?t.info.id===ue?Dt==="completed"?!0:gt||(Dt==="streaming"||Dt==="cooldown"):!1:!0},[i,gt,N,r,Dt,t.info.id]),Zt=g.useCallback(ue=>{Xn(ue).then(ke=>{ke.ok&&(H(ue),setTimeout(()=>H(null),2e3))})},[]),fo=N?void 0:r?.userMessageVariant??Ce?.variant,Eo=!N&&j?fo??"Default":void 0,Gt=g.useMemo(()=>{if(N)return;const ue=t.info?.error;if(!ue)return;const ke=typeof ue.data?.message=="string"?ue.data.message:void 0,Ue=typeof ue.message=="string"?ue.message:void 0,Ze=typeof ue.name=="string"?ue.name:void 0,Ke=ke||Ue||Ze;if(Ke)return Ze==="SessionRetry"?{text:`Opencode failed to send a message. Retry attempt info:
|
|
6955
6955
|
\`${Ke}\``,variant:"info"}:bV(Ke)?{text:vV,variant:"error"}:Ke.trim().toLowerCase()==="aborted"?{text:"The running turn was stopped before OpenCode could send the next message.",variant:"info"}:{text:`Opencode failed to send message with error:
|
|
6956
6956
|
\`${Ke}\``,variant:"error"}},[N,t.info]),Et=Gt?.text,Vt=Gt?.variant,xt=g.useMemo(()=>{if(N){const ue=X.filter(Ke=>Ke.type==="text").map(Ke=>{const To=Ke.shellAction?.output;return typeof To=="string"?To.trim():""}).filter(Ke=>Ke.length>0);if(ue.length>0)return ue.join(`
|
|
6957
6957
|
|
|
@@ -6961,7 +6961,7 @@ ${R}`;pe(Ie)},[R,pe]),Zt=g.useCallback(fe=>{fe.stopPropagation(),fe.preventDefau
|
|
|
6961
6961
|
`)}return Et&&Et.trim().length>0?Et:e4(X)},[Et,X,N]),mo=xt.length>0,go=g.useCallback(async()=>(await Xn(xt)).ok?(N&&(T(!0),setTimeout(()=>T(!1),2e3)),!0):!1,[N,xt]),to=g.useCallback(()=>{!q||!t.info.id||C(q,t.info.id)},[q,t.info.id,C]),Do=g.useCallback(()=>{!q||!t.info.id||x(q,t.info.id)},[q,t.info.id,x]),Vo=g.useCallback(ue=>{const ke=ze.has(ue),Ue=Oe.has(ue);if(ke){Z(Ze=>{const Ke=new Set(Ze);return Ue?Ke.add(ue):Ke.delete(ue),i8(t.info.id,Ke),Ke}),Ue||O(Ze=>{const Ke=new Set(Ze);return Ke.delete(ue),s8(t.info.id,Ke),Ke});return}O(Ze=>{const Ke=new Set(Ze);return Ke.has(ue)?Ke.delete(ue):Ke.add(ue),s8(t.info.id,Ke),Ke}),Z(Ze=>{if(!Ze.has(ue))return Ze;const Ke=new Set(Ze);return Ke.delete(ue),i8(t.info.id,Ke),Ke})},[ze,Oe,t.info.id]),vo=s??null,zo=g.useRef(!1),kt=g.useRef(!1),Po=g.useRef(!1),Nt=g.useRef(!1),ro=g.useRef(!1),So=g.useRef(!1);g.useEffect(()=>{kt.current=!1,Po.current=!1,Nt.current=!1,ro.current=!1,zo.current=!1,So.current=!1},[t.info.id]);const at=g.useCallback(()=>{N||zo.current||(zo.current=!0,n?.("structural"))},[N,n]),io=Me(ue=>ue.setImagePreviewOpen),oo=g.useCallback(ue=>{(ue.image||ue.mermaid)&&(V(ue),io(!0))},[io]),Rt=g.useCallback(ue=>{V(ke=>({...ke,open:ue})),io(ue)},[io]),Ct=!!Vn(t.info,"animationSettled"),jo=Dt==="streaming"||Dt==="cooldown";jo&&(So.current=!0);const ho=g.useMemo(()=>N?!1:Fe.some(ue=>ue.type==="reasoning"),[N,Fe]),$e=Ye&&!Ct&&!jo&&!So.current,tt=!N&&Ye&&me.length>0&&!ot;if(g.useEffect(()=>{if(vo?.onStreamingCandidate){if(!tt){Po.current&&(ho&&vo?.onReasoningBlock?vo.onReasoningBlock():vo?.onReservationCancelled&&vo.onReservationCancelled(),Po.current=!1);return}ro.current||(ro.current=!0,vo.onStreamingCandidate(),Po.current=!0)}},[vo,tt,ho]),g.useEffect(()=>{vo?.onAnimationStart&&$e&&(Nt.current||(vo.onAnimationStart(),Nt.current=!0))},[vo,$e]),g.useEffect(()=>{if(N)return;const ue=vo?.onAnimatedHeightChange;if(!ue||!($e||tt))return;const Ue=b.current;if(!Ue)return;if(typeof window>"u"||typeof ResizeObserver>"u"){ue(Ue.getBoundingClientRect().height);return}let Ze=null;const Ke=bo=>{if(typeof window>"u"){ue(bo);return}Ze!==null&&window.cancelAnimationFrame(Ze),Ze=window.requestAnimationFrame(()=>{ue(bo)})},To=new ResizeObserver(bo=>{const En=bo[0];En&&Ke(En.contentRect.height)});return To.observe(Ue),Ke(Ue.getBoundingClientRect().height),()=>{Ze!==null&&(window.cancelAnimationFrame(Ze),Ze=null),To.disconnect()}},[$e,N,vo,tt]),mt)return null;const fe=!N&&Wt&&D?f?"pt-4":"pt-6":"pt-0";return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:U("group w-full",N?f?"pt-2":"pt-6":fe,N||At?"pb-0":"pb-8"),id:`message-${t.info.id}`,"data-message-id":t.info.id,ref:b,children:a.jsx("div",{className:"chat-message-column relative",children:N?X.length===0?null:a.jsx(Ps,{forceAnimation:!0,skipAnimation:!d,ignoreContextDisabled:!0,respectReducedMotion:!0,children:a.jsx("div",{className:U("relative flex justify-end",f?void 0:"group/user-shell"),children:a.jsxs("div",{className:U("max-w-[85%]",z?"pb-5":void 0),children:[a.jsx("div",{style:{backgroundColor:"var(--chat-user-message-bg)",borderRadius:"var(--radius-xl)",borderBottomRightRadius:"var(--radius-sm)"},className:"px-5 py-3 shadow-none border border-primary/5",children:a.jsx(Il,{messageId:t.info.id,parts:X,isUser:N,isMessageCompleted:te,messageFinish:xe,syntaxTheme:Le,isMobile:f,alwaysShowActions:p,hasTouchInput:h,copiedCode:M,onCopyCode:Zt,expandedTools:E,onToggleTool:Vo,onShowPopup:oo,streamPhase:Dt,allowAnimation:$e,onContentChange:n,shouldShowHeader:!1,hasTextContent:mo,onCopyMessage:go,copiedMessage:P,showReasoningTraces:k,onAuxiliaryContentComplete:at,agentMention:Xe,onRevert:to,onFork:N?Do:void 0,errorMessage:Et,errorVariant:Vt,userActionsMode:ee?"external-content":"inline",stickyUserHeaderEnabled:D})}),ee?a.jsx(Il,{messageId:t.info.id,parts:X,isUser:N,isMessageCompleted:te,messageFinish:xe,syntaxTheme:Le,isMobile:f,alwaysShowActions:p,hasTouchInput:h,copiedCode:M,onCopyCode:Zt,expandedTools:E,onToggleTool:Vo,onShowPopup:oo,streamPhase:Dt,allowAnimation:$e,onContentChange:n,shouldShowHeader:!1,hasTextContent:mo,onCopyMessage:go,copiedMessage:P,showReasoningTraces:k,onAuxiliaryContentComplete:at,agentMention:Xe,onRevert:to,onFork:N?Do:void 0,errorMessage:Et,errorVariant:Vt,userActionsMode:"external-actions",stickyUserHeaderEnabled:D}):null]})})}):a.jsxs("div",{className:"relative",children:[Wt&&a.jsx(tE,{isUser:N,providerID:be,agentName:he,modelName:ce,variant:Eo,isDarkTheme:Ft}),a.jsx(Il,{sessionId:t.info.sessionID,messageId:t.info.id,parts:Fe,isUser:N,isMessageCompleted:te,messageFinish:xe,messageCompletedAt:ye??void 0,messageCreatedAt:_e??void 0,syntaxTheme:Le,isMobile:f,alwaysShowActions:p,hasTouchInput:h,copiedCode:M,onCopyCode:Zt,expandedTools:Oe,onToggleTool:Vo,onShowPopup:oo,streamPhase:Dt,allowAnimation:$e,onContentChange:n,shouldShowHeader:Wt,hasTextContent:mo,onCopyMessage:go,copiedMessage:P,onAuxiliaryContentComplete:at,showReasoningTraces:k,agentMention:Xe,turnGroupingContext:r,errorMessage:Et,errorVariant:Vt})]})})}),a.jsx(g.Suspense,{fallback:null,children:a.jsx(yV,{popup:oe,onOpenChange:Rt,syntaxTheme:Le,isMobile:f})})]})},kV=g.memo(SV,(t,e)=>L4({info:t.message.info,parts:t.message.parts},{info:e.message.info,parts:e.message.parts})&&$2(t.previousMessage?{info:t.previousMessage.info,parts:t.previousMessage.parts}:void 0,e.previousMessage?{info:e.previousMessage.info,parts:e.previousMessage.parts}:void 0)&&$2(t.nextMessage?{info:t.nextMessage.info,parts:t.nextMessage.parts}:void 0,e.nextMessage?{info:e.nextMessage.info,parts:e.nextMessage.parts}:void 0)&&t.isInActiveTurn===e.isInActiveTurn&&t.activeStreamingPhase===e.activeStreamingPhase&&t.assistantHeaderMessageId===e.assistantHeaderMessageId&&t.animateUserOnMount===e.animateUserOnMount&&t.onUserAnimationConsumed===e.onUserAnimationConsumed&&b9(t.turnGroupingContext,e.turnGroupingContext,t.message.info.id,Dc(t.message.info).isUser)),MV=t=>{const e=de.c(7),{assistantMessages:o,renderMessage:n}=t;let s;if(e[0]!==o||e[1]!==n){let i;e[3]!==n?(i=l=>n(l),e[3]=n,e[4]=i):i=e[4],s=o.map(i),e[0]=o,e[1]=n,e[2]=s}else s=e[2];let r;return e[5]!==s?(r=a.jsx("div",{className:"relative z-0",children:s}),e[5]=s,e[6]=r):r=e[6],r},AV=g.memo(MV),FV=t=>{const e=de.c(12),{turn:o,stickyUserHeader:n,renderMessage:s}=t,r=n===void 0?!0:n,i=`turn-${o.turnId}`;let l;e[0]!==s||e[1]!==r||e[2]!==o.userMessage?(l=r?a.jsxs("div",{className:"sticky top-0 z-20 relative bg-[var(--surface-background)] [overflow-anchor:none]",children:[a.jsx("div",{className:"relative z-10",children:s(o.userMessage)}),a.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-full z-0 h-4 bg-gradient-to-b from-[var(--surface-background)] to-transparent sm:h-8"})]}):s(o.userMessage),e[0]=s,e[1]=r,e[2]=o.userMessage,e[3]=l):l=e[3];let c;e[4]!==s||e[5]!==o.assistantMessages?(c=a.jsx(AV,{assistantMessages:o.assistantMessages,renderMessage:s}),e[4]=s,e[5]=o.assistantMessages,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==o.turnId?(d=a.jsxs("section",{className:"relative w-full",id:i,"data-turn-id":o.turnId,"data-scroll-spy-id":o.turnId,children:[l,c]}),e[7]=i,e[8]=l,e[9]=c,e[10]=o.turnId,e[11]=d):d=e[11],d},_V=g.memo(FV),BV=new Set(["task"]),R9={initialTurns:7,batchTurns:7},DV=t=>typeof t=="string"&&BV.has(t.toLowerCase()),PV=t=>{const e=t.state?.time?.end;if(typeof e=="number")return e;const o=t.time?.end;return typeof o=="number"?o:void 0},a8=t=>{const e=t.text;if(typeof e=="string"&&e.trim().length>0)return e;const o=t.content;if(typeof o=="string"&&o.trim().length>0)return o},TV=t=>{const e=t.info.finish;return typeof e=="string"?e:void 0},HV=(t,e,o,n)=>({id:o.id??`${e}-part-${n}-${o.type}`,turnId:t,messageId:e,part:o,partIndex:n,endedAt:PV(o)}),IV=t=>{const e=[];let o=!1,n=!1;t.assistantMessages.forEach(f=>{f.parts.forEach(m=>{if(m.type==="tool"){o=!0;return}m.type==="reasoning"&&a8(m)&&(n=!0)})});const s=new Map,r=[],i=new Map;let l=null;t.assistantMessages.forEach(f=>{const m=TV(f),h=f.parts.some(p=>p.type==="tool");f.parts.forEach((p,v)=>{const b=p.type==="tool",y=p.type==="reasoning"||p.type==="text"?a8(p):void 0,w=p.id??`${f.info.id}-part-${v}-${p.type}`,S=b?p.tool:void 0,C=b&&DV(S);if(C){const F=w;s.has(F)||(s.set(F,f.info.id),r.push(F)),l=F}const x=p.type==="text"&&typeof y=="string"&&m==="stop"&&t.summarySourceMessageId===f.info.id&&t.summarySourcePartId===w;let _=null;if(b?_="tool":p.type==="reasoning"?y&&(_="reasoning"):t.showTextJustificationActivity&&p.type==="text"&&y&&!x&&(h||typeof m=="string"&&m!=="stop")&&(_="justification"),!_)return;const k={...HV(t.turnId,f.info.id,p,v),kind:_};if(e.push(k),_==="tool"&&C)return;const D=i.get(l)??[];D.push(k),i.set(l,D)})});const c=[],d=f=>{if(f.length===0)return;const m=new Map;f.forEach(p=>{m.set(p.messageId,(m.get(p.messageId)??0)+1)});let h;for(const p of t.assistantMessages)(m.get(p.info.id)??0)>0&&!h&&(h=p.info.id);return h};return[null,...r].forEach(f=>{const m=i.get(f)??[];if(m.length===0)return;const h=f===null?d(m):s.get(f);h&&c.push({id:`${t.turnId}:${h}:${f??"start"}`,anchorMessageId:h,afterToolPartId:f,parts:m})}),{activityParts:e,activitySegments:c,hasTools:o,hasReasoning:n}},EV=t=>{const e=new Map,o=new Map,n=new Map,s=new Set;t.forEach(l=>{e.set(l.turnId,l);const c=l.assistantMessages[0]?.info.id,d=l.assistantMessages[l.assistantMessages.length-1]?.info.id;o.set(l.userMessageId,l.turnId),s.add(l.userMessageId),n.set(l.userMessageId,{turnId:l.turnId,messageId:l.userMessageId,userMessageId:l.userMessageId,isUserMessage:!0,isAssistantMessage:!1,isFirstAssistantInTurn:!1,isLastAssistantInTurn:!1,headerMessageId:l.headerMessageId}),l.assistantMessageIds.forEach(u=>{o.set(u,l.turnId),s.add(u),n.set(u,{turnId:l.turnId,messageId:u,userMessageId:l.userMessageId,isUserMessage:!1,isAssistantMessage:!0,isFirstAssistantInTurn:u===c,isLastAssistantInTurn:u===d,headerMessageId:l.headerMessageId})})});const r=t.length>0?t[t.length-1]:null,i=new Set;return r&&(i.add(r.userMessageId),r.assistantMessageIds.forEach(l=>{i.add(l)})),{turns:t,indexes:{turnById:e,messageToTurnId:o,messageMetaById:n},lastTurnId:r?.turnId??null,lastTurnMessageIds:i,ungroupedMessageIds:new Set}},l8=t=>{const e=t.text;if(typeof e=="string"&&e.trim().length>0)return e;const o=t.content;if(typeof o=="string"&&o.trim().length>0)return o},jV=t=>{for(let e=t.length-1;e>=0;e-=1){const o=t[e];if(!(!o||o.info.finish!=="stop"))for(let s=o.parts.length-1;s>=0;s-=1){const r=o.parts[s];if(!r||r.type!=="text")continue;const i=l8(r);if(i)return{text:i,sourceMessageId:o.info.id,sourcePartId:r.id??`${o.info.id}-part-${s}-text`}}}for(let e=t.length-1;e>=0;e-=1){const o=t[e];if(o)for(let n=o.parts.length-1;n>=0;n-=1){const s=o.parts[n];if(!s||s.type!=="text")continue;const r=l8(s);if(r)return{text:r,sourceMessageId:o.info.id,sourcePartId:s.id??`${o.info.id}-part-${n}-text`}}}return{}},LV=t=>{const o=t.info.summary?.diffs;if(!Array.isArray(o)||o.length===0)return;let n=0,s=0,r=0;if(o.forEach(i=>{if(!i)return;const l=typeof i.additions=="number"?i.additions:0,c=typeof i.deletions=="number"?i.deletions:0;(l!==0||c!==0)&&(r+=1),n+=l,s+=c}),r!==0)return{additions:n,deletions:s,files:r}},c2=t=>{const e=t.info.clientRole??t.info.role;return typeof e=="string"?e:""},z9=t=>{const e=t.info.parentID;if(!(typeof e!="string"||e.trim().length===0))return e},VV=t=>{const e=t.info.time?.created;return typeof e=="number"?e:void 0},NV=t=>{const e=t.info.time?.completed;return typeof e=="number"?e:void 0},RV=t=>{const e=t.info?.summary?.body;return typeof e!="string"?void 0:e.trim().length>0?e:void 0},c8=(t,e)=>{const o=c2(t);return{messageId:t.info.id,role:o,parentMessageId:z9(t),message:t,order:e}},zV=(t,e)=>{const o=VV(t);let n,s=!1;e.forEach(i=>{const l=NV(i);typeof l=="number"?n=Math.max(n??0,l):s=!0});const r=typeof o=="number"&&typeof n=="number"&&n>=o?n-o:void 0;return{isStreaming:s,isRetrying:e.length>1,startedAt:o,completedAt:n,durationMs:r}},OV={previousProjection:null,showTextJustificationActivity:!1},$V=(t,e)=>{const o={...OV,...e},n=[],s=new Map,r=new Set;t.forEach((c,d)=>{if(c2(c)!=="user")return;const m={turnId:c.info.id,userMessageId:c.info.id,userMessage:c,headerMessageId:void 0,messages:[c8(c,d)],assistantMessageIds:[],assistantMessages:[],activityParts:[],activitySegments:[],summary:{},summaryText:void 0,hasTools:!1,hasReasoning:!1,diffStats:void 0,stream:{isStreaming:!1,isRetrying:!1}};n.push(m),s.set(m.userMessageId,m),r.add(c.info.id)}),t.forEach((c,d)=>{if(c2(c)!=="assistant")return;const f=z9(c),m=f?s.get(f):void 0;m&&(m.assistantMessages.push(c),m.assistantMessageIds.push(c.info.id),m.messages.push(c8(c,d)),m.headerMessageId||(m.headerMessageId=c.info.id),r.add(c.info.id))}),n.forEach(c=>{c.summary=jV(c.assistantMessages),c.summaryText=c.summary.text??RV(c.userMessage),c.diffStats=LV(c.userMessage);const d=IV({turnId:c.turnId,assistantMessages:c.assistantMessages,summarySourceMessageId:c.summary.sourceMessageId,summarySourcePartId:c.summary.sourcePartId,showTextJustificationActivity:o.showTextJustificationActivity});c.activityParts=d.activityParts,c.activitySegments=d.activitySegments,c.hasTools=d.hasTools,c.hasReasoning=d.hasReasoning,c.stream=zV(c.userMessage,c.assistantMessages),c.startedAt=c.stream.startedAt,c.completedAt=c.stream.completedAt,c.durationMs=c.stream.durationMs});const i=EV(n),l=new Set;return t.forEach(c=>{c2(c)!=="assistant"&&(r.has(c.info.id)||l.add(c.info.id))}),{...i,ungroupedMessageIds:l}},ZV=(t,e)=>{const o=g.useRef(null),n=g.useRef([]),s=g.useRef(void 0),r=g.useRef(e.sessionKey);r.current!==e.sessionKey&&(r.current=e.sessionKey,o.current=null,n.current=[],s.current=void 0),g.useEffect(()=>{o.current=null,n.current=[],s.current=void 0},[e.sessionKey,e.showTextJustificationActivity]);const i=g.useMemo(()=>e2("ui.turns.projection_ms",()=>{const d=$V(t,{previousProjection:o.current,showTextJustificationActivity:e.showTextJustificationActivity});return o.current=d,d}),[t,e.showTextJustificationActivity]),l=g.useMemo(()=>{const d=i.turns.length<=1?[]:i.turns.slice(0,-1),u=n.current;if(u.length===d.length){let f=!0;for(let m=0;m<d.length;m+=1)if(u[m]!==d[m]){f=!1;break}if(f)return u}return n.current=d,d},[i.turns]),c=g.useMemo(()=>{const d=i.turns.length===0?void 0:i.turns[i.turns.length-1];return s.current===d?s.current:(s.current=d,d)},[i.turns]);return{projection:i,staticTurns:l,streamingTurn:c}},d8=t=>{const e=t.info;return(typeof e.clientRole=="string"?e.clientRole:null)??(typeof e.role=="string"?e.role:null)??null},UV=(t,e)=>{if(!e.sessionId)return t;const o={name:"SessionRetry",message:e.message,data:{message:e.message}};let n=-1;for(let d=t.length-1;d>=0;d-=1)if(d8(t[d])==="user"){n=d;break}if(n<0)return t;let s=-1;for(let d=t.length-1;d>n;d-=1)if(d8(t[d])==="assistant"){s=d;break}if(s>=0)return t[s].info.error?t:t.map((f,m)=>m!==s?f:{...f,info:{...f.info,error:o}});const r=typeof e.confirmedAt=="number"?e.confirmedAt:e.fallbackTimestamp,l={info:{id:`synthetic_retry_notice_${e.sessionId}`,sessionID:e.sessionId,role:"assistant",time:{created:r,completed:r},finish:"stop",error:o},parts:[]},c=t.slice();return c.splice(n+1,0,l),c},qV=5,WV=6,u8=t=>t?t.kind==="turn"?180+Math.min(t.turn.assistantMessages.length,4)*100:140:160,m1=t=>{const e=de.c(4),o=g.useRef(t);let n,s;e[0]!==t?(n=()=>{o.current=t},s=[t],e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]),g.useEffect(n,s);let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(...i)=>{const l=i;return o.current(...l)},e[3]=r):r=e[3],r},O9="The following tool was executed by the user",Is=t=>{const e=t.info;return(typeof e.clientRole=="string"?e.clientRole:null)??(typeof e.role=="string"?e.role:null)??null},$9=t=>t.parts.some(e=>e?.type==="compaction"),GV=t=>{const e=t.text;if(typeof e=="string")return e;const o=t.content;return typeof o=="string"?o:""},KV=t=>{if(!$9(t))return t;let e=!1;const o=t.parts.map(r=>r?.type!=="compaction"?r:(e=!0,{type:"text",text:"/compact"})),s=t.info.clientRole!=="user";return!e&&!s?t:{...t,info:s?{...t.info,clientRole:"user"}:t.info,parts:e?o:t.parts}},YV=(t,e)=>{if(Is(t)!=="system")return t;const n=Z9(t);return!n||!e.has(n)||t.info.clientRole==="assistant"?t:{...t,info:{...t.info,clientRole:"assistant"}}},jl=t=>{const e=t.info,o=e.time?.completed,n=e.status;return typeof o!="number"||o<=0?!1:typeof n=="string"?n==="completed":!0},JV=t=>!t||Is(t)!=="user"?!1:t.parts.some(e=>e?.type==="subtask"),QV=t=>{if(!t)return null;const e=t.info.id;return typeof e=="string"&&e.trim().length>0?e:null},Z9=t=>{const e=t.info.parentID;return typeof e=="string"&&e.trim().length>0?e:null},XV=t=>!t||Is(t)!=="user"?!1:t.parts.some(e=>{if(e?.type!=="text")return!1;const o=e.text;return e.synthetic===!0&&typeof o=="string"&&o.trim().startsWith(O9)}),eN=(t,e)=>{if(Is(t)!=="assistant")return{hide:!1,details:null};if(e&&Z9(t)!==e)return{hide:!1,details:null};if(t.parts.length!==1)return{hide:!1,details:null};const o=t.parts[0];if(o?.type!=="tool")return{hide:!1,details:null};if((typeof o.tool=="string"?o.tool.toLowerCase():"")!=="bash")return{hide:!1,details:null};const s=typeof o.state?.input?.command=="string"?o.state.input.command:void 0,r=(typeof o.state?.output=="string"?o.state.output:void 0)??(typeof o.state?.metadata?.output=="string"?o.state.metadata.output:void 0),i=typeof o.state?.status=="string"?o.state.status:void 0;return{hide:!0,details:{command:s,output:r,status:i}}},tN=t=>{const e=t,o=e.state?.metadata,n=(typeof o?.sessionID=="string"&&o.sessionID.trim().length>0?o.sessionID.trim():null)??(typeof o?.sessionId=="string"&&o.sessionId.trim().length>0?o.sessionId.trim():null);if(n)return n;const s=e.state?.output;if(typeof s=="string"){const r=s.match(/task_id\s*:\s*([^\s<"']+)/i);if(r?.[1])return r[1]}return null},oN=t=>{if(Is(t)!=="assistant")return{hide:!1,taskSessionId:null};if(t.parts.length!==1)return{hide:!1,taskSessionId:null};const e=t.parts[0];return e?.type!=="tool"?{hide:!1,taskSessionId:null}:(typeof e.tool=="string"?e.tool.toLowerCase():"")!=="task"?{hide:!1,taskSessionId:null}:{hide:!0,taskSessionId:tN(t.parts[0])}},nN=(t,e)=>{if(!e)return t;const o=t.parts.map(n=>{if(n?.type!=="subtask")return n;const s=n.taskSessionID;return typeof s=="string"&&s.trim().length>0?n:{...n,taskSessionID:e}});return{...t,parts:o}},sN=(t,e)=>{const o=typeof e?.command=="string"?e.command.trim():"",n=typeof e?.output=="string"?e.output:"",s=typeof e?.status=="string"?e.status.trim():"",r=[];let i=!1;for(const l of t.parts){if(!i&&l?.type==="text"){const c=l.text;if(l.synthetic===!0&&typeof c=="string"&&c.trim().startsWith(O9)){r.push({type:"text",text:"/shell",shellAction:{...o?{command:o}:{},...n?{output:n}:{},...s?{status:s}:{}}}),i=!0;continue}}r.push(l)}return i||r.push({type:"text",text:"/shell",shellAction:{...o?{command:o}:{},...n?{output:n}:{},...s?{status:s}:{}}}),{...t,parts:r}},rN=t=>{const e=z4(t.parts);return e.length===t.parts.length?t:{...t,parts:e}},f8=new WeakMap,iN=t=>{const e=f8.get(t);if(e)return e;const o=rN(t),n=KV(o),s=yy(n.parts),r=s===n.parts?n:{...n,parts:s};return f8.set(t,r),r},Z4=g.memo(t=>{const e=de.c(13),{message:o,previousMessage:n,nextMessage:s,turnGroupingContext:r,assistantHeaderMessageId:i,isInActiveTurn:l,activeStreamingPhase:c,animateUserOnMount:d,onUserAnimationConsumed:u,onContentChange:f,animationHandlers:m,scrollToBottom:h}=t;let p;return e[0]!==c||e[1]!==d||e[2]!==m||e[3]!==i||e[4]!==l||e[5]!==o||e[6]!==s||e[7]!==f||e[8]!==u||e[9]!==n||e[10]!==h||e[11]!==r?(p=a.jsx(kV,{message:o,previousMessage:n,nextMessage:s,animateUserOnMount:d,onUserAnimationConsumed:u,onContentChange:f,animationHandlers:m,scrollToBottom:h,turnGroupingContext:r,assistantHeaderMessageId:i,isInActiveTurn:l,activeStreamingPhase:c}),e[0]=c,e[1]=d,e[2]=m,e[3]=i,e[4]=l,e[5]=o,e[6]=s,e[7]=f,e[8]=u,e[9]=n,e[10]=h,e[11]=r,e[12]=p):p=e[12],p},(t,e)=>{const o=t.turnGroupingContext,n=e.turnGroupingContext;return L4(t.message,e.message)&&$2(t.previousMessage,e.previousMessage)&&$2(t.nextMessage,e.nextMessage)&&t.animateUserOnMount===e.animateUserOnMount&&t.onUserAnimationConsumed===e.onUserAnimationConsumed&&t.onContentChange===e.onContentChange&&t.scrollToBottom===e.scrollToBottom&&b9(o,n,t.message.info.id,Is(t.message)==="user")&&t.assistantHeaderMessageId===e.assistantHeaderMessageId&&t.isInActiveTurn===e.isInActiveTurn&&t.activeStreamingPhase===e.activeStreamingPhase&&t.animationHandlers?.onChunk===e.animationHandlers?.onChunk&&t.animationHandlers?.onComplete===e.animationHandlers?.onComplete&&t.animationHandlers?.onStreamingCandidate===e.animationHandlers?.onStreamingCandidate&&t.animationHandlers?.onAnimationStart===e.animationHandlers?.onAnimationStart&&t.animationHandlers?.onReservationCancelled===e.animationHandlers?.onReservationCancelled&&t.animationHandlers?.onReasoningBlock===e.animationHandlers?.onReasoningBlock&&t.animationHandlers?.onAnimatedHeightChange===e.animationHandlers?.onAnimatedHeightChange});Z4.displayName="MessageRow";const U9=g.memo(t=>{const e=de.c(86),{turn:o,isLastTurn:n,sessionIsWorking:s,defaultActivityExpanded:r,turnUiStates:i,onToggleTurnGroup:l,chatRenderMode:c,onMessageContentChange:d,getAnimationHandlers:u,scrollToBottom:f,stickyUserHeader:m,shouldAnimateUserMessage:h,onUserAnimationConsumed:p,activeStreamingMessageId:v,activeStreamingPhase:b}=t,y=m===void 0?!0:m;let w;e[0]!==r||e[1]!==o.turnId||e[2]!==i?(w=i.get(o.turnId)??{isExpanded:r},e[0]=r,e[1]=o.turnId,e[2]=i,e[3]=w):w=e[3];const S=w;let C;e[4]!==l||e[5]!==o.turnId?(C=()=>{l(o.turnId)},e[4]=l,e[5]=o.turnId,e[6]=C):C=e[6];const x=C;let _;if(e[7]!==o.assistantMessages||e[8]!==o.userMessage){const J=[o.userMessage,...o.assistantMessages],j=new Map;J.forEach((se,ne)=>{j.set(se.info.id,ne)}),_={ordered:J,lookup:j},e[7]=o.assistantMessages,e[8]=o.userMessage,e[9]=_}else _=e[9];const k=_;let D;e:{if(v&&o.assistantMessages.some(J=>J.info.id===v)){D=v;break e}for(let J=o.assistantMessages.length-1;J>=0;J=J-1,J){const j=o.assistantMessages[J];if(!jl(j)){D=j.info.id;break e}}D=null}const F=D;let A;if(e[10]!==c||e[11]!==F||e[12]!==o.assistantMessages){e:{if(c==="live"){A=o.assistantMessages;break e}const J=o.assistantMessages.filter(jl);if(J.length===o.assistantMessages.length){A=o.assistantMessages;break e}if(F){const ne=new Set(J.map(cN));let le;if(e[14]!==ne||e[15]!==F||e[16]!==o.assistantMessages){let he;e[18]!==ne||e[19]!==F?(he=be=>ne.has(be.info.id)||be.info.id===F,e[18]=ne,e[19]=F,e[20]=he):he=e[20],le=o.assistantMessages.filter(he),e[14]=ne,e[15]=F,e[16]=o.assistantMessages,e[17]=le}else le=e[17];A=le;break e}if(J.length>0){A=J;break e}const j=o.assistantMessages[0];let se;e[21]!==j?(se=j?[j]:[],e[21]=j,e[22]=se):se=e[22],A=se}e[10]=c,e[11]=F,e[12]=o.assistantMessages,e[13]=A}else A=e[13];const B=A;let M;e:{if(c!=="sorted"){M=o.assistantMessages;break e}let J;e[23]!==o.assistantMessages?(J=o.assistantMessages.filter(jl),e[23]=o.assistantMessages,e[24]=J):J=e[24],M=J}const H=M;let P;e[25]!==B?(P=new Map,B.forEach((J,j)=>{P.set(J.info.id,j)}),e[25]=B,e[26]=P):P=e[26];const T=P;let E;e[27]!==H?(E=new Set(H.map(dN)),e[27]=H,e[28]=E):E=e[28];const O=E;let L;e[29]!==O||e[30]!==F?(L=new Set(O),F&&L.add(F),e[29]=O,e[30]=F,e[31]=L):L=e[31];const Z=L,oe=aN(o,F);let V;e:{if(oe&&F){V=F;break e}V=B[0]?.info.id}const $=V;let N;e:{if(c!=="sorted"){N=o.activityParts;break e}if(Z.size===o.assistantMessages.length){N=o.activityParts;break e}let J;if(e[32]!==o.activityParts||e[33]!==Z){let j;e[35]!==Z?(j=se=>Z.has(se.messageId),e[35]=Z,e[36]=j):j=e[36],J=o.activityParts.filter(j),e[32]=o.activityParts,e[33]=Z,e[34]=J}else J=e[34];N=J}const ee=N;let z;e:{if(c!=="sorted"){z=o.activitySegments;break e}if(Z.size===o.assistantMessages.length){z=o.activitySegments;break e}let J;if(e[37]!==o.activitySegments||e[38]!==Z){let j;e[40]!==Z?(j=se=>{const ne=se.parts.filter(he=>Z.has(he.messageId));if(ne.length===0)return null;const le=Z.has(se.anchorMessageId)?se.anchorMessageId:ne[0]?.messageId;return le?{...se,anchorMessageId:le,parts:ne}:null},e[40]=Z,e[41]=j):j=e[41],J=o.activitySegments.map(j).filter(uN),e[37]=o.activitySegments,e[38]=Z,e[39]=J}else J=e[39];z=J}const q=z,ae=o.userMessage.info.time?.created,R=o.userMessage.info,we=R?.model?.variant??R?.variant,ve=typeof we=="string"&&we.trim().length>0?we:void 0,Ce=typeof ae=="number"?ae:void 0;let Pe;e[42]!==Ce||e[43]!==o.diffStats||e[44]!==o.hasReasoning||e[45]!==o.hasTools||e[46]!==o.headerMessageId||e[47]!==o.summaryText||e[48]!==o.turnId||e[49]!==ve||e[50]!==ee||e[51]!==q?(Pe={turnId:o.turnId,summaryBody:o.summaryText,activityParts:ee,activityGroupSegments:q,headerMessageId:o.headerMessageId,hasTools:o.hasTools,hasReasoning:o.hasReasoning,diffStats:o.diffStats,userMessageCreatedAt:Ce,userMessageVariant:ve},e[42]=Ce,e[43]=o.diffStats,e[44]=o.hasReasoning,e[45]=o.hasTools,e[46]=o.headerMessageId,e[47]=o.summaryText,e[48]=o.turnId,e[49]=ve,e[50]=ee,e[51]=q,e[52]=Pe):Pe=e[52];const De=Pe;let pe;e[53]!==b||e[54]!==$||e[55]!==c||e[56]!==u||e[57]!==x||e[58]!==n||e[59]!==k.lookup||e[60]!==k.ordered||e[61]!==d||e[62]!==p||e[63]!==f||e[64]!==s||e[65]!==h||e[66]!==F||e[67]!==o.hasReasoning||e[68]!==o.hasTools||e[69]!==o.headerMessageId||e[70]!==o.turnId||e[71]!==o.userMessage||e[72]!==De||e[73]!==S.isExpanded||e[74]!==q||e[75]!==T||e[76]!==B[0]?.info.id||e[77]!==B.length?(pe=J=>{const se=Is(J)==="user",ne=k.lookup.get(J.info.id),le=T.get(J.info.id)??-1,he=le>=0,be=le===0,ce=le===B.length-1,ye=!!$&&J.info.id===$,_e=q.some(me=>me.anchorMessageId===J.info.id),te=c==="sorted"?he:ye||be||ce,xe=B[0]?.info.id??o.headerMessageId,Fe=se?void 0:he?be?o.userMessage:void 0:typeof ne=="number"&&ne>0?k.ordered[ne-1]:void 0,X=he?{turnId:o.turnId,activityOwnerMessageId:$,isFirstAssistantInTurn:be,isLastAssistantInTurn:ce,isWorking:n&&s&&(c==="sorted"?_e:J.info.id===F),hasTools:o.hasTools,hasReasoning:o.hasReasoning,...te?{summaryBody:De.summaryBody,activityParts:De.activityParts,activityGroupSegments:De.activityGroupSegments,headerMessageId:De.headerMessageId,diffStats:De.diffStats,userMessageCreatedAt:De.userMessageCreatedAt,userMessageVariant:De.userMessageVariant,isGroupExpanded:S.isExpanded,toggleGroup:x}:{}}:void 0;return a.jsx(Z4,{message:J,previousMessage:Fe,nextMessage:void 0,turnGroupingContext:X,assistantHeaderMessageId:xe,isInActiveTurn:!!F&&J.info.id===F,activeStreamingPhase:J.info.id===F?b:null,animateUserOnMount:h(J),onUserAnimationConsumed:p,onContentChange:d,animationHandlers:u(J.info.id),scrollToBottom:f},J.info.id)},e[53]=b,e[54]=$,e[55]=c,e[56]=u,e[57]=x,e[58]=n,e[59]=k.lookup,e[60]=k.ordered,e[61]=d,e[62]=p,e[63]=f,e[64]=s,e[65]=h,e[66]=F,e[67]=o.hasReasoning,e[68]=o.hasTools,e[69]=o.headerMessageId,e[70]=o.turnId,e[71]=o.userMessage,e[72]=De,e[73]=S.isExpanded,e[74]=q,e[75]=T,e[76]=B[0]?.info.id,e[77]=B.length,e[78]=pe):pe=e[78];const K=pe;let re;e:{if(B===o.assistantMessages){re=o;break e}let J;e[79]!==o||e[80]!==B?(J={...o,assistantMessages:B},e[79]=o,e[80]=B,e[81]=J):J=e[81],re=J}const Q=re;let W;return e[82]!==K||e[83]!==Q||e[84]!==y?(W=a.jsx(_V,{turn:Q,stickyUserHeader:y,renderMessage:K}),e[82]=K,e[83]=Q,e[84]=y,e[85]=W):W=e[85],W});U9.displayName="TurnBlock";const q9=g.memo(t=>{const e=de.c(17),{message:o,previousMessage:n,nextMessage:s,onMessageContentChange:r,getAnimationHandlers:i,scrollToBottom:l,shouldAnimateUserMessage:c,onUserAnimationConsumed:d,activeStreamingMessageId:u,activeStreamingPhase:f}=t;let m;e[0]!==o||e[1]!==c?(m=c(o),e[0]=o,e[1]=c,e[2]=m):m=e[2];let h;e[3]!==i||e[4]!==o.info.id?(h=i(o.info.id),e[3]=i,e[4]=o.info.id,e[5]=h):h=e[5];const p=!!u&&o.info.id===u,v=o.info.id===u?f:null;let b;return e[6]!==o||e[7]!==s||e[8]!==r||e[9]!==d||e[10]!==n||e[11]!==l||e[12]!==m||e[13]!==h||e[14]!==p||e[15]!==v?(b=a.jsx(Z4,{message:o,previousMessage:n,nextMessage:s,animateUserOnMount:m,onUserAnimationConsumed:d,onContentChange:r,animationHandlers:h,scrollToBottom:l,isInActiveTurn:p,activeStreamingPhase:v}),e[6]=o,e[7]=s,e[8]=r,e[9]=d,e[10]=n,e[11]=l,e[12]=m,e[13]=h,e[14]=p,e[15]=v,e[16]=b):b=e[16],b});q9.displayName="UngroupedMessageRow";const aN=(t,e)=>e?t.userMessage.info.id===e?!0:t.assistantMessages.some(o=>o.info.id===e):!1,U4=g.memo(t=>{const e=de.c(27),{entry:o,onMessageContentChange:n,getAnimationHandlers:s,scrollToBottom:r,stickyUserHeader:i,sessionIsWorking:l,defaultActivityExpanded:c,turnUiStates:d,onToggleTurnGroup:u,chatRenderMode:f,shouldAnimateUserMessage:m,onUserAnimationConsumed:h,activeStreamingMessageId:p,activeStreamingPhase:v}=t;if(o.kind==="ungrouped"){let y;return e[0]!==p||e[1]!==v||e[2]!==o.message||e[3]!==o.nextMessage||e[4]!==o.previousMessage||e[5]!==s||e[6]!==n||e[7]!==h||e[8]!==r||e[9]!==m?(y=a.jsx(q9,{message:o.message,previousMessage:o.previousMessage,nextMessage:o.nextMessage,onMessageContentChange:n,getAnimationHandlers:s,scrollToBottom:r,shouldAnimateUserMessage:m,onUserAnimationConsumed:h,activeStreamingMessageId:p,activeStreamingPhase:v}),e[0]=p,e[1]=v,e[2]=o.message,e[3]=o.nextMessage,e[4]=o.previousMessage,e[5]=s,e[6]=n,e[7]=h,e[8]=r,e[9]=m,e[10]=y):y=e[10],y}let b;return e[11]!==p||e[12]!==v||e[13]!==f||e[14]!==c||e[15]!==o.isLastTurn||e[16]!==o.turn||e[17]!==s||e[18]!==n||e[19]!==u||e[20]!==h||e[21]!==r||e[22]!==l||e[23]!==m||e[24]!==i||e[25]!==d?(b=a.jsx(U9,{turn:o.turn,isLastTurn:o.isLastTurn,sessionIsWorking:l,defaultActivityExpanded:c,turnUiStates:d,onToggleTurnGroup:u,chatRenderMode:f,shouldAnimateUserMessage:m,onUserAnimationConsumed:h,activeStreamingMessageId:p,activeStreamingPhase:v,onMessageContentChange:n,getAnimationHandlers:s,scrollToBottom:r,stickyUserHeader:i}),e[11]=p,e[12]=v,e[13]=f,e[14]=c,e[15]=o.isLastTurn,e[16]=o.turn,e[17]=s,e[18]=n,e[19]=u,e[20]=h,e[21]=r,e[22]=l,e[23]=m,e[24]=i,e[25]=d,e[26]=b):b=e[26],b});U4.displayName="MessageListEntry";const W9=t=>{const e=de.c(34),{entries:o,shouldVirtualize:n,virtualRows:s,totalSize:r,measureElement:i,contentRef:l,onMessageContentChange:c,getAnimationHandlers:d,scrollToBottom:u,stickyUserHeader:f,defaultActivityExpanded:m,turnUiStates:h,onToggleTurnGroup:p,chatRenderMode:v,shouldAnimateUserMessage:b,onUserAnimationConsumed:y,activeStreamingPhase:w}=t;let S;e[0]!==w||e[1]!==v||e[2]!==m||e[3]!==d||e[4]!==c||e[5]!==p||e[6]!==y||e[7]!==u||e[8]!==b||e[9]!==f||e[10]!==h?(S=B=>a.jsx(U4,{entry:B,onMessageContentChange:c,getAnimationHandlers:d,scrollToBottom:u,stickyUserHeader:f,sessionIsWorking:!1,defaultActivityExpanded:m,turnUiStates:h,onToggleTurnGroup:p,chatRenderMode:v,shouldAnimateUserMessage:b,onUserAnimationConsumed:y,activeStreamingMessageId:null,activeStreamingPhase:w},B.key),e[0]=w,e[1]=v,e[2]=m,e[3]=d,e[4]=c,e[5]=p,e[6]=y,e[7]=u,e[8]=b,e[9]=f,e[10]=h,e[11]=S):S=e[11];const C=S,x=n&&s.length>0?s[0]?.start??0:0,_=n&&s.length>0?Math.max(0,r-(s[s.length-1]?.end??0)):0;if(!n||s.length===0&&o.length>0){let B;if(e[12]!==o||e[13]!==C){let H;e[15]!==C?(H=P=>a.jsx("div",{"data-turn-entry":P.key,children:C(P)},P.key),e[15]=C,e[16]=H):H=e[16],B=o.map(H),e[12]=o,e[13]=C,e[14]=B}else B=e[14];let M;return e[17]!==l||e[18]!==B?(M=a.jsx("div",{ref:l,className:"relative w-full",children:B}),e[17]=l,e[18]=B,e[19]=M):M=e[19],M}let k;e[20]!==x?(k=x>0?a.jsx("div",{"aria-hidden":"true",style:{height:`${x}px`}}):null,e[20]=x,e[21]=k):k=e[21];let D;e[22]!==o||e[23]!==i||e[24]!==C||e[25]!==s?(D=s.map(B=>{const M=o[B.index];return M?a.jsx("div",{ref:i,"data-index":B.index,"data-turn-entry":M.key,children:C(M)},B.key):null}),e[22]=o,e[23]=i,e[24]=C,e[25]=s,e[26]=D):D=e[26];let F;e[27]!==_?(F=_>0?a.jsx("div",{"aria-hidden":"true",style:{height:`${_}px`}}):null,e[27]=_,e[28]=F):F=e[28];let A;return e[29]!==l||e[30]!==k||e[31]!==D||e[32]!==F?(A=a.jsxs("div",{ref:l,className:"relative w-full",children:[k,D,F]}),e[29]=l,e[30]=k,e[31]=D,e[32]=F,e[33]=A):A=e[33],A};W9.displayName="StaticHistoryList";const G9=t=>{const e=de.c(15),{entry:o,onMessageContentChange:n,getAnimationHandlers:s,scrollToBottom:r,stickyUserHeader:i,sessionIsWorking:l,defaultActivityExpanded:c,turnUiStates:d,onToggleTurnGroup:u,chatRenderMode:f,shouldAnimateUserMessage:m,onUserAnimationConsumed:h,activeStreamingMessageId:p,activeStreamingPhase:v}=t;let b;return e[0]!==p||e[1]!==v||e[2]!==f||e[3]!==c||e[4]!==o||e[5]!==s||e[6]!==n||e[7]!==u||e[8]!==h||e[9]!==r||e[10]!==l||e[11]!==m||e[12]!==i||e[13]!==d?(b=a.jsx(U4,{entry:o,onMessageContentChange:n,getAnimationHandlers:s,scrollToBottom:r,stickyUserHeader:i,sessionIsWorking:l,defaultActivityExpanded:c,turnUiStates:d,onToggleTurnGroup:u,chatRenderMode:f,shouldAnimateUserMessage:m,onUserAnimationConsumed:h,activeStreamingMessageId:p,activeStreamingPhase:v}),e[0]=p,e[1]=v,e[2]=f,e[3]=c,e[4]=o,e[5]=s,e[6]=n,e[7]=u,e[8]=h,e[9]=r,e[10]=l,e[11]=m,e[12]=i,e[13]=d,e[14]=b):b=e[14],b};G9.displayName="StreamingTailContent";const K9=g.forwardRef(({sessionKey:t,turnStart:e,disableStaging:o,messages:n,sessionIsWorking:s=!1,activeStreamingMessageId:r=null,activeStreamingPhase:i=null,retryOverlay:l=null,onMessageContentChange:c,getAnimationHandlers:d,hasMoreAbove:u,isLoadingOlder:f,onLoadOlder:m,scrollToBottom:h,scrollRef:p},v)=>{Di("ui.message_list.render");const b=Me(j=>j.stickyUserHeader),y=Me(j=>j.chatRenderMode),w=Me(j=>j.activityRenderMode),S=w==="summary",[C,x]=g.useState(()=>new Map),_=g.useRef({sessionKey:void 0,previousOrder:[],animatedIds:new Set}),k=m1(d),D=m1(m),F=m1(()=>{h?.()});g.useEffect(()=>{x(new Map)},[w]);const A=g.useCallback(j=>{x(se=>{const ne=new Map(se),le=ne.get(j)??{isExpanded:S};return ne.set(j,{isExpanded:!le.isExpanded}),ne})},[S]),B=g.useMemo(()=>e2("ui.message_list.base_display_ms",()=>{const j=new Set,se=[];for(let he=n.length-1;he>=0;he-=1){const be=n[he],ce=be.info?.id;if(typeof ce=="string"){if(j.has(ce))continue;j.add(ce)}se.push(iN(be))}se.reverse();const ne=[],le=new Set;for(let he=0;he<se.length;he+=1){const be=se[he],ce=YV(be,le);($9(be)||be.parts.some(_e=>_e.type==="text"&&GV(_e).trim()==="/compact"))&&le.add(be.info.id);const ye=ne.length>0?ne[ne.length-1]:void 0;if(JV(ye)){const _e=oN(ce);if(_e.hide){ne[ne.length-1]=nN(ye,_e.taskSessionId);continue}}if(XV(ye)){const _e=eN(ce,QV(ye));if(_e.hide){ne[ne.length-1]=sN(ye,_e.details);continue}}ne.push(ce)}return ne}),[n]),M=g.useRef(null),H=g.useRef(null),P=g.useCallback(()=>p?.current?p.current:typeof document>"u"?null:document.querySelector('[data-scrollbar="chat"]'),[p]),T=g.useMemo(()=>e2("ui.message_list.retry_overlay_ms",()=>UV(B,{sessionId:l?.sessionId??null,message:l?.message??"Quota limit reached. Retrying automatically.",confirmedAt:l?.confirmedAt,fallbackTimestamp:l?.fallbackTimestamp??0})),[B,l]),{projection:E,staticTurns:O,streamingTurn:L}=ZV(T,{sessionKey:t,showTextJustificationActivity:y==="sorted"}),Z=g.useMemo(()=>e2("ui.message_list.render_entries_ms",()=>{const j=O.map(le=>({kind:"turn",key:`turn:${le.turnId}`,turn:le,isLastTurn:le.turnId===E.lastTurnId}));if(E.ungroupedMessageIds.size===0)return j;const se=new Map;j.forEach(le=>{se.set(le.turn.userMessage.info.id,le)});const ne=[];return T.forEach((le,he)=>{const be=se.get(le.info.id);if(be){ne.push(be);return}E.ungroupedMessageIds.has(le.info.id)&&ne.push({kind:"ungrouped",key:`msg:${le.info.id}`,message:le,previousMessage:he>0?T[he-1]:void 0,nextMessage:he<T.length-1?T[he+1]:void 0})}),ne}),[T,E.lastTurnId,E.ungroupedMessageIds,O]),oe=g.useMemo(()=>{if(L)return{kind:"turn",key:`turn:${L.turnId}`,turn:L,isLastTurn:L.turnId===E.lastTurnId};if(E.ungroupedMessageIds.size===0)return;const j=T[T.length-1];if(!(!j||!E.ungroupedMessageIds.has(j.info.id)))return{kind:"ungrouped",key:`msg:${j.info.id}`,message:j,previousMessage:T.length>1?T[T.length-2]:void 0,nextMessage:void 0}},[T,E.lastTurnId,E.ungroupedMessageIds,L]);oe&&Di("ui.message_list.render.streaming");const V=Z,$=V.length>=qV,N=g.useRef(V.length),ee=g.useRef(V[0]?.key);g.useLayoutEffect(()=>{const j=N.current,se=V.length,ne=ee.current,le=V[0]?.key;N.current=se,ee.current=le;const he=se>j;if(!$||!he||!(ne!==le)||j===0)return;const ce=se-j;if(V[ce]?.key!==ne)return;let _e=0;for(let xe=0;xe<ce;xe++)_e+=u8(V[xe]);const te=P();!te||_e<=0||(te.scrollTop+=_e)});const z=O8({count:V.length,getScrollElement:P,estimateSize:j=>u8(V[j]),getItemKey:j=>V[j]?.key??String(j),measureElement:Ch,useAnimationFrameWithResizeObserver:!0,overscan:WV,enabled:$});g.useLayoutEffect(()=>{const j=M.current;if(!j||!$||typeof ResizeObserver>"u")return;const se=new ResizeObserver(()=>{z.measure()});return se.observe(j),()=>{se.disconnect()}},[V.length,$,z]),g.useEffect(()=>{if(!$)return;const j=P(),se=z.getTotalSize(),ne=j&&se>0?j.scrollTop+j.clientHeight>=se-10:!1;z.measure();let le=null;const he=requestAnimationFrame(()=>{le=requestAnimationFrame(()=>{if(!ne)return;const be=P();if(!be)return;const ce=Math.max(0,be.scrollHeight-be.clientHeight);ce>0&&Math.abs(be.scrollTop-ce)>5&&(be.scrollTop=ce)})});return()=>{cancelAnimationFrame(he),le!==null&&cancelAnimationFrame(le)}},[z,P,$]);const q=g.useCallback(()=>{if($){if(typeof window>"u"){z.measure();return}H.current===null&&(H.current=window.requestAnimationFrame(()=>{H.current=null,z.measure()}))}},[z,$]);g.useEffect(()=>()=>{H.current!==null&&typeof window<"u"&&window.cancelAnimationFrame(H.current)},[]);const ae=g.useMemo(()=>$?z.getVirtualItems():[],[z,$]),R=g.useMemo(()=>oe?[...V,oe]:V,[V,oe]),we=m1(j=>{q(),c(j)}),ve=m1(j=>{c(j)}),Ce=g.useMemo(()=>n.filter(j=>Is(j)==="user").map(j=>j.info.id),[n]);{const j=_.current;j.sessionKey!==t&&(j.sessionKey=t,j.previousOrder=Ce,j.animatedIds=new Set);const se=j.previousOrder;if(Ce.length>se.length&&se.every((le,he)=>Ce[he]===le)&&Rv(t))for(let le=se.length;le<Ce.length;le+=1){const he=Ce[le];if(he&&!j.animatedIds.has(he)){if(!zv(t))break;j.animatedIds.add(he)}}j.previousOrder=Ce}const Pe=g.useCallback(j=>Is(j)!=="user"?!1:_.current.animatedIds.has(j.info.id),[]),De=g.useCallback(j=>{_.current.animatedIds.delete(j)},[]),pe=g.useMemo(()=>{const j=new Map;return R.forEach((se,ne)=>{if(se.kind==="ungrouped"){j.set(se.message.info.id,ne);return}j.set(se.turn.userMessage.info.id,ne),se.turn.assistantMessages.forEach(le=>{j.set(le.info.id,ne)})}),j},[R]),K=g.useMemo(()=>{const j=new Map;return R.forEach((se,ne)=>{se.kind==="turn"&&j.set(se.turn.turnId,ne)}),j},[R]),re=g.useCallback(j=>{const se=P();return se?se.querySelector(`[data-message-id="${j}"]`):null},[P]),Q=g.useCallback((j,se="auto")=>{if(!$||j<0||j>=V.length)return!1;const ne=se==="smooth"?"smooth":"auto";return z.scrollToIndex(j,{align:"start",behavior:ne}),!0},[V.length,z,$]),W=g.useCallback((j,se="auto")=>{const ne=P();if(!ne)return!1;const le=re(j);if(!le)return!1;const he=ne.getBoundingClientRect(),ye=le.getBoundingClientRect().top-he.top+ne.scrollTop-50;return ne.scrollTo({top:ye,behavior:se}),!0},[re,P]);return g.useEffect(()=>{if(!v)return;const j={scrollToTurnId:(ne,le)=>{const he=le?.behavior??"auto",be=K.get(ne);if(be===void 0)return!1;const ce=P();if(!ce)return!1;const ye=ce.querySelector(`[data-turn-id="${ne}"]`);return ye?(ye.scrollIntoView({behavior:he,block:"start"}),!0):oe!==void 0&&be>=V.length?!1:Q(be,he)},scrollToMessageId:(ne,le)=>{const he=le?.behavior??"auto",be=pe.get(ne);return be===void 0?!1:W(ne,he)||(oe!==void 0&&be>=V.length?!1:Q(be,he))},captureViewportAnchor:()=>{const ne=P();if(!ne)return null;const le=ne.getBoundingClientRect(),he=Array.from(ne.querySelectorAll("[data-message-id]")),be=he.find(ye=>{const _e=ye.getBoundingClientRect();return _e.bottom<=le.top+1?!1:typeof window>"u"?!0:!(window.getComputedStyle(ye).position==="sticky"&&_e.top<=le.top+1)})??he.find(ye=>ye.getBoundingClientRect().bottom>le.top+1);if(!be)return null;const ce=be.dataset.messageId;return ce?{messageId:ce,offsetTop:be.getBoundingClientRect().top-le.top}:null},restoreViewportAnchor:ne=>{const le=P();if(!le||!pe.has(ne.messageId))return!1;const he=()=>{const be=re(ne.messageId);if(!be)return!1;const ce=le.getBoundingClientRect(),_e=be.getBoundingClientRect().top-ce.top-ne.offsetTop;return _e!==0&&(le.scrollTop+=_e),!0};if(!he()){const be=pe.get(ne.messageId);typeof be=="number"&&be<V.length&&Q(be,"auto")}return he()},scrollToBottom:()=>{if($&&V.length>0){z.scrollToIndex(V.length-1,{align:"end"});return}const ne=P();ne&&(ne.scrollTop=ne.scrollHeight)}};if(typeof v=="function")return v(j),()=>{v(null)};const se=v;return se.current=j,()=>{se.current=null}},[re,V.length,z,pe,P,Q,W,$,oe,K,v]),a.jsxs("div",{children:[(e>0||u)&&a.jsx("div",{className:"flex justify-center py-3",children:f?a.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground/80",children:"Loading…"}):a.jsx("button",{type:"button",onClick:D,className:"text-xs uppercase tracking-wide text-muted-foreground/80 hover:text-foreground",children:"Load older messages"})}),a.jsx(aL,{disabled:!1,children:a.jsxs("div",{className:"relative w-full",children:[a.jsx(W9,{entries:V,shouldVirtualize:$,virtualRows:ae,totalSize:z.getTotalSize(),measureElement:z.measureElement,contentRef:M,onMessageContentChange:we,getAnimationHandlers:k,scrollToBottom:F,stickyUserHeader:b,defaultActivityExpanded:S,turnUiStates:C,onToggleTurnGroup:A,chatRenderMode:y,shouldAnimateUserMessage:Pe,onUserAnimationConsumed:De,activeStreamingPhase:i}),oe?a.jsx(G9,{entry:oe,onMessageContentChange:ve,getAnimationHandlers:k,scrollToBottom:F,stickyUserHeader:b,sessionIsWorking:s,defaultActivityExpanded:S,turnUiStates:C,onToggleTurnGroup:A,chatRenderMode:y,shouldAnimateUserMessage:Pe,onUserAnimationConsumed:De,activeStreamingMessageId:r,activeStreamingPhase:i}):null]})})]})});K9.displayName="MessageList";const lN=g.memo(K9);function cN(t){return t.info.id}function dN(t){return t.info.id}function uN(t){return t!==null}const Y9={margin:0,padding:0,fontSize:"inherit",background:"transparent",backgroundColor:"transparent",borderRadius:0,overflow:"visible",whiteSpace:"pre-wrap",wordBreak:"break-all",overflowWrap:"anywhere"},J9={style:{background:"transparent",backgroundColor:"transparent",fontSize:"inherit"}},fN=t=>{const e=de.c(9),{diff:o,syntaxTheme:n,filePath:s}=t;let r;if(e[0]!==o||e[1]!==s||e[2]!==n){let l;e[4]!==s||e[5]!==n?(l=(c,d)=>a.jsxs("div",{className:"-mx-1 px-1 border-b border-border/20 last:border-b-0",children:[a.jsx("div",{className:"bg-muted/20 px-2 py-1 typography-meta font-medium text-muted-foreground border-b border-border/10 break-words -mx-1",children:`${c.file||s?.split("/").pop()||"file"} (line ${c.oldStart})`}),a.jsx("div",{children:c.lines.map((u,f)=>a.jsxs("div",{className:U("typography-code font-mono px-2 py-0.5 flex -mx-2",u.type==="context"&&"bg-transparent",u.type==="removed"&&"bg-transparent",u.type==="added"&&"bg-transparent"),style:u.type==="removed"?{backgroundColor:"var(--tools-edit-removed-bg)"}:u.type==="added"?{backgroundColor:"var(--tools-edit-added-bg)"}:{},children:[a.jsx("span",{className:"w-10 flex-shrink-0 text-right pr-3 select-none border-r mr-3 -my-0.5 py-0.5",style:{color:"var(--tools-edit-line-number)",borderColor:"var(--tools-border)"},children:u.lineNumber||""}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx(vi,{style:n,language:y0(s||c.file)||"text",PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:Y9,codeTagProps:J9,children:u.content})})]},f))})]},d),e[4]=s,e[5]=n,e[6]=l):l=e[6],r=pE(o).map(l),e[0]=o,e[1]=s,e[2]=n,e[3]=r}else r=e[3];let i;return e[7]!==r?(i=a.jsx("div",{className:"typography-code px-1 pb-1 pt-0 space-y-0",children:r}),e[7]=r,e[8]=i):i=e[8],i},mN=t=>{const e=de.c(23),{content:o,syntaxTheme:n,filePath:s}=t;let r,i,l,c;if(e[0]!==o||e[1]!==s||e[2]!==n){const f=o.split(`
|
|
6962
6962
|
`);let m;e[7]!==s?(m=y0(s??"")||"text",e[7]=s,e[8]=m):m=e[8];const h=m;let p;e[9]!==s?(p=s?.split("/").pop()||"New file",e[9]=s,e[10]=p):p=e[10];const v=p,b=Math.max(f.length,1),y=b===1?"line 1":`lines 1-${b}`;l="w-full min-w-0";const w=`${v} (${y})`;e[11]!==w?(c=a.jsx("div",{className:"bg-muted/20 px-2 py-1 typography-meta font-medium text-muted-foreground border border-border/10 rounded-lg mb-1",children:w}),e[11]=w,e[12]=c):c=e[12],r="space-y-0";let S;e[13]!==h||e[14]!==n?(S=(C,x)=>a.jsxs("div",{className:"typography-code font-mono px-2 py-0.5 flex -mx-1",children:[a.jsx("span",{className:"w-10 flex-shrink-0 text-right pr-3 select-none border-r mr-3 -my-0.5 py-0.5",style:{color:"var(--tools-edit-line-number)",borderColor:"var(--tools-border)"},children:x+1}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx(vi,{style:n,language:h,PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:Y9,codeTagProps:J9,children:C||" "})})]},x),e[13]=h,e[14]=n,e[15]=S):S=e[15],i=f.map(S),e[0]=o,e[1]=s,e[2]=n,e[3]=r,e[4]=i,e[5]=l,e[6]=c}else r=e[3],i=e[4],l=e[5],c=e[6];let d;e[16]!==r||e[17]!==i?(d=a.jsx("div",{className:r,children:i}),e[16]=r,e[17]=i,e[18]=d):d=e[18];let u;return e[19]!==l||e[20]!==c||e[21]!==d?(u=a.jsxs("div",{className:l,children:[c,d]}),e[19]=l,e[20]=c,e[21]=d,e[22]=u):u=e[22],u},hN={margin:0,padding:"0.5rem",fontSize:"var(--text-meta)",lineHeight:"1.25rem",background:"rgb(var(--muted) / 0.3)",borderRadius:"0.25rem",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowWrap:"break-word",overflow:"visible"},pN={style:{whiteSpace:"pre-wrap",wordBreak:"break-word",overflowWrap:"break-word"}},m8={margin:0,padding:"0.5rem",fontSize:"var(--text-meta)",lineHeight:"1.25rem",background:"rgb(var(--muted) / 0.3)",borderRadius:"0.25rem"},gN=t=>{const e="h-3 w-3",o=t.toLowerCase();return o==="edit"||o==="multiedit"||o==="str_replace"||o==="str_replace_based_edit_tool"?a.jsx(G,{name:"pencil-ai",className:e}):o==="write"||o==="create"||o==="file_write"?a.jsx(G,{name:"file-edit",className:e}):o==="bash"||o==="shell"||o==="cmd"||o==="terminal"||o==="shell_command"?a.jsx(G,{name:"terminal-box",className:e}):o==="webfetch"||o==="fetch"||o==="curl"||o==="wget"?a.jsx(G,{name:"global",className:e}):a.jsx(G,{name:"tools",className:e})},vN=t=>{const e=t.toLowerCase();return e==="edit"||e==="multiedit"||e==="str_replace"||e==="str_replace_based_edit_tool"?"edit":e==="write"||e==="create"||e==="file_write"?"write":e==="bash"||e==="shell"||e==="cmd"||e==="terminal"||e==="shell_command"?"bash":e==="webfetch"||e==="fetch"||e==="curl"||e==="wget"?"webfetch":t},bN=({permission:t,onResponse:e})=>{const{t:o}=ft(),[n,s]=g.useState(!1),[r,i]=g.useState(!1),l=oa,c=ur(),d=Te(x=>x.currentSessionId),u=g.useMemo(()=>{if(!d||t.sessionID===d)return!1;const x=c.find(_=>_.id===t.sessionID);return!!(x?.parentID&&x.parentID===d)},[t.sessionID,d,c]),{currentTheme:f}=js(),m=g.useMemo(()=>Pf(f),[f]),h=async x=>{s(!0);try{await l(t.sessionID,t.id,x),i(!0),e?.(x)}catch(_){console.error("[PermissionCard] Failed to respond to permission:",_)}finally{s(!1)}};if(r)return null;const p=t.permission||"unknown",v=p.toLowerCase(),b=(x,_="")=>{const k=t.metadata[x];return typeof k=="string"?k:typeof k=="number"?String(k):_},y=x=>{const _=t.metadata[x];return typeof _=="number"?_:void 0},w=x=>!!t.metadata[x],S=vN(p),C=()=>{if(v==="bash"||v==="shell"||v==="shell_command"){const k=b("command")||b("cmd")||b("script"),D=b("description"),F=b("cwd")||b("working_directory")||b("directory")||b("path"),A=y("timeout");return a.jsxs(a.Fragment,{children:[D&&a.jsx("div",{className:"typography-meta text-muted-foreground mb-2",children:D}),F&&a.jsxs("div",{className:"typography-meta text-muted-foreground mb-2",children:[a.jsx("span",{className:"font-semibold",children:o("chat.permissionCard.workingDirectory")})," ",a.jsx("code",{className:"px-1 py-0.5 bg-muted/30 rounded",children:F})]}),A&&a.jsxs("div",{className:"typography-meta text-muted-foreground mb-2",children:[a.jsx("span",{className:"font-semibold",children:o("chat.permissionCard.timeout")})," ",A,"ms"]}),k&&a.jsx("div",{children:a.jsx(vi,{language:"bash",style:m,PreTag:"div",customStyle:hN,codeTagProps:pN,wrapLongLines:!0,children:k})})]})}if(v==="edit"||v==="multiedit"||v==="str_replace"||v==="str_replace_based_edit_tool"){const k=b("path")||b("file_path")||b("filename")||b("filePath"),D=b("changes")||b("diff"),F=w("replace_all")||w("replaceAll");return a.jsxs(a.Fragment,{children:[F&&a.jsx("div",{className:"typography-meta text-muted-foreground mb-2",children:a.jsx("span",{className:"font-semibold",children:"⚠️ Replace All Occurrences"})}),D&&a.jsx(mn,{outerClassName:"max-h-[60vh]",className:"tool-output-surface p-1 rounded-xl border border-border/20 bg-transparent",children:a.jsx(fN,{diff:D,syntaxTheme:m,filePath:k})})]})}if(v==="write"||v==="create"||v==="file_write"){const k=b("path")||b("file_path")||b("filename")||b("filePath"),D=b("content")||b("text")||b("data");return D?a.jsx(mn,{outerClassName:"max-h-[60vh]",className:"tool-output-surface p-1 rounded-xl border border-border/20 bg-transparent",children:a.jsx(mN,{content:D,syntaxTheme:m,filePath:k})}):null}if(v==="webfetch"||v==="fetch"||v==="curl"||v==="wget"){const k=b("url")||b("uri")||b("endpoint"),D=b("method")||"GET",F=t.metadata.headers&&typeof t.metadata.headers=="object"?t.metadata.headers:void 0,A=b("body")||b("data")||b("payload"),B=y("timeout"),M=b("format")||b("responseType");return a.jsxs(a.Fragment,{children:[k&&a.jsxs("div",{className:"mb-2",children:[a.jsx("div",{className:"typography-meta text-muted-foreground mb-1",children:o("chat.permissionCard.request")}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"typography-meta font-semibold px-1.5 py-0.5 bg-primary/20 text-primary rounded",children:D}),a.jsx("code",{className:"typography-meta px-2 py-1 bg-muted/30 rounded flex-1 break-all",children:k})]})]}),F&&Object.keys(F).length>0&&a.jsxs("div",{className:"mb-2",children:[a.jsx("div",{className:"typography-meta text-muted-foreground mb-1",children:o("chat.permissionCard.headers")}),a.jsx(mn,{outerClassName:"max-h-24",className:"p-0",children:a.jsx(vi,{language:"json",style:m,customStyle:m8,wrapLongLines:!0,children:JSON.stringify(F,null,2)})})]}),A&&a.jsxs("div",{className:"mb-2",children:[a.jsx("div",{className:"typography-meta text-muted-foreground mb-1",children:o("chat.permissionCard.body")}),a.jsx(mn,{outerClassName:"max-h-32",className:"p-0",children:a.jsx(vi,{language:typeof A=="object"?"json":"text",style:m,customStyle:m8,wrapLongLines:!0,children:typeof A=="object"?JSON.stringify(A,null,2):String(A)})})]}),(B||M)&&a.jsxs("div",{className:"typography-meta text-muted-foreground",children:[B&&a.jsxs("span",{children:["Timeout: ",B,"ms"]}),B&&M&&a.jsx("span",{children:" • "}),M&&a.jsxs("span",{children:["Response format: ",M]})]})]})}const x=b("command")||b("content")||b("action")||b("operation"),_=b("description");return a.jsxs(a.Fragment,{children:[_&&a.jsx("div",{className:"typography-meta text-muted-foreground mb-2",children:_}),x&&a.jsxs("div",{className:"mb-2",children:[a.jsx("div",{className:"typography-meta text-muted-foreground mb-1",children:o("chat.permissionCard.action")}),a.jsx(mn,{outerClassName:"max-h-32",className:"p-0",children:a.jsx("pre",{className:"typography-meta font-mono px-2 py-1 bg-muted/30 rounded whitespace-pre-wrap break-all",children:String(x)})})]}),Object.keys(t.metadata).length>0&&!x&&!_&&a.jsxs("div",{children:[a.jsx("div",{className:"typography-meta text-muted-foreground mb-1",children:o("chat.permissionCard.details")}),a.jsx(mn,{outerClassName:"max-h-32",className:"p-0",children:a.jsx("pre",{className:"typography-meta font-mono px-2 py-1 bg-muted/30 rounded whitespace-pre-wrap break-all",children:JSON.stringify(t.metadata,null,2)})})]})]})};return a.jsx("div",{className:"group w-full pt-0 pb-2",children:a.jsx("div",{className:"chat-column",children:a.jsxs("div",{className:"-mt-1 border border-border/30 rounded-xl bg-muted/10",children:[a.jsx("div",{className:"px-2 py-1.5 border-b border-border/20 bg-muted/5",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{name:"question",className:"h-3.5 w-3.5 text-[var(--status-warning)]"}),a.jsx("span",{className:"typography-meta font-medium text-muted-foreground",children:"Permission Required"}),u?a.jsx("span",{className:"typography-micro text-muted-foreground px-1.5 py-0.5 rounded bg-foreground/5",children:"From subagent"}):null]}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[gN(p),a.jsx("span",{className:"typography-meta text-muted-foreground font-medium",children:S})]})]})}),a.jsxs("div",{className:"px-2 py-2",children:[t.patterns.length>0&&a.jsxs("div",{className:"mb-2",children:[a.jsx("div",{className:"typography-meta text-muted-foreground mb-1",children:o("chat.permissionCard.patterns")}),a.jsx("code",{className:"typography-meta px-2 py-1 bg-muted/30 rounded block break-all",children:t.patterns.join(", ")})]}),C()]}),a.jsxs("div",{className:"px-2 pb-2 sm:pb-1.5 pt-1.5 sm:pt-1 flex flex-col sm:flex-row sm:items-center sm:flex-wrap gap-1.5 border-t border-border/20",children:[a.jsxs("button",{onClick:()=>h("once"),disabled:n,className:U("flex items-center gap-1.5 sm:gap-1 px-3 sm:px-2 py-1.5 sm:py-1 typography-meta font-medium rounded transition-all min-h-[32px] sm:min-h-0 w-full sm:w-auto","disabled:opacity-50 disabled:cursor-not-allowed"),style:{backgroundColor:"rgb(var(--status-success) / 0.1)",color:"var(--status-success)"},onMouseEnter:x=>{x.currentTarget.style.backgroundColor="rgb(var(--status-success) / 0.2)"},onMouseLeave:x=>{x.currentTarget.style.backgroundColor="rgb(var(--status-success) / 0.1)"},children:[a.jsx(G,{name:"check",className:"h-3.5 w-3.5 sm:h-3 sm:w-3 flex-shrink-0"}),"Allow Once"]}),t.always.length>0?a.jsxs("button",{onClick:()=>h("always"),disabled:n,className:U("flex items-center gap-1.5 sm:gap-1 px-3 sm:px-2 py-1.5 sm:py-1 typography-meta font-medium rounded transition-all min-h-[32px] sm:min-h-0 w-full sm:w-auto","disabled:opacity-50 disabled:cursor-not-allowed"),style:{backgroundColor:"rgb(var(--muted) / 0.5)",color:"var(--muted-foreground)"},onMouseEnter:x=>{x.currentTarget.style.backgroundColor="rgb(var(--muted) / 0.7)"},onMouseLeave:x=>{x.currentTarget.style.backgroundColor="rgb(var(--muted) / 0.5)"},children:[a.jsx(G,{name:"time",className:"h-3.5 w-3.5 sm:h-3 sm:w-3 flex-shrink-0"}),(()=>{const x=t.always||t.metadata.always||[];if(x.length===0)return"Always Allow";const k=x.slice(0,2).join(", "),D=x.length>2;return a.jsx("span",{className:"truncate max-w-[180px]",children:D?`Always: ${k}...`:`Always: ${k}`})})()]}):a.jsxs("button",{onClick:()=>h("always"),disabled:n,className:U("flex items-center gap-1.5 sm:gap-1 px-3 sm:px-2 py-1.5 sm:py-1 typography-meta font-medium rounded transition-all min-h-[32px] sm:min-h-0 w-full sm:w-auto","disabled:opacity-50 disabled:cursor-not-allowed"),style:{backgroundColor:"rgb(var(--muted) / 0.5)",color:"var(--muted-foreground)"},onMouseEnter:x=>{x.currentTarget.style.backgroundColor="rgb(var(--muted) / 0.7)"},onMouseLeave:x=>{x.currentTarget.style.backgroundColor="rgb(var(--muted) / 0.5)"},children:[a.jsx(G,{name:"time",className:"h-3.5 w-3.5 sm:h-3 sm:w-3 flex-shrink-0"}),"Always Allow"]}),a.jsxs("button",{onClick:()=>h("reject"),disabled:n,className:U("flex items-center gap-1.5 sm:gap-1 px-3 sm:px-2 py-1.5 sm:py-1 typography-meta font-medium rounded transition-all min-h-[32px] sm:min-h-0 w-full sm:w-auto","disabled:opacity-50 disabled:cursor-not-allowed"),style:{backgroundColor:"rgb(var(--status-error) / 0.1)",color:"var(--status-error)"},onMouseEnter:x=>{x.currentTarget.style.backgroundColor="rgb(var(--status-error) / 0.2)"},onMouseLeave:x=>{x.currentTarget.style.backgroundColor="rgb(var(--status-error) / 0.1)"},children:[a.jsx(G,{name:"close",className:"h-3.5 w-3.5 sm:h-3 sm:w-3 flex-shrink-0"}),"Deny"]}),n&&a.jsx("div",{className:"flex justify-center w-full sm:w-auto sm:ml-auto py-1 sm:py-0 typography-meta text-muted-foreground",children:a.jsx("div",{className:"animate-spin h-3 w-3 border border-primary border-t-transparent rounded-full"})})]})]})})})};function yN(t){const e=[];return(t.questions??[]).forEach((n,s)=>{const r=n.header?.trim(),i=r&&r.length>0?r:`Question ${s+1}`;e.push(`## ${i}`),e.push(""),e.push(n.question),e.push(""),n.multiple&&(e.push("_Select all that apply._"),e.push("")),n.options.forEach(l=>{const c=l.label,d=l.description?.trim();e.push(d?`- **${c}** — ${d}`:`- **${c}**`)}),e.push("")}),e.join(`
|
|
6963
6963
|
`).trimEnd()}function wN(t){const e={questions:(t.questions??[]).map(o=>({header:o.header??null,question:o.question,multiple:!!o.multiple,options:o.options.map(n=>({label:n.label,description:n.description??null}))}))};return JSON.stringify(e,null,2)}const Ll="summary",xN=({question:t})=>{const{t:e}=ft(),o=ou,n=nu,s=Me(z=>z.isMobile),r=ur(),i=Te(z=>z.currentSessionId),l=g.useMemo(()=>{if(!i||t.sessionID===i)return!1;const z=r.find(q=>q.id===t.sessionID);return!!(z?.parentID&&z.parentID===i)},[t.sessionID,i,r]),[c,d]=g.useState("0"),[u,f]=g.useState(!1),[m,h]=g.useState(!1),[p,v]=g.useState({}),[b,y]=g.useState({}),[w,S]=g.useState({}),C=g.useMemo(()=>t.questions??[],[t.questions]),x=c===Ll,_=x?-1:Math.max(0,Math.min(C.length-1,Number(c)||0)),k=x?null:C[_],D=g.useMemo(()=>{if(x)return null;const z=k?.header?.trim();return z&&z.length>0?z:null},[k?.header,x]);g.useEffect(()=>{d("0"),v({}),y({}),S({}),h(!1)},[t.id]);const F=g.useMemo(()=>{const z=C.map((q,ae)=>({value:String(ae),label:q.header?.trim()||`Q${ae+1}`}));return C.length>1&&z.push({value:Ll,label:e("chat.questionCard.summaryTab")}),z},[C,e]),A=g.useCallback(z=>{if(!!b[z])return(w[z]??"").trim()||e("chat.questionCard.noAnswer");const ae=p[z]??[];return ae.length>0?ae.join(", "):e("chat.questionCard.noAnswer")},[b,w,p,e]),B=!!k?.multiple,M=p[_]??[],H=!!b[_],P=g.useMemo(()=>{const z=[];for(let q=0;q<C.length;q+=1){if(!!b[q]){(w[q]??"").trim()||z.push(q);continue}(p[q]??[]).length===0&&z.push(q)}return z},[b,w,C.length,p]),T=g.useMemo(()=>C.length===0?!1:P.length===0,[C.length,P.length]),E=g.useCallback(()=>{if(C.length===0||P.length===0)return;const z=x?-1:_;for(let q=1;q<=C.length;q+=1){const ae=(z+q+C.length)%C.length;if(P.includes(ae)){d(String(ae));return}}d(String(P[0]))},[_,x,C.length,P]),O=g.useCallback(()=>{const z=[];for(let q=0;q<C.length;q+=1){if(!!b[q]){const R=(w[q]??"").trim();z.push(R?[R]:[]);continue}z.push(p[q]??[])}return z},[b,w,C.length,p]),L=g.useCallback(z=>{k&&(y(q=>({...q,[_]:!1})),v(q=>{const ae=q[_]??[];if(B){const we=ae.includes(z)?ae.filter(ve=>ve!==z):[...ae,z];return{...q,[_]:we}}return{...q,[_]:[z]}}))},[_,k,B]),Z=g.useCallback(()=>{y(z=>({...z,[_]:!0})),v(z=>({...z,[_]:[]}))},[_]),oe=g.useCallback(async()=>{if(T){f(!0);try{const z=O();await o(t.sessionID,t.id,z),h(!0)}catch{}finally{f(!1)}}},[O,t.id,t.sessionID,T,o]),V=g.useCallback(z=>{zf(z)||z.key==="Enter"&&!z.shiftKey&&(!s||z.ctrlKey||z.metaKey)&&(z.preventDefault(),T?oe():E())},[oe,E,s,T]),$=g.useCallback(async()=>{f(!0);try{await n(t.sessionID,t.id),h(!0)}catch{}finally{f(!1)}},[t.id,t.sessionID,n]),N=g.useCallback(async()=>{const z=yN(t);if((await Xn(z)).ok){We.success(e("chat.questionCard.copiedMarkdown"));return}We.error(e("chat.questionCard.copyFailed"))},[t,e]),ee=g.useCallback(async()=>{const z=wN(t);if((await Xn(z)).ok){We.success(e("chat.questionCard.copiedJson"));return}We.error(e("chat.questionCard.copyFailed"))},[t,e]);return m||C.length===0?null:a.jsx("div",{className:"group w-full pt-0 pb-2",children:a.jsx("div",{className:"chat-column",children:a.jsxs("div",{className:"-mt-1 border border-border/30 rounded-xl bg-muted/10",children:[a.jsx("div",{className:"px-2 py-1.5 border-b border-border/20",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{name:"question",className:"h-3.5 w-3.5 text-primary"}),a.jsx("span",{className:"typography-meta font-medium text-muted-foreground",children:e("chat.questionCard.inputNeeded")}),l?a.jsx("span",{className:"typography-micro text-muted-foreground px-1.5 py-0.5 rounded bg-foreground/5",children:e("chat.questionCard.fromSubagent")}):null,D?a.jsx("span",{className:"ml-auto typography-micro font-medium text-foreground/70 px-1.5 py-0.5 rounded bg-muted/30 border border-border/20",children:D}):null,a.jsxs("div",{className:U("flex items-center gap-0.5",D?null:"ml-auto"),children:[a.jsx("button",{type:"button",onClick:N,title:e("chat.questionCard.copyMarkdown"),"aria-label":e("chat.questionCard.copyMarkdown"),className:"flex items-center justify-center h-5 w-5 rounded text-muted-foreground hover:text-foreground hover:bg-interactive-hover/30 transition-colors",children:a.jsx(G,{name:"file-text",className:"h-3 w-3"})}),a.jsx("button",{type:"button",onClick:ee,title:e("chat.questionCard.copyJson"),"aria-label":e("chat.questionCard.copyJson"),className:"flex items-center justify-center h-5 w-5 rounded text-muted-foreground hover:text-foreground hover:bg-interactive-hover/30 transition-colors",children:a.jsx(G,{name:"code-box",className:"h-3 w-3"})})]})]})}),a.jsxs("div",{className:"px-2 py-2",children:[F.length>1?a.jsx("div",{className:"flex items-center gap-1 mb-2 flex-wrap",children:F.map(z=>{const q=c===z.value,ae=z.value===Ll,R=ae?-1:Number(z.value),we=!ae&&Number.isFinite(R)&&!P.includes(R);return a.jsxs("button",{type:"button",onClick:()=>d(z.value),className:U("px-2 py-0.5 typography-meta font-medium rounded transition-colors flex items-center gap-1",q?"bg-interactive-selection/40 text-foreground":ae?"text-muted-foreground hover:text-foreground hover:bg-interactive-hover/20":we?"text-muted-foreground/60 hover:text-muted-foreground hover:bg-interactive-hover/20":"text-foreground/85 hover:text-foreground hover:bg-interactive-hover/20"),children:[ae?a.jsx(G,{name:"list-check-3",className:"h-3 w-3"}):null,z.label]},z.value)})}):null,x?a.jsx("div",{className:"space-y-2",children:C.map((z,q)=>{const ae=A(q),R=ae!==e("chat.questionCard.noAnswer");return a.jsxs("button",{type:"button",onClick:()=>d(String(q)),className:"w-full text-left rounded px-1.5 py-1 hover:bg-interactive-hover/20 transition-colors",children:[a.jsx("div",{className:"typography-micro text-muted-foreground",children:z.header||e("chat.questionCard.questionFallback",{index:q+1})}),a.jsx("div",{className:U("typography-meta",R?"text-foreground":"text-muted-foreground/50 italic"),children:ae})]},q)})}):k?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"typography-meta font-medium text-foreground mb-1.5",children:k.question}),B?a.jsx("div",{className:"typography-micro text-muted-foreground mb-1.5",children:e("chat.questionCard.selectMultiple")}):null,a.jsxs("div",{className:"space-y-0.5",children:[k.options.map((z,q)=>{const ae=M.includes(z.label),R=/\(recommended\)/i.test(z.label);return a.jsx("button",{type:"button",onClick:()=>L(z.label),disabled:u,className:U("w-full px-1.5 py-1 text-left rounded transition-colors","hover:bg-interactive-hover/30",ae?"bg-interactive-selection/20":null,u?"opacity-60 cursor-not-allowed":null),children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{className:"mt-0.5 shrink-0",children:B?a.jsx(L2,{checked:ae,onChange:()=>L(z.label),disabled:u}):a.jsx(RD,{checked:ae,onChange:()=>L(z.label),disabled:u})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:U("typography-meta break-all",ae?"text-foreground font-medium":"text-foreground/80"),children:z.label}),R?a.jsx("span",{className:"typography-micro text-primary/80",children:e("chat.questionCard.recommended")}):null]}),z.description?a.jsx("div",{className:"typography-micro text-muted-foreground break-words",children:z.description}):null]})]})},`${q}:${z.label}`)}),a.jsx("button",{type:"button",onClick:Z,disabled:u,className:U("w-full px-1.5 py-1 text-left rounded transition-colors","hover:bg-interactive-hover/30",H?"bg-interactive-selection/20":null,u?"opacity-60 cursor-not-allowed":null),children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{name:"edit",className:U("h-3.5 w-3.5",H?"text-primary":"text-muted-foreground/50")}),a.jsx("span",{className:U("typography-meta",H?"text-foreground font-medium":"text-muted-foreground"),children:e("chat.questionCard.other")})]})}),H?a.jsx("div",{className:"pl-6 pr-1 pt-0.5",children:a.jsx("textarea",{ref:z=>{if(z){z.style.height="auto";const q=20,ae=q*2,R=q*4;z.style.height=`${Math.min(Math.max(z.scrollHeight,ae),R)}px`}},value:w[_]??"",onChange:z=>{const q=z.target;q.style.height="auto";const ae=20,R=ae*2,we=ae*4;q.style.height=`${Math.min(Math.max(q.scrollHeight,R),we)}px`,S(ve=>({...ve,[_]:q.value}))},placeholder:e("chat.questionCard.yourAnswer"),disabled:u,rows:2,onKeyDown:V,className:"w-full bg-transparent border border-border/30 focus:border-primary rounded px-2 py-1 outline-none typography-meta text-foreground placeholder:text-muted-foreground/50 transition-colors resize-none overflow-hidden",autoFocus:!0})}):null]})]}):null]}),a.jsxs("div",{className:"px-2 pb-1.5 pt-1 flex items-center gap-1.5 border-t border-border/20",children:[a.jsxs("button",{type:"button",onClick:T?oe:E,disabled:u,className:U("flex items-center gap-1 px-2 py-1 typography-meta font-medium rounded transition-colors","bg-[rgb(var(--status-success)/0.1)] text-[var(--status-success)] hover:bg-[rgb(var(--status-success)/0.2)]","disabled:opacity-50 disabled:cursor-not-allowed"),children:[T?a.jsx(G,{name:"check",className:"h-3 w-3"}):a.jsx(G,{name:"arrow-right-s",className:"h-3 w-3"}),e(T?"chat.questionCard.submit":"chat.questionCard.next")]}),a.jsxs("button",{type:"button",onClick:$,disabled:u,className:U("flex items-center gap-1 px-2 py-1 typography-meta font-medium rounded transition-colors","bg-[rgb(var(--status-error)/0.1)] text-[var(--status-error)] hover:bg-[rgb(var(--status-error)/0.2)]","disabled:opacity-50 disabled:cursor-not-allowed"),children:[a.jsx(G,{name:"close",className:"h-3 w-3"}),e("chat.questionCard.dismiss")]}),u?a.jsx("div",{className:"ml-auto",children:a.jsx("div",{className:"animate-spin h-3 w-3 border border-primary border-t-transparent rounded-full"})}):null]})]})})})},CN={activity:"idle",hasWorkingContext:!1,hasActiveTools:!1,isWorking:!1,isStreaming:!1,isCooldown:!1,lifecyclePhase:null,statusText:null,isGenericStatus:!0,isWaitingForPermission:!1,canAbort:!1,compactionDeadline:null,activePartType:void 0,activeToolName:void 0,wasAborted:!1,abortActive:!1,lastCompletionId:null,isComplete:!1,retryInfo:null},h8=[],Vl=[],SN=[],p8=t=>t.role==="assistant",kN=t=>t.type==="reasoning",Q9=t=>t.type==="text",g8=t=>{if(Q9(t))return t.text;const e=t;if(typeof e.text=="string")return e.text;if(typeof e.content=="string")return e.content;if(typeof e.value=="string")return e.value},v8=t=>(Q9(t)||kN(t),t.time),MN=t=>{if(t.tool)return t.tool;const e=t;return typeof e.name=="string"?e.name:"tool"};function X9(){const t=Te(w=>w.currentSessionId),e=Qo(g.useCallback(w=>t?w.message[t]??h8:h8,[t])),o=g.useMemo(()=>{for(let w=e.length-1;w>=0;w--)if(e[w].role==="assistant")return e[w].id;return null},[e]),n=Qo(g.useCallback(w=>o?w.part[o]??Vl:Vl,[o])),s=g.useMemo(()=>e.length===0?SN:e.map(w=>({info:w,parts:w.id===o?n:Vl})),[n,e,o]),r=f4(t??""),i=Cw(t??""),l=Te(g.useCallback(w=>t?w.sessionAbortFlags?.get(t)??null:null,[t])),{phase:c,isWorking:d}=f9(),u=u4(t??""),f=u?.type==="retry"?u.attempt:void 0,m=u?.type==="retry"?u.next:void 0,h=g.useMemo(()=>{if(s.length===0)return{activePartType:void 0,activeToolName:void 0,statusText:"working",isGenericStatus:!0};const w=(H,P)=>{const T=typeof H.info.time?.created=="number"?H.info.time.created:null,E=typeof P.info.time?.created=="number"?P.info.time.created:null;return T!==null&&E!==null&&T!==E?T>E:H.info.id.localeCompare(P.info.id)>0};let S=null;for(const H of s){if(!p8(H.info)||Jd(H.parts))continue;const P=H;(S===null||w(P,S))&&(S=P)}if(!S)return{activePartType:void 0,activeToolName:void 0,statusText:"working",isGenericStatus:!0};let C,x;const _=new Set(["edit","write","multiedit","apply_patch"]);for(let H=(S.parts??[]).length-1;H>=0;H-=1){const P=S.parts?.[H];if(P)switch(P.type){case"reasoning":{const T=P.time??v8(P);(!T||typeof T.end>"u")&&!C&&(C="reasoning");break}case"tool":{const T=P.state?.status;if((T==="running"||T==="pending")&&!C){const E=MN(P);_.has(E)?(C="editing",x=E):(C="tool",x=E)}break}case"text":{const T=g8(P)??"";if(typeof T=="string"&&T.trim().length>0){const E=v8(P);(!E||typeof E.end>"u")&&!C&&(C="text")}break}}}const k={read:"reading file",write:"writing file",edit:"editing file",multiedit:"editing files",apply_patch:"applying patch",bash:"running command",grep:"searching content",glob:"finding files",list:"listing directory",task:"delegating task",webfetch:"fetching URL",websearch:"searching web",codesearch:"web code search",todowrite:"updating todos",todoread:"reading todos",skill:"learning skill",question:"asking question",plan_enter:"switching to planning",plan_exit:"switching to building"},D=["working","processing","preparing","warming up","gears turning","computing","calculating","analyzing","wheels spinning","calibrating","synthesizing","connecting dots","inspecting logic","weighing options"],F=H=>k[H]??`using ${H}`,A=()=>D[Math.floor(Math.random()*D.length)],B=C===void 0,M=C==="editing"?x==="multiedit"?F(x):"editing file":C==="tool"&&x?F(x):C==="reasoning"?"thinking":C==="text"?"composing":A();return{activePartType:C,activeToolName:x,statusText:M,isGenericStatus:B}},[s]),p=g.useMemo(()=>{const w=!!(l&&!l.acknowledged);return{wasAborted:w,abortActive:w}},[l]),v=g.useMemo(()=>{if(p.wasAborted)return{...CN,wasAborted:!0,abortActive:p.abortActive,activity:"idle",hasWorkingContext:!1,isWorking:!1,isStreaming:!1,isCooldown:!1,statusText:null,canAbort:!1,retryInfo:null};const w=d,S=c==="busy",C=!1,x=c==="retry";let _="idle";w&&(h.activePartType==="tool"||h.activePartType==="editing"?_="tooling":_="streaming");const k=x?{attempt:f,next:m}:null;return{activity:_,hasWorkingContext:w,hasActiveTools:h.activePartType==="tool"||h.activePartType==="editing",isWorking:w,isStreaming:S,isCooldown:C,lifecyclePhase:S?"streaming":C?"cooldown":null,statusText:w?h.statusText:null,isGenericStatus:w?h.isGenericStatus:!0,isWaitingForPermission:!1,canAbort:w,compactionDeadline:null,activePartType:w?h.activePartType:void 0,activeToolName:w?h.activeToolName:void 0,wasAborted:!1,abortActive:!1,lastCompletionId:null,isComplete:!1,retryInfo:k}},[c,d,h,p,f,m]),b=g.useMemo(()=>{const w=d&&h.activePartType==="text";if(!w||s.length===0)return{isActive:w,characterCount:0};const S=s.filter(_=>p8(_.info)&&!Jd(_.parts));if(S.length===0)return{isActive:w,characterCount:0};const C=S[S.length-1];let x=0;return(C.parts??[]).forEach(_=>{if(_.type!=="text")return;const k=g8(_)??"";typeof k=="string"&&k.trim().length>0&&(x+=k.length)}),{isActive:w,characterCount:x}},[s,d,h.activePartType]),y=g.useMemo(()=>{if(v.wasAborted||v.abortActive)return v;const w=r.length>0,S=i.length>0;return!w&&!S?v:S?{...v,statusText:null,isWorking:!1,hasWorkingContext:!1,hasActiveTools:!1,canAbort:!1,activePartType:void 0,activeToolName:void 0,retryInfo:null}:{...v,statusText:"waiting for permission",isWaitingForPermission:!0,canAbort:!1,retryInfo:null}},[v,r,i]);return{forming:b,working:y}}const em=g.memo(()=>{const t=de.c(11),e=Te(AN);let o;t[0]!==e?(o=u=>e?u.sessionAbortFlags?.get(e)??null:null,t[0]=e,t[1]=o):o=t[1];const n=Te(o),{working:s}=X9(),r=Ee(FN),i=!!(n&&!n.acknowledged),l=i||s.wasAborted,c=i||s.abortActive;let d;return t[2]!==r||t[3]!==l||t[4]!==c||t[5]!==s.isGenericStatus||t[6]!==s.isWaitingForPermission||t[7]!==s.isWorking||t[8]!==s.retryInfo||t[9]!==s.statusText?(d=a.jsx(Qf,{isWorking:s.isWorking,statusText:s.statusText,isGenericStatus:s.isGenericStatus,isWaitingForPermission:s.isWaitingForPermission,wasAborted:l,abortActive:c,retryInfo:s.retryInfo,showAssistantStatus:!0,showTodos:!1,agentName:r}),t[2]=r,t[3]=l,t[4]=c,t[5]=s.isGenericStatus,t[6]=s.isWaitingForPermission,t[7]=s.isWorking,t[8]=s.retryInfo,t[9]=s.statusText,t[10]=d):d=t[10],d});em.displayName="StatusRowContainer";function AN(t){return t.currentSessionId}function FN(t){return t.currentAgentName}const _N=t=>{const e=de.c(11),{visible:o,onClick:n}=t,{t:s}=ft(),r=o?"opacity-100 translate-y-0 scale-100 pointer-events-auto":"opacity-0 translate-y-2 scale-95 pointer-events-none";let i;e[0]!==r?(i=U("absolute bottom-full left-1/2 -translate-x-1/2 mb-2 transition-all duration-150",r),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==s?(l=s("chat.scrollToBottom.aria"),e[2]=s,e[3]=l):l=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(G,{name:"arrow-down",className:"h-4 w-4"}),e[4]=c):c=e[4];let d;e[5]!==n||e[6]!==l?(d=a.jsx(yt,{variant:"outline",size:"sm",onClick:n,className:"size-8 rounded-full [corner-shape:round] p-0 shadow-none bg-background/95 hover:bg-interactive-hover","aria-label":l,children:c}),e[5]=n,e[6]=l,e[7]=d):d=e[7];let u;return e[8]!==i||e[9]!==d?(u=a.jsx("div",{className:i,children:d}),e[8]=i,e[9]=d,e[10]=u):u=e[10],u},BN=g.memo(_N),DN=(t,e)=>t.length===0?void 0:[...t].sort((n,s)=>{if(s.ratio!==n.ratio)return s.ratio-n.ratio;const r=Math.abs(n.top-e),i=Math.abs(s.top-e);return r!==i?r-i:n.top-s.top})[0]?.id,PN=(t,e)=>{if(t.length===0)return;let o=0,n=t.length-1,s=0;for(;o<=n;){const r=o+n>>1,i=t[r]?.top;if(i===void 0)break;if(i<=e){s=r,o=r+1;continue}n=r-1}return t[s]?.id},TN=t=>{const e=t.raf??requestAnimationFrame,o=t.caf??cancelAnimationFrame,n=t.IntersectionObserver??globalThis.IntersectionObserver,s=t.ResizeObserver??globalThis.ResizeObserver,r=t.MutationObserver??globalThis.MutationObserver;let i,l,c,d,u,f,m,h=!0;const p=new Map,v=new WeakMap,b=new Map;let y=[];const w=()=>{u===void 0&&(u=e(()=>{u=void 0,C()}))},S=()=>{const M=i;if(!M){y=[],h=!1;return}const H=M.getBoundingClientRect().top;y=[...p].map(([P,T])=>({id:P,top:T.getBoundingClientRect().top-H+M.scrollTop})),y.sort((P,T)=>P.top-T.top),h=!1},C=()=>{const M=i;if(!M)return;const H=M.getBoundingClientRect().top+100,P=DN([...b].map(([T,E])=>({id:T,ratio:E.ratio,top:E.top})),H)??(h&&S(),PN(y,M.scrollTop+100));!P||P===m||(m=P,t.onActive(P))},x=()=>{const M=i;if(M){if(l?.disconnect(),l=void 0,n)try{l=new n(H=>{for(const P of H){const T=P.target;if(!(T instanceof HTMLElement))continue;const E=v.get(T);if(E){if(!P.isIntersecting||P.intersectionRatio<=0){b.delete(E);continue}b.set(E,{ratio:P.intersectionRatio,top:P.boundingClientRect.top})}}w()},{root:M,threshold:[0,.25,.5,.75,1]})}catch{l=void 0}if(l)for(const H of p.values())l.observe(H);if(clearTimeout(f),f=void 0,c?.disconnect(),c=void 0,s){c=new s(()=>{clearTimeout(f),f=setTimeout(()=>{h=!0,w()},100)}),c.observe(M);for(const H of p.values())c.observe(H)}if(d?.disconnect(),d=void 0,r){d=new r(()=>{h=!0,w()});const H={subtree:!0,childList:!0};s||(H.characterData=!0,H.characterDataOldValue=!1),d.observe(M,H)}h=!0,w()}},_=M=>{i!==M&&(i=M,b.clear(),m=void 0,x())},k=(M,H)=>{const P=p.get(H);P&&P!==M&&(l?.unobserve(P),c?.unobserve(P)),p.set(H,M),v.set(M,H),l&&l.observe(M),c&&c.observe(M),h=!0,w()},D=M=>{const H=p.get(M);H&&(l?.unobserve(H),c?.unobserve(H),p.delete(M),b.delete(M),h=!0,w())},F=()=>{h=!0,w()},A=()=>{for(const M of p.values())l?.unobserve(M),c?.unobserve(M);p.clear(),b.clear(),y=[],m=void 0,h=!0};return{setContainer:_,register:k,unregister:D,onScroll:w,markDirty:F,clear:A,destroy:()=>{u!==void 0&&o(u),u=void 0,clearTimeout(f),f=void 0,A(),l?.disconnect(),c?.disconnect(),d?.disconnect(),l=void 0,c=void 0,d=void 0,i=void 0},getActiveId:()=>m}},HN=.1,IN=40,EN=200,jN=150,LN=.18,b8=.5,VN=4,NN=2,RN=280,zN=1200,tm=(t,e)=>{if(t)return IN;const o=e?.clientHeight??0;return o<=0?96:Math.max(48,o*HN)},ON=t=>t.scrollHeight-t.scrollTop-t.clientHeight,y8=(t,e)=>ON(t)<=tm(e,t),$N=t=>{if(t.altKey||t.ctrlKey||t.metaKey)return!1;switch(t.key){case"ArrowUp":case"PageUp":case"Home":return!0;default:return!1}},ZN=(t,e)=>{if(!(e instanceof Element))return null;const o=e.closest("[data-scrollable]");return!o||o===t||!(o instanceof HTMLElement)?null:o},w8=(t,e)=>{const o=ZN(t,e);return o?o.scrollTop>0:!1},UN=(t,e)=>{const o=Math.max(0,t.scrollHeight-t.clientHeight);if(o<=0)return!0;const n=tm(e,null);return o-t.scrollTop<=n},qN=({currentSessionId:t,sessionMessageCount:e,sessionIsWorking:o,isMobile:n,onActiveTurnChange:s})=>{const r=g.useRef(null),[i,l]=g.useState(null),c=g.useRef(null),[d,u]=g.useState("following"),[f,m]=g.useState(!1),[h,p]=g.useState(!1),[v,b]=g.useState(!1),y=g.useRef("following"),w=g.useRef(o);w.current=o;const S=g.useRef(e);S.current=e;const C=g.useRef(t);C.current=t;const x=g.useRef(null),_=g.useRef(0),k=g.useRef(null),D=g.useRef(0),F=g.useRef(0),A=g.useRef(null),B=g.useRef(null),M=g.useRef(null),H=g.useRef(0),P=g.useRef(null),T=Br(Q=>Q.updateViewportAnchor);g.useLayoutEffect(()=>{r.current!==c.current&&(c.current=r.current,l(r.current))});const E=g.useCallback(Q=>{y.current!==Q&&(y.current=Q,u(Q))},[]),O=g.useCallback(()=>{const Q=typeof performance<"u"?performance.now():Date.now();_.current=Q+EN},[]),L=g.useCallback(()=>(typeof performance<"u"?performance.now():Date.now())<_.current,[]),Z=g.useCallback(()=>{k.current!==null&&typeof window<"u"&&window.cancelAnimationFrame(k.current),k.current=null,D.current=0,b(!1)},[]),oe=g.useCallback(()=>{k.current=null;const Q=r.current;if(!Q){Z();return}if(y.current!=="following"||!w.current){Z();return}const W=Math.max(0,Q.scrollHeight-Q.clientHeight),J=Q.scrollTop,j=W-J;if(Math.abs(j)<=b8){if(J!==W&&(O(),Q.scrollTop=W,F.current=W),D.current+=1,D.current>=VN){Z();return}k.current=window.requestAnimationFrame(oe);return}D.current=0;const se=J+j*LN;O(),Q.scrollTop=se,F.current=Q.scrollTop,k.current=window.requestAnimationFrame(oe)},[O,Z]),V=g.useCallback(()=>{typeof window>"u"||k.current===null&&(y.current!=="following"||!w.current||(D.current=0,b(!0),k.current=window.requestAnimationFrame(oe)))},[oe]),$=g.useCallback(Q=>{const W=r.current;if(!W)return;const J=Math.max(0,W.scrollHeight-W.clientHeight),j=Math.max(0,Math.min(Q,J));O(),W.scrollTop=j,F.current=W.scrollTop},[O]),N=g.useCallback(()=>{M.current!==null&&typeof window<"u"&&window.cancelAnimationFrame(M.current),M.current=null},[]),ee=g.useCallback(()=>{if(typeof window>"u")return;N();const Q=(typeof performance<"u"?performance.now():Date.now())+RN,W=()=>{if(M.current=null,y.current!=="following")return;const J=r.current;if(!J)return;const j=Math.max(0,J.scrollHeight-J.clientHeight);Math.abs(J.scrollTop-j)>b8&&(O(),J.scrollTop=j,F.current=j),(typeof performance<"u"?performance.now():Date.now())<Q&&(M.current=window.requestAnimationFrame(W))};M.current=window.requestAnimationFrame(W)},[O,N]),z=g.useCallback(()=>{Z(),N(),H.current=typeof performance<"u"?performance.now():Date.now(),E("released")},[E,Z,N]),q=g.useCallback(()=>{y.current==="following"?(Z(),N(),H.current=typeof performance<"u"?performance.now():Date.now(),E("released")):H.current=typeof performance<"u"?performance.now():Date.now()},[E,Z,N]),ae=g.useCallback((Q="instant")=>{const W=r.current;if(E("following"),H.current=0,!W)return;if(Q==="smooth"&&w.current){V();return}const J=Math.max(0,W.scrollHeight-W.clientHeight);$(J),w.current?V():ee()},[E,V,ee,$]),R=g.useCallback(()=>{A.current!==null&&(clearTimeout(A.current),A.current=null);const Q=B.current;if(!Q)return;const W=r.current;if(!W){B.current=null;return}T(Q.sessionId,Q.anchor,{scrollTop:W.scrollTop,scrollHeight:W.scrollHeight,clientHeight:W.clientHeight}),B.current=null},[T]),we=g.useCallback(()=>{const Q=C.current;if(!Q)return;const W=r.current;if(!W)return;const{scrollTop:J,scrollHeight:j,clientHeight:se}=W,ne=j>0?(J+se/2)/j:0,le=Math.floor(ne*S.current);B.current={sessionId:Q,anchor:le},A.current===null&&(A.current=setTimeout(()=>{A.current=null,R()},jN))},[R]),ve=g.useCallback(()=>{R()},[R]),Ce=g.useCallback(async()=>{const Q=C.current;if(!Q)return!1;const W=r.current;if(!W)return P.current=Q,E("following"),!1;P.current=null;const J=Br.getState().sessionMemoryState.get(Q)?.scrollPosition;if(!J||UN(J,n)){E("following"),H.current=0;const be=Math.max(0,W.scrollHeight-W.clientHeight);return $(be),w.current&&V(),ee(),!1}const j=Math.max(0,J.scrollHeight-J.clientHeight),se=j>0?J.scrollTop/j:0,ne=Math.max(0,W.scrollHeight-W.clientHeight),le=Math.round(se*ne);E("released"),$(le);const he=Br.getState().sessionMemoryState.get(Q);return T(Q,he?.viewportAnchor??0,{scrollTop:W.scrollTop,scrollHeight:W.scrollHeight,clientHeight:W.clientHeight}),!0},[n,E,V,ee,T,$]);g.useEffect(()=>{!t||t===x.current||(x.current=t,Qs.getInstance().recordSessionStart(t),R(),Z(),N(),O(),P.current&&P.current!==t&&(P.current=null))},[t,R,O,Z,N]),g.useEffect(()=>{o?y.current==="following"&&V():Z()},[o,V,Z]),g.useEffect(()=>{i&&P.current&&P.current===t&&Ce()},[i,t,Ce]);const Pe=g.useCallback(()=>{const Q=r.current;if(!Q){m(!1),p(!1);return}const W=Q.scrollHeight>Q.clientHeight+1;if(m(W),!W){p(!1);return}const J=y.current==="released"&&!y8(Q,n);p(J)},[n]),De=g.useCallback(()=>{const Q=r.current;if(!Q)return;const W=L(),J=Q.scrollTop,j=F.current;if(F.current=J,Pe(),W)return;J<j&&y.current==="following"&&(Z(),N(),H.current=typeof performance<"u"?performance.now():Date.now(),E("released"));const ne=(typeof performance<"u"?performance.now():Date.now())-H.current<zN;y.current==="released"&&y8(Q,n)&&!ne&&(E("following"),w.current&&V()),we()},[L,n,we,E,V,Z,N,Pe]);g.useEffect(()=>{const Q=i;if(!Q)return;const W=be=>{be.deltaY>=0||w8(Q,be.target)||q()};let J=null;const j=be=>{const ce=be.touches.item(0);J=ce?ce.clientY:null},se=be=>{const ce=be.touches.item(0);if(!ce){J=null;return}const ye=J;J=ce.clientY,!(ye===null||ce.clientY-ye<=NN)&&(w8(Q,be.target)||q())},ne=()=>{J=null},le=be=>{$N(be)&&q()},he=be=>{const ce=be.target;ce instanceof Element&&ce.closest("[data-overlay-scrollbar-thumb]")&&q()};return Q.addEventListener("scroll",De,{passive:!0}),Q.addEventListener("wheel",W,{passive:!0}),Q.addEventListener("touchstart",j,{passive:!0}),Q.addEventListener("touchmove",se,{passive:!0}),Q.addEventListener("touchend",ne,{passive:!0}),Q.addEventListener("touchcancel",ne,{passive:!0}),Q.addEventListener("keydown",le),typeof window<"u"&&window.addEventListener("pointerdown",he,!0),()=>{Q.removeEventListener("scroll",De),Q.removeEventListener("wheel",W),Q.removeEventListener("touchstart",j),Q.removeEventListener("touchmove",se),Q.removeEventListener("touchend",ne),Q.removeEventListener("touchcancel",ne),Q.removeEventListener("keydown",le),typeof window<"u"&&window.removeEventListener("pointerdown",he,!0)}},[i,De,q]),g.useEffect(()=>{const Q=i;if(!Q||typeof ResizeObserver>"u")return;const W=new ResizeObserver(()=>{Pe(),y.current==="following"&&w.current&&V()});W.observe(Q);const J=Q.firstElementChild;return J instanceof Element&&W.observe(J),()=>W.disconnect()},[i,V,Pe]),g.useEffect(()=>{Pe()},[e,Pe]);const pe=g.useCallback(Q=>{Pe(),y.current==="following"&&w.current&&V()},[V,Pe]),K=g.useRef(new Map),re=g.useCallback(Q=>{const W=K.current.get(Q);if(W)return W;const J=()=>{y.current==="following"&&w.current&&V()},j={onChunk:J,onComplete:()=>{Pe()},onStreamingCandidate:()=>{},onAnimationStart:()=>{},onAnimatedHeightChange:J,onReservationCancelled:()=>{},onReasoningBlock:()=>{}};return K.current.set(Q,j),j},[V,Pe]);return g.useEffect(()=>()=>{Z(),N(),R(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[R,Z,N]),g.useEffect(()=>{if(!s)return;const Q=i;if(!Q)return;let W=null;const J=TN({onActive:ce=>{ce!==W&&(W=ce,s(ce))}});J.setContainer(Q);const j=new Map,se=ce=>{const ye=ce.dataset.turnId;return ye?(j.set(ye,ce),J.register(ce,ye),!0):!1},ne=ce=>{const ye=ce.dataset.turnId;return!ye||j.get(ye)!==ce?!1:(j.delete(ye),J.unregister(ye),!0)},le=ce=>{if(!(ce instanceof HTMLElement))return[];const ye=[];return ce.matches("[data-turn-id]")&&ye.push(ce),ce.querySelectorAll("[data-turn-id]").forEach(_e=>ye.push(_e)),ye};Q.querySelectorAll("[data-turn-id]").forEach(se),J.markDirty();const he=new MutationObserver(ce=>{let ye=!1;ce.forEach(_e=>{_e.removedNodes.forEach(te=>{le(te).forEach(xe=>{ne(xe)&&(ye=!0)})}),_e.addedNodes.forEach(te=>{le(te).forEach(xe=>{se(xe)&&(ye=!0)})})}),ye&&J.markDirty()});he.observe(Q,{subtree:!0,childList:!0});const be=()=>J.onScroll();return Q.addEventListener("scroll",be,{passive:!0}),()=>{Q.removeEventListener("scroll",be),he.disconnect(),J.destroy()}},[i,s]),{scrollRef:r,state:d,isPinned:d==="following",isOverflowing:f,isFollowingProgrammatically:v,showScrollButton:h,notifyContentChange:pe,getAnimationHandlers:re,goToBottom:ae,releaseAutoFollow:z,saveSnapshotNow:ve,restoreSnapshot:Ce}},q4=t=>{const e=t.info.clientRole??t.info.role;return typeof e=="string"?e:""},W4=t=>{const e=t.info.parentID;if(!(typeof e!="string"||e.trim().length===0))return e},x8=t=>{if(!t)return null;const e=q4(t),o=typeof t.info?.id=="string"?t.info.id:"",n=W4(t)??"";return`${o}::${e}::${n}`},WN=t=>({turnIds:[...t.turnIds],turnMessageStartIndexes:[...t.turnMessageStartIndexes],turnIndexById:new Map(t.turnIndexById),messageToTurnId:new Map(t.messageToTurnId),messageToTurnIndex:new Map(t.messageToTurnIndex),turnCount:t.turnCount}),GN=(t,e,o)=>{if(!t||!e)return null;if(e.length===o.length){let u=-1;for(let f=0;f<o.length;f+=1)if(e[f]!==o[f]){if(u!==-1)return null;u=f}return u===-1?t:u!==o.length-1?null:x8(e[u])===x8(o[u])?t:null}if(o.length!==e.length+1)return null;for(let u=0;u<e.length;u+=1)if(e[u]!==o[u])return null;const n=o[o.length-1];if(!n)return null;const s=q4(n),r=n.info.id,i=WN(t);if(s==="user"){const u=i.turnIds.length;return i.turnIds.push(r),i.turnMessageStartIndexes.push(o.length-1),i.turnIndexById.set(r,u),i.messageToTurnId.set(r,r),i.messageToTurnIndex.set(r,u),i.turnCount=i.turnIds.length,i}if(s!=="assistant"){const u=i.turnIds.length-1;if(u<0)return null;const f=i.turnIds[u];return f?(i.messageToTurnId.set(r,f),i.messageToTurnIndex.set(r,u),i):null}const l=W4(n);if(!l)return i;const c=i.turnIndexById.get(l);if(typeof c!="number"||c<0)return null;const d=i.turnIds[c];return d?(i.messageToTurnId.set(r,d),i.messageToTurnIndex.set(r,c),i):null},KN=t=>{const e=[],o=[],n=new Map,s=new Map,r=new Map,i=new Map;let l=-1;return t.forEach((c,d)=>{const u=q4(c),f=c.info.id;if(u==="user"){l=e.length,e.push(f),o.push(d),n.set(f,l),i.set(f,l),s.set(f,f),r.set(f,l);return}if(u!=="assistant"){if(l>=0){const v=e[l];v&&(s.set(f,v),r.set(f,l))}return}const m=W4(c);if(!m)return;const h=i.get(m);if(typeof h!="number"||h<0)return;const p=e[h];p&&(s.set(f,p),r.set(f,h))}),{turnIds:e,turnMessageStartIndexes:o,turnIndexById:n,messageToTurnId:s,messageToTurnIndex:r,turnCount:e.length}},ai=(t,e=R9.initialTurns)=>t<=0?0:t>e?t-e:0,C8=(t,e)=>e<=0||t<=0?0:Math.min(t,e-1),YN=(t,e)=>{if(e<=0)return 0;const o=t.turnMessageStartIndexes[e];return typeof o=="number"?o:0},JN=(t,e,o)=>{const n=YN(e,o);return n<=0?t:t.slice(n)},d2=200,S8={MAX_SESSIONS:3,ZOMBIE_TIMEOUT:600*1e3},om=()=>d2,QN=()=>Math.round(om()*.6),nm={MAX_SESSIONS:S8.MAX_SESSIONS,VIEWPORT_MESSAGES:Math.round(d2*.6),HISTORICAL_MESSAGES:d2,FETCH_BUFFER:20,HISTORY_CHUNK:d2,STREAMING_BUFFER:1/0,ZOMBIE_TIMEOUT:S8.ZOMBIE_TIMEOUT},k8=()=>{const t=om(),e=QN();return{...nm,HISTORICAL_MESSAGES:t,VIEWPORT_MESSAGES:e,HISTORY_CHUNK:t}},FZ=nm,XN=30,h1=new Map,eR=({sessionId:t,messages:e,historyMeta:o,scrollRef:n,messageListRef:s,loadMoreMessages:r,goToBottom:i,releaseAutoFollow:l,isPinned:c,showScrollButton:d})=>{const u=g.useRef(null),f=g.useRef(null),m=g.useMemo(()=>{const K=t??"",re=K?h1.get(K):void 0;if(re&&re.messages===e)return u.current=re.model,f.current=e,re.model;const W=GN(u.current,f.current,e)??KN(e);if(u.current=W,f.current=e,K&&e.length>0){if(h1.size>=XN){const J=h1.keys().next().value;J!==void 0&&h1.delete(J)}h1.set(K,{messages:e,model:W})}return W},[e,t]),[h,p]=g.useState(()=>ai(m.turnCount)),[v,b]=g.useState(!1),[y,w]=g.useState(!1),[S,C]=g.useState(null),x=g.useRef(m),_=g.useRef(h),k=g.useRef(c),D=g.useRef(v),F=g.useRef(y),A=g.useRef(t),B=g.useRef(e),M=g.useRef(o),H=g.useRef(m.turnCount),P=g.useRef(null),T=g.useRef([]),E=g.useRef(null),O=g.useMemo(()=>{const K=k8().HISTORICAL_MESSAGES,re=h>0,Q=o?!o.complete:e.length>=K,W=!!o?.loading;return{hasBufferedTurns:re,hasMoreAboveTurns:Q,historyLoading:W,canLoadEarlier:re||Q}},[o,e.length,h]),L=g.useRef(O);x.current=m,_.current=h,k.current=c,D.current=v,F.current=y,L.current=O,A.current=t,B.current=e,M.current=o,g.useLayoutEffect(()=>{P.current!==t&&(P.current=t,p(ai(m.turnCount)),b(!1),w(!1),C(null),H.current=m.turnCount)},[t,m.turnCount]),g.useLayoutEffect(()=>{p(K=>C8(K,m.turnCount))},[m.turnCount]),g.useLayoutEffect(()=>{const K=H.current,re=m.turnCount;K!==re&&(p(Q=>{const W=ai(K),J=ai(re);return k.current&&Q===W?J:C8(Q,re)}),H.current=re)},[m.turnCount]);const Z=g.useCallback(()=>{const K=T.current;K.length!==0&&(T.current=[],K.forEach(re=>re()))},[]),oe=g.useCallback(()=>new Promise(K=>{T.current.push(K)}),[]),V=g.useCallback(K=>{const re=E.current;re&&(E.current=null,re.resolve(K))},[]),$=g.useCallback(()=>{const K=E.current;if(!K)return;if(K.sessionId!==A.current){V(!1);return}if(K.kind==="turn"?s.current?.scrollToTurnId(K.id,{behavior:K.behavior})??!1:s.current?.scrollToMessageId(K.id,{behavior:K.behavior})??!1){K.turnId&&C(K.turnId),V(!0);return}const Q=K.kind==="turn"?x.current.turnIndexById.get(K.id):x.current.messageToTurnIndex.get(K.id);typeof Q=="number"&&Q>=_.current&&V(!1)},[s,V]);g.useEffect(()=>()=>{Z(),V(!1)},[Z,V]);const N=g.useMemo(()=>JN(e,m,h),[e,h,m]);g.useLayoutEffect(()=>{Z(),$()},[$,N,Z,h]);const ee=g.useRef(null),z=g.useCallback(()=>s.current?.captureViewportAnchor()??null,[s]),q=g.useCallback(K=>s.current?.restoreViewportAnchor(K)??!1,[s]);g.useLayoutEffect(()=>{const K=ee.current,re=n.current;if(!K||!re||(ee.current=null,K.anchor&&q(K.anchor)))return;const Q=re.scrollHeight-K.height;Q>0&&(re.scrollTop=K.top+Q)},[N,n,q]);const ae=g.useCallback(async()=>{if(_.current<=0||F.current)return!1;const K=n.current;return K&&(ee.current={height:K.scrollHeight,top:K.scrollTop,anchor:z()}),w(!0),p(re=>{const Q=re-R9.batchTurns;return Q>0?Q:0}),await oe(),w(!1),!0},[z,n,oe]),R=g.useCallback(async K=>{if(!A.current||D.current||!L.current.hasMoreAboveTurns)return!1;const re=n.current,Q=B.current,W=Q.length,J=Q[0]?.info?.id??null,j=M.current?.limit??k8().HISTORICAL_MESSAGES;K.preserveViewport&&re&&(ee.current={height:re.scrollHeight,top:re.scrollTop,anchor:z()}),b(!0);try{const se=A.current;if(!se)return!1;await r(se,"up");const ne=B.current,le=ne.length,he=ne[0]?.info?.id??null,be=M.current?.limit??j;return le>W||typeof J=="string"&&typeof he=="string"&&J!==he||be>j}finally{b(!1)}},[z,r,n]),we=g.useCallback(async()=>{await ae()||await R({preserveViewport:!0})},[R,ae]),ve=g.useCallback(async(K,re)=>{if(!K||!A.current)return!1;l(),w(!0);try{if(A.current!==t)return!1;const Q=x.current.turnIndexById.get(K);return typeof Q!="number"?!1:(Q<_.current&&p(Q),!!await new Promise(J=>{E.current={sessionId:A.current??t??"",kind:"turn",id:K,behavior:re?.behavior??"auto",turnId:K,resolve:J},$()}))}finally{w(!1)}},[$,l,t]),Ce=g.useCallback(async(K,re)=>{if(!K||!A.current)return!1;l(),w(!0);try{if(A.current!==t)return!1;const Q=x.current.messageToTurnId.get(K),W=x.current.messageToTurnIndex.get(K);return typeof W!="number"?!1:(W<_.current&&p(W),!!await new Promise(j=>{E.current={sessionId:A.current??t??"",kind:"message",id:K,behavior:re?.behavior??"auto",turnId:Q??null,resolve:j},$()}))}finally{w(!1)}},[$,l,t]),Pe=g.useCallback(async()=>{const K=ai(x.current.turnCount);w(!1),b(!1),K!==_.current&&(p(K),await oe()),i("smooth")},[i,oe]),De=g.useCallback(async()=>{const K=ai(x.current.turnCount);w(!1),b(!1),K!==_.current&&(p(K),await oe()),i("instant")},[i,oe]),pe=g.useCallback(K=>{C(K)},[]);return{turnIds:m.turnIds,turnStart:h,renderedMessages:N,historySignals:O,isLoadingOlder:v,pendingRevealWork:y,activeTurnId:S,showScrollToBottom:d&&!y,turnWindowModel:m,loadEarlier:we,revealBufferedTurns:ae,resumeToBottom:Pe,resumeToBottomInstant:De,scrollToTurn:ve,scrollToMessage:Ce,captureViewportAnchor:z,restoreViewportAnchor:q,handleActiveTurnChange:pe}},tR=({open:t,onOpenChange:e,onScrollToMessage:o,onScrollByTurnOffset:n,onResumeToLatest:s})=>{const{t:r}=ft(),i=Te(A=>A.currentSessionId),l=na(i??""),c=Te(A=>A.revertToMessage),d=Te(A=>A.forkFromMessage),{isMobile:u,isTablet:f}=Lr(),m=u||f,[h,p]=g.useState(null),[v,b]=g.useState(""),[y,w]=g.useState(0),S=g.useRef([]),C=g.useCallback(A=>{const M=Date.now()-A,H=Math.floor(M/1e3),P=Math.floor(H/60),T=Math.floor(P/60),E=Math.floor(T/24);return H<60?r("chat.timeline.relative.justNow"):P<60?r("chat.timeline.relative.minutesAgo",{count:P}):T<24?r("chat.timeline.relative.hoursAgo",{count:T}):E<7?r("chat.timeline.relative.daysAgo",{count:E}):new Date(A).toLocaleDateString()},[r]),x=g.useMemo(()=>l.filter(A=>A.info.role==="user").map((A,B)=>({message:A,messageNumber:B+1})).reverse(),[l]),_=g.useMemo(()=>{const A=v.trim();if(!A)return x;const B=A.toLowerCase();return x.filter(({message:M})=>$c(M.parts).toLowerCase().includes(B))},[x,v]);g.useEffect(()=>{w(0)},[_]),g.useEffect(()=>{S.current=S.current.slice(0,_.length)},[_.length]),g.useEffect(()=>{S.current[y]?.scrollIntoView({block:"nearest"})},[y]);const k=g.useCallback(async A=>{await o?.(A)!==!1&&e(!1)},[e,o]),D=g.useCallback(A=>{const B=_.length;if(B!==0){if(A.key==="ArrowDown"){A.preventDefault(),w(M=>(M+1)%B);return}if(A.key==="ArrowUp"){A.preventDefault(),w(M=>(M-1+B)%B);return}if(A.key==="Enter"){A.preventDefault();const M=(y%B+B)%B,H=_[M];H&&k(H.message.info.id)}}},[_,k,y]),F=async A=>{if(i){p(A);try{await d(i,A),e(!1)}finally{p(null)}}};return i?a.jsx(ar,{open:t,onOpenChange:e,children:a.jsxs(lr,{className:"max-w-2xl max-h-[70vh] flex flex-col",children:[a.jsxs(cr,{children:[a.jsxs(dr,{className:"flex items-center gap-2",children:[a.jsx(G,{name:"time",className:"h-5 w-5"}),r("chat.timeline.title")]}),a.jsx(Ir,{children:r("chat.timeline.description")})]}),a.jsxs("div",{className:"relative mt-2",children:[a.jsx(G,{name:"search",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(Fn,{autoFocus:!0,placeholder:r("chat.timeline.searchPlaceholder"),value:v,onChange:A=>b(A.target.value),onKeyDown:D,className:"pl-9 w-full"})]}),a.jsx("div",{className:"flex-1 overflow-y-auto",children:_.length===0?a.jsx("div",{className:"text-center text-muted-foreground py-8",children:r(v?"chat.timeline.empty.search":"chat.timeline.empty.session")}):_.map(({message:A,messageNumber:B},M)=>{const H=oR(A.parts),P=A.info.time.created,T=C(P),E=M===y,O=v.trim()?nR($c(A.parts),v):null;return a.jsxs("div",{ref:L=>{S.current[M]=L},className:U("group flex items-center gap-2 py-1.5 hover:bg-interactive-hover/30 rounded transition-colors cursor-pointer",E&&"bg-interactive-selection text-interactive-selection-foreground"),onClick:()=>{k(A.info.id)},onMouseEnter:()=>w(M),children:[a.jsxs("span",{className:U("typography-meta w-5 text-right flex-shrink-0",E?"text-interactive-selection-foreground/70":"text-muted-foreground"),children:[B,"."]}),a.jsxs("p",{className:U("flex-1 min-w-0 typography-small truncate ml-0.5",E?"text-interactive-selection-foreground":"text-foreground"),children:[O??(H||r("chat.timeline.noTextContent")),!O&&H&&H.length>=80&&"…"]}),a.jsxs("div",{className:"flex-shrink-0 h-5 flex items-center mr-2",children:[a.jsx("span",{className:U("typography-meta whitespace-nowrap",E?"text-interactive-selection-foreground/70":"text-muted-foreground",m?"hidden":"group-hover:hidden"),children:T}),a.jsxs("div",{className:U("gap-1",m?"flex":"hidden group-hover:flex"),children:[a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx("button",{type:"button",className:"h-5 w-5 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors",onClick:async L=>{L.stopPropagation(),await c(i,A.info.id),e(!1)},children:a.jsx(G,{name:"arrow-go-back",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:r("chat.timeline.actions.revertFromHere")})]}),a.jsxs(no,{children:[a.jsx(so,{asChild:!0,children:a.jsx("button",{type:"button",className:"h-5 w-5 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",onClick:L=>{L.stopPropagation(),F(A.info.id)},disabled:h===A.info.id,children:h===A.info.id?a.jsx(G,{name:"loader-4",className:"h-4 w-4 animate-spin"}):a.jsx(G,{name:"git-branch",className:"h-4 w-4"})})}),a.jsx(eo,{sideOffset:6,children:r("chat.timeline.actions.forkFromHere")})]})]})]})]},A.info.id)})}),a.jsxs("div",{className:"mt-4 p-3 bg-muted/30 rounded-lg",children:[a.jsx("p",{className:"typography-meta text-muted-foreground font-medium mb-2",children:r("chat.timeline.actions.title")}),a.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[a.jsx("button",{type:"button",className:"text-[11px] uppercase tracking-wide text-muted-foreground/90 hover:text-foreground",onClick:()=>{n?.(-1),e(!1)},children:r("chat.timeline.actions.previousTurn")}),a.jsx("span",{className:"text-muted-foreground/50",children:"/"}),a.jsx("button",{type:"button",className:"text-[11px] uppercase tracking-wide text-muted-foreground/90 hover:text-foreground",onClick:()=>{s?.(),e(!1)},children:r("chat.timeline.actions.latest")})]}),a.jsxs("div",{className:"flex flex-col gap-1.5 typography-meta text-muted-foreground",children:[a.jsx("div",{className:"flex items-center gap-2",children:a.jsx("span",{children:r("chat.timeline.help.clickMessage")})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{name:"arrow-go-back",className:"h-4 w-4 flex-shrink-0"}),a.jsx("span",{children:r("chat.timeline.help.undoToPoint")})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{name:"git-branch",className:"h-4 w-4 flex-shrink-0"}),a.jsx("span",{children:r("chat.timeline.help.createSessionFromHere")})]})]})]})]})}):null};function $c(t){return t.filter(e=>e.type==="text"&&typeof e.text=="string").map(e=>e.text).join(`
|
|
6964
|
-
`)}function oR(t){const o=$c(t).replace(/\n/g," ");return o.length>80?o.slice(0,80):o}function nR(t,e,o=30){const n=t.toLowerCase(),s=e.toLowerCase(),r=n.indexOf(s);if(r===-1)return null;const i=Math.max(0,r-o),l=Math.min(t.length,r+e.length+o);return`${i>0?"…":""}${t.slice(i,l).replace(/\n/g," ")}${l<t.length?"…":""}`}const sR=t=>{const e=t.startsWith("#")?t.slice(1):t;if(!e)return null;const o=e.match(/^turn-(.+)$/);if(o?.[1])return{kind:"turn",id:o[1]};const n=e.match(/^message-(.+)$/);return n?.[1]?{kind:"message",id:n[1]}:null},rR=(t,e,o)=>{if(o===0)return{kind:"noop"};if(t.length===0)return{kind:"noop"};const n=e?t.indexOf(e):t.length-1,r=(n>=0?n:t.length-1)+o;if(r>=t.length)return{kind:"resume"};const i=Math.max(0,r),l=t[i];return l?{kind:"turn",turnId:l}:{kind:"noop"}},Ya=t=>{if(typeof window>"u")return;const e=t?`#${t}`:"",o=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState(window.history.state,"",o)},iR=t=>{const e=de.c(29),{sessionId:o,turnIds:n,activeTurnId:s,scrollToTurn:r,scrollToMessage:i,resumeToBottom:l}=t,c=g.useRef(n),d=g.useRef(s);let u,f;e[0]!==n?(u=()=>{c.current=n},f=[n],e[0]=n,e[1]=u,e[2]=f):(u=e[1],f=e[2]),g.useEffect(u,f);let m,h;e[3]!==s?(m=()=>{d.current=s},h=[s],e[3]=s,e[4]=m,e[5]=h):(m=e[4],h=e[5]),g.useEffect(m,h);let p;e[6]!==r?(p=async(F,A)=>F?(A?.updateHash!==!1&&Ya(`turn-${F}`),r(F,{behavior:A?.behavior})):!1,e[6]=r,e[7]=p):p=e[7];const v=p;let b;e[8]!==i?(b=async(F,A)=>F?(A?.updateHash!==!1&&Ya(`message-${F}`),i(F,{behavior:A?.behavior})):!1,e[8]=i,e[9]=b):b=e[9];const y=b;let w;e[10]!==l||e[11]!==v?(w=async(F,A)=>{const B=c.current,M=rR(B,d.current,F);if(M.kind==="noop")return F===0;if(M.kind==="resume"){if(A?.resumePastEnd===!1){const H=B[B.length-1];return H?v(H,{behavior:"auto"}):!1}return Ya(null),l(),!0}return v(M.turnId,{behavior:"auto"})},e[10]=l,e[11]=v,e[12]=w):w=e[12];const S=w;let C;e[13]!==l?(C=()=>{Ya(null),l()},e[13]=l,e[14]=C):C=e[14];const x=C;let _;e[15]!==y||e[16]!==v||e[17]!==o?(_=()=>{if(!o||typeof window>"u")return;const F=()=>{const A=sR(window.location.hash);if(A){if(A.kind==="turn"){v(A.id,{behavior:"auto",updateHash:!1});return}y(A.id,{behavior:"auto",updateHash:!1})}};return F(),window.addEventListener("hashchange",F),()=>{window.removeEventListener("hashchange",F)}},e[15]=y,e[16]=v,e[17]=o,e[18]=_):_=e[18];let k;e[19]!==y||e[20]!==v||e[21]!==o||e[22]!==n.length?(k=[o,y,v,n.length],e[19]=y,e[20]=v,e[21]=o,e[22]=n.length,e[23]=k):k=e[23],g.useEffect(_,k);let D;return e[24]!==x||e[25]!==S||e[26]!==y||e[27]!==v?(D={scrollToTurnId:v,scrollToMessageId:y,scrollByTurnOffset:S,resumeToLatest:x},e[24]=x,e[25]=S,e[26]=y,e[27]=v,e[28]=D):D=e[28],D},aR=(t,e)=>{if(!e)return[];if(!Array.isArray(t)||t.length===0)return[e];if(!t.find(i=>i.id===e))return[e];const n=new Map;for(const i of t){if(!i.parentID)continue;const l=n.get(i.parentID)??[];l.push(i.id),n.set(i.parentID,l)}const s=[e],r=new Set(s);for(const i of s){const l=n.get(i)??[];for(const c of l)r.has(c)||(r.add(c),s.push(c))}return s},M8=(t,e)=>{if(e.length===0)return[];const o=new Set,n=[];for(const s of e){const r=t.get(s);if(!(!r||r.length===0))for(const i of r)o.has(i.id)||(o.add(i.id),n.push(i))}return n},lR=(t,e)=>{const o=de.c(8),n=Bu(cR),s=Te(dR),r=Te(uR),i=n0(t,e);let l,c;o[0]!==e||o[1]!==r||o[2]!==s||o[3]!==i||o[4]!==n||o[5]!==t?(l=()=>{if(n&&t&&!r(t))for(const d of i){if(d.role!=="assistant")continue;const u=Wn(d.id,e);for(const f of u){if(f.type!=="text")continue;const m=f.text||"";if(m.includes("The plan at ")||m.includes("User has requested to enter plan mode")){s(t);return}}}},c=[n,t,e,i,s,r],o[0]=e,o[1]=r,o[2]=s,o[3]=i,o[4]=n,o[5]=t,o[6]=l,o[7]=c):(l=o[6],c=o[7]),g.useEffect(l,c)};function cR(t){return t.planModeEnabled}function dR(t){return t.markSessionPlanAvailable}function uR(t){return t.isSessionPlanAvailable}const fR=[],mR=[],hR=[],pR={type:"idle"},A8="vinci:chat-force-scroll-bottom",gR="Quota limit reached. Retrying automatically.",sm={overflowAnchor:"none",overscrollBehavior:"contain",overscrollBehaviorY:"contain"},vR=["a[href]","button","input","select","textarea",'[contenteditable="true"]','[role="button"]','[role="combobox"]','[role="dialog"]','[role="listbox"]','[role="menu"]','[role="menuitem"]','[role="option"]','[role="textbox"]',"[data-radix-popper-content-wrapper]"].join(","),bR=t=>t instanceof HTMLElement,G4=t=>bR(t)?!!t.closest(vR):!1,yR=(t,e)=>typeof document>"u"||!t||t===document.body||t===document.documentElement||G4(t)?!0:!e?.contains(t),wR=()=>{const{isAboutDialogOpen:t,isCommandPaletteOpen:e,isHelpDialogOpen:o,isImagePreviewOpen:n,isMultiRunLauncherOpen:s,isSessionSwitcherOpen:r,isSettingsDialogOpen:i}=Me.getState();return t||e||o||n||s||r||i},rm=g.memo(t=>{const e=de.c(46),{currentSessionId:o,isDesktopExpandedInput:n,isMobile:s,stickyUserHeader:r,scrollRef:i,messageListRef:l,turnStart:c,pendingRevealWork:d,renderedMessages:u,hasMoreAboveTurns:f,isLoadingOlder:m,sessionIsWorking:h,streamingMessageId:p,activeStreamingPhase:v,retryOverlay:b,handleMessageContentChange:y,getAnimationHandlers:w,handleLoadOlder:S,scrollToBottom:C,sessionQuestions:x,sessionPermissions:_,isProgrammaticFollowActive:k}=t;let D;e[0]!==i?(D=N=>{N.defaultPrevented||G4(N.target)||typeof window<"u"&&window.getSelection()?.type==="Range"||i.current?.focus({preventScroll:!0})},e[0]=i,e[1]=D):D=e[1];const F=D,A=n?"absolute inset-0 opacity-0 pointer-events-none":"flex-1";let B;e[2]!==A?(B=U("relative min-h-0",A),e[2]=A,e[3]=B):B=e[3];const M=s&&r;let H;e[4]!==v||e[5]!==o||e[6]!==w||e[7]!==S||e[8]!==y||e[9]!==f||e[10]!==m||e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==b||e[15]!==i||e[16]!==C||e[17]!==h||e[18]!==p||e[19]!==c?(H=a.jsx(lN,{ref:l,sessionKey:o,turnStart:c,disableStaging:d,messages:u,sessionIsWorking:h,activeStreamingMessageId:p,activeStreamingPhase:v,retryOverlay:b,onMessageContentChange:y,getAnimationHandlers:w,hasMoreAbove:f,isLoadingOlder:m,onLoadOlder:S,scrollToBottom:C,scrollRef:i}),e[4]=v,e[5]=o,e[6]=w,e[7]=S,e[8]=y,e[9]=f,e[10]=m,e[11]=l,e[12]=d,e[13]=u,e[14]=b,e[15]=i,e[16]=C,e[17]=h,e[18]=p,e[19]=c,e[20]=H):H=e[20];let P;e[21]!==_||e[22]!==x?(P=(x.length>0||_.length>0)&&a.jsxs("div",{children:[x.map(CR),_.map(SR)]}),e[21]=_,e[22]=x,e[23]=P):P=e[23];let T;e[24]===Symbol.for("react.memo_cache_sentinel")?(T=a.jsx("div",{className:"mb-3",children:a.jsx(em,{})}),e[24]=T):T=e[24];const E=s?"40px":"10vh";let O;e[25]!==E?(O=a.jsx("div",{className:"flex-shrink-0",style:{height:E},"aria-hidden":"true"}),e[25]=E,e[26]=O):O=e[26];let L;e[27]!==H||e[28]!==P||e[29]!==O?(L=a.jsxs("div",{className:"relative z-0 min-h-full",children:[H,P,T,O]}),e[27]=H,e[28]=P,e[29]=O,e[30]=L):L=e[30];let Z;e[31]!==F||e[32]!==i||e[33]!==L||e[34]!==M?(Z=a.jsx(i0,{className:"absolute inset-0 overflow-y-auto overflow-x-hidden z-0 chat-scroll overlay-scrollbar-target",ref:i,style:sm,observeMutations:!1,hideTopShadow:M,tabIndex:0,onClick:F,"data-scroll-shadow":"true","data-scrollbar":"chat",children:L}),e[31]=F,e[32]=i,e[33]=L,e[34]=M,e[35]=Z):Z=e[35];let oe;e[36]!==k||e[37]!==i?(oe=a.jsx(Pu,{containerRef:i,suppressVisibility:k,userIntentOnly:!0,observeMutations:!1}),e[36]=k,e[37]=i,e[38]=oe):oe=e[38];let V;e[39]!==Z||e[40]!==oe?(V=a.jsxs("div",{className:"absolute inset-0",children:[Z,oe]}),e[39]=Z,e[40]=oe,e[41]=V):V=e[41];let $;return e[42]!==n||e[43]!==V||e[44]!==B?($=a.jsx("div",{className:B,"aria-hidden":n,children:V}),e[42]=n,e[43]=V,e[44]=B,e[45]=$):$=e[45],$},(t,e)=>t.currentSessionId===e.currentSessionId&&t.isDesktopExpandedInput===e.isDesktopExpandedInput&&t.isMobile===e.isMobile&&t.stickyUserHeader===e.stickyUserHeader&&t.scrollRef===e.scrollRef&&t.messageListRef===e.messageListRef&&t.turnStart===e.turnStart&&t.pendingRevealWork===e.pendingRevealWork&&t.renderedMessages===e.renderedMessages&&t.hasMoreAboveTurns===e.hasMoreAboveTurns&&t.isLoadingOlder===e.isLoadingOlder&&t.sessionIsWorking===e.sessionIsWorking&&t.streamingMessageId===e.streamingMessageId&&t.activeStreamingPhase===e.activeStreamingPhase&&t.retryOverlay===e.retryOverlay&&t.handleMessageContentChange===e.handleMessageContentChange&&t.getAnimationHandlers===e.getAnimationHandlers&&t.handleLoadOlder===e.handleLoadOlder&&t.scrollToBottom===e.scrollToBottom&&t.sessionQuestions===e.sessionQuestions&&t.sessionPermissions===e.sessionPermissions&&t.isProgrammaticFollowActive===e.isProgrammaticFollowActive);rm.displayName="ChatViewport";const xR=[{id:1,toolRows:[{id:"search",titleWidth:"w-24",detailWidth:"w-52"},{id:"read",titleWidth:"w-20",detailWidth:"w-36"},{id:"edit",titleWidth:"w-24",detailWidth:"w-64"}],textWidths:["w-24","w-[92%]","w-[78%]"]},{id:2,toolRows:[{id:"read",titleWidth:"w-20",detailWidth:"w-40"},{id:"search",titleWidth:"w-24",detailWidth:"w-48"}],textWidths:["w-20","w-[88%]","w-[70%]"]},{id:3,toolRows:[{id:"shell",titleWidth:"w-28",detailWidth:"w-44"},{id:"edit",titleWidth:"w-24",detailWidth:"w-56"}],textWidths:["w-24","w-[84%]","w-[64%]"]}],Ja=()=>{const t=de.c(4),{t:e}=ft();let o;t[0]!==e?(o=e("chat.container.readOnlySubagentPromptBanner"),t[0]=e,t[1]=o):o=t[1];let n;return t[2]!==o?(n=a.jsx("div",{className:"p-3",children:a.jsx("div",{className:"rounded-2xl border border-border/70 bg-[var(--surface-background)] px-4 py-3 typography-ui-label text-muted-foreground",children:o})}),t[2]=o,t[3]=n):n=t[3],n},_Z=t=>{const e=de.c(229),{autoOpenDraft:o,readOnly:n}=t,s=o===void 0?!0:o,r=n===void 0?!1:n,{t:i}=ft(),l=Te(kR),c=Te(MR),d=Te(AR),u=Te(FR),f=f0();let m;e[0]!==f?(m=$e=>f.ensureSessionRenderable($e),e[0]=f,e[1]=m):m=e[1];const h=m;let p;e[2]!==f?(p=($e,tt)=>f.loadMore($e),e[2]=f,e[3]=p):p=e[3];const v=p,b=Me(_R),y=Me(BR),w=Me(DR),S=Me(PR);let C;e[4]!==l?(C=$e=>l?$e.streamingMessageIds.get(l)??null:null,e[4]=l,e[5]=C):C=e[5];const x=Ii(C);let _;e[6]!==x?(_=$e=>x?$e.messageStreamStates.get(x)?.phase??null:null,e[6]=x,e[7]=_):_=e[7];const k=Ii(_),D=Hw(l??"");let F;e[8]!==l?(F=$e=>l?ji($e,l).renderable:!1,e[8]=l,e[9]=F):F=e[9];const A=Qo(F),B=na(l??""),M=l?B:fR,H=ur();lR(l??"");const P=u4(l??"")??pR,T=Qo(TR),E=Qo(HR);let O;if(e[10]!==T){O=new Map;for(const[$e,tt]of Object.entries(T))O.set($e,tt);e[10]=T,e[11]=O}else O=e[11];const L=O;let Z;if(e[12]!==E){Z=new Map;for(const[$e,tt]of Object.entries(E))Z.set($e,tt);e[12]=E,e[13]=Z}else Z=e[13];const oe=Z;let V;e[14]!==l||e[15]!==H?(V=aR(H.map(IR),l),e[14]=l,e[15]=H,e[16]=V):V=e[16];const $=V;let N;e:{if($.length===0){N=mR;break e}let $e;e[17]!==L||e[18]!==$?($e=M8(L,$),e[17]=L,e[18]=$,e[19]=$e):$e=e[19],N=$e}const ee=N;let z;e:{if($.length===0){z=hR;break e}let $e;e[20]!==oe||e[21]!==$?($e=M8(oe,$),e[20]=oe,e[21]=$,e[22]=$e):$e=e[22],z=$e}const q=z;let ae;e:{if(!l||ee.length>0||q.length>0){ae=!1;break e}const $e=P.type??"idle";if($e==="busy"||$e==="retry"){ae=!0;break e}const tt=M[M.length-1]?.info;ae=!!(tt&&tt.role==="assistant"&&typeof tt.time?.completed!="number")}const R=ae;let we;e:{if(!l||P.type!=="retry"){we=null;break e}let $e;e[23]!==P?($e=typeof P.message=="string"?(P.message??"").trim():"",e[23]=P,e[24]=$e):$e=e[24];const fe=$e||gR,Ie=P;let ue;e[25]!==l||e[26]!==fe||e[27]!==Ie.confirmedAt?(ue={sessionId:l,message:fe,confirmedAt:Ie.confirmedAt},e[25]=l,e[26]=fe,e[27]=Ie.confirmedAt,e[28]=ue):ue=e[28],we=ue}const ve=we,[Ce,Pe]=g.useState(0),De=g.useRef(null);let pe,K;e[29]!==ve?(pe=()=>{if(!ve||typeof ve.confirmedAt=="number"){De.current=null,Pe(0);return}De.current!==ve.sessionId&&(De.current=ve.sessionId,Pe(Date.now()))},K=[ve],e[29]=ve,e[30]=pe,e[31]=K):(pe=e[30],K=e[31]),g.useEffect(pe,K);let re;e:{if(!ve){re=null;break e}let $e;e[32]!==ve||e[33]!==Ce?($e={...ve,fallbackTimestamp:Ce},e[32]=ve,e[33]=Ce,e[34]=$e):$e=e[34],re=$e}const Q=re;let W;e:{if(!l){W=null;break e}const $e=M.length;let tt;e[35]!==l||e[36]!==f?(tt=f.hasMore(l),e[35]=l,e[36]=f,e[37]=tt):tt=e[37];const fe=!tt;let Ie;e[38]!==l||e[39]!==f?(Ie=f.isLoading(l),e[38]=l,e[39]=f,e[40]=Ie):Ie=e[40];let ue;e[41]!==M.length||e[42]!==fe||e[43]!==Ie?(ue={limit:$e,complete:fe,loading:Ie},e[41]=M.length,e[42]=fe,e[43]=Ie,e[44]=ue):ue=e[44],W=ue}const J=W,{isMobile:j}=Lr(),se=!!u?.open,ne=b&&!j,le=g.useRef(null);let he;e:{if(!l){he=null;break e}let $e;if(e[45]!==l||e[46]!==H){let ue;e[48]!==l?(ue=ke=>ke.id===l,e[48]=l,e[49]=ue):ue=e[49],$e=H.find(ue),e[45]=l,e[46]=H,e[47]=$e}else $e=e[47];const fe=$e?.parentID;if(!fe){he=null;break e}let Ie;e[50]!==fe||e[51]!==H?(Ie=H.find(ue=>ue.id===fe)??ir().find(ue=>ue.id===fe)??null,e[50]=fe,e[51]=H,e[52]=Ie):Ie=e[52],he=Ie}const be=he;let ce;e[53]!==be||e[54]!==d?(ce=()=>{if(!be)return;const $e=be.directory??null;d(be.id,$e)},e[53]=be,e[54]=d,e[55]=ce):ce=e[55];const ye=ce;let _e;e[56]!==ye||e[57]!==be||e[58]!==i?(_e=be?a.jsxs(yt,{type:"button",variant:"outline",size:"xs",onClick:ye,className:"absolute left-3 top-3 z-20 !font-normal bg-[var(--surface-background)]/95","aria-label":i("chat.container.returnToParent.aria"),title:be.title?.trim()?i("chat.container.returnToParent.titleNamed",{title:be.title}):i("chat.container.returnToParent.title"),children:[a.jsx(G,{name:"arrow-left",className:"h-4 w-4"}),i("chat.container.returnToParent.label")]}):null,e[56]=ye,e[57]=be,e[58]=i,e[59]=_e):_e=e[59];const te=_e,xe=r||!!be;let Fe,X;e[60]!==s||e[61]!==l||e[62]!==se||e[63]!==c?(Fe=()=>{s&&!l&&!se&&c()},X=[s,l,se,c],e[60]=s,e[61]=l,e[62]=se,e[63]=c,e[64]=Fe,e[65]=X):(Fe=e[64],X=e[65]),g.useEffect(Fe,X);const me=g.useRef(ER);let Ae;e[66]===Symbol.for("react.memo_cache_sentinel")?(Ae=$e=>{me.current($e)},e[66]=Ae):Ae=e[66];const qe=Ae;let ze;e[67]!==l||e[68]!==j||e[69]!==R||e[70]!==D?(ze={currentSessionId:l,sessionMessageCount:D,sessionIsWorking:R,isMobile:j,onActiveTurnChange:qe},e[67]=l,e[68]=j,e[69]=R,e[70]=D,e[71]=ze):ze=e[71];const{scrollRef:Oe,notifyContentChange:Xe,getAnimationHandlers:mt,goToBottom:Ge,releaseAutoFollow:ot,restoreSnapshot:ct,isPinned:Ft,isFollowingProgrammatically:Le,showScrollButton:Ye}=qN(ze),gt=M;let wt;e[72]!==l||e[73]!==Ge||e[74]!==J||e[75]!==Ft||e[76]!==v||e[77]!==ot||e[78]!==Oe||e[79]!==Ye||e[80]!==gt?(wt={sessionId:l,messages:gt,historyMeta:J,scrollRef:Oe,messageListRef:le,loadMoreMessages:v,goToBottom:Ge,releaseAutoFollow:ot,isPinned:Ft,showScrollButton:Ye},e[72]=l,e[73]=Ge,e[74]=J,e[75]=Ft,e[76]=v,e[77]=ot,e[78]=Oe,e[79]=Ye,e[80]=gt,e[81]=wt):wt=e[81];const et=eR(wt),{loadEarlier:Pt}=et;let st;e[82]!==Ge?(st=()=>{Ge("instant")},e[82]=Ge,e[83]=st):st=e[83];const At=st;let Dt,Wt;e[84]!==et.handleActiveTurnChange?(Dt=()=>{me.current=et.handleActiveTurnChange},Wt=[et.handleActiveTurnChange],e[84]=et.handleActiveTurnChange,e[85]=Dt,e[86]=Wt):(Dt=e[85],Wt=e[86]),g.useEffect(Dt,Wt);let Zt;e[87]!==Xe||e[88]!==ee.length||e[89]!==q.length?(Zt=()=>{ee.length===0&&q.length===0||Xe("permission")},e[87]=Xe,e[88]=ee.length,e[89]=q.length,e[90]=Zt):Zt=e[90];let fo;e[91]!==Xe||e[92]!==ee||e[93]!==q?(fo=[Xe,ee,q],e[91]=Xe,e[92]=ee,e[93]=q,e[94]=fo):fo=e[94],g.useEffect(Zt,fo);let Eo;e[95]!==Pt?(Eo=()=>{Pt()},e[95]=Pt,e[96]=Eo):Eo=e[96];const Gt=Eo;let Et;e[97]!==l||e[98]!==et.activeTurnId||e[99]!==et.resumeToBottomInstant||e[100]!==et.scrollToMessage||e[101]!==et.scrollToTurn||e[102]!==et.turnIds?(Et={sessionId:l,turnIds:et.turnIds,activeTurnId:et.activeTurnId,scrollToTurn:et.scrollToTurn,scrollToMessage:et.scrollToMessage,resumeToBottom:et.resumeToBottomInstant},e[97]=l,e[98]=et.activeTurnId,e[99]=et.resumeToBottomInstant,e[100]=et.scrollToMessage,e[101]=et.scrollToTurn,e[102]=et.turnIds,e[103]=Et):Et=e[103];const Vt=iR(Et);let xt,mo;e[104]!==l||e[105]!==Ge?(xt=()=>{if(typeof window>"u"||!l)return;const $e=tt=>{const fe=tt;fe.detail?.sessionId&&fe.detail.sessionId!==l||Ge("instant")};return window.addEventListener(A8,$e),()=>{window.removeEventListener(A8,$e)}},mo=[l,Ge],e[104]=l,e[105]=Ge,e[106]=xt,e[107]=mo):(xt=e[106],mo=e[107]),g.useEffect(xt,mo);let go,to;e[108]!==l||e[109]!==ne||e[110]!==Vt||e[111]!==Oe?(go=()=>{if(typeof window>"u"||!l||ne)return;const $e=tt=>{if(tt.defaultPrevented||tt.isComposing||tt.key!=="ArrowUp"&&tt.key!=="ArrowDown"||tt.altKey||tt.ctrlKey||tt.metaKey||tt.shiftKey)return;const{activeMainTab:fe}=Me.getState();if(fe!=="chat"||wR())return;const Ie=Oe.current;if(yR(document.activeElement,Ie)||G4(tt.target))return;tt.preventDefault();const ue=tt.key==="ArrowUp"?-1:1;Vt.scrollByTurnOffset(ue,{resumePastEnd:!1})};return window.addEventListener("keydown",$e),()=>{window.removeEventListener("keydown",$e)}},to=[l,ne,Vt,Oe],e[108]=l,e[109]=ne,e[110]=Vt,e[111]=Oe,e[112]=go,e[113]=to):(go=e[112],to=e[113]),g.useEffect(go,to);let Do;e[114]!==Oe?(Do=()=>{const $e=Oe.current;if(!$e)return;const tt=()=>{$e.style.setProperty("--chat-scroll-height",`${$e.clientHeight}px`)};tt();let fe=0;const Ie=()=>{fe||(fe=requestAnimationFrame(()=>{fe=0,tt()}))};if(typeof ResizeObserver>"u")return window.addEventListener("resize",Ie),()=>{fe&&cancelAnimationFrame(fe),window.removeEventListener("resize",Ie)};const ue=new ResizeObserver(Ie);return ue.observe($e),()=>{fe&&cancelAnimationFrame(fe),ue.disconnect()}},e[114]=Oe,e[115]=Do):Do=e[115];let Vo;e[116]!==l||e[117]!==ne||e[118]!==Oe?(Vo=[l,ne,Oe],e[116]=l,e[117]=ne,e[118]=Oe,e[119]=Vo):Vo=e[119],g.useLayoutEffect(Do,Vo);const vo=g.useRef(null),zo=!!l&&!A;let kt,Po;e[120]!==l||e[121]!==ot||e[122]!==ct?(kt=()=>{if(!l||vo.current===l)return;const $e=typeof window<"u"&&window.location.hash.length>0;if(vo.current=l,$e){ot();return}const tt=()=>{ct()};typeof window>"u"?tt():window.requestAnimationFrame(tt)},Po=[l,ot,ct],e[120]=l,e[121]=ot,e[122]=ct,e[123]=kt,e[124]=Po):(kt=e[123],Po=e[124]),g.useEffect(kt,Po);let Nt,ro;if(e[125]!==l||e[126]!==h||e[127]!==A?(Nt=()=>{l&&(A||h(l))},ro=[l,h,A],e[125]=l,e[126]=h,e[127]=A,e[128]=Nt,e[129]=ro):(Nt=e[128],ro=e[129]),g.useEffect(Nt,ro),!l&&!se){let $e;return e[130]===Symbol.for("react.memo_cache_sentinel")?($e=a.jsx("div",{className:"flex flex-col h-full bg-background",children:a.jsx(Pl,{})}),e[130]=$e):$e=e[130],$e}if(!l&&se){let $e;e[131]!==ne?($e=ne?null:a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(Pl,{})}),e[131]=ne,e[132]=$e):$e=e[132];const tt=ne?"flex-1 min-h-0 bg-background":"bg-background";let fe;e[133]!==tt?(fe=U("relative z-10",tt),e[133]=tt,e[134]=fe):fe=e[134];let Ie;e[135]!==xe||e[136]!==At?(Ie=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[135]=xe,e[136]=At,e[137]=Ie):Ie=e[137];let ue;e[138]!==fe||e[139]!==Ie?(ue=a.jsx("div",{className:fe,children:Ie}),e[138]=fe,e[139]=Ie,e[140]=ue):ue=e[140];let ke;return e[141]!==$e||e[142]!==ue?(ke=a.jsxs("div",{className:"relative flex flex-col h-full bg-background transform-gpu",children:[$e,ue]}),e[141]=$e,e[142]=ue,e[143]=ke):ke=e[143],ke}if(!l)return null;if(zo&&M.length===0&&!R){const $e=ne?"absolute inset-0 opacity-0 pointer-events-none":"flex-1";let tt;e[144]!==$e?(tt=U("relative min-h-0",$e),e[144]=$e,e[145]=tt):tt=e[145];let fe;e[146]===Symbol.for("react.memo_cache_sentinel")?(fe=a.jsx("div",{className:"absolute inset-0 overflow-y-auto overflow-x-hidden bg-background pt-6",style:sm,children:a.jsx("div",{className:"space-y-4",children:xR.map(jR)})}),e[146]=fe):fe=e[146];let Ie;e[147]!==ne||e[148]!==tt?(Ie=a.jsx("div",{className:tt,"aria-hidden":ne,children:fe}),e[147]=ne,e[148]=tt,e[149]=Ie):Ie=e[149];const ue=ne?"flex-1 min-h-0 bg-background":"bg-background";let ke;e[150]!==ue?(ke=U("relative z-10",ue),e[150]=ue,e[151]=ke):ke=e[151];let Ue;e[152]!==xe||e[153]!==At?(Ue=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[152]=xe,e[153]=At,e[154]=Ue):Ue=e[154];let Ze;e[155]!==ke||e[156]!==Ue?(Ze=a.jsx("div",{className:ke,children:Ue}),e[155]=ke,e[156]=Ue,e[157]=Ze):Ze=e[157];let Ke;return e[158]!==te||e[159]!==Ie||e[160]!==Ze?(Ke=a.jsxs("div",{className:"relative flex flex-col h-full bg-background",children:[te,Ie,Ze]}),e[158]=te,e[159]=Ie,e[160]=Ze,e[161]=Ke):Ke=e[161],Ke}if(M.length===0&&!R){const $e=ne?"absolute inset-0 opacity-0 pointer-events-none":"flex-1";let tt;e[162]!==$e?(tt=U("relative min-h-0",$e),e[162]=$e,e[163]=tt):tt=e[163];let fe;e[164]!==ne?(fe=ne?null:a.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a.jsx(Pl,{})}),e[164]=ne,e[165]=fe):fe=e[165];let Ie;e[166]!==ne||e[167]!==tt||e[168]!==fe?(Ie=a.jsx("div",{className:tt,"aria-hidden":ne,children:fe}),e[166]=ne,e[167]=tt,e[168]=fe,e[169]=Ie):Ie=e[169];const ue=ne?"flex-1 min-h-0 bg-background":"bg-background";let ke;e[170]!==ue?(ke=U("relative z-10",ue),e[170]=ue,e[171]=ke):ke=e[171];let Ue;e[172]!==xe||e[173]!==At?(Ue=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[172]=xe,e[173]=At,e[174]=Ue):Ue=e[174];let Ze;e[175]!==ke||e[176]!==Ue?(Ze=a.jsx("div",{className:ke,children:Ue}),e[175]=ke,e[176]=Ue,e[177]=Ze):Ze=e[177];let Ke;return e[178]!==te||e[179]!==Ie||e[180]!==Ze?(Ke=a.jsxs("div",{className:"relative flex flex-col h-full bg-background transform-gpu",children:[te,Ie,Ze]}),e[178]=te,e[179]=Ie,e[180]=Ze,e[181]=Ke):Ke=e[181],Ke}let So;e[182]!==k||e[183]!==l||e[184]!==mt||e[185]!==Gt||e[186]!==Xe||e[187]!==ne||e[188]!==Le||e[189]!==j||e[190]!==At||e[191]!==Q||e[192]!==Oe||e[193]!==R||e[194]!==ee||e[195]!==q||e[196]!==y||e[197]!==x||e[198]!==et.historySignals.hasMoreAboveTurns||e[199]!==et.isLoadingOlder||e[200]!==et.pendingRevealWork||e[201]!==et.renderedMessages||e[202]!==et.turnStart?(So=a.jsx(rm,{currentSessionId:l,isDesktopExpandedInput:ne,isMobile:j,stickyUserHeader:y,scrollRef:Oe,messageListRef:le,turnStart:et.turnStart,pendingRevealWork:et.pendingRevealWork,renderedMessages:et.renderedMessages,hasMoreAboveTurns:et.historySignals.hasMoreAboveTurns,isLoadingOlder:et.isLoadingOlder,sessionIsWorking:R,streamingMessageId:x,activeStreamingPhase:k,retryOverlay:Q,handleMessageContentChange:Xe,getAnimationHandlers:mt,handleLoadOlder:Gt,scrollToBottom:At,sessionQuestions:q,sessionPermissions:ee,isProgrammaticFollowActive:Le}),e[182]=k,e[183]=l,e[184]=mt,e[185]=Gt,e[186]=Xe,e[187]=ne,e[188]=Le,e[189]=j,e[190]=At,e[191]=Q,e[192]=Oe,e[193]=R,e[194]=ee,e[195]=q,e[196]=y,e[197]=x,e[198]=et.historySignals.hasMoreAboveTurns,e[199]=et.isLoadingOlder,e[200]=et.pendingRevealWork,e[201]=et.renderedMessages,e[202]=et.turnStart,e[203]=So):So=e[203];const at=ne?"flex-1 min-h-0 bg-background":"bg-background";let io;e[204]!==at?(io=U("relative z-10",at),e[204]=at,e[205]=io):io=e[205];let oo;e[206]!==ne||e[207]!==Vt.resumeToLatest||e[208]!==M.length||e[209]!==et.showScrollToBottom?(oo=!ne&&M.length>0&&a.jsx(BN,{visible:et.showScrollToBottom,onClick:Vt.resumeToLatest}),e[206]=ne,e[207]=Vt.resumeToLatest,e[208]=M.length,e[209]=et.showScrollToBottom,e[210]=oo):oo=e[210];let Rt;e[211]!==xe||e[212]!==At?(Rt=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[211]=xe,e[212]=At,e[213]=Rt):Rt=e[213];let Ct;e[214]!==io||e[215]!==oo||e[216]!==Rt?(Ct=a.jsxs("div",{className:io,children:[oo,Rt]}),e[214]=io,e[215]=oo,e[216]=Rt,e[217]=Ct):Ct=e[217];let jo;e[218]!==w||e[219]!==Vt.scrollByTurnOffset||e[220]!==At||e[221]!==S||e[222]!==et.scrollToMessage?(jo=a.jsx(tR,{open:w,onOpenChange:S,onScrollToMessage:et.scrollToMessage,onScrollByTurnOffset:Vt.scrollByTurnOffset,onResumeToLatest:At}),e[218]=w,e[219]=Vt.scrollByTurnOffset,e[220]=At,e[221]=S,e[222]=et.scrollToMessage,e[223]=jo):jo=e[223];let ho;return e[224]!==te||e[225]!==So||e[226]!==Ct||e[227]!==jo?(ho=a.jsxs("div",{className:"relative flex flex-col h-full bg-background",children:[te,So,Ct,jo]}),e[224]=te,e[225]=So,e[226]=Ct,e[227]=jo,e[228]=ho):ho=e[228],ho};function CR(t){return a.jsx(xN,{question:t},t.id)}function SR(t){return a.jsx(bN,{permission:t},t.id)}function kR(t){return t.currentSessionId}function MR(t){return t.openNewSessionDraft}function AR(t){return t.setCurrentSession}function FR(t){return t.newSessionDraft}function _R(t){return t.isExpandedInput}function BR(t){return t.stickyUserHeader}function DR(t){return t.isTimelineDialogOpen}function PR(t){return t.setTimelineDialogOpen}function TR(t){return t.permission??{}}function HR(t){return t.question??{}}function IR(t){return{id:t.id,parentID:t.parentID}}function ER(){}function jR(t){return a.jsx("div",{className:"group w-full",children:a.jsx("div",{className:"chat-message-column",children:a.jsxs("div",{className:"space-y-2.5 px-4 py-3",children:[a.jsx("div",{className:"space-y-1.5",children:t.toolRows.map(e=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ri,{className:"h-3.5 w-3.5 rounded-full flex-shrink-0"}),a.jsx(ri,{className:U("h-4 rounded-md",e.titleWidth)}),a.jsx(ri,{className:U("h-4 rounded-md",e.detailWidth)})]},`${t.id}-${e.id}`))}),a.jsxs("div",{className:"space-y-1.5 pt-1",children:[a.jsx(ri,{className:U("h-4 rounded-md",t.textWidths[0])}),a.jsx(ri,{className:U("h-4 rounded-md",t.textWidths[1])}),a.jsx(ri,{className:U("h-4 rounded-md",t.textWidths[2])})]})]})})},t.id)}const LR=()=>{const e=Te.getState().currentSessionId;if(!e)return"";const n=hi().find(s=>s.id===e);return typeof n?.directory=="string"?n.directory:""},VR=async(t,e=6e3)=>{const o=new AbortController,n=setTimeout(()=>o.abort(),e),s=Date.now();try{const r=await fetch(t,{method:"GET",headers:{Accept:"application/json"},signal:o.signal}),i=Date.now()-s,l=r.headers.get("content-type")||"",c=l.toLowerCase(),d=c.includes("json")&&!c.includes("text/html");let u="";if(d){const f=await r.json().catch(()=>null);if(Array.isArray(f))u=`json[array] len=${f.length}`;else if(f&&typeof f=="object"){const m=Object.keys(f).slice(0,8);u=`json[object] keys=${m.join(",")}${Object.keys(f).length>m.length?",…":""}`}else u=`json[${typeof f}]`}else u=l?`content-type=${l}`:"no content-type";return{ok:r.ok&&d,status:r.status,elapsedMs:i,summary:u}}catch(r){const i=Date.now()-s,c=o.signal.aborted||r instanceof Error&&(r.name==="AbortError"||r.message.toLowerCase().includes("aborted"))?`timeout after ${e}ms`:r instanceof Error?r.message:String(r);return{ok:!1,status:0,elapsedMs:i,summary:`error=${c}`}}finally{clearTimeout(n)}},NR=t=>{if(!t||!Number.isFinite(t))return"(n/a)";try{return new Date(t).toISOString()}catch{return"(invalid)"}},RR=t=>{if(typeof t=="number"&&Number.isFinite(t)&&t>0)return Math.trunc(t);if(typeof t=="string"){const e=Number.parseInt(t,10);if(Number.isFinite(e)&&e>0)return e}return null},zR=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Ws=(t,e="(n/a)")=>typeof t=="string"?t.trim()||e:typeof t=="number"&&Number.isFinite(t)?String(t):typeof t=="boolean"?t?"true":"false":e,F8=(t,e,o)=>t==="node-shebang"||t==="node-launcher"?e?`node (${e})`:"node":t==="bun-shebang"?o?`bun (${o})`:"bun":t||"direct executable",OR=async()=>{const t=new Date,e="1.0.1",o=typeof navigator<"u"?navigator.userAgent:"(no navigator)",n=LR(),s=Me.getState().eventStreamStatus,r=typeof window<"u"?window.location.origin:"",i=r?`${r.replace(/\/+$/,"")}/api/`:"",l=await(async()=>{if(!r)return null;const v=new AbortController,b=setTimeout(()=>v.abort(),5e3);try{const y=await fetch(`${r.replace(/\/+$/,"")}/health`,{method:"GET",headers:{Accept:"application/json"},signal:v.signal});if(!y.ok)return null;const w=await y.json().catch(()=>null);return!w||typeof w!="object"||Array.isArray(w)?null:w}catch{return null}finally{clearTimeout(b)}})(),c=await(async()=>{if(!r)return null;const v=new AbortController,b=setTimeout(()=>v.abort(),7e3);try{const y=await fetch(`${r.replace(/\/+$/,"")}/api/config/opencode-resolution`,{method:"GET",headers:{Accept:"application/json"},signal:v.signal}),w=y.headers.get("content-type")||"(none)";if(!y.ok)return{data:null,status:y.status,error:`http ${y.status} content-type=${w}`};const S=await y.text();let C=null;try{C=JSON.parse(S)}catch{const x=S.replace(/\s+/g," ").slice(0,120);return{data:null,status:y.status,error:`invalid json content-type=${w} body=${x||"(empty)"}`}}return!C||typeof C!="object"||Array.isArray(C)?{data:null,status:y.status,error:`invalid json-shape content-type=${w}`}:{data:C,status:y.status,error:null}}catch(y){return{data:null,status:null,error:y instanceof Error?y.message:String(y)}}finally{clearTimeout(b)}})()||{data:null,error:null},d=(v,b=!0)=>{if(!i)return null;const y=new URL(v.replace(/^\/+/,""),i);return b&&n&&y.searchParams.set("directory",n),y.toString()},u=[{label:"health",path:"/global/health",includeDirectory:!1},{label:"config",path:"/config",includeDirectory:!0},{label:"providers",path:"/config/providers",includeDirectory:!0},{label:"agents",path:"/agent",includeDirectory:!0,timeoutMs:12e3},{label:"commands",path:"/command",includeDirectory:!0,timeoutMs:1e4},{label:"project",path:"/project/current",includeDirectory:!0},{label:"path",path:"/path",includeDirectory:!0},{label:"sessions",path:"/session",includeDirectory:!0,timeoutMs:12e3},{label:"sessionStatus",path:"/session/status",includeDirectory:!0}],f=i?await Promise.all(u.map(async v=>{const b=d(v.path,v.includeDirectory!==!1);if(!b)return{label:v.label,url:"(none)",result:null};const y=await VR(b,typeof v.timeoutMs=="number"?v.timeoutMs:void 0);return{label:v.label,url:b,result:y}})):[],m=[];m.push(`Time: ${t.toISOString()}`),m.push(`Vinci version: ${e}`),m.push(`Runtime: ${r||"(unknown)"} (api=${r?r+"/api":"(unknown)"})`),m.push(`Event stream: ${s}`),m.push(`Directory: ${n||"(none)"}`),m.push(`Platform: ${o}`);const h=RR(l?.openCodePort);if(m.push(`OpenCode runtime port: ${h??"(unknown)"}`),typeof l?.openCodeRunning=="boolean"&&m.push(`OpenCode runtime running: ${l.openCodeRunning?"yes":"no"}`),typeof l?.openCodeSecureConnection=="boolean"&&m.push(`Secure OpenCode connection: ${l.openCodeSecureConnection?"true":"false"}`),typeof l?.openCodeAuthSource=="string"&&l.openCodeAuthSource.trim()&&m.push(`OpenCode auth source: ${l.openCodeAuthSource}`),typeof window<"u"){const v=window.__APP_MACOS_MAJOR__;typeof v=="number"&&Number.isFinite(v)&&v>0&&m.push(`macOS major: ${v}`)}if(/Mac OS X|Macintosh/.test(o)){m.push(""),m.push("OpenCode CLI resolution:");const v=zR(l?.lastOpenCodeLaunchDiagnostics)?l.lastOpenCodeLaunchDiagnostics:null,b=v&&Array.isArray(v.args)?v.args.filter(H=>typeof H=="string"):[],y=c.data,w=y&&typeof y.configured=="string"?y.configured:null,S=y&&typeof y.resolved=="string"?y.resolved:l&&typeof l.opencodeBinaryResolved=="string"?l.opencodeBinaryResolved:"",C=y&&typeof y.resolvedDir=="string"?y.resolvedDir:"",x=y&&typeof y.source=="string"?y.source:l&&typeof l.opencodeBinarySource=="string"?l.opencodeBinarySource:"",_=y&&typeof y.launchBinary=="string"?y.launchBinary:l&&typeof l.opencodeLaunchBinary=="string"?l.opencodeLaunchBinary:"",k=y&&typeof y.launchWrapperType=="string"?y.launchWrapperType:l&&typeof l.opencodeLaunchWrapperType=="string"?l.opencodeLaunchWrapperType:"",D=y&&Array.isArray(y.launchArgs)?y.launchArgs.filter(H=>typeof H=="string"):l&&Array.isArray(l.opencodeLaunchArgs)?l.opencodeLaunchArgs.filter(H=>typeof H=="string"):[],F=y&&typeof y.node=="string"?y.node:l&&typeof l.nodeBinaryResolved=="string"?l.nodeBinaryResolved:"",A=y&&typeof y.bun=="string"?y.bun:l&&typeof l.bunBinaryResolved=="string"?l.bunBinaryResolved:"",B=y&&typeof y.detectedNow=="string"?y.detectedNow:"",M=y&&typeof y.detectedSourceNow=="string"?y.detectedSourceNow:"";if(w!==null&&m.push(`- configured: ${w.trim().length===0?"(cleared)":w}`),S){const H=C||(S.includes("/")?S.split("/").slice(0,-1).join("/")||"/":"");m.push(`- opencode: ${S}${H?` (dir=${H})`:""}`)}else m.push("- opencode: (n/a)");m.push(`- source: ${x||"(n/a)"}`),B&&(m.push(`- detected-now: ${B}`),m.push(`- detected-source: ${M||"(n/a)"}`)),v?(m.push(`- launched-at: ${Ws(v.launchedAt)}`),m.push(`- launch: ${Ws(v.binary)} ${b.join(" ")}`.trim()),m.push(`- cwd: ${Ws(v.cwd)}`),m.push(`- wrapper: ${Ws(v.wrapperType)}`),m.push(`- runtime: ${F8(Ws(v.wrapperType,""),F,A)}`),m.push(`- PATH entries: ${Ws(v.pathEntryCount,"(unknown)")}`),m.push(`- shell env: ${Ws(v.hasShellEnv,"(unknown)")} (${Ws(v.shellEnvKeysCount,"?")} keys)`)):(m.push(`- launch-binary: ${_||"(n/a)"}`),m.push(`- launch-wrapper: ${k||"(n/a)"}`),m.push(`- launch-args: ${D.length?D.join(" "):"(none)"}`),m.push(`- runtime: ${F8(k||"",F,A)}`)),!y&&c.error&&m.push(`- resolution-endpoint: ${c.error}`)}if(m.push(""),f.length){m.push("OpenCode API probes:");for(const v of f){if(!v.result){m.push(`- ${v.label}: (no url)`);continue}const{ok:b,status:y,elapsedMs:w,summary:S}=v.result,C=b?"":` url=${v.url}`;m.push(`- ${v.label}: ${b?"ok":"fail"} status=${y} time=${w}ms ${S}${C}`)}}else m.push("OpenCode API probes: (skipped)");return m.push(""),m.push(`Generated: ${NR(Date.now())}`),m.join(`
|
|
6964
|
+
`)}function oR(t){const o=$c(t).replace(/\n/g," ");return o.length>80?o.slice(0,80):o}function nR(t,e,o=30){const n=t.toLowerCase(),s=e.toLowerCase(),r=n.indexOf(s);if(r===-1)return null;const i=Math.max(0,r-o),l=Math.min(t.length,r+e.length+o);return`${i>0?"…":""}${t.slice(i,l).replace(/\n/g," ")}${l<t.length?"…":""}`}const sR=t=>{const e=t.startsWith("#")?t.slice(1):t;if(!e)return null;const o=e.match(/^turn-(.+)$/);if(o?.[1])return{kind:"turn",id:o[1]};const n=e.match(/^message-(.+)$/);return n?.[1]?{kind:"message",id:n[1]}:null},rR=(t,e,o)=>{if(o===0)return{kind:"noop"};if(t.length===0)return{kind:"noop"};const n=e?t.indexOf(e):t.length-1,r=(n>=0?n:t.length-1)+o;if(r>=t.length)return{kind:"resume"};const i=Math.max(0,r),l=t[i];return l?{kind:"turn",turnId:l}:{kind:"noop"}},Ya=t=>{if(typeof window>"u")return;const e=t?`#${t}`:"",o=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState(window.history.state,"",o)},iR=t=>{const e=de.c(29),{sessionId:o,turnIds:n,activeTurnId:s,scrollToTurn:r,scrollToMessage:i,resumeToBottom:l}=t,c=g.useRef(n),d=g.useRef(s);let u,f;e[0]!==n?(u=()=>{c.current=n},f=[n],e[0]=n,e[1]=u,e[2]=f):(u=e[1],f=e[2]),g.useEffect(u,f);let m,h;e[3]!==s?(m=()=>{d.current=s},h=[s],e[3]=s,e[4]=m,e[5]=h):(m=e[4],h=e[5]),g.useEffect(m,h);let p;e[6]!==r?(p=async(F,A)=>F?(A?.updateHash!==!1&&Ya(`turn-${F}`),r(F,{behavior:A?.behavior})):!1,e[6]=r,e[7]=p):p=e[7];const v=p;let b;e[8]!==i?(b=async(F,A)=>F?(A?.updateHash!==!1&&Ya(`message-${F}`),i(F,{behavior:A?.behavior})):!1,e[8]=i,e[9]=b):b=e[9];const y=b;let w;e[10]!==l||e[11]!==v?(w=async(F,A)=>{const B=c.current,M=rR(B,d.current,F);if(M.kind==="noop")return F===0;if(M.kind==="resume"){if(A?.resumePastEnd===!1){const H=B[B.length-1];return H?v(H,{behavior:"auto"}):!1}return Ya(null),l(),!0}return v(M.turnId,{behavior:"auto"})},e[10]=l,e[11]=v,e[12]=w):w=e[12];const S=w;let C;e[13]!==l?(C=()=>{Ya(null),l()},e[13]=l,e[14]=C):C=e[14];const x=C;let _;e[15]!==y||e[16]!==v||e[17]!==o?(_=()=>{if(!o||typeof window>"u")return;const F=()=>{const A=sR(window.location.hash);if(A){if(A.kind==="turn"){v(A.id,{behavior:"auto",updateHash:!1});return}y(A.id,{behavior:"auto",updateHash:!1})}};return F(),window.addEventListener("hashchange",F),()=>{window.removeEventListener("hashchange",F)}},e[15]=y,e[16]=v,e[17]=o,e[18]=_):_=e[18];let k;e[19]!==y||e[20]!==v||e[21]!==o||e[22]!==n.length?(k=[o,y,v,n.length],e[19]=y,e[20]=v,e[21]=o,e[22]=n.length,e[23]=k):k=e[23],g.useEffect(_,k);let D;return e[24]!==x||e[25]!==S||e[26]!==y||e[27]!==v?(D={scrollToTurnId:v,scrollToMessageId:y,scrollByTurnOffset:S,resumeToLatest:x},e[24]=x,e[25]=S,e[26]=y,e[27]=v,e[28]=D):D=e[28],D},aR=(t,e)=>{if(!e)return[];if(!Array.isArray(t)||t.length===0)return[e];if(!t.find(i=>i.id===e))return[e];const n=new Map;for(const i of t){if(!i.parentID)continue;const l=n.get(i.parentID)??[];l.push(i.id),n.set(i.parentID,l)}const s=[e],r=new Set(s);for(const i of s){const l=n.get(i)??[];for(const c of l)r.has(c)||(r.add(c),s.push(c))}return s},M8=(t,e)=>{if(e.length===0)return[];const o=new Set,n=[];for(const s of e){const r=t.get(s);if(!(!r||r.length===0))for(const i of r)o.has(i.id)||(o.add(i.id),n.push(i))}return n},lR=(t,e)=>{const o=de.c(8),n=Bu(cR),s=Te(dR),r=Te(uR),i=n0(t,e);let l,c;o[0]!==e||o[1]!==r||o[2]!==s||o[3]!==i||o[4]!==n||o[5]!==t?(l=()=>{if(n&&t&&!r(t))for(const d of i){if(d.role!=="assistant")continue;const u=Wn(d.id,e);for(const f of u){if(f.type!=="text")continue;const m=f.text||"";if(m.includes("The plan at ")||m.includes("User has requested to enter plan mode")){s(t);return}}}},c=[n,t,e,i,s,r],o[0]=e,o[1]=r,o[2]=s,o[3]=i,o[4]=n,o[5]=t,o[6]=l,o[7]=c):(l=o[6],c=o[7]),g.useEffect(l,c)};function cR(t){return t.planModeEnabled}function dR(t){return t.markSessionPlanAvailable}function uR(t){return t.isSessionPlanAvailable}const fR=[],mR=[],hR=[],pR={type:"idle"},A8="vinci:chat-force-scroll-bottom",gR="Quota limit reached. Retrying automatically.",sm={overflowAnchor:"none",overscrollBehavior:"contain",overscrollBehaviorY:"contain"},vR=["a[href]","button","input","select","textarea",'[contenteditable="true"]','[role="button"]','[role="combobox"]','[role="dialog"]','[role="listbox"]','[role="menu"]','[role="menuitem"]','[role="option"]','[role="textbox"]',"[data-radix-popper-content-wrapper]"].join(","),bR=t=>t instanceof HTMLElement,G4=t=>bR(t)?!!t.closest(vR):!1,yR=(t,e)=>typeof document>"u"||!t||t===document.body||t===document.documentElement||G4(t)?!0:!e?.contains(t),wR=()=>{const{isAboutDialogOpen:t,isCommandPaletteOpen:e,isHelpDialogOpen:o,isImagePreviewOpen:n,isMultiRunLauncherOpen:s,isSessionSwitcherOpen:r,isSettingsDialogOpen:i}=Me.getState();return t||e||o||n||s||r||i},rm=g.memo(t=>{const e=de.c(46),{currentSessionId:o,isDesktopExpandedInput:n,isMobile:s,stickyUserHeader:r,scrollRef:i,messageListRef:l,turnStart:c,pendingRevealWork:d,renderedMessages:u,hasMoreAboveTurns:f,isLoadingOlder:m,sessionIsWorking:h,streamingMessageId:p,activeStreamingPhase:v,retryOverlay:b,handleMessageContentChange:y,getAnimationHandlers:w,handleLoadOlder:S,scrollToBottom:C,sessionQuestions:x,sessionPermissions:_,isProgrammaticFollowActive:k}=t;let D;e[0]!==i?(D=N=>{N.defaultPrevented||G4(N.target)||typeof window<"u"&&window.getSelection()?.type==="Range"||i.current?.focus({preventScroll:!0})},e[0]=i,e[1]=D):D=e[1];const F=D,A=n?"absolute inset-0 opacity-0 pointer-events-none":"flex-1";let B;e[2]!==A?(B=U("relative min-h-0",A),e[2]=A,e[3]=B):B=e[3];const M=s&&r;let H;e[4]!==v||e[5]!==o||e[6]!==w||e[7]!==S||e[8]!==y||e[9]!==f||e[10]!==m||e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==b||e[15]!==i||e[16]!==C||e[17]!==h||e[18]!==p||e[19]!==c?(H=a.jsx(lN,{ref:l,sessionKey:o,turnStart:c,disableStaging:d,messages:u,sessionIsWorking:h,activeStreamingMessageId:p,activeStreamingPhase:v,retryOverlay:b,onMessageContentChange:y,getAnimationHandlers:w,hasMoreAbove:f,isLoadingOlder:m,onLoadOlder:S,scrollToBottom:C,scrollRef:i}),e[4]=v,e[5]=o,e[6]=w,e[7]=S,e[8]=y,e[9]=f,e[10]=m,e[11]=l,e[12]=d,e[13]=u,e[14]=b,e[15]=i,e[16]=C,e[17]=h,e[18]=p,e[19]=c,e[20]=H):H=e[20];let P;e[21]!==_||e[22]!==x?(P=(x.length>0||_.length>0)&&a.jsxs("div",{children:[x.map(CR),_.map(SR)]}),e[21]=_,e[22]=x,e[23]=P):P=e[23];let T;e[24]===Symbol.for("react.memo_cache_sentinel")?(T=a.jsx("div",{className:"mb-3",children:a.jsx(em,{})}),e[24]=T):T=e[24];const E=s?"40px":"10vh";let O;e[25]!==E?(O=a.jsx("div",{className:"flex-shrink-0",style:{height:E},"aria-hidden":"true"}),e[25]=E,e[26]=O):O=e[26];let L;e[27]!==H||e[28]!==P||e[29]!==O?(L=a.jsxs("div",{className:"relative z-0 min-h-full",children:[H,P,T,O]}),e[27]=H,e[28]=P,e[29]=O,e[30]=L):L=e[30];let Z;e[31]!==F||e[32]!==i||e[33]!==L||e[34]!==M?(Z=a.jsx(i0,{className:"absolute inset-0 overflow-y-auto overflow-x-hidden z-0 chat-scroll overlay-scrollbar-target",ref:i,style:sm,observeMutations:!1,hideTopShadow:M,tabIndex:0,onClick:F,"data-scroll-shadow":"true","data-scrollbar":"chat",children:L}),e[31]=F,e[32]=i,e[33]=L,e[34]=M,e[35]=Z):Z=e[35];let oe;e[36]!==k||e[37]!==i?(oe=a.jsx(Pu,{containerRef:i,suppressVisibility:k,userIntentOnly:!0,observeMutations:!1}),e[36]=k,e[37]=i,e[38]=oe):oe=e[38];let V;e[39]!==Z||e[40]!==oe?(V=a.jsxs("div",{className:"absolute inset-0",children:[Z,oe]}),e[39]=Z,e[40]=oe,e[41]=V):V=e[41];let $;return e[42]!==n||e[43]!==V||e[44]!==B?($=a.jsx("div",{className:B,"aria-hidden":n,children:V}),e[42]=n,e[43]=V,e[44]=B,e[45]=$):$=e[45],$},(t,e)=>t.currentSessionId===e.currentSessionId&&t.isDesktopExpandedInput===e.isDesktopExpandedInput&&t.isMobile===e.isMobile&&t.stickyUserHeader===e.stickyUserHeader&&t.scrollRef===e.scrollRef&&t.messageListRef===e.messageListRef&&t.turnStart===e.turnStart&&t.pendingRevealWork===e.pendingRevealWork&&t.renderedMessages===e.renderedMessages&&t.hasMoreAboveTurns===e.hasMoreAboveTurns&&t.isLoadingOlder===e.isLoadingOlder&&t.sessionIsWorking===e.sessionIsWorking&&t.streamingMessageId===e.streamingMessageId&&t.activeStreamingPhase===e.activeStreamingPhase&&t.retryOverlay===e.retryOverlay&&t.handleMessageContentChange===e.handleMessageContentChange&&t.getAnimationHandlers===e.getAnimationHandlers&&t.handleLoadOlder===e.handleLoadOlder&&t.scrollToBottom===e.scrollToBottom&&t.sessionQuestions===e.sessionQuestions&&t.sessionPermissions===e.sessionPermissions&&t.isProgrammaticFollowActive===e.isProgrammaticFollowActive);rm.displayName="ChatViewport";const xR=[{id:1,toolRows:[{id:"search",titleWidth:"w-24",detailWidth:"w-52"},{id:"read",titleWidth:"w-20",detailWidth:"w-36"},{id:"edit",titleWidth:"w-24",detailWidth:"w-64"}],textWidths:["w-24","w-[92%]","w-[78%]"]},{id:2,toolRows:[{id:"read",titleWidth:"w-20",detailWidth:"w-40"},{id:"search",titleWidth:"w-24",detailWidth:"w-48"}],textWidths:["w-20","w-[88%]","w-[70%]"]},{id:3,toolRows:[{id:"shell",titleWidth:"w-28",detailWidth:"w-44"},{id:"edit",titleWidth:"w-24",detailWidth:"w-56"}],textWidths:["w-24","w-[84%]","w-[64%]"]}],Ja=()=>{const t=de.c(4),{t:e}=ft();let o;t[0]!==e?(o=e("chat.container.readOnlySubagentPromptBanner"),t[0]=e,t[1]=o):o=t[1];let n;return t[2]!==o?(n=a.jsx("div",{className:"p-3",children:a.jsx("div",{className:"rounded-2xl border border-border/70 bg-[var(--surface-background)] px-4 py-3 typography-ui-label text-muted-foreground",children:o})}),t[2]=o,t[3]=n):n=t[3],n},_Z=t=>{const e=de.c(229),{autoOpenDraft:o,readOnly:n}=t,s=o===void 0?!0:o,r=n===void 0?!1:n,{t:i}=ft(),l=Te(kR),c=Te(MR),d=Te(AR),u=Te(FR),f=f0();let m;e[0]!==f?(m=$e=>f.ensureSessionRenderable($e),e[0]=f,e[1]=m):m=e[1];const h=m;let p;e[2]!==f?(p=($e,tt)=>f.loadMore($e),e[2]=f,e[3]=p):p=e[3];const v=p,b=Me(_R),y=Me(BR),w=Me(DR),S=Me(PR);let C;e[4]!==l?(C=$e=>l?$e.streamingMessageIds.get(l)??null:null,e[4]=l,e[5]=C):C=e[5];const x=Ii(C);let _;e[6]!==x?(_=$e=>x?$e.messageStreamStates.get(x)?.phase??null:null,e[6]=x,e[7]=_):_=e[7];const k=Ii(_),D=Hw(l??"");let F;e[8]!==l?(F=$e=>l?ji($e,l).renderable:!1,e[8]=l,e[9]=F):F=e[9];const A=Qo(F),B=na(l??""),M=l?B:fR,H=ur();lR(l??"");const P=u4(l??"")??pR,T=Qo(TR),E=Qo(HR);let O;if(e[10]!==T){O=new Map;for(const[$e,tt]of Object.entries(T))O.set($e,tt);e[10]=T,e[11]=O}else O=e[11];const L=O;let Z;if(e[12]!==E){Z=new Map;for(const[$e,tt]of Object.entries(E))Z.set($e,tt);e[12]=E,e[13]=Z}else Z=e[13];const oe=Z;let V;e[14]!==l||e[15]!==H?(V=aR(H.map(IR),l),e[14]=l,e[15]=H,e[16]=V):V=e[16];const $=V;let N;e:{if($.length===0){N=mR;break e}let $e;e[17]!==L||e[18]!==$?($e=M8(L,$),e[17]=L,e[18]=$,e[19]=$e):$e=e[19],N=$e}const ee=N;let z;e:{if($.length===0){z=hR;break e}let $e;e[20]!==oe||e[21]!==$?($e=M8(oe,$),e[20]=oe,e[21]=$,e[22]=$e):$e=e[22],z=$e}const q=z;let ae;e:{if(!l||ee.length>0||q.length>0){ae=!1;break e}const $e=P.type??"idle";if($e==="busy"||$e==="retry"){ae=!0;break e}const tt=M[M.length-1]?.info;ae=!!(tt&&tt.role==="assistant"&&typeof tt.time?.completed!="number")}const R=ae;let we;e:{if(!l||P.type!=="retry"){we=null;break e}let $e;e[23]!==P?($e=typeof P.message=="string"?(P.message??"").trim():"",e[23]=P,e[24]=$e):$e=e[24];const fe=$e||gR,Ie=P;let ue;e[25]!==l||e[26]!==fe||e[27]!==Ie.confirmedAt?(ue={sessionId:l,message:fe,confirmedAt:Ie.confirmedAt},e[25]=l,e[26]=fe,e[27]=Ie.confirmedAt,e[28]=ue):ue=e[28],we=ue}const ve=we,[Ce,Pe]=g.useState(0),De=g.useRef(null);let pe,K;e[29]!==ve?(pe=()=>{if(!ve||typeof ve.confirmedAt=="number"){De.current=null,Pe(0);return}De.current!==ve.sessionId&&(De.current=ve.sessionId,Pe(Date.now()))},K=[ve],e[29]=ve,e[30]=pe,e[31]=K):(pe=e[30],K=e[31]),g.useEffect(pe,K);let re;e:{if(!ve){re=null;break e}let $e;e[32]!==ve||e[33]!==Ce?($e={...ve,fallbackTimestamp:Ce},e[32]=ve,e[33]=Ce,e[34]=$e):$e=e[34],re=$e}const Q=re;let W;e:{if(!l){W=null;break e}const $e=M.length;let tt;e[35]!==l||e[36]!==f?(tt=f.hasMore(l),e[35]=l,e[36]=f,e[37]=tt):tt=e[37];const fe=!tt;let Ie;e[38]!==l||e[39]!==f?(Ie=f.isLoading(l),e[38]=l,e[39]=f,e[40]=Ie):Ie=e[40];let ue;e[41]!==M.length||e[42]!==fe||e[43]!==Ie?(ue={limit:$e,complete:fe,loading:Ie},e[41]=M.length,e[42]=fe,e[43]=Ie,e[44]=ue):ue=e[44],W=ue}const J=W,{isMobile:j}=Lr(),se=!!u?.open,ne=b&&!j,le=g.useRef(null);let he;e:{if(!l){he=null;break e}let $e;if(e[45]!==l||e[46]!==H){let ue;e[48]!==l?(ue=ke=>ke.id===l,e[48]=l,e[49]=ue):ue=e[49],$e=H.find(ue),e[45]=l,e[46]=H,e[47]=$e}else $e=e[47];const fe=$e?.parentID;if(!fe){he=null;break e}let Ie;e[50]!==fe||e[51]!==H?(Ie=H.find(ue=>ue.id===fe)??ir().find(ue=>ue.id===fe)??null,e[50]=fe,e[51]=H,e[52]=Ie):Ie=e[52],he=Ie}const be=he;let ce;e[53]!==be||e[54]!==d?(ce=()=>{if(!be)return;const $e=be.directory??null;d(be.id,$e)},e[53]=be,e[54]=d,e[55]=ce):ce=e[55];const ye=ce;let _e;e[56]!==ye||e[57]!==be||e[58]!==i?(_e=be?a.jsxs(yt,{type:"button",variant:"outline",size:"xs",onClick:ye,className:"absolute left-3 top-3 z-20 !font-normal bg-[var(--surface-background)]/95","aria-label":i("chat.container.returnToParent.aria"),title:be.title?.trim()?i("chat.container.returnToParent.titleNamed",{title:be.title}):i("chat.container.returnToParent.title"),children:[a.jsx(G,{name:"arrow-left",className:"h-4 w-4"}),i("chat.container.returnToParent.label")]}):null,e[56]=ye,e[57]=be,e[58]=i,e[59]=_e):_e=e[59];const te=_e,xe=r||!!be;let Fe,X;e[60]!==s||e[61]!==l||e[62]!==se||e[63]!==c?(Fe=()=>{s&&!l&&!se&&c()},X=[s,l,se,c],e[60]=s,e[61]=l,e[62]=se,e[63]=c,e[64]=Fe,e[65]=X):(Fe=e[64],X=e[65]),g.useEffect(Fe,X);const me=g.useRef(ER);let Ae;e[66]===Symbol.for("react.memo_cache_sentinel")?(Ae=$e=>{me.current($e)},e[66]=Ae):Ae=e[66];const qe=Ae;let ze;e[67]!==l||e[68]!==j||e[69]!==R||e[70]!==D?(ze={currentSessionId:l,sessionMessageCount:D,sessionIsWorking:R,isMobile:j,onActiveTurnChange:qe},e[67]=l,e[68]=j,e[69]=R,e[70]=D,e[71]=ze):ze=e[71];const{scrollRef:Oe,notifyContentChange:Xe,getAnimationHandlers:mt,goToBottom:Ge,releaseAutoFollow:ot,restoreSnapshot:ct,isPinned:Ft,isFollowingProgrammatically:Le,showScrollButton:Ye}=qN(ze),gt=M;let wt;e[72]!==l||e[73]!==Ge||e[74]!==J||e[75]!==Ft||e[76]!==v||e[77]!==ot||e[78]!==Oe||e[79]!==Ye||e[80]!==gt?(wt={sessionId:l,messages:gt,historyMeta:J,scrollRef:Oe,messageListRef:le,loadMoreMessages:v,goToBottom:Ge,releaseAutoFollow:ot,isPinned:Ft,showScrollButton:Ye},e[72]=l,e[73]=Ge,e[74]=J,e[75]=Ft,e[76]=v,e[77]=ot,e[78]=Oe,e[79]=Ye,e[80]=gt,e[81]=wt):wt=e[81];const et=eR(wt),{loadEarlier:Pt}=et;let st;e[82]!==Ge?(st=()=>{Ge("instant")},e[82]=Ge,e[83]=st):st=e[83];const At=st;let Dt,Wt;e[84]!==et.handleActiveTurnChange?(Dt=()=>{me.current=et.handleActiveTurnChange},Wt=[et.handleActiveTurnChange],e[84]=et.handleActiveTurnChange,e[85]=Dt,e[86]=Wt):(Dt=e[85],Wt=e[86]),g.useEffect(Dt,Wt);let Zt;e[87]!==Xe||e[88]!==ee.length||e[89]!==q.length?(Zt=()=>{ee.length===0&&q.length===0||Xe("permission")},e[87]=Xe,e[88]=ee.length,e[89]=q.length,e[90]=Zt):Zt=e[90];let fo;e[91]!==Xe||e[92]!==ee||e[93]!==q?(fo=[Xe,ee,q],e[91]=Xe,e[92]=ee,e[93]=q,e[94]=fo):fo=e[94],g.useEffect(Zt,fo);let Eo;e[95]!==Pt?(Eo=()=>{Pt()},e[95]=Pt,e[96]=Eo):Eo=e[96];const Gt=Eo;let Et;e[97]!==l||e[98]!==et.activeTurnId||e[99]!==et.resumeToBottomInstant||e[100]!==et.scrollToMessage||e[101]!==et.scrollToTurn||e[102]!==et.turnIds?(Et={sessionId:l,turnIds:et.turnIds,activeTurnId:et.activeTurnId,scrollToTurn:et.scrollToTurn,scrollToMessage:et.scrollToMessage,resumeToBottom:et.resumeToBottomInstant},e[97]=l,e[98]=et.activeTurnId,e[99]=et.resumeToBottomInstant,e[100]=et.scrollToMessage,e[101]=et.scrollToTurn,e[102]=et.turnIds,e[103]=Et):Et=e[103];const Vt=iR(Et);let xt,mo;e[104]!==l||e[105]!==Ge?(xt=()=>{if(typeof window>"u"||!l)return;const $e=tt=>{const fe=tt;fe.detail?.sessionId&&fe.detail.sessionId!==l||Ge("instant")};return window.addEventListener(A8,$e),()=>{window.removeEventListener(A8,$e)}},mo=[l,Ge],e[104]=l,e[105]=Ge,e[106]=xt,e[107]=mo):(xt=e[106],mo=e[107]),g.useEffect(xt,mo);let go,to;e[108]!==l||e[109]!==ne||e[110]!==Vt||e[111]!==Oe?(go=()=>{if(typeof window>"u"||!l||ne)return;const $e=tt=>{if(tt.defaultPrevented||tt.isComposing||tt.key!=="ArrowUp"&&tt.key!=="ArrowDown"||tt.altKey||tt.ctrlKey||tt.metaKey||tt.shiftKey)return;const{activeMainTab:fe}=Me.getState();if(fe!=="chat"||wR())return;const Ie=Oe.current;if(yR(document.activeElement,Ie)||G4(tt.target))return;tt.preventDefault();const ue=tt.key==="ArrowUp"?-1:1;Vt.scrollByTurnOffset(ue,{resumePastEnd:!1})};return window.addEventListener("keydown",$e),()=>{window.removeEventListener("keydown",$e)}},to=[l,ne,Vt,Oe],e[108]=l,e[109]=ne,e[110]=Vt,e[111]=Oe,e[112]=go,e[113]=to):(go=e[112],to=e[113]),g.useEffect(go,to);let Do;e[114]!==Oe?(Do=()=>{const $e=Oe.current;if(!$e)return;const tt=()=>{$e.style.setProperty("--chat-scroll-height",`${$e.clientHeight}px`)};tt();let fe=0;const Ie=()=>{fe||(fe=requestAnimationFrame(()=>{fe=0,tt()}))};if(typeof ResizeObserver>"u")return window.addEventListener("resize",Ie),()=>{fe&&cancelAnimationFrame(fe),window.removeEventListener("resize",Ie)};const ue=new ResizeObserver(Ie);return ue.observe($e),()=>{fe&&cancelAnimationFrame(fe),ue.disconnect()}},e[114]=Oe,e[115]=Do):Do=e[115];let Vo;e[116]!==l||e[117]!==ne||e[118]!==Oe?(Vo=[l,ne,Oe],e[116]=l,e[117]=ne,e[118]=Oe,e[119]=Vo):Vo=e[119],g.useLayoutEffect(Do,Vo);const vo=g.useRef(null),zo=!!l&&!A;let kt,Po;e[120]!==l||e[121]!==ot||e[122]!==ct?(kt=()=>{if(!l||vo.current===l)return;const $e=typeof window<"u"&&window.location.hash.length>0;if(vo.current=l,$e){ot();return}const tt=()=>{ct()};typeof window>"u"?tt():window.requestAnimationFrame(tt)},Po=[l,ot,ct],e[120]=l,e[121]=ot,e[122]=ct,e[123]=kt,e[124]=Po):(kt=e[123],Po=e[124]),g.useEffect(kt,Po);let Nt,ro;if(e[125]!==l||e[126]!==h||e[127]!==A?(Nt=()=>{l&&(A||h(l))},ro=[l,h,A],e[125]=l,e[126]=h,e[127]=A,e[128]=Nt,e[129]=ro):(Nt=e[128],ro=e[129]),g.useEffect(Nt,ro),!l&&!se){let $e;return e[130]===Symbol.for("react.memo_cache_sentinel")?($e=a.jsx("div",{className:"flex flex-col h-full bg-background",children:a.jsx(Pl,{})}),e[130]=$e):$e=e[130],$e}if(!l&&se){let $e;e[131]!==ne?($e=ne?null:a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(Pl,{})}),e[131]=ne,e[132]=$e):$e=e[132];const tt=ne?"flex-1 min-h-0 bg-background":"bg-background";let fe;e[133]!==tt?(fe=U("relative z-10",tt),e[133]=tt,e[134]=fe):fe=e[134];let Ie;e[135]!==xe||e[136]!==At?(Ie=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[135]=xe,e[136]=At,e[137]=Ie):Ie=e[137];let ue;e[138]!==fe||e[139]!==Ie?(ue=a.jsx("div",{className:fe,children:Ie}),e[138]=fe,e[139]=Ie,e[140]=ue):ue=e[140];let ke;return e[141]!==$e||e[142]!==ue?(ke=a.jsxs("div",{className:"relative flex flex-col h-full bg-background transform-gpu",children:[$e,ue]}),e[141]=$e,e[142]=ue,e[143]=ke):ke=e[143],ke}if(!l)return null;if(zo&&M.length===0&&!R){const $e=ne?"absolute inset-0 opacity-0 pointer-events-none":"flex-1";let tt;e[144]!==$e?(tt=U("relative min-h-0",$e),e[144]=$e,e[145]=tt):tt=e[145];let fe;e[146]===Symbol.for("react.memo_cache_sentinel")?(fe=a.jsx("div",{className:"absolute inset-0 overflow-y-auto overflow-x-hidden bg-background pt-6",style:sm,children:a.jsx("div",{className:"space-y-4",children:xR.map(jR)})}),e[146]=fe):fe=e[146];let Ie;e[147]!==ne||e[148]!==tt?(Ie=a.jsx("div",{className:tt,"aria-hidden":ne,children:fe}),e[147]=ne,e[148]=tt,e[149]=Ie):Ie=e[149];const ue=ne?"flex-1 min-h-0 bg-background":"bg-background";let ke;e[150]!==ue?(ke=U("relative z-10",ue),e[150]=ue,e[151]=ke):ke=e[151];let Ue;e[152]!==xe||e[153]!==At?(Ue=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[152]=xe,e[153]=At,e[154]=Ue):Ue=e[154];let Ze;e[155]!==ke||e[156]!==Ue?(Ze=a.jsx("div",{className:ke,children:Ue}),e[155]=ke,e[156]=Ue,e[157]=Ze):Ze=e[157];let Ke;return e[158]!==te||e[159]!==Ie||e[160]!==Ze?(Ke=a.jsxs("div",{className:"relative flex flex-col h-full bg-background",children:[te,Ie,Ze]}),e[158]=te,e[159]=Ie,e[160]=Ze,e[161]=Ke):Ke=e[161],Ke}if(M.length===0&&!R){const $e=ne?"absolute inset-0 opacity-0 pointer-events-none":"flex-1";let tt;e[162]!==$e?(tt=U("relative min-h-0",$e),e[162]=$e,e[163]=tt):tt=e[163];let fe;e[164]!==ne?(fe=ne?null:a.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a.jsx(Pl,{})}),e[164]=ne,e[165]=fe):fe=e[165];let Ie;e[166]!==ne||e[167]!==tt||e[168]!==fe?(Ie=a.jsx("div",{className:tt,"aria-hidden":ne,children:fe}),e[166]=ne,e[167]=tt,e[168]=fe,e[169]=Ie):Ie=e[169];const ue=ne?"flex-1 min-h-0 bg-background":"bg-background";let ke;e[170]!==ue?(ke=U("relative z-10",ue),e[170]=ue,e[171]=ke):ke=e[171];let Ue;e[172]!==xe||e[173]!==At?(Ue=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[172]=xe,e[173]=At,e[174]=Ue):Ue=e[174];let Ze;e[175]!==ke||e[176]!==Ue?(Ze=a.jsx("div",{className:ke,children:Ue}),e[175]=ke,e[176]=Ue,e[177]=Ze):Ze=e[177];let Ke;return e[178]!==te||e[179]!==Ie||e[180]!==Ze?(Ke=a.jsxs("div",{className:"relative flex flex-col h-full bg-background transform-gpu",children:[te,Ie,Ze]}),e[178]=te,e[179]=Ie,e[180]=Ze,e[181]=Ke):Ke=e[181],Ke}let So;e[182]!==k||e[183]!==l||e[184]!==mt||e[185]!==Gt||e[186]!==Xe||e[187]!==ne||e[188]!==Le||e[189]!==j||e[190]!==At||e[191]!==Q||e[192]!==Oe||e[193]!==R||e[194]!==ee||e[195]!==q||e[196]!==y||e[197]!==x||e[198]!==et.historySignals.hasMoreAboveTurns||e[199]!==et.isLoadingOlder||e[200]!==et.pendingRevealWork||e[201]!==et.renderedMessages||e[202]!==et.turnStart?(So=a.jsx(rm,{currentSessionId:l,isDesktopExpandedInput:ne,isMobile:j,stickyUserHeader:y,scrollRef:Oe,messageListRef:le,turnStart:et.turnStart,pendingRevealWork:et.pendingRevealWork,renderedMessages:et.renderedMessages,hasMoreAboveTurns:et.historySignals.hasMoreAboveTurns,isLoadingOlder:et.isLoadingOlder,sessionIsWorking:R,streamingMessageId:x,activeStreamingPhase:k,retryOverlay:Q,handleMessageContentChange:Xe,getAnimationHandlers:mt,handleLoadOlder:Gt,scrollToBottom:At,sessionQuestions:q,sessionPermissions:ee,isProgrammaticFollowActive:Le}),e[182]=k,e[183]=l,e[184]=mt,e[185]=Gt,e[186]=Xe,e[187]=ne,e[188]=Le,e[189]=j,e[190]=At,e[191]=Q,e[192]=Oe,e[193]=R,e[194]=ee,e[195]=q,e[196]=y,e[197]=x,e[198]=et.historySignals.hasMoreAboveTurns,e[199]=et.isLoadingOlder,e[200]=et.pendingRevealWork,e[201]=et.renderedMessages,e[202]=et.turnStart,e[203]=So):So=e[203];const at=ne?"flex-1 min-h-0 bg-background":"bg-background";let io;e[204]!==at?(io=U("relative z-10",at),e[204]=at,e[205]=io):io=e[205];let oo;e[206]!==ne||e[207]!==Vt.resumeToLatest||e[208]!==M.length||e[209]!==et.showScrollToBottom?(oo=!ne&&M.length>0&&a.jsx(BN,{visible:et.showScrollToBottom,onClick:Vt.resumeToLatest}),e[206]=ne,e[207]=Vt.resumeToLatest,e[208]=M.length,e[209]=et.showScrollToBottom,e[210]=oo):oo=e[210];let Rt;e[211]!==xe||e[212]!==At?(Rt=xe?a.jsx(Ja,{}):a.jsx(Wa,{scrollToBottom:At}),e[211]=xe,e[212]=At,e[213]=Rt):Rt=e[213];let Ct;e[214]!==io||e[215]!==oo||e[216]!==Rt?(Ct=a.jsxs("div",{className:io,children:[oo,Rt]}),e[214]=io,e[215]=oo,e[216]=Rt,e[217]=Ct):Ct=e[217];let jo;e[218]!==w||e[219]!==Vt.scrollByTurnOffset||e[220]!==At||e[221]!==S||e[222]!==et.scrollToMessage?(jo=a.jsx(tR,{open:w,onOpenChange:S,onScrollToMessage:et.scrollToMessage,onScrollByTurnOffset:Vt.scrollByTurnOffset,onResumeToLatest:At}),e[218]=w,e[219]=Vt.scrollByTurnOffset,e[220]=At,e[221]=S,e[222]=et.scrollToMessage,e[223]=jo):jo=e[223];let ho;return e[224]!==te||e[225]!==So||e[226]!==Ct||e[227]!==jo?(ho=a.jsxs("div",{className:"relative flex flex-col h-full bg-background",children:[te,So,Ct,jo]}),e[224]=te,e[225]=So,e[226]=Ct,e[227]=jo,e[228]=ho):ho=e[228],ho};function CR(t){return a.jsx(xN,{question:t},t.id)}function SR(t){return a.jsx(bN,{permission:t},t.id)}function kR(t){return t.currentSessionId}function MR(t){return t.openNewSessionDraft}function AR(t){return t.setCurrentSession}function FR(t){return t.newSessionDraft}function _R(t){return t.isExpandedInput}function BR(t){return t.stickyUserHeader}function DR(t){return t.isTimelineDialogOpen}function PR(t){return t.setTimelineDialogOpen}function TR(t){return t.permission??{}}function HR(t){return t.question??{}}function IR(t){return{id:t.id,parentID:t.parentID}}function ER(){}function jR(t){return a.jsx("div",{className:"group w-full",children:a.jsx("div",{className:"chat-message-column",children:a.jsxs("div",{className:"space-y-2.5 px-4 py-3",children:[a.jsx("div",{className:"space-y-1.5",children:t.toolRows.map(e=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ri,{className:"h-3.5 w-3.5 rounded-full flex-shrink-0"}),a.jsx(ri,{className:U("h-4 rounded-md",e.titleWidth)}),a.jsx(ri,{className:U("h-4 rounded-md",e.detailWidth)})]},`${t.id}-${e.id}`))}),a.jsxs("div",{className:"space-y-1.5 pt-1",children:[a.jsx(ri,{className:U("h-4 rounded-md",t.textWidths[0])}),a.jsx(ri,{className:U("h-4 rounded-md",t.textWidths[1])}),a.jsx(ri,{className:U("h-4 rounded-md",t.textWidths[2])})]})]})})},t.id)}const LR=()=>{const e=Te.getState().currentSessionId;if(!e)return"";const n=hi().find(s=>s.id===e);return typeof n?.directory=="string"?n.directory:""},VR=async(t,e=6e3)=>{const o=new AbortController,n=setTimeout(()=>o.abort(),e),s=Date.now();try{const r=await fetch(t,{method:"GET",headers:{Accept:"application/json"},signal:o.signal}),i=Date.now()-s,l=r.headers.get("content-type")||"",c=l.toLowerCase(),d=c.includes("json")&&!c.includes("text/html");let u="";if(d){const f=await r.json().catch(()=>null);if(Array.isArray(f))u=`json[array] len=${f.length}`;else if(f&&typeof f=="object"){const m=Object.keys(f).slice(0,8);u=`json[object] keys=${m.join(",")}${Object.keys(f).length>m.length?",…":""}`}else u=`json[${typeof f}]`}else u=l?`content-type=${l}`:"no content-type";return{ok:r.ok&&d,status:r.status,elapsedMs:i,summary:u}}catch(r){const i=Date.now()-s,c=o.signal.aborted||r instanceof Error&&(r.name==="AbortError"||r.message.toLowerCase().includes("aborted"))?`timeout after ${e}ms`:r instanceof Error?r.message:String(r);return{ok:!1,status:0,elapsedMs:i,summary:`error=${c}`}}finally{clearTimeout(n)}},NR=t=>{if(!t||!Number.isFinite(t))return"(n/a)";try{return new Date(t).toISOString()}catch{return"(invalid)"}},RR=t=>{if(typeof t=="number"&&Number.isFinite(t)&&t>0)return Math.trunc(t);if(typeof t=="string"){const e=Number.parseInt(t,10);if(Number.isFinite(e)&&e>0)return e}return null},zR=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Ws=(t,e="(n/a)")=>typeof t=="string"?t.trim()||e:typeof t=="number"&&Number.isFinite(t)?String(t):typeof t=="boolean"?t?"true":"false":e,F8=(t,e,o)=>t==="node-shebang"||t==="node-launcher"?e?`node (${e})`:"node":t==="bun-shebang"?o?`bun (${o})`:"bun":t||"direct executable",OR=async()=>{const t=new Date,e="1.0.2",o=typeof navigator<"u"?navigator.userAgent:"(no navigator)",n=LR(),s=Me.getState().eventStreamStatus,r=typeof window<"u"?window.location.origin:"",i=r?`${r.replace(/\/+$/,"")}/api/`:"",l=await(async()=>{if(!r)return null;const v=new AbortController,b=setTimeout(()=>v.abort(),5e3);try{const y=await fetch(`${r.replace(/\/+$/,"")}/health`,{method:"GET",headers:{Accept:"application/json"},signal:v.signal});if(!y.ok)return null;const w=await y.json().catch(()=>null);return!w||typeof w!="object"||Array.isArray(w)?null:w}catch{return null}finally{clearTimeout(b)}})(),c=await(async()=>{if(!r)return null;const v=new AbortController,b=setTimeout(()=>v.abort(),7e3);try{const y=await fetch(`${r.replace(/\/+$/,"")}/api/config/opencode-resolution`,{method:"GET",headers:{Accept:"application/json"},signal:v.signal}),w=y.headers.get("content-type")||"(none)";if(!y.ok)return{data:null,status:y.status,error:`http ${y.status} content-type=${w}`};const S=await y.text();let C=null;try{C=JSON.parse(S)}catch{const x=S.replace(/\s+/g," ").slice(0,120);return{data:null,status:y.status,error:`invalid json content-type=${w} body=${x||"(empty)"}`}}return!C||typeof C!="object"||Array.isArray(C)?{data:null,status:y.status,error:`invalid json-shape content-type=${w}`}:{data:C,status:y.status,error:null}}catch(y){return{data:null,status:null,error:y instanceof Error?y.message:String(y)}}finally{clearTimeout(b)}})()||{data:null,error:null},d=(v,b=!0)=>{if(!i)return null;const y=new URL(v.replace(/^\/+/,""),i);return b&&n&&y.searchParams.set("directory",n),y.toString()},u=[{label:"health",path:"/global/health",includeDirectory:!1},{label:"config",path:"/config",includeDirectory:!0},{label:"providers",path:"/config/providers",includeDirectory:!0},{label:"agents",path:"/agent",includeDirectory:!0,timeoutMs:12e3},{label:"commands",path:"/command",includeDirectory:!0,timeoutMs:1e4},{label:"project",path:"/project/current",includeDirectory:!0},{label:"path",path:"/path",includeDirectory:!0},{label:"sessions",path:"/session",includeDirectory:!0,timeoutMs:12e3},{label:"sessionStatus",path:"/session/status",includeDirectory:!0}],f=i?await Promise.all(u.map(async v=>{const b=d(v.path,v.includeDirectory!==!1);if(!b)return{label:v.label,url:"(none)",result:null};const y=await VR(b,typeof v.timeoutMs=="number"?v.timeoutMs:void 0);return{label:v.label,url:b,result:y}})):[],m=[];m.push(`Time: ${t.toISOString()}`),m.push(`Vinci version: ${e}`),m.push(`Runtime: ${r||"(unknown)"} (api=${r?r+"/api":"(unknown)"})`),m.push(`Event stream: ${s}`),m.push(`Directory: ${n||"(none)"}`),m.push(`Platform: ${o}`);const h=RR(l?.openCodePort);if(m.push(`OpenCode runtime port: ${h??"(unknown)"}`),typeof l?.openCodeRunning=="boolean"&&m.push(`OpenCode runtime running: ${l.openCodeRunning?"yes":"no"}`),typeof l?.openCodeSecureConnection=="boolean"&&m.push(`Secure OpenCode connection: ${l.openCodeSecureConnection?"true":"false"}`),typeof l?.openCodeAuthSource=="string"&&l.openCodeAuthSource.trim()&&m.push(`OpenCode auth source: ${l.openCodeAuthSource}`),typeof window<"u"){const v=window.__APP_MACOS_MAJOR__;typeof v=="number"&&Number.isFinite(v)&&v>0&&m.push(`macOS major: ${v}`)}if(/Mac OS X|Macintosh/.test(o)){m.push(""),m.push("OpenCode CLI resolution:");const v=zR(l?.lastOpenCodeLaunchDiagnostics)?l.lastOpenCodeLaunchDiagnostics:null,b=v&&Array.isArray(v.args)?v.args.filter(H=>typeof H=="string"):[],y=c.data,w=y&&typeof y.configured=="string"?y.configured:null,S=y&&typeof y.resolved=="string"?y.resolved:l&&typeof l.opencodeBinaryResolved=="string"?l.opencodeBinaryResolved:"",C=y&&typeof y.resolvedDir=="string"?y.resolvedDir:"",x=y&&typeof y.source=="string"?y.source:l&&typeof l.opencodeBinarySource=="string"?l.opencodeBinarySource:"",_=y&&typeof y.launchBinary=="string"?y.launchBinary:l&&typeof l.opencodeLaunchBinary=="string"?l.opencodeLaunchBinary:"",k=y&&typeof y.launchWrapperType=="string"?y.launchWrapperType:l&&typeof l.opencodeLaunchWrapperType=="string"?l.opencodeLaunchWrapperType:"",D=y&&Array.isArray(y.launchArgs)?y.launchArgs.filter(H=>typeof H=="string"):l&&Array.isArray(l.opencodeLaunchArgs)?l.opencodeLaunchArgs.filter(H=>typeof H=="string"):[],F=y&&typeof y.node=="string"?y.node:l&&typeof l.nodeBinaryResolved=="string"?l.nodeBinaryResolved:"",A=y&&typeof y.bun=="string"?y.bun:l&&typeof l.bunBinaryResolved=="string"?l.bunBinaryResolved:"",B=y&&typeof y.detectedNow=="string"?y.detectedNow:"",M=y&&typeof y.detectedSourceNow=="string"?y.detectedSourceNow:"";if(w!==null&&m.push(`- configured: ${w.trim().length===0?"(cleared)":w}`),S){const H=C||(S.includes("/")?S.split("/").slice(0,-1).join("/")||"/":"");m.push(`- opencode: ${S}${H?` (dir=${H})`:""}`)}else m.push("- opencode: (n/a)");m.push(`- source: ${x||"(n/a)"}`),B&&(m.push(`- detected-now: ${B}`),m.push(`- detected-source: ${M||"(n/a)"}`)),v?(m.push(`- launched-at: ${Ws(v.launchedAt)}`),m.push(`- launch: ${Ws(v.binary)} ${b.join(" ")}`.trim()),m.push(`- cwd: ${Ws(v.cwd)}`),m.push(`- wrapper: ${Ws(v.wrapperType)}`),m.push(`- runtime: ${F8(Ws(v.wrapperType,""),F,A)}`),m.push(`- PATH entries: ${Ws(v.pathEntryCount,"(unknown)")}`),m.push(`- shell env: ${Ws(v.hasShellEnv,"(unknown)")} (${Ws(v.shellEnvKeysCount,"?")} keys)`)):(m.push(`- launch-binary: ${_||"(n/a)"}`),m.push(`- launch-wrapper: ${k||"(n/a)"}`),m.push(`- launch-args: ${D.length?D.join(" "):"(none)"}`),m.push(`- runtime: ${F8(k||"",F,A)}`)),!y&&c.error&&m.push(`- resolution-endpoint: ${c.error}`)}if(m.push(""),f.length){m.push("OpenCode API probes:");for(const v of f){if(!v.result){m.push(`- ${v.label}: (no url)`);continue}const{ok:b,status:y,elapsedMs:w,summary:S}=v.result,C=b?"":` url=${v.url}`;m.push(`- ${v.label}: ${b?"ok":"fail"} status=${y} time=${w}ms ${S}${C}`)}}else m.push("OpenCode API probes: (skipped)");return m.push(""),m.push(`Generated: ${NR(Date.now())}`),m.join(`
|
|
6965
6965
|
`)},$R=async()=>{const t=await OR(),e=Me.getState();e.setOpenCodeStatusText(t),e.setOpenCodeStatusDialogOpen(!0)},ZR=2e4,im=()=>{if(typeof document>"u")return"visible";const t=document.visibilityState;return t==="hidden"&&document.hasFocus()?"visible":t},K4=t=>{if(!q2())return;const e=J2();e?.push?.setVisibility&&e.push.setVisibility({visible:t})},BZ=t=>{const e=de.c(3),o=t?.enabled??!0;let n,s;e[0]!==o?(n=()=>{if(!o||!q2()||typeof document>"u")return;const r=UR,i=qR,l=WR;r();const c=window.setInterval(i,ZR);return document.addEventListener("visibilitychange",r),window.addEventListener("pagehide",l),window.addEventListener("pageshow",r),window.addEventListener("focus",r),window.addEventListener("blur",r),()=>{window.clearInterval(c),document.removeEventListener("visibilitychange",r),window.removeEventListener("pagehide",l),window.removeEventListener("pageshow",r),window.removeEventListener("focus",r),window.removeEventListener("blur",r)}},s=[o],e[0]=o,e[1]=n,e[2]=s):(n=e[1],s=e[2]),g.useEffect(n,s)};function UR(){K4(im()==="visible")}function qR(){im()==="visible"&&K4(!0)}function WR(){K4(!1)}const GR="Vinci",_8=t=>t.replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()),KR=t=>{const o=t.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return o[o.length-1]??""},YR=(t,e)=>[t,e,GR].filter(n=>typeof n=="string"&&n.trim().length>0).join(" | "),DZ=()=>{const t=$t(r=>r.activeProjectId?r.projects.find(i=>i.id===r.activeProjectId)??null:null),e=g.useMemo(()=>{if(!t)return null;const r=t.label?.trim();if(r)return _8(r);const i=KR(t.path);return i?_8(i):null},[t]),[o,n]=g.useState(null);g.useEffect(()=>{if(typeof window>"u"||!hn()){n(null);return}let r=!1;const i=async()=>{try{const c=window.location.href,d=window.__APP_LOCAL_ORIGIN__||window.location.origin;if(E2(c,d)){r||n(null);return}const f=(await Lu()).hosts.find(h=>E2(c,h.url)),m=f?.label?.trim()?bn(f.label.trim()):"Instance";r||n(m)}catch{r||n("Instance")}};i();const l=()=>{i()};return window.addEventListener("focus",l),()=>{r=!0,window.removeEventListener("focus",l)}},[]);const s=g.useMemo(()=>YR(e,o),[e,o]);g.useEffect(()=>{if(typeof document<"u"&&(document.title=s),!Xt())return;(async()=>{try{if(typeof navigator<"u"&&/Macintosh|Mac OS X/.test(navigator.userAgent||""))return;await HD(s)}catch{return}})()},[s])},JR={getLastAssistantMessage(){const e=Te.getState().currentSessionId;if(!e)return console.log("[ERROR] No active session"),null;const o=Hn(e);if(!o||o.length===0)return console.log("[ERROR] No messages in current session"),null;for(let n=o.length-1;n>=0;n--){const s=o[n];if(s.role==="assistant"){const i=(Wn(s.id)||[]).map(h=>{const p={id:h.id,type:h.type};return h.type==="text"?(p.text=h.text,p.textLength=h.text?.length||0):h.type==="tool"?(p.tool=h.tool,p.state=h.state?.status):(h.type==="step-start"||h.type==="step-finish")&&(p.isStepMarker=!0),p}),l=i.some(h=>h.type==="text"&&h.text&&h.text.trim().length>0),c=i.some(h=>h.type==="tool"),d=i.some(h=>h.type==="step-start"||h.type==="step-finish"),u=i.length===0,f=!l&&!c&&(!u||d),m={messageId:s.id,role:s.role,timestamp:s.time?.created||0,partsCount:i.length,parts:i,isEmpty:u,isEmptyResponse:f,raw:s};return console.log("[INSPECT] Last Assistant Message:",m),console.log("[SUMMARY] Summary:",{messageId:m.messageId,partsCount:m.partsCount,isEmpty:m.isEmpty,isEmptyResponse:m.isEmptyResponse,hasText:l,hasTools:c,hasStepMarkers:d,onlyStepMarkers:d&&!l&&!c}),m.isEmpty&&console.warn("[WARNING] Message has NO parts!"),m.isEmptyResponse&&(console.warn("[WARNING] Message has parts but NO meaningful content (empty text, no tools)!"),d&&!l&&!c&&(console.warn("[CRITICAL] CLAUDE EMPTY RESPONSE BUG: Only step-start/step-finish markers, no actual content!"),console.log("This is a known issue with Claude models (anthropic provider)"),console.log("Recommendation: Send a follow-up message or try a different model"))),m}}return console.log("[ERROR] No assistant messages found in current session"),null},truncateString(t,e=80){return!t||typeof t!="string"||t.length<=e?t:t.substring(0,e)+"…"},truncateMessages(t){return t.map(e=>({...e,parts:(Wn(e.id)||[]).map(o=>{const n={...o};return"text"in o&&(n.text=this.truncateString(o.text)),"textPreview"in o&&(n.textPreview=this.truncateString(o.textPreview)),o.state&&(n.state={...o.state},"output"in o.state&&(n.state.output=this.truncateString(o.state.output)),"error"in o.state&&(n.state.error=this.truncateString(o.state.error)),o.state.metadata&&"preview"in o.state.metadata&&(n.state.metadata={...o.state.metadata,preview:this.truncateString(o.state.metadata.preview)})),n})}))},getAllMessages(t=!1){const o=Te.getState().currentSessionId;if(!o)return console.log("[ERROR] No active session"),[];const n=Hn(o);return console.log(`[MESSAGES] Total messages in session: ${n.length}`),n.forEach((s,r)=>{const i=Wn(s.id)||[];console.log(`[${r}] ${s.role} - ${s.id} - ${i.length} parts`)}),t?this.truncateMessages(n):n},async getAppStatus(){const t=Bo.getState(),e=Te.getState(),o=$t.getState(),n=t.currentDirectory||null,s=it.getDirectory()??null,r=hi(),i=new Set,l={};r.forEach(k=>{const D=k.directory;typeof D=="string"&&D.trim().length>0?(i.add(D),l[D]=(l[D]??0)+1):l["(none)"]=(l["(none)"]??0)+1});const c=(()=>{if(typeof window>"u")return{available:!1};try{return{available:!0,lastDirectory:window.localStorage.getItem("lastDirectory"),homeDirectory:window.localStorage.getItem("homeDirectory")}}catch(k){return{available:!1,error:k instanceof Error?k.message:String(k)}}})(),d=typeof window<"u"?window.__VINCI_RUNTIME_APIS__:null,u=typeof window<"u"&&!!window.__TAURI__,f=async k=>{try{return await k.json()}catch{return null}},m=async k=>{try{return await k.text()}catch{return null}},h=async k=>{try{const D=await fetch(k);return D.ok?await f(D):{status:D.status}}catch(D){return{error:D instanceof Error?D.message:String(D)}}};let p=null,v=null,b=null,y=null;const w=n?`/api/path?directory=${encodeURIComponent(n)}`:"/api/path";p=await h(w);const S=n?`/api/project/current?directory=${encodeURIComponent(n)}`:"/api/project/current";v=await h(S),b=await h("/api/config/settings");try{const k=await fetch("/api/health"),D=k.headers.get("content-type")||"",F=await m(k),A=D.toLowerCase().includes("application/json");let B=null;if(A&&F)try{const M=JSON.parse(F);M&&typeof M=="object"&&!Array.isArray(M)&&(B=M)}catch{B=null}y={status:k.status,ok:k.ok,contentType:D,type:A?"json":"html",openCodePort:B?.openCodePort??null,openCodeRunning:B?.openCodeRunning??null,openCodeSecureConnection:B?.openCodeSecureConnection??null,openCodeAuthSource:B?.openCodeAuthSource??null,isOpenCodeReady:B?.isOpenCodeReady??null,lastOpenCodeError:B?.lastOpenCodeError??null,preview:F?F.slice(0,120):null}}catch(k){y={error:k instanceof Error?k.message:String(k)}}let C={isGitRepo:null};if(n)try{C.isGitRepo=await p0(n)}catch(k){C={isGitRepo:null,error:k instanceof Error?k.message:String(k)}}const x=o.projects.map(k=>({id:k.id,path:k.path,label:k.label})),_={runtime:{platform:d?.runtime?.platform??null,isDesktop:u,isVSCode:!!d?.runtime?.isVSCode,hasRuntimeApis:!!d,desktopServerOrigin:null},location:typeof window<"u"?{href:window.location?.href??null,origin:window.location?.origin??null}:null,directories:{currentDirectory:n,opencodeDirectory:p?.directory||p?.worktree||s,homeDirectory:t.homeDirectory||null,isHomeReady:t.isHomeReady,hasPersistedDirectory:t.hasPersistedDirectory,isSwitchingDirectory:t.isSwitchingDirectory},projects:{total:o.projects.length,activeProjectId:o.activeProjectId,samples:x},sessions:{total:r.length,currentSessionId:e.currentSessionId,lastLoadedDirectory:e.lastLoadedDirectory,uniqueDirectories:i.size,directorySamples:Array.from(i).slice(0,5),directoryCounts:l},worktrees:{available:e.availableWorktrees.length,metadataEntries:e.worktreeMetadata.size},git:C,localStorage:c,opencode:{pathInfo:p,projectInfo:v,health:y},vinci:{settingsInfo:b}};return console.log("[DEBUG] App status snapshot:",_),_},async buildDiagnosticsReport(){const t=await this.getAppStatus();return JSON.stringify(t,null,2)},async copyTextToClipboard(t){return Xn(t)},async copyDiagnosticsReport(){const t=await this.buildDiagnosticsReport();return{...await this.copyTextToClipboard(t),report:t}},checkLastMessage(){const t=this.getLastAssistantMessage();if(!t)return!1;const e=t.isEmpty||t.isEmptyResponse;return e?(console.error("[ALERT] PROBLEMATIC MESSAGE DETECTED!"),console.log("Details:",{messageId:t.messageId,isEmpty:t.isEmpty,isEmptyResponse:t.isEmptyResponse,partsCount:t.partsCount}),t.parts.length>0&&console.log("Parts:",t.parts)):console.log("[OK] Last message looks good!"),e},getStreamingState(){const t=Te.getState(),e=Ii.getState(),o=t.currentSessionId?e.streamingMessageIds.get(t.currentSessionId)??null:null;return console.log("[STREAM] Streaming State:",{streamingMessageId:o,streamingMessageIds:Array.from(e.streamingMessageIds.entries()),messageStreamStates:Array.from(e.messageStreamStates.entries())}),{streamingMessageId:o,streamingMessageIds:e.streamingMessageIds,streamStates:e.messageStreamStates}},findEmptyMessages(){const e=Te.getState().currentSessionId;if(!e)return console.log("[ERROR] No active session"),[];const n=Hn(e).filter(s=>s.role==="assistant").filter(s=>{const r=Wn(s.id)||[],i=r.some(c=>c.type==="text"&&c.text&&c.text.trim().length>0),l=r.some(c=>c.type==="tool");return r.length===0||!i&&!l});return console.log(`[INSPECT] Found ${n.length} empty assistant messages`),n.forEach((s,r)=>{const i=Wn(s.id)||[];console.log(`[${r}] Empty message:`,{messageId:s.id,partsCount:i.length,provider:s.providerID,model:s.modelID,timestamp:s.time?.created})}),n},showRetryHelp(){console.log(`[DEBUG] How to handle empty Claude responses:
|
|
6966
6966
|
`),console.log("1. Check the last message:"),console.log(` __opencodeDebug.getLastAssistantMessage()
|
|
6967
6967
|
`),console.log("2. Find all empty messages in session:"),console.log(` __opencodeDebug.findEmptyMessages()
|