@openchamber/web 1.12.2 → 1.12.3

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.
Files changed (34) hide show
  1. package/dist/assets/{MarkdownRendererImpl-2INOOMmV.js → MarkdownRendererImpl-C2snGm6y.js} +1 -1
  2. package/dist/assets/{MultiRunWindow-BovvaCrr.js → MultiRunWindow-DXXoYCBh.js} +1 -1
  3. package/dist/assets/{NewWorktreeDialog-6y6rHfOQ.js → NewWorktreeDialog-C6394QE9.js} +1 -1
  4. package/dist/assets/OnboardingScreen-CLXmHHBW.js +1 -0
  5. package/dist/assets/{SessionSwitcherDropdown-DSXsR7zB.js → SessionSwitcherDropdown-BMN9gaXo.js} +1 -1
  6. package/dist/assets/{SettingsWindow-Dll7W_Kd.js → SettingsWindow-DXEjjH2f.js} +1 -1
  7. package/dist/assets/{TerminalView-D_ktT_L5.js → TerminalView-CePdcScA.js} +1 -1
  8. package/dist/assets/{es-9Cy-lgBh.js → es-rCA6AcBs.js} +1 -1
  9. package/dist/assets/{ko-BxmPoeb2.js → ko-CTiirGAp.js} +1 -1
  10. package/dist/assets/{main-BpZQobwD.js → main-D1IN8sAs.js} +2 -2
  11. package/dist/assets/{main-D8KFwoUt.js → main-DIwL7PaU.js} +46 -46
  12. package/dist/assets/{miniChat-BdEth0Oc.js → miniChat-DXW_W4_n.js} +2 -2
  13. package/dist/assets/{mobile-BxWzNO1C.js → mobile-DWyy0wq-.js} +2 -2
  14. package/dist/assets/{pl-J7oKZUR2.js → pl-CwJAYYhT.js} +1 -1
  15. package/dist/assets/{pt-BR-p6gRuJwx.js → pt-BR-xndordtt.js} +1 -1
  16. package/dist/assets/{renderElectronMiniChatApp-MNKYhIaT.js → renderElectronMiniChatApp-BmvjGDb_.js} +2 -2
  17. package/dist/assets/{renderMobileApp-DpYY7X9v.js → renderMobileApp-1BEmeUF9.js} +3 -3
  18. package/dist/assets/{uk-BOvMb8eG.js → uk-C52rE_cP.js} +1 -1
  19. package/dist/assets/{useAppFontEffects-DEZpweZZ.js → useAppFontEffects-hYm-4PtP.js} +4 -4
  20. package/dist/assets/{zh-CN-Cv0tBxN1.js → zh-CN-B7IfGwyh.js} +1 -1
  21. package/dist/assets/{zh-TW-CS7R6Ak3.js → zh-TW-DiO_1_-_.js} +1 -1
  22. package/dist/index.html +1 -1
  23. package/dist/mini-chat.html +1 -1
  24. package/dist/mobile.html +1 -1
  25. package/package.json +1 -1
  26. package/server/index.js +0 -15
  27. package/server/lib/fs/routes.js +28 -2
  28. package/server/lib/opencode/env-runtime.js +20 -158
  29. package/server/lib/opencode/env-runtime.test.js +38 -11
  30. package/server/lib/opencode/lifecycle.js +5 -24
  31. package/server/lib/opencode/lifecycle.test.js +0 -2
  32. package/server/lib/opencode/network-runtime.js +1 -1
  33. package/server/lib/opencode/routes.js +1 -1
  34. package/dist/assets/OnboardingScreen-B1Ft9kmW.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-.bun-TPgXvEwq.js","assets/vendor--V65Sl9C2.css","assets/MarkdownRendererImpl-2INOOMmV.js","assets/index-D9t9eCUC.js","assets/index-BDH6F8f2.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-.bun-TPgXvEwq.js","assets/vendor--V65Sl9C2.css","assets/MarkdownRendererImpl-C2snGm6y.js","assets/index-D9t9eCUC.js","assets/index-BDH6F8f2.css"])))=>i.map(i=>d[i]);
2
2
  import{_ as dn,aQ as Fb,b as Jt,I as Un,e as qo,L as Wo,c as le,R as g,j as a,aR as _b,H as se,aS as ga,aT as Bb,aU as F4,aV as Db,aW as Tb,aX as Pb,aY as Eb,aZ as Hb,a_ as Ib,a$ as jb,b0 as Lb,b1 as Nb,b2 as Rb,b3 as Vb,b4 as zb,b5 as Ob,b6 as $b,b7 as Zb,b8 as Ub,b9 as qb,ba as Wb,bb as Gb,bc as Kb,bd as Yb,be as Jb,bf as Qb,bg as Xb,bh as ey,bi as ty,f as Ji,a6 as _4,bj as Rl,bk as Mf,F as Af,$ as es,aP as ny,bl as Ff,bm as oy,bn as _f,bo as Bf,bp as sy,bq as Df,br as ry,bs as iy,bt as ay,bu as ly,bv as cy,u as Tf,g as id,D as Pf,m as Ef,S as Hf,v as dy,k as uy,o as If,C as jf,bw as fy,bx as my,by as hy,bz as py,bA as gy,bB as by,bC as yy,bD as vy,bE as wy,bF as xy,bG as Cy,bH as Sy,bI as Xr,N as ky,bJ as My,bK as Ay,bL as Fy,bM as _y,a4 as By,bN as Dy,bO as Ty,bP as Lf,bQ as Nf,bR as ad,bS as Rf,bT as Vf,bU as zf,bV as ji,bW as Of,aE as Py,aC as Ey,aD as Ye,bX as Hy,bY as Iy,bZ as jy,a9 as Q1,b_ as Ly,a8 as g5,b$ as Ny,c0 as Ry,c1 as Vy,c2 as zy,c3 as Oy,c4 as $y,T as b5,c5 as Zy}from"./vendor-.bun-TPgXvEwq.js";import{k as ei,a as wr,l as $f,b as We,g as B4,m as Uy,n as qy,o as Wy,p as Gy,q as Ky,t as Yy,u as Jy,v as Qy,w as Xy,x as ev,y as tv,z as nv,A as ov,B as sv,C as rv,D as iv,E as av,F as lv,G as cv,H as dv,I as uv,J as fv,K as mv,L as hv,M as pv,N as gv,O as bv,P as yv,Q as vv,R as wv,S as xv,T as Cv,U as Sv,V as kv,W as Mv,X as Av,Y as Fv,Z as _v,_ as Bv,$ as Dv,a0 as Tv,a1 as Pv,a2 as Ev,a3 as Hv,a4 as Iv,a5 as jv,a6 as Lv,a7 as Nv,a8 as Rv,a9 as Vv,aa as zv,ab as Ov,ac as $v,ad as Zv,ae as Uv,af as qv,ag as Wv,ah as Gv,ai as Kv,aj as Yv,ak as Jv,s as Zf,j as ld}from"./index-D9t9eCUC.js";const Qv=["local","remote",null],Xv=["ok","not-configured","unreachable","incompatible","wrong-service","missing"];function Uf(t){if(!t||typeof t!="object")return{valid:!1};const e=t,n=e.target,o=e.status;if(n!==null&&(typeof n!="string"||!Qv.includes(n)))return{valid:!1};if(typeof o!="string"||!Xv.includes(o))return{valid:!1};if(n==="remote"||n==="local"){if(o==="ok"&&n==="local")return{valid:!0,outcome:{target:"local",status:"ok"}};if(o==="ok"&&n==="remote")return typeof e.hostId!="string"||typeof e.url!="string"?{valid:!1}:{valid:!0,outcome:{target:"remote",status:"ok",hostId:e.hostId,url:e.url}};if(o==="unreachable")return n==="local"?{valid:!0,outcome:{target:"local",status:"unreachable"}}:typeof e.hostId!="string"||typeof e.url!="string"?{valid:!1}:{valid:!0,outcome:{target:"remote",status:"unreachable",hostId:e.hostId,url:e.url}};if(o==="incompatible"||o==="wrong-service")return n!=="remote"?{valid:!1}:typeof e.hostId!="string"||typeof e.url!="string"?{valid:!1}:{valid:!0,outcome:{target:"remote",status:o,hostId:e.hostId,url:e.url}};if(o==="missing")return n!=="remote"?{valid:!1}:typeof e.hostId!="string"?{valid:!1}:{valid:!0,outcome:{target:"remote",status:"missing",hostId:e.hostId}}}if(n===null){if(o==="not-configured")return{valid:!0,outcome:{target:null,status:"not-configured"}};if(o==="missing")return{valid:!1}}return{valid:!1}}function UY(t){if(!t.isDesktopShell)return null;const e=t.bootOutcome;if(!e)return null;if(e.status==="ok"){if(e.target==="local")return{screen:"main"};if(e.target==="remote")return{screen:"main",hostId:e.hostId,url:e.url}}if(e.target===null&&e.status==="not-configured")return{screen:"chooser"};if(e.target==="local"&&e.status==="unreachable")return{screen:"recovery",variant:"local-unavailable"};if(e.target==="remote"){if(e.status==="unreachable")return{screen:"recovery",variant:"remote-unreachable",hostId:e.hostId,url:e.url};if(e.status==="incompatible")return{screen:"recovery",variant:"remote-incompatible",hostId:e.hostId,url:e.url};if(e.status==="wrong-service")return{screen:"recovery",variant:"remote-wrong-service",hostId:e.hostId,url:e.url};if(e.status==="missing")return{screen:"recovery",variant:"remote-missing",hostId:e.hostId}}return null}function qY(t){return t.isDesktopShell?t.bootOutcomeKnown?t.bootViewIsMain===!1?!0:t.isInitialized:!1:t.isInitialized}function WY(t){return t.isDesktopShell&&!t.isDesktopLocalOriginActive}function ew(){if(tw()!=="valid")return null;const e=window.__OPENCHAMBER_DESKTOP_BOOT_OUTCOME__,n=Uf(e);return n.valid?n.outcome:null}function tw(){if(typeof window>"u")return"not-injected";const t=window.__OPENCHAMBER_DESKTOP_BOOT_OUTCOME__;return t==null?"not-injected":Uf(t).valid?"valid":"malformed"}let cd=null;const GY=t=>{cd=t},yo=()=>cd||(typeof window>"u"?null:window.__OPENCHAMBER_RUNTIME_APIS__??null),nw=()=>typeof window>"u"?null:window.__OPENCHAMBER_ELECTRON__??null,M1=()=>typeof window>"u"?null:window.__OPENCHAMBER_DESKTOP__??null,zi=()=>nw()?.runtime==="electron",qn=()=>typeof M1()?.invoke=="function",D4=()=>zi()&&qn(),Wn=async(t,e)=>{const n=M1();return typeof n?.invoke!="function"?null:n.invoke(t,e??{})},KY=async()=>{if(!D4()||!Do())return null;try{const t=await Wn("desktop_get_launch_at_login");return!t||typeof t.supported!="boolean"||typeof t.enabled!="boolean"?null:t}catch(t){return console.warn("Failed to get launch at login status",t),null}},YY=async t=>{if(!D4()||!Do())return null;try{const e=await Wn("desktop_set_launch_at_login",{enabled:t});return!e||typeof e.supported!="boolean"||typeof e.enabled!="boolean"?null:e}catch(e){return console.warn("Failed to set launch at login status",e),null}},y5=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}}},Vl=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}}},ow=t=>t.replace(/^\[|\]$/g,"").toLowerCase(),ba=t=>{const e=ow(t);return e==="localhost"||e==="127.0.0.1"||e==="::1"},Do=()=>{if(typeof window>"u"||!Et())return!1;if(ei()==="local")return!0;const t=typeof window.__OPENCHAMBER_LOCAL_ORIGIN__=="string"?window.__OPENCHAMBER_LOCAL_ORIGIN__:"",e=Vl(t),n=Vl(wr());if(!n&&e&&ew()?.target==="local")return!0;if(e&&n){if(e.origin===n.origin)return!0;const i=e.port||(e.protocol==="https:"?"443":"80"),l=n.port||(n.protocol==="https:"?"443":"80");return e.protocol===n.protocol&&i===l&&ba(e.hostname)&&ba(n.hostname)}const o=Vl(window.location.origin);if(e&&o){if(e.origin===o.origin)return!0;const i=e.port||(e.protocol==="https:"?"443":"80"),l=o.port||(o.protocol==="https:"?"443":"80");return e.protocol===o.protocol&&i===l&&ba(e.hostname)&&ba(o.hostname)}const s=y5(t),r=y5(window.location.origin)||window.location.origin;return s&&r&&s===r?!0:!!(o&&ba(o.hostname))},Et=()=>typeof window>"u"?!1:zi(),JY=async()=>{if(!Et())return!1;try{return await Wn("desktop_start_window_drag"),!0}catch{return!1}},Ht=()=>yo()?.runtime?.isVSCode===!0,Q0=()=>{const e=yo()?.runtime?.platform;return e==="web"?!0:e==="desktop"||e==="vscode"?!1:!Ht()},T4=async()=>{if(typeof window<"u"){const t=window.__OPENCHAMBER_HOME__;if(t&&t.length>0)return t}return null},QY=async t=>{if(qn()&&Do())try{const e=await M1()?.openDialog?.({directory:!0,multiple:!1,title:"Select Working Directory"});return!e||typeof e!="string"?{success:!1,error:"Directory selection cancelled"}:{success:!0,path:e}}catch(e){return console.warn("Failed to request directory access",e),{success:!1,error:e instanceof Error?e.message:String(e)}}return{success:!0,path:t}},XY=async t=>{if(qn()&&Do())try{const e=await M1()?.openDialog?.({directory:!1,multiple:!1,title:"Select File",...t?.filters?{filters:t.filters}:{},...t?.defaultPath?{defaultPath:t.defaultPath}:{}});return!e||typeof e!="string"?{success:!1,error:"File selection cancelled"}:{success:!0,path:e}}catch(e){return console.warn("Failed to request file access",e),{success:!1,error:e instanceof Error?e.message:String(e)}}return{success:!1,error:"Native file picker not available"}},eJ=async t=>({success:!0}),tJ=async t=>({success:!0}),nJ=async()=>{if(!qn())return null;try{return await Wn("desktop_check_for_updates")}catch(t){return console.warn("Failed to check for updates",t),null}},oJ=async t=>{if(!qn())return!1;const e=M1();let n=null,o=0,s;try{return typeof t=="function"&&e?.listen&&(n=await e.listen("openchamber:update-progress",r=>{const i=r?.payload;if(!i||typeof i!="object")return;const l=i,c=typeof l.event=="string"?l.event:null,d=l.data&&typeof l.data=="object"?l.data:null;if(c==="Started"){o=0,s=typeof d?.contentLength=="number"?d.contentLength:void 0,t({downloaded:o,total:s});return}if(c==="Progress"){const u=d?.downloaded,f=d?.total;typeof u=="number"&&(o=u),typeof f=="number"&&(s=f),t({downloaded:o,total:s});return}c==="Finished"&&t({downloaded:o,total:s})})),await Wn("desktop_download_and_install_update"),!0}catch(r){return console.warn("Failed to download update",r),!1}finally{if(n)try{const r=n();r instanceof Promise&&await r}catch{}}},sJ=async()=>qn()?sw():!1,sw=async()=>{if(!qn())return!1;try{return await Wn("desktop_restart"),!0}catch(t){return console.warn("Failed to restart desktop app",t),!1}},rJ=async()=>{if(!qn()||!Do())return null;try{const t=await Wn("desktop_get_lan_address");return typeof t=="string"&&t.trim().length>0?t.trim():null}catch(t){return console.warn("Failed to get desktop LAN address",t),null}},rw=async(t,e)=>{if(!qn()||!Do())return!1;const n=t?.trim();if(!n)return!1;try{return await Wn("desktop_open_path",{path:n,app:typeof e=="string"&&e.trim().length>0?e.trim():void 0}),!0}catch(o){return console.warn("Failed to open path",o),!1}},iJ=async t=>{if(!qn()||!Do())return!1;const e=t?.trim();if(!e)return!1;try{return await Wn("desktop_reveal_path",{path:e}),!0}catch{return rw(e)}},aJ=async(t,e)=>{if(!qn()||!Do())return null;const n=t?.trim();if(!n)return null;try{const o=await Wn("desktop_save_markdown_file",{defaultFileName:n,content:e});return typeof o=="string"&&o.trim().length>0?o:null}catch(o){return console.warn("Failed to save markdown file",o),null}},lJ=async(t,e,n)=>{if(!qn()||!Do())return!1;const o=t?.trim(),s=e?.trim(),r=n?.trim();if(!o||!s||!r)return!1;try{return await Wn("desktop_open_in_app",{projectPath:o,appId:s,appName:r}),!0}catch(i){return console.warn("Failed to open project in app",i),!1}},cJ=async(t,e,n)=>{if(!qn()||!Do())return!1;const o=t?.trim(),s=e?.trim(),r=n?.trim();if(!o||!s||!r)return!1;try{return await Wn("desktop_open_file_in_app",{filePath:o,appId:s,appName:r}),!0}catch(i){return console.warn("Failed to open file in app",i),!1}},dJ=async(t,e)=>{if(!qn()||!Do())return{apps:[],success:!1,hasCache:!1,isCacheStale:!1};const n=Array.isArray(t)?t.filter(o=>typeof o=="string"):[];if(n.length===0)return{apps:[],success:!0,hasCache:!1,isCacheStale:!1};try{const o=await Wn("desktop_get_installed_apps",{apps:n,force:e===!0?!0:void 0});if(!o||typeof o!="object")return{apps:[],success:!1,hasCache:!1,isCacheStale:!1};const s=o;return Array.isArray(s.apps)?{apps:s.apps.filter(i=>i&&typeof i=="object").map(i=>{const l=i;return{name:typeof l.name=="string"?l.name:"",iconDataUrl:typeof l.iconDataUrl=="string"?l.iconDataUrl:null}}).filter(i=>i.name.length>0),success:!0,hasCache:s.hasCache===!0,isCacheStale:s.isCacheStale===!0}:{apps:[],success:!1,hasCache:!1,isCacheStale:!1}}catch(o){return console.warn("Failed to fetch installed apps",o),{apps:[],success:!1,hasCache:!1,isCacheStale:!1}}},iw=300*1e3,aw=250,lw=t=>t.replace(/\\/g,"/").replace(/\/+$/,"")||t,X0=new Map,Ua=new Map,el=t=>lw(t),cw=async t=>{const e=yo()?.git;return e?.worktree?.bootstrapStatus?e.worktree.bootstrapStatus(t):e?.getGitWorktreeBootstrapStatus?e.getGitWorktreeBootstrapStatus(t):$f(t)},dw=t=>{const e=el(t);e&&X0.set(e,{status:"pending",error:null,updatedAt:Date.now()})},uw=t=>{const e=el(t);e&&(X0.delete(e),Ua.delete(e))},fw=(t,e)=>{const n=el(t);n&&(X0.set(n,e),e.status!=="pending"&&Ua.delete(n))},mw=async(t,e)=>{const n=Date.now();for(;Date.now()-n<e;){const o=await cw(t);if(fw(t,o),o.status==="ready")return;if(o.status==="failed")throw new Error(o.error||"Worktree bootstrap failed");await new Promise(s=>setTimeout(s,aw))}throw new Error("Timed out waiting for worktree bootstrap")},dd=async(t,e=iw)=>{const n=el(t);if(!n)return;const o=X0.get(n);if(!o||o?.status==="ready")return;if(o?.status==="failed")throw new Error(o.error||"Worktree bootstrap failed");const s=Ua.get(n);if(s)return s;const r=mw(t,e).finally(()=>{Ua.delete(n)});return Ua.set(n,r),r},v5=500,qf=()=>{if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).get("startupTrace")==="1"||window.localStorage?.getItem("OPENCHAMBER_STARTUP_TRACE")==="1"}catch{return!1}},uJ=()=>qf(),Tt=(t,e)=>{if(!qf())return;const n=typeof performance<"u"?performance.now():Date.now();window.__OPENCHAMBER_STARTUP_TRACE_START__??=n,window.__OPENCHAMBER_STARTUP_TRACE__??=[],window.__OPENCHAMBER_STARTUP_TRACE__.push({t:Math.round(n-window.__OPENCHAMBER_STARTUP_TRACE_START__),name:t,...e?{data:e}:{}}),window.__OPENCHAMBER_STARTUP_TRACE__.length>v5&&window.__OPENCHAMBER_STARTUP_TRACE__.splice(0,window.__OPENCHAMBER_STARTUP_TRACE__.length-v5)},hw=()=>{const t=typeof window<"u"?window.__OPENCHAMBER_STARTUP_TRACE__??[]:[],e=t.findIndex(o=>o.name==="ModelControls:ready"),n=e>=0?Math.min(t.length,e+8):t.length;return t.slice(0,n).filter(o=>o.name.includes("checkConnection")||o.name.includes("checkHealth")||o.name.includes("initializeApp")||o.name.includes("initApp")||o.name.includes("loadProviders")||o.name.includes("loadAgents")||o.name.includes("config.defaults")||o.name.includes("modelsMetadata")||o.name.includes("ModelControls")||o.name.includes("activateDirectory")||o.name.includes("opencodeClient:setDirectory"))};typeof window<"u"&&(window.__OPENCHAMBER_STARTUP_TRACE_SUMMARY__=hw);const G2=async(t,e,n)=>{const o=typeof performance<"u"?performance.now():Date.now();Tt(`${t}:start`,n);try{const s=await e(),r=typeof performance<"u"?performance.now():Date.now();return Tt(`${t}:end`,{durationMs:Math.round(r-o)}),s}catch(s){const r=typeof performance<"u"?performance.now():Date.now();throw Tt(`${t}:error`,{durationMs:Math.round(r-o),error:s instanceof Error?s.message:String(s)}),s}},pw=3,gw=3e4,bw=1e3,Wf=32e3,yw=3,vw=3600*1e3,ww=600*1e3,Gf=new Set([429,502,503,504]),Qi=new Map;function xw(){const t=Date.now();for(const[e,n]of Qi)n.consecutiveErrors===0&&t-n.lastErrorAt>vw&&Qi.delete(e)}typeof setInterval<"u"&&setInterval(xw,ww).unref?.();function Cw(t){let e=Qi.get(t);return e||(e={consecutiveErrors:0,lastErrorAt:0,circuitOpen:!1,circuitOpenAt:0,circuitCooldownMs:gw},Qi.set(t,e)),e}function Sw(t){if(!t)return;const e=Qi.get(t);e&&(e.consecutiveErrors=0,e.lastErrorAt=0)}function w5(t,e){if(!t)return;const n=Cw(t);n.consecutiveErrors+=1,n.lastErrorAt=Date.now(),kw(e)&&n.consecutiveErrors>=pw&&(n.circuitOpen=!0,n.circuitOpenAt=Date.now(),console.warn(`[provider-tracker] Circuit opened for ${t} after ${n.consecutiveErrors} consecutive errors`))}function kw(t){return t!==void 0&&Gf.has(t)}function Kf(t){const e=Qi.get(t);return e?.circuitOpen?Date.now()-e.circuitOpenAt>=e.circuitCooldownMs?(e.circuitOpen=!1,e.consecutiveErrors=0,e.circuitCooldownMs=Math.min(e.circuitCooldownMs*2,Wf*4),!1):!0:!1}function Mw(t,e,n){return!(!Gf.has(e)||n>=yw-1||Kf(t))}function Aw(t){if(!(!t||!Kf(t)))throw new Error(`Provider ${t} is temporarily unavailable after repeated errors. Please retry shortly.`)}function x5(t){const e=bw*2**t;return Math.min(e,Wf)}const C5="/api";function qa(t){if(t instanceof Error)return t.message;if(typeof t=="string")return t;if(t&&typeof t=="object"&&"message"in t&&typeof t.message=="string")return t.message;try{return JSON.stringify(t)}catch{return String(t)}}function Mo(t,e){if(t.error){const n=t.response?.status,o=new Error(`${e} failed${n?` (${n})`:""}: ${qa(t.error)}`);throw n!==void 0&&(o.status=n),o}if(t.data===void 0||t.data===null)throw new Error(`${e} failed: empty response`);return t.data}function pi(t,e){if(t.error){const n=t.response?.status,o=new Error(`${e} failed${n?` (${n})`:""}: ${qa(t.error)}`);throw n!==void 0&&(o.status=n),o}return t.data}const Fw=/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//,S5="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",_w=14;let k5=0,zl=0;const Bw=t=>{const e=new Uint8Array(t);if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(e);else for(let o=0;o<t;o+=1)e[o]=Math.floor(Math.random()*256);let n="";for(let o=0;o<t;o+=1)n+=S5[e[o]%S5.length];return n},M5=t=>{const e=Date.now();e!==k5&&(k5=e,zl=0),zl+=1;const n=BigInt(e)*BigInt(4096)+BigInt(zl),o=new Uint8Array(6);for(let r=0;r<6;r+=1)o[r]=Number(n>>BigInt(40-8*r)&BigInt(255));const s=Array.from(o,r=>r.toString(16).padStart(2,"0")).join("");return`${t}_${s}${Bw(_w)}`},Dw=t=>t instanceof DOMException&&t.name==="AbortError"||t instanceof TypeError,A5=t=>{const e=typeof t=="string"&&t.trim().length>0?t.trim():"/api";if(Fw.test(e)||typeof window>"u")return e;const n=window.location?.href||window.location?.origin;if(!n)return e;try{return new URL(e,n).toString()}catch(o){return console.warn("Failed to normalize OpenCode base URL:",o),e}},F5=()=>{try{return B4().api("/api")}catch{return null}},Ol=t=>Fb({...t,fetch:We}),gi=t=>t.replace(/\\/g,"/"),_5=400,B5=()=>{const t=yo();return t&&t.runtime?.isDesktop&&t.files?t.files:null};class Tw{client;baseUrl;scopedClients=new Map;currentDirectory=void 0;directoryContextQueue=Promise.resolve();listDirectoryInFlight=new Map;listDirectoryCache=new Map;constructor(e=C5){const o=F5()||e;this.baseUrl=A5(o),this.client=Ol({baseUrl:this.baseUrl})}getBaseUrl(){return this.baseUrl}reconnectToRuntimeBaseUrl(){const e=F5(),n=A5(e||C5);n!==this.baseUrl&&(this.baseUrl=n,this.client=Ol({baseUrl:this.baseUrl}),this.scopedClients.clear(),this.listDirectoryInFlight.clear(),this.listDirectoryCache.clear())}getSdkClient(){return this.client}getScopedSdkClient(e){return this.getScopedApiClient(e)}getScopedApiClient(e){const n=this.normalizeCandidatePath(e)??e,o=n||"",s=this.scopedClients.get(o);if(s)return s;const r=Ol({baseUrl:this.baseUrl,directory:n});return this.scopedClients.set(o,r),r}normalizeCandidatePath(e){if(typeof e!="string")return null;const n=e.trim();if(!n)return null;const o=n.replace(/\\/g,"/").replace(/^([a-z]):/,(r,i)=>i.toUpperCase()+":");return(o.length>1?o.replace(/\/+$/,""):o)||null}deriveHomeDirectory(e){const n=e.match(/^([A-Za-z]:)(?:\/|$)/);if(n){const r=n[1],l=e.slice(r.length+(e.charAt(r.length)==="/"?1:0)).split("/").filter(Boolean);return l.length>=2?{homeDirectory:`${r}/${l[0]}/${l[1]}`,username:l[1]}:l.length===1?{homeDirectory:`${r}/${l[0]}`,username:l[0]}:{homeDirectory:r,username:void 0}}const o=e.startsWith("/"),s=e.split("/").filter(Boolean);return s.length>=2&&(s[0]==="Users"||s[0]==="home")?{homeDirectory:`${o?"/":""}${s[0]}/${s[1]}`,username:s[1]}:o?s.length===0?{homeDirectory:"/",username:void 0}:{homeDirectory:`/${s.join("/")}`,username:s[s.length-1]}:s.length>0?{homeDirectory:`/${s.join("/")}`,username:s[s.length-1]}:{homeDirectory:"/",username:void 0}}setDirectory(e){const n=this.normalizeCandidatePath(e)??e;this.currentDirectory!==n&&Tt("opencodeClient:setDirectory",{previous:this.currentDirectory??null,next:n??null}),this.currentDirectory=n}getDirectory(){return this.currentDirectory}async withDirectory(e,n){const o=async()=>{if(e==null)return n();const r=this.currentDirectory,i=this.normalizeCandidatePath(e)??e;this.currentDirectory=i;try{return await n()}finally{this.currentDirectory===i&&(this.currentDirectory=r)}},s=this.directoryContextQueue.then(o,o);return this.directoryContextQueue=s.then(()=>{},()=>{}),s}getApiClient(){return this.client}async getSystemInfo(){const e=new Set,n=s=>{const r=this.normalizeCandidatePath(s);r&&e.add(r)};try{const r=(await this.client.path.get(this.currentDirectory?{directory:this.currentDirectory}:void 0)).data;r&&(n(r.directory),n(r.worktree),n(r.state))}catch(s){console.debug("Failed to load path info:",s)}if(!e.size)try{const s=await this.client.project.current(this.currentDirectory?{directory:this.currentDirectory}:void 0);n(s.data?.worktree)}catch(s){console.debug("Failed to load project info:",s)}if(!e.size)try{(await this.listSessions()).forEach(r=>n(r.directory))}catch(s){console.debug("Failed to inspect sessions for system info:",s)}if(n(this.currentDirectory),typeof window<"u")try{n(window.localStorage.getItem("lastDirectory")),n(window.localStorage.getItem("homeDirectory"))}catch{}if(!e.size&&typeof process<"u"&&typeof process.cwd=="function"&&n(process.cwd()),!e.size)return{homeDirectory:"/",username:void 0};const[o]=Array.from(e);return this.deriveHomeDirectory(o)}async probeDirectory(e){const n=this.normalizeCandidatePath(e);if(!n)return!1;try{const s=(await this.client.path.get({directory:n})).data,r=typeof s?.directory=="string"?s.directory:null;return!!(r&&r.trim().length>0)}catch{return!1}}async listSessions(){const e=await this.client.session.list(this.currentDirectory?{directory:this.currentDirectory}:void 0);return Array.isArray(e.data)?e.data:[]}async createSession(e,n){const o=this.normalizeCandidatePath(n)??this.currentDirectory,s=await this.client.session.create({...o?{directory:o}:{},parentID:e?.parentID,title:e?.title});return Mo(s,"session.create")}async getSession(e){const n=await this.client.session.get({sessionID:e,...this.currentDirectory?{directory:this.currentDirectory}:{}});return Mo(n,"session.get")}async deleteSession(e,n){const o=this.normalizeCandidatePath(n)??this.currentDirectory,s=await this.client.session.delete({sessionID:e,...o?{directory:o}:{}});return pi(s,"session.delete")===!0}async updateSession(e,n,o){const s=this.normalizeCandidatePath(o)??this.currentDirectory,r={...n.title!==void 0?{title:n.title}:{},...n.time?.archived!==void 0&&n.time.archived!==null?{time:{archived:n.time.archived}}:{}},i=await this.client.session.update({sessionID:e,...s?{directory:s}:{},...r});return Mo(i,"session.update")}async getSessionMessages(e,n){const o=await this.client.session.messages({sessionID:e,...this.currentDirectory?{directory:this.currentDirectory}:{},...typeof n=="number"?{limit:n}:{}});return Mo(o,"session.messages")}async getSessionTodos(e){try{const n=await this.client.session.todo({sessionID:e,...this.currentDirectory?{directory:this.currentDirectory}:{}});if(n.error)return[];const o=n.data;return!o||!Array.isArray(o)?[]:o}catch{return[]}}shouldNormalizeToTextPlain(e){if(!e)return!1;const n=e.toLowerCase();return n.startsWith("text/")&&n!=="text/plain"?!0:["application/json","application/xml","application/javascript","application/typescript","application/x-yaml","application/yaml","application/toml","application/x-sh","application/x-shellscript","application/octet-stream","image/svg+xml"].includes(n)}isHeicMime(e){if(!e)return!1;const n=e.toLowerCase();return n==="image/heic"||n==="image/heif"}async convertHeicToJpeg(e){try{const n=(await dn(async()=>{const{default:f}=await import("./vendor-.bun-TPgXvEwq.js").then(m=>m.h);return{default:f}},__vite__mapDeps([0,1]))).default,o=e.url.indexOf(",");if(o===-1)return e;const s=e.url.substring(o+1),r=atob(s),i=new Uint8Array(r.length);for(let f=0;f<r.length;f++)i[f]=r.charCodeAt(f);const l=new Blob([i],{type:e.mime}),c=await n({blob:l,toType:"image/jpeg",quality:.9}),d=await new Promise((f,m)=>{const h=new FileReader;h.onload=()=>f(h.result),h.onerror=m,h.readAsDataURL(c)});let u=e.filename;return u&&(u=u.replace(/\.heic$/i,".jpg").replace(/\.heif$/i,".jpg")),{mime:"image/jpeg",filename:u,url:d}}catch(n){return console.warn("Failed to convert HEIC to JPEG:",n),e}}async normalizeFilePart(e){if(this.isHeicMime(e.mime))return this.convertHeicToJpeg(e);if(!this.shouldNormalizeToTextPlain(e.mime))return e;let n=e.url;if(e.url.startsWith("data:")){const o=e.url.indexOf(",");if(o!==-1){const s=e.url.substring(5,o),r=e.url.substring(o);n=`data:${s.replace(/^[^;,]+/,"text/plain")}${r}`}}return{mime:"text/plain",filename:e.filename,url:n}}async toNormalizedFilePartInput(e){const n=await this.normalizeFilePart(e);return{...e.id?{id:e.id}:{},type:"file",mime:n.mime,filename:n.filename,url:n.url}}async sendMessage(e){const n=e.messageId??M5("msg"),o=[];if(e.prefaceText&&e.prefaceText.trim()&&o.push({type:"text",text:e.prefaceText,synthetic:e.prefaceTextSynthetic!==!1}),e.text&&e.text.trim()){const i={type:"text",text:e.text};o.push(i)}if(e.files&&e.files.length>0)for(const i of e.files){const l=await this.toNormalizedFilePartInput(i);o.push(l)}if(e.additionalParts&&e.additionalParts.length>0){for(const i of e.additionalParts)if(i.text&&i.text.trim()&&o.push({type:"text",text:i.text,...i.synthetic?{synthetic:!0}:{}}),i.files&&i.files.length>0)for(const l of i.files){const c=await this.toNormalizedFilePartInput(l);o.push(c)}}if(e.agentMentions&&e.agentMentions.length>0)for(const i of e.agentMentions)i?.name&&o.push({type:"agent",name:i.name,...i.source?{source:i.source}:{}});if(o.length===0)throw new Error("Message must have at least one part (text or file)");const s=this.normalizeCandidatePath(e.directory??null)??this.currentDirectory;s&&await dd(s),e.format&&console.info("[git-generation][browser] send structured message",{sessionId:e.id,providerID:e.providerID,modelID:e.modelID,agent:e.agent,variant:e.variant,directory:s,baseUrl:this.baseUrl,formatType:e.format.type}),Aw(e.providerID);let r;for(let i=0;i<3;i++){try{const u=await this.client.session.promptAsync({sessionID:e.id,...s?{directory:s}:{},model:{providerID:e.providerID,modelID:e.modelID},agent:e.agent,variant:e.variant,messageID:n,...e.format?{format:e.format}:{},parts:o});if(u.response instanceof Response)r=u.response;else if(u.error){const f=u.response?.status||500;r=new Response(JSON.stringify(u.error),{status:f})}else r=new Response(JSON.stringify(u.data??!0),{status:200})}catch(u){if(i<2&&Dw(u)){const f=x5(i);console.warn(`[prompt] fetch failed for ${e.providerID}/${e.modelID} (attempt ${i+1}/3), retrying in ${f}ms`,u?.message),await new Promise(m=>setTimeout(m,f));continue}throw w5(e.providerID),u}if(r.ok)return Sw(e.providerID),n;if(Mw(e.providerID,r.status,i)){const u=x5(i);console.warn(`[prompt] ${r.status} for ${e.providerID}/${e.modelID} (attempt ${i+1}/3), retrying in ${u}ms`),await new Promise(f=>setTimeout(f,u));continue}let l="";try{l=await r.text()}catch{}const c=l&&l.trim().length>0?`: ${l.trim()}`:"",d=new Error(`Failed to send message (${r.status})${c}`);throw w5(e.providerID,r.status),d}throw new Error("Failed to send message after retries")}async sendCommand(e){const n=e.messageId??M5("msg"),o=[];if(e.files&&e.files.length>0)for(const i of e.files)o.push(await this.toNormalizedFilePartInput(i));const s=this.normalizeCandidatePath(e.directory??null)??this.currentDirectory,r=await this.client.session.command({sessionID:e.id,...s?{directory:s}:{},command:e.command,arguments:e.arguments??"",model:`${e.providerID}/${e.modelID}`,agent:e.agent,variant:e.variant,...o.length>0?{parts:o}:{},messageID:n});return pi(r,"session.command"),n}async abortSession(e){return!!(await this.client.session.abort({sessionID:e,...this.currentDirectory?{directory:this.currentDirectory}:{}},{throwOnError:!0})).data}async shellSession(e){const n=this.normalizeCandidatePath(e.directory??null)??this.currentDirectory,o=await this.client.session.shell({sessionID:e.sessionId,...n?{directory:n}:{},messageID:e.messageId,agent:e.agent,model:e.model,command:e.command});return Mo(o,"session.shell")}async revertSession(e,n,o,s){const r=this.normalizeCandidatePath(s)??this.currentDirectory,i=await this.client.session.revert({sessionID:e,...r?{directory:r}:{},messageID:n,partID:o});return Mo(i,"session.revert")}async summarizeSession(e,n,o,s){const r=this.normalizeCandidatePath(s)??this.currentDirectory,i=await this.client.session.summarize({sessionID:e,...r?{directory:r}:{},providerID:n,modelID:o});return pi(i,"session.summarize")===!0}async unrevertSession(e){const n=await this.client.session.unrevert({sessionID:e,...this.currentDirectory?{directory:this.currentDirectory}:{}});return Mo(n,"session.unrevert")}async forkSession(e,n,o){const s=this.normalizeCandidatePath(o)??this.currentDirectory,r=await this.client.session.fork({sessionID:e,...s?{directory:s}:{},messageID:n});return Mo(r,"session.fork")}async getSessionStatus(){return await this.getSessionStatusForDirectory(this.currentDirectory??null)??{}}async getSessionStatusForDirectory(e){try{const n=typeof e=="string"?e.trim():"",o=await this.client.session.status(n?{directory:n}:void 0);return o.error||!o.data||typeof o.data!="object"?null:o.data}catch{return null}}async getGlobalSessionStatus(){return await this.getSessionStatusForDirectory(null)??{}}async getWebServerSessionActivity(){try{const e=await We("/api/session-activity",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)return null;const n=await e.json().catch(()=>null);return!n||typeof n!="object"?null:n}catch{return null}}async listToolIds(e){try{const n=typeof e?.directory=="string"?e.directory.trim():this.currentDirectory?this.currentDirectory.trim():"";return((await this.client.tool.ids(n?{directory:n}:void 0)).data||[]).filter(r=>typeof r=="string"&&r!=="invalid")}catch{return[]}}async replyToPermission(e,n,o){const s=this.normalizeCandidatePath(o?.directory??null)??this.currentDirectory,r=await this.client.permission.reply({requestID:e,...s?{directory:s}:{},reply:n,...o?.message?{message:o.message}:{}});return pi(r,"permission.reply")===!0}async listPendingPermissions(e){const n=[],o=async c=>{const d=typeof c=="string"?c.trim():"",u=await this.client.permission.list(d?{directory:d}:void 0);if(u.error)throw new Error(`permission.list failed: ${qa(u.error)}`);return u.data||[]};n.push(o(null));const s=new Set;for(const c of e?.directories??[]){const d=this.normalizeCandidatePath(c??null);d&&s.add(d)}for(const c of s)n.push(o(c));const r=await Promise.all(n),i=[],l=new Set;for(const c of r)for(const d of c){if(!d||typeof d!="object")continue;const u=d.id;typeof u!="string"||u.length===0||l.has(u)||(l.add(u),i.push(d))}return i}async replyToQuestion(e,n,o){const s=!Array.isArray(n)||n.length===0?[]:Array.isArray(n[0])?n:[n],r=this.normalizeCandidatePath(o)??this.currentDirectory,i=await this.client.question.reply({requestID:e,...r?{directory:r}:{},answers:s});return pi(i,"question.reply")===!0}async rejectQuestion(e){const n=await this.client.question.reject({requestID:e,...this.currentDirectory?{directory:this.currentDirectory}:{}});return pi(n,"question.reject")===!0}async listPendingQuestions(e){const n=[],o=async c=>{const d=typeof c=="string"?c.trim():"",u=await this.client.question.list(d?{directory:d}:void 0);if(u.error)throw new Error(`question.list failed: ${qa(u.error)}`);return u.data||[]};n.push(o(null));const s=new Set;for(const c of e?.directories??[]){const d=this.normalizeCandidatePath(c??null);d&&s.add(d)}for(const c of s)n.push(o(c));const r=await Promise.all(n),i=[],l=new Set;for(const c of r)for(const d of c){if(!d||typeof d!="object")continue;const u=d.id;typeof u!="string"||u.length===0||l.has(u)||(l.add(u),i.push(d))}return i}async getConfig(){const e=await this.client.config.get();if(!e.data)throw new Error("Failed to get config");return e.data}async updateConfig(e){const n=await this.client.config.update({config:e});return Mo(n,"global.config.update")}async updateConfigPartial(e){const n=await this.getConfig(),o=e(n);return await this.updateConfig(o)}async getProviders(){const e=await this.client.config.providers(this.currentDirectory?{directory:this.currentDirectory}:void 0);if(!e.data)throw new Error("Failed to get providers");return e.data}async getApp(){return{version:"0.0.3",config:await this.getConfig()}}async initApp(){try{return await this.checkHealth()}catch{return!1}}async listAgents(){const e=await this.client.app.agents(this.currentDirectory?{directory:this.currentDirectory}:void 0);if(e.error)throw new Error(`app.agents failed: ${qa(e.error)}`);return e.data||[]}async readFile(e){try{const n=await this.client.file.read({path:e,...this.currentDirectory?{directory:this.currentDirectory}:{}});return String(Mo(n,"file.read"))}catch{return`// Content of ${e}
3
3
  // This would be loaded from the server`}}async listFiles(e){try{const n=e||this.currentDirectory||"/",o=await this.client.file.list({path:n,...this.currentDirectory?{directory:this.currentDirectory}:{}}),s=Mo(o,"file.list");return Array.isArray(s)?s:[]}catch{return[]}}async listCommands(){const e=await this.client.command.list(this.currentDirectory?{directory:this.currentDirectory}:void 0);return(Mo(e,"command.list")||[]).map(o=>({name:o.name,description:o.description,agent:o.agent,model:o.model,source:o.source}))}async listCommandsWithDetails(){const e=await this.client.command.list(this.currentDirectory?{directory:this.currentDirectory}:void 0);return(Mo(e,"command.list")||[]).map(o=>({name:o.name,description:o.description,agent:o.agent,model:o.model,source:o.source,template:o.template}))}async listSkillsWithDetails(){try{const n=(await this.client.app.skills(this.currentDirectory?{directory:this.currentDirectory}:void 0)).data;if(!Array.isArray(n))return[];const o=[];for(const s of n){const r=typeof s.name=="string"?s.name.trim():"",i=typeof s.location=="string"?s.location:"";if(!r||!i)continue;const l={name:r,location:i};typeof s.description=="string"&&(l.description=s.description),typeof s.content=="string"&&(l.content=s.content),o.push(l)}return o}catch{return[]}}async getCommandDetails(e){try{const n=await this.client.command.list(this.currentDirectory?{directory:this.currentDirectory}:void 0);if(n.data){const o=n.data.find(s=>s.name===e);if(o)return{name:o.name,template:o.template,description:o.description,agent:o.agent,model:o.model}}return null}catch{return null}}async checkHealth(){try{const e=this.baseUrl.endsWith("/")?this.baseUrl.replace(/\/+$/,""):this.baseUrl,n=e==="/api"||e.endsWith("/api")?"/api/opencode/health":`${e}/opencode/health`;Tt("opencodeClient.checkHealth:url",{baseUrl:this.baseUrl,healthUrl:n});const o=await We(n);if(Tt("opencodeClient.checkHealth:response",{status:o.status}),!o.ok)return!1;const s=await o.json();return Tt("opencodeClient.checkHealth:result",{healthy:s?.healthy}),s?.healthy===!0}catch{return!1}}async createDirectory(e,n){const o=B5();if(o?.createDirectory)try{return await o.createDirectory(e)}catch(l){const c=l instanceof Error?l.message:String(l);throw new Error(c||"Failed to create directory")}const s={path:e,...n?.allowOutsideWorkspace?{allowOutsideWorkspace:!0}:{}},r=await We(`${this.baseUrl}/fs/mkdir`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){const l=await r.json().catch(()=>({error:"Failed to create directory"}));throw new Error(l.error||"Failed to create directory")}return await r.json()}async cloneRepository(e){const n=await We(`${this.baseUrl}/fs/clone`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)});if(!n.ok){const o=await n.json().catch(()=>({error:"Failed to clone repository"}));throw new Error(o.error||"Failed to clone repository")}return await n.json()}async listLocalDirectory(e,n){const s=`${typeof e=="string"?gi(e.trim()):""}|${n?.respectGitignore?"1":"0"}`,r=Date.now(),i=this.listDirectoryCache.get(s);if(i&&i.expiresAt>r)return i.entries;const l=this.listDirectoryInFlight.get(s);if(l)return l;const d=(async()=>{const u=B5();if(u)try{const f=await u.listDirectory(e||"",n);if(!f||!Array.isArray(f.entries))return[];const m=f.entries.map(h=>({name:h.name,path:gi(h.path),isDirectory:!!h.isDirectory,isFile:!h.isDirectory,isSymbolicLink:!1}));return this.listDirectoryCache.set(s,{entries:m,expiresAt:Date.now()+_5}),m}catch(f){throw console.error("Failed to list directory contents:",f),f}try{const f=new URLSearchParams;e&&e.trim().length>0&&f.set("path",e),n?.respectGitignore&&f.set("respectGitignore","true");const m=f.toString(),h=await We(`${this.baseUrl}/fs/list${m?`?${m}`:""}`);if(!h.ok){const y=await h.json().catch(()=>({})),v=typeof y.error=="string"?y.error:"Failed to list directory";throw new Error(v)}const p=await h.json();if(!p||!Array.isArray(p.entries))return[];const b=p.entries;return this.listDirectoryCache.set(s,{entries:b,expiresAt:Date.now()+_5}),b}catch(f){throw console.error("Failed to list directory contents:",f),f}})().finally(()=>{this.listDirectoryInFlight.get(s)===d&&this.listDirectoryInFlight.delete(s)});return this.listDirectoryInFlight.set(s,d),d}async searchFiles(e,n){const o=typeof n?.directory=="string"&&n.directory.trim().length>0?n.directory.trim():this.currentDirectory,s=o?gi(o):null,r=o?this.getScopedApiClient(o):this.client;try{const i=await r.find.files({query:e,limit:typeof n?.limit=="number"&&Number.isFinite(n.limit)?n.limit:void 0,dirs:n?.dirs===!1||n?.type==="file"?"false":"true",type:n?.type});return(Array.isArray(i?.data)?i.data:[]).map(c=>{const d=gi(c),u=d.split("/").filter(Boolean).pop()||d,f=gi(s?`${s}/${d}`:d);return{name:u,path:f,relativePath:d,extension:u.includes(".")?u.split(".").pop()?.toLowerCase():void 0}})}catch(i){throw console.error("Failed to search files:",i),i}}async getFilesystemHome(){const e=await T4();if(e)return e;try{const n=await We(`${this.baseUrl}/fs/home`,{method:"GET",headers:{Accept:"application/json"}});if(!n.ok){const s=await n.json().catch(()=>({})),r=typeof s.error=="string"&&s.error.length>0?s.error:"Failed to resolve home directory";throw new Error(r)}const o=await n.json();return o&&typeof o.home=="string"&&o.home.length>0?o.home:null}catch(n){return console.warn("Failed to resolve filesystem home directory:",n),null}}async setOpenCodeWorkingDirectory(e){if(!e||typeof e!="string"||!e.trim())return console.warn("[OpencodeClient] setOpenCodeWorkingDirectory: invalid path",e),null;const n=`${this.baseUrl}/opencode/directory`;console.log("[OpencodeClient] POST",n,"with path:",e);try{const o=await We(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),s=await o.json().catch(()=>null);if(!o.ok){const r=s??{},i=typeof r.error=="string"&&r.error.length>0?r.error:"Failed to update OpenCode working directory";throw new Error(i)}return s&&typeof s=="object"?s:{success:!0,restarted:!1,path:e}}catch(o){throw console.warn("Failed to update OpenCode working directory:",o),o}}}const Je=new Tw,ud=new Set;function tl(t){return ud.add(t),()=>{ud.delete(t)}}function os(t,e){const n=Array.isArray(t)?t:[t],o=Array.from(new Set(n));if(o.length===0)return;o.includes("all")&&o.splice(0,o.length,"all");const s={scopes:o,source:e?.source,timestamp:Date.now()};for(const r of ud)try{const i=r(s);i instanceof Promise&&i.catch(l=>{console.error("[ConfigSync] Async listener failed:",l)})}catch(i){console.error("[ConfigSync] Listener threw:",i)}}function i1(t,e){return t.scopes.includes("all")||t.scopes.includes(e)}let $l=null,Zl=null;const Yf=t=>{if(typeof window>"u")return null;try{return window[t]??null}catch{return null}},u0=()=>{const t=new Map;return{getItem:e=>t.get(e)??null,setItem:(e,n)=>{t.set(e,n)},removeItem:e=>{t.delete(e)},clear:()=>{t.clear()},key:e=>Array.from(t.keys())[e]??null,get length(){return t.size}}},Pw=()=>{const t=Yf("localStorage");if(!t)return u0();const e=u0();let n=!0;const o=()=>{n=!1};return{getItem:d=>{if(n)try{const u=t.getItem(d);if(u!==null)return u}catch{o()}return e.getItem(d)},setItem:(d,u)=>{if(n)try{t.setItem(d,u),e.removeItem(d);return}catch{o();try{t.removeItem(d)}catch{}}e.setItem(d,u)},removeItem:d=>{try{t.removeItem(d)}catch{o()}e.removeItem(d)},clear:()=>{try{t.clear()}catch{o()}e.clear()},key:d=>{if(n)try{return t.key(d)}catch{o()}return e.key(d)},get length(){if(n)try{return t.length+e.length}catch{o()}return e.length}}},Pn=()=>($l||($l=Pw()),$l),Ew=()=>{const t=Yf("sessionStorage");if(!t)return u0();const e=u0();let n=!0;const o=()=>{n=!1};return{getItem:d=>{if(n)try{const u=t.getItem(d);if(u!==null)return u}catch{o()}return e.getItem(d)},setItem:(d,u)=>{if(n)try{t.setItem(d,u),e.removeItem(d);return}catch{o();try{t.removeItem(d)}catch{}}e.setItem(d,u)},removeItem:d=>{try{t.removeItem(d)}catch{o()}e.removeItem(d)},clear:()=>{try{t.clear()}catch{o()}e.clear()},key:d=>{if(n)try{return t.key(d)}catch{o()}return e.key(d)},get length(){if(n)try{return t.length+e.length}catch{o()}return e.length}}},fJ=()=>(Zl||(Zl=Ew()),Zl),P4="Updating OpenCode configuration...";let bs=0,fr=P4;const fd=new Set;function f0(){const t={isUpdating:bs>0,message:fr};fd.forEach(e=>e(t))}function ss(t){bs+=1,bs===1?(fr=t||P4,f0()):t&&(fr=t,f0())}function bo(){bs!==0&&(bs-=1,bs===0&&(fr=P4,f0()))}function Yn(t){fr===t&&bs>0||(fr=t,bs>0&&f0())}function mJ(t){return fd.add(t),t({isUpdating:bs>0,message:fr}),()=>{fd.delete(t)}}function hJ(){return{isUpdating:bs>0,message:fr}}const A1=t=>{const e=t.replace(/\\/g,"/").replace(/\/+$/g,"").trim();if(!e)return"";const n=new TextEncoder().encode(e);let o="";for(const r of n)o+=String.fromCharCode(r);return`path_${typeof btoa=="function"?btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,""):e.replace(/[^A-Za-z0-9._-]+/g,"_")}`},E4={markdown:"0.9375rem",code:"0.8125rem",uiHeader:"0.9375rem",uiLabel:"0.8750rem",meta:"0.875rem",micro:"0.875rem"},Hw={markdown:"0.9063rem",code:"0.8750rem",uiHeader:"0.9063rem",uiLabel:"0.8438rem",meta:"0.8438rem",micro:"0.7813rem"};function D5(t){return`--text-${t.replace(/([A-Z])/g,"-$1").toLowerCase()}`}const Ps={semanticMarkdown:{fontSize:"var(--text-markdown)"},semanticCode:{fontSize:"var(--text-code)"},uiHeader:{fontSize:"var(--text-ui-header)"},uiLabel:{fontSize:"var(--text-ui-label)"},meta:{fontSize:"var(--text-meta)"},micro:{fontSize:"var(--text-micro)"},ui:{button:{fontSize:"var(--text-ui-label)",lineHeight:"var(--ui-button-line-height)",letterSpacing:"var(--ui-button-letter-spacing)",fontWeight:"var(--ui-button-font-weight)"},buttonSmall:{fontSize:"var(--text-meta)",lineHeight:"var(--ui-button-small-line-height)",letterSpacing:"var(--ui-button-small-letter-spacing)",fontWeight:"var(--ui-button-small-font-weight)"},buttonLarge:{fontSize:"var(--text-ui-label)",lineHeight:"var(--ui-button-large-line-height)",letterSpacing:"var(--ui-button-large-letter-spacing)",fontWeight:"var(--ui-button-large-font-weight)"},label:{fontSize:"var(--text-meta)",lineHeight:"var(--ui-label-line-height)",letterSpacing:"var(--ui-label-letter-spacing)",fontWeight:"var(--ui-label-font-weight)"},caption:{fontSize:"var(--text-micro)",lineHeight:"var(--ui-caption-line-height)",letterSpacing:"var(--ui-caption-letter-spacing)",fontWeight:"var(--ui-caption-font-weight)"},badge:{fontSize:"var(--text-micro)",lineHeight:"var(--ui-badge-line-height)",letterSpacing:"var(--ui-badge-letter-spacing)",fontWeight:"var(--ui-badge-font-weight)"},tooltip:{fontSize:"var(--text-micro)",lineHeight:"var(--ui-tooltip-line-height)",letterSpacing:"var(--ui-tooltip-letter-spacing)",fontWeight:"var(--ui-tooltip-font-weight)"},input:{fontSize:"var(--text-ui-label)",lineHeight:"var(--ui-input-line-height)",letterSpacing:"var(--ui-input-letter-spacing)",fontWeight:"var(--ui-input-font-weight)"},helperText:{fontSize:"var(--text-meta)",lineHeight:"var(--ui-helper-text-line-height)",letterSpacing:"var(--ui-helper-text-letter-spacing)",fontWeight:"var(--ui-helper-text-font-weight)"}},code:{inline:{fontSize:"var(--text-code)",lineHeight:"var(--code-inline-line-height)",letterSpacing:"var(--code-inline-letter-spacing)",fontWeight:"var(--code-inline-font-weight)"},block:{fontSize:"var(--text-code)",lineHeight:"var(--code-block-line-height)",letterSpacing:"var(--code-block-letter-spacing)",fontWeight:"var(--code-block-font-weight)"},lineNumbers:{fontSize:"var(--text-micro)",lineHeight:"var(--code-line-numbers-line-height)",letterSpacing:"var(--code-line-numbers-letter-spacing)",fontWeight:"var(--code-line-numbers-font-weight)"}},markdown:{body:{fontSize:"var(--text-markdown)",lineHeight:"var(--markdown-body-line-height)",letterSpacing:"var(--markdown-body-letter-spacing)",fontWeight:"var(--markdown-body-font-weight)"},bodySmall:{fontSize:"var(--text-meta)",lineHeight:"var(--markdown-body-small-line-height)",letterSpacing:"var(--markdown-body-small-letter-spacing)",fontWeight:"var(--markdown-body-small-font-weight)"},bodyLarge:{fontSize:"var(--text-markdown)",lineHeight:"var(--markdown-body-large-line-height)",letterSpacing:"var(--markdown-body-large-letter-spacing)",fontWeight:"var(--markdown-body-large-font-weight)"},blockquote:{fontSize:"var(--text-markdown)",lineHeight:"var(--markdown-blockquote-line-height)",letterSpacing:"var(--markdown-blockquote-letter-spacing)",fontWeight:"var(--markdown-blockquote-font-weight)"},list:{fontSize:"var(--text-markdown)",lineHeight:"var(--markdown-list-line-height)",letterSpacing:"var(--markdown-list-letter-spacing)",fontWeight:"var(--markdown-list-font-weight)"},link:{fontSize:"var(--text-markdown)",lineHeight:"var(--markdown-link-line-height)",letterSpacing:"var(--markdown-link-letter-spacing)",fontWeight:"var(--markdown-link-font-weight)"},code:{fontSize:"var(--text-code)",lineHeight:"var(--markdown-code-line-height)",letterSpacing:"var(--markdown-code-letter-spacing)",fontWeight:"var(--markdown-code-font-weight)"},codeBlock:{fontSize:"var(--text-code)",lineHeight:"var(--markdown-code-block-line-height)",letterSpacing:"var(--markdown-code-block-letter-spacing)",fontWeight:"var(--markdown-code-block-font-weight)"}},tool:{collapsed:{fontSize:"var(--text-code)",lineHeight:"var(--code-block-line-height)",letterSpacing:"var(--code-block-letter-spacing)",fontWeight:"var(--code-block-font-weight)"},popup:{fontSize:"var(--text-code)",lineHeight:"var(--code-block-line-height)",letterSpacing:"var(--code-block-letter-spacing)",fontWeight:"var(--code-block-font-weight)"},inline:{fontSize:"var(--text-code)",lineHeight:"var(--code-inline-line-height)",letterSpacing:"var(--code-inline-letter-spacing)",fontWeight:"var(--code-inline-font-weight)"}}},fs={padding:{collapsed:"0.375rem",popup:"0.75rem",popupContainer:"1rem"},backgroundOpacity:{muted:"30",mutedAlt:"50"},getCollapsedStyles:()=>({...Ps.tool.collapsed,background:"transparent",backgroundColor:"transparent",margin:0,padding:fs.padding.collapsed,borderRadius:0}),getPopupStyles:()=>({...Ps.tool.popup,background:"transparent",backgroundColor:"transparent",margin:0,padding:fs.padding.popup,borderRadius:"0.75rem"}),getPopupContainerStyles:()=>({...Ps.tool.popup,background:"transparent",backgroundColor:"transparent",margin:0,padding:fs.padding.popupContainer,borderRadius:"0.5rem",overflowX:"auto"}),getInlineStyles:()=>({...Ps.tool.inline})},Iw=[{id:"ibm-plex-sans",label:"IBM Plex Sans",description:"Humanist sans-serif for optimal readability in the interface.",stack:'"IBM Plex Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},{id:"inter",label:"Inter",description:"Modern UI sans with excellent readability at small sizes.",stack:'"Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"Inter",packageName:"@fontsource/inter",filePrefix:"inter",weights:[400,500,600]}},{id:"geist-sans",label:"Geist Sans",description:"Crisp sans-serif with a technical interface feel.",stack:'"Geist Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"Geist Sans",packageName:"@fontsource/geist-sans",filePrefix:"geist-sans",weights:[400,500,600]}},{id:"atkinson-hyperlegible",label:"Atkinson Hyperlegible",description:"Accessibility-focused sans-serif optimized for character distinction.",stack:'"Atkinson Hyperlegible", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"Atkinson Hyperlegible",packageName:"@fontsource/atkinson-hyperlegible",filePrefix:"atkinson-hyperlegible",weights:[400,700]}},{id:"source-sans-3",label:"Source Sans 3",description:"Adobe sans-serif tuned for clean, readable interfaces.",stack:'"Source Sans 3", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"Source Sans 3",packageName:"@fontsource/source-sans-3",filePrefix:"source-sans-3",weights:[400,500,600]}},{id:"roboto",label:"Roboto",description:"Familiar Material-style sans-serif with broad UI usage.",stack:'"Roboto", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"Roboto",packageName:"@fontsource/roboto",filePrefix:"roboto",weights:[400,500,600]}},{id:"noto-sans",label:"Noto Sans",description:"Readable sans-serif with strong international coverage.",stack:'"Noto Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"Noto Sans",packageName:"@fontsource/noto-sans",filePrefix:"noto-sans",weights:[400,500,600]}},{id:"dm-sans",label:"DM Sans",description:"Modern product UI sans-serif with friendly proportions.",stack:'"DM Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"DM Sans",packageName:"@fontsource/dm-sans",filePrefix:"dm-sans",weights:[400,500,600]}},{id:"manrope",label:"Manrope",description:"Polished geometric sans-serif for modern app interfaces.",stack:'"Manrope", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',source:{family:"Manrope",packageName:"@fontsource/manrope",filePrefix:"manrope",weights:[400,500,600]}},{id:"system",label:"System",description:"Native operating system interface font.",stack:'"SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif'}],jw=[{id:"ibm-plex-mono",label:"IBM Plex Mono",description:"Balanced monospace for code blocks and technical content.",stack:'"IBM Plex Mono", "SFMono-Regular", "Menlo", monospace'},{id:"jetbrains-mono",label:"JetBrains Mono",description:"Developer-focused monospace with strong punctuation clarity.",stack:'"JetBrains Mono", "SFMono-Regular", "Menlo", monospace',source:{family:"JetBrains Mono",packageName:"@fontsource/jetbrains-mono",filePrefix:"jetbrains-mono",weights:[400,500,600]}},{id:"fira-code",label:"Fira Code",description:"Readable coding font with ligature support.",stack:'"Fira Code", "SFMono-Regular", "Menlo", monospace',source:{family:"Fira Code",packageName:"@fontsource/fira-code",filePrefix:"fira-code",weights:[400,500,600]}},{id:"geist-mono",label:"Geist Mono",description:"Sharp monospace pair for Geist Sans.",stack:'"Geist Mono", "SFMono-Regular", "Menlo", monospace',source:{family:"Geist Mono",packageName:"@fontsource/geist-mono",filePrefix:"geist-mono",weights:[400,500,600]}},{id:"commit-mono",label:"Commit Mono",description:"Code-oriented monospace with polished editor ergonomics.",stack:'"Commit Mono", "SFMono-Regular", "Menlo", monospace',source:{family:"Commit Mono",packageName:"@fontsource/commit-mono",filePrefix:"commit-mono",weights:[400,500,600]}},{id:"source-code-pro",label:"Source Code Pro",description:"Adobe monospace designed for source code readability.",stack:'"Source Code Pro", "SFMono-Regular", "Menlo", monospace',source:{family:"Source Code Pro",packageName:"@fontsource/source-code-pro",filePrefix:"source-code-pro",weights:[400,500,600]}},{id:"cascadia-code",label:"Cascadia Code",description:"Microsoft coding font popular in terminals and editors.",stack:'"Cascadia Code", "SFMono-Regular", "Menlo", monospace',source:{family:"Cascadia Code",packageName:"@fontsource/cascadia-code",filePrefix:"cascadia-code",weights:[400,500,600]}},{id:"roboto-mono",label:"Roboto Mono",description:"Neutral monospace companion to Roboto.",stack:'"Roboto Mono", "SFMono-Regular", "Menlo", monospace',source:{family:"Roboto Mono",packageName:"@fontsource/roboto-mono",filePrefix:"roboto-mono",weights:[400,500,600]}},{id:"iosevka",label:"Iosevka",description:"Compact monospace for dense code and terminal layouts.",stack:'"Iosevka", "SFMono-Regular", "Menlo", monospace',source:{family:"Iosevka",packageName:"@fontsource/iosevka",filePrefix:"iosevka",weights:[400,500,600]}},{id:"system-mono",label:"System Mono",description:"Native operating system monospace font.",stack:'ui-monospace, "SFMono-Regular", "Menlo", "Cascadia Mono", "Segoe UI Mono", monospace'}],Jf=t=>Object.fromEntries(t.map(e=>[e.id,e])),m0=Jf(Iw),h0=Jf(jw),Qf="ibm-plex-sans",Xf="ibm-plex-mono",em=t=>typeof t=="string"&&t in m0,tm=t=>typeof t=="string"&&t in h0,md="openchamber.mobileKeyboardMode",Lw='meta[name="viewport"]',T5="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover",pJ=()=>!0;function nl(t,e="resize-content"){return t==="native"||t==="resize-content"?t:e}const Nw=t=>nl(t)==="resize-content"?`${T5}, interactive-widget=resizes-content`:T5,Rw=()=>{if(typeof window>"u")return"resize-content";try{return nl(localStorage.getItem(md))}catch{return"resize-content"}},nm=t=>{const e=nl(t);if(typeof window<"u")try{e==="resize-content"?localStorage.removeItem(md):localStorage.setItem(md,e)}catch{}return e},gJ=t=>{const e=nm(t);if(typeof document>"u")return e;document.documentElement.setAttribute("data-oc-mobile-keyboard-mode",e);const n=document.querySelector(Lw);if(n instanceof HTMLMetaElement){const o=Nw(e);n.getAttribute("content")!==o&&n.setAttribute("content",o)}return e},X1={completion:{title:"{agent_name} is ready",message:"{last_message}"},error:{title:"Tool error",message:"{last_message}"},question:{title:"{agent_name} needs input",message:"{last_message}"},subtask:{title:"Subtask complete",message:"{last_message}"}},Xs={completion:{title:"",message:""},error:{title:"",message:""},question:{title:"",message:""},subtask:{title:"",message:""}},e2=(t,e)=>t?t.title===e.title&&t.message===e.message:!1,Vw=t=>{if(!t||typeof t!="object")return!1;const e=t;return e2(e.completion,X1.completion)&&e2(e.error,X1.error)&&e2(e.question,X1.question)&&e2(e.subtask,X1.subtask)},H4=380,zw=380,Ow=1400,om=12,P5=120,ya=280,va=360,Ul=new Map,ql=t=>(t??ei()).trim()||"default",eo=t=>{if(!t)return"";const e=t.replace(/\\/g,"/"),n=e.startsWith("//");let o=e.replace(/\/+$/g,"");return o=o.replace(/\/+/g,"/"),n&&!o.startsWith("//")&&(o=`/${o}`),o===""?e.startsWith("/")?"/":"":o},sm=t=>Number.isFinite(t)?Math.min(Ow,Math.max(zw,Math.round(t))):H4,p0=t=>{if(typeof t!="string")return null;const e=t.trim();return e?e.replace(/\\/g,"/"):null},rm=t=>{if(typeof t!="string")return null;const e=t.trim();return e?e.length>P5?e.slice(0,P5):e:null},$w=(t,e)=>(t==="file"||t==="preview")&&e||t,im=(t,e,n)=>{if(typeof n=="string"){const o=n.trim();if(o)return o}return $w(t,e)},am=(t,e)=>e===t?t:`${t}:${e}`,lm=t=>{const e=p0(t.targetPath),n=im(t.mode,e,t.dedupeKey);return{id:am(t.mode,n),mode:t.mode,targetPath:e,dedupeKey:n,label:rm(t.label),readOnly:t.readOnly===!0,stagedDiff:t.stagedDiff===!0,touchedAt:Date.now()}},cm=(t,e,n)=>{if(t.length<=e)return t;const s=[...t].sort((l,c)=>l.touchedAt-c.touchedAt).filter(l=>l.id!==n),r=t.length-e;if(r<=0||s.length===0)return t.slice(-e);const i=new Set(s.slice(0,r).map(l=>l.id));return t.filter(l=>!i.has(l.id))},dm=t=>{if(!Array.isArray(t))return[];const e=[],n=new Set;for(const o of t){if(!o||typeof o!="object")continue;const s=o;if(s.mode!=="diff"&&s.mode!=="file"&&s.mode!=="context"&&s.mode!=="plan"&&s.mode!=="chat"&&s.mode!=="preview"&&s.mode!=="browser")continue;const r=p0(typeof s.targetPath=="string"?s.targetPath:null),i=im(s.mode,r,typeof s.dedupeKey=="string"?s.dedupeKey:null),l=am(s.mode,i);!l||n.has(l)||(n.add(l),e.push({id:l,mode:s.mode,targetPath:r,dedupeKey:i,label:rm(typeof s.label=="string"?s.label:null),readOnly:s.readOnly===!0,stagedDiff:s.stagedDiff===!0,touchedAt:typeof s.touchedAt=="number"&&Number.isFinite(s.touchedAt)?s.touchedAt:Date.now()}))}return e},a1=(t,e)=>e&&t.some(n=>n.id===e)?e:t.length===0?null:t[t.length-1].id,Tr=t=>{if(t){const e=dm(t.tabs),n=a1(e,t.activeTabId);return{...t,tabs:e,activeTabId:n,touchedAt:Date.now()}}return{isOpen:!1,expanded:!1,tabs:[],activeTabId:null,width:H4,touchedAt:Date.now()}},Zw=(t,e)=>{const n=lm(e),o=t.tabs.findIndex(l=>l.id===n.id),s=o===-1?[...t.tabs,n]:t.tabs.map((l,c)=>c===o?{...l,mode:n.mode,targetPath:n.targetPath||l.targetPath,dedupeKey:n.dedupeKey,label:n.label,stagedDiff:n.stagedDiff,touchedAt:Date.now()}:l),r=n.id,i=cm(s,om,r);return{...t,isOpen:!0,tabs:i,activeTabId:a1(i,r),touchedAt:Date.now()}},Uw=(t,e)=>{const n=t.tabs.filter(s=>s.id!==e),o=t.activeTabId===e?n[n.length-1]?.id??null:a1(n,t.activeTabId);return{...t,tabs:n,activeTabId:o,isOpen:n.length>0?t.isOpen:!1,touchedAt:Date.now()}},qw=(t,e,n)=>{if(e===n)return t;const o=t.tabs.findIndex(l=>l.id===e),s=t.tabs.findIndex(l=>l.id===n);if(o===-1||s===-1)return t;const r=[...t.tabs],[i]=r.splice(o,1);return i?(r.splice(s,0,i),{...t,tabs:r,touchedAt:Date.now()}):t},Ww=(t,e,n)=>({...t,tabs:t.tabs.map(o=>o.id===e?{...o,targetPath:n}:o)}),Wl=t=>{if(!t||typeof t!="object")return{};const e=t,n={};for(const[o,s]of Object.entries(e)){const r=eo(o);if(!r||!s||typeof s!="object")continue;const i=s;let l=dm(i.tabs),c=typeof i.activeTabId=="string"?i.activeTabId:null;l.length===0&&(i.mode==="diff"||i.mode==="file"||i.mode==="context"||i.mode==="plan"||i.mode==="chat")&&(l=[lm({mode:i.mode,targetPath:typeof i.targetPath=="string"?i.targetPath:null,dedupeKey:typeof i.dedupeKey=="string"?i.dedupeKey:null,label:typeof i.label=="string"?i.label:null})],c=l[0]?.id??null);const d=a1(l,c),u=cm(l,om,d);n[r]={isOpen:i.isOpen===!0,expanded:i.expanded===!0,tabs:u,activeTabId:a1(u,d),width:sm(typeof i.width=="number"?i.width:H4),touchedAt:typeof i.touchedAt=="number"&&Number.isFinite(i.touchedAt)?i.touchedAt:Date.now()}}return n},Pr=(t,e)=>{const n=Object.entries(t);if(n.length<=e)return t;n.sort((s,r)=>(r[1]?.touchedAt??0)-(s[1]?.touchedAt??0));const o={};for(const[s,r]of n.slice(0,e))o[s]=r;return o},ke=Jt()(Un(qo((t,e)=>({theme:"system",isMultiRunLauncherOpen:!1,multiRunLauncherPrefillPrompt:"",isSidebarOpen:!0,sidebarWidth:ya,hasManuallyResizedLeftSidebar:!1,isRightSidebarOpen:!1,rightSidebarWidth:va,hasManuallyResizedRightSidebar:!1,rightSidebarTab:"git",contextPanelByDirectory:{},isBottomTerminalOpen:!1,isBottomTerminalExpanded:!1,bottomTerminalHeight:300,hasManuallyResizedBottomTerminal:!1,notesPanelHeight:112,todoPanelHeight:259,isSessionSwitcherOpen:!1,isSessionDropdownOpen:!1,activeMainTab:"chat",mainTabGuard:null,sidebarOpenBeforeFullscreenTab:null,pendingDiffFile:null,pendingDiffStaged:!1,pendingFileNavigation:null,pendingFileFocusPath:null,isMobile:!1,isCommandPaletteOpen:!1,isHelpDialogOpen:!1,isAboutDialogOpen:!1,isOpenCodeStatusDialogOpen:!1,openCodeStatusText:"",isSessionCreateDialogOpen:!1,isScheduledTasksDialogOpen:!1,isSettingsDialogOpen:!1,isModelSelectorOpen:!1,sidebarSection:"sessions",settingsPage:"home",settingsHasOpenedOnce:!1,settingsProjectsSelectedId:null,settingsRemoteInstancesSelectedId:null,eventStreamStatus:"idle",eventStreamHint:null,showReasoningTraces:!0,collapsibleThinkingBlocks:!0,groupReasoningBlocks:!0,chatRenderMode:"live",activityRenderMode:"summary",showDeletionDialog:!0,autoDeleteEnabled:!1,autoDeleteAfterDays:30,sessionRetentionAction:"archive",autoDeleteLastRunAt:null,messageLimit:200,fontSize:100,globalDraftStarters:null,terminalFontSize:13,uiFont:Qf,monoFont:Xf,padding:100,cornerRadius:18,inputBarOffset:0,mobileKeyboardMode:Rw(),favoriteModels:[],hiddenModels:[],collapsedModelProviders:[],recentModels:[],recentAgents:[],recentEfforts:{},diffLayoutPreference:"inline",diffFileLayout:{},diffWrapLines:!1,diffViewMode:"stacked",gitChangesViewMode:"flat",isTimelineDialogOpen:!1,isImagePreviewOpen:!1,nativeNotificationsEnabled:!1,notificationMode:"hidden-only",notifyOnSubtasks:!0,notifyOnCompletion:!0,notifyOnError:!0,notifyOnQuestion:!0,notificationTemplates:{completion:{...Xs.completion},error:{...Xs.error},question:{...Xs.question},subtask:{...Xs.subtask}},summarizeLastMessage:!1,summaryThreshold:200,summaryLength:100,maxLastMessageLength:250,showTerminalQuickKeysOnDesktop:!1,persistChatDraft:!0,showOpenCodeUpdateNotifications:!0,inputSpellcheckEnabled:!1,wideChatLayoutEnabled:!1,showToolFileIcons:!0,showTurnChangedFiles:!1,showExpandedBashTools:!1,showExpandedEditTools:!1,timeFormatPreference:"auto",weekStartPreference:"auto",mermaidRenderingMode:"svg",userMessageRenderingMode:"markdown",stickyUserHeader:!1,showSplitAssistantMessageActions:!1,showMobileSessionStatusBar:!1,isMobileSessionStatusBarCollapsed:!1,mobileSessionPanelOpen:!1,mobileSessionFilterProjectId:null,isExpandedInput:!1,reportUsage:!0,shortcutOverrides:{},setTheme:n=>{t({theme:n}),e().applyTheme()},toggleSidebar:()=>{t(n=>{const o=!n.isSidebarOpen;return o&&!n.hasManuallyResizedLeftSidebar?{isSidebarOpen:o,sidebarWidth:ya}:{isSidebarOpen:o}})},setSidebarOpen:n=>{t(o=>o.isSidebarOpen===n?n&&!o.hasManuallyResizedLeftSidebar&&o.sidebarWidth!==ya?{isSidebarOpen:n,sidebarWidth:ya}:o:n&&!o.hasManuallyResizedLeftSidebar?{isSidebarOpen:n,sidebarWidth:ya}:{isSidebarOpen:n})},setSidebarWidth:n=>{t({sidebarWidth:n,hasManuallyResizedLeftSidebar:!0})},toggleRightSidebar:()=>{t(n=>{const o=!n.isRightSidebarOpen;return o&&!n.hasManuallyResizedRightSidebar?{isRightSidebarOpen:o,rightSidebarWidth:va}:{isRightSidebarOpen:o}})},setRightSidebarOpen:n=>{t(o=>o.isRightSidebarOpen===n?n&&!o.hasManuallyResizedRightSidebar&&o.rightSidebarWidth!==va?{isRightSidebarOpen:n,rightSidebarWidth:va}:o:n&&!o.hasManuallyResizedRightSidebar?{isRightSidebarOpen:n,rightSidebarWidth:va}:{isRightSidebarOpen:n})},setRightSidebarWidth:n=>{t({rightSidebarWidth:n,hasManuallyResizedRightSidebar:!0})},setRightSidebarTab:n=>{t({rightSidebarTab:n})},openContextPanelTab:(n,o)=>{const s=eo((n||"").trim());s&&t(r=>{const i=r.contextPanelByDirectory[s],l=Tr(i),c={...r.contextPanelByDirectory,[s]:Zw(l,o)};return{contextPanelByDirectory:Pr(c,20)}})},openContextDiff:(n,o,s=!1)=>{const r=eo((n||"").trim()),i=(o||"").trim();!r||!i||e().openContextPanelTab(r,{mode:"diff",targetPath:i,dedupeKey:s?"staged":null,stagedDiff:s})},openContextFile:(n,o)=>{const s=eo((n||"").trim()),r=p0(o);!s||!r||(e().openContextPanelTab(s,{mode:"file",targetPath:r}),e().setPendingFileFocusPath(r),e().setPendingFileNavigation(null))},openContextFileAtLine:(n,o,s,r)=>{const i=eo((n||"").trim()),l=p0(o),c=Number.isFinite(s)?Math.max(1,Math.trunc(s)):1,d=Number.isFinite(r)?Math.max(1,Math.trunc(r)):1;!i||!l||(e().openContextPanelTab(i,{mode:"file",targetPath:l}),e().setPendingFileFocusPath(null),e().setPendingFileNavigation({path:l,line:c,column:d}))},openContextOverview:n=>{const o=eo((n||"").trim());o&&e().openContextPanelTab(o,{mode:"context"})},openContextPlan:n=>{const o=eo((n||"").trim());o&&e().openContextPanelTab(o,{mode:"plan"})},openContextPreview:(n,o)=>{const s=eo((n||"").trim()),r=(o||"").trim();if(!s||!r)return;let i=null;try{const l=new URL(r);(l.protocol==="http:"||l.protocol==="https:")&&(i=l.host||l.hostname||"Preview")}catch{}e().openContextPanelTab(s,{mode:"preview",targetPath:r,dedupeKey:r,label:i})},openContextBrowser:(n,o="")=>{const s=eo((n||"").trim());if(!s)return;const r=typeof o=="string"&&o.trim().length>0?o.trim():"";e().openContextPanelTab(s,{mode:"browser",targetPath:r,dedupeKey:"desktop-browser",label:"Browser"})},setContextPanelTabTargetPath:(n,o,s)=>{const r=eo((n||"").trim()),i=(o||"").trim();!r||!i||t(l=>{const c=l.contextPanelByDirectory[r];return c?{contextPanelByDirectory:{...l.contextPanelByDirectory,[r]:Ww(c,i,s)}}:l})},setActiveContextPanelTab:(n,o)=>{const s=eo((n||"").trim()),r=(o||"").trim();!s||!r||t(i=>{const l=i.contextPanelByDirectory[s],c=Tr(l);if(!c.tabs.some(u=>u.id===r)||c.activeTabId===r&&c.isOpen)return i;const d={...i.contextPanelByDirectory,[s]:{...c,isOpen:!0,activeTabId:r,touchedAt:Date.now(),tabs:c.tabs.map(u=>u.id===r?{...u,touchedAt:Date.now()}:u)}};return{contextPanelByDirectory:Pr(d,20)}})},reorderContextPanelTabs:(n,o,s)=>{const r=eo((n||"").trim()),i=(o||"").trim(),l=(s||"").trim();!r||!i||!l||t(c=>{const d=c.contextPanelByDirectory[r],u=Tr(d);if(!u.tabs.some(h=>h.id===i)||!u.tabs.some(h=>h.id===l))return c;const f=qw(u,i,l);if(f.tabs===u.tabs)return c;const m={...c.contextPanelByDirectory,[r]:f};return{contextPanelByDirectory:Pr(m,20)}})},closeContextPanelTab:(n,o)=>{const s=eo((n||"").trim()),r=(o||"").trim();!s||!r||t(i=>{const l=i.contextPanelByDirectory[s],c=Tr(l);if(!c.tabs.some(u=>u.id===r))return i;const d={...i.contextPanelByDirectory,[s]:Uw(c,r)};return{contextPanelByDirectory:Pr(d,20)}})},closeContextPanel:n=>{const o=eo((n||"").trim());o&&t(s=>{const r=s.contextPanelByDirectory[o];if(!r||!r.isOpen)return s;const i={...s.contextPanelByDirectory,[o]:{...Tr(r),isOpen:!1}};return{contextPanelByDirectory:Pr(i,20)}})},toggleContextPanelExpanded:n=>{const o=eo((n||"").trim());o&&t(s=>{const r=s.contextPanelByDirectory[o],i=Tr(r),l={...s.contextPanelByDirectory,[o]:{...i,expanded:!i.expanded}};return{contextPanelByDirectory:Pr(l,20)}})},setContextPanelWidth:(n,o)=>{const s=eo((n||"").trim());s&&t(r=>{const i=r.contextPanelByDirectory[s],l=Tr(i),c={...r.contextPanelByDirectory,[s]:{...l,width:sm(o)}};return{contextPanelByDirectory:Pr(c,20)}})},toggleBottomTerminal:()=>{t(n=>{const o=!n.isBottomTerminalOpen;if(o&&typeof window<"u"){const s=Math.floor(window.innerHeight*.32);return{isBottomTerminalOpen:o,bottomTerminalHeight:s,hasManuallyResizedBottomTerminal:!1}}return{isBottomTerminalOpen:o}})},setBottomTerminalOpen:n=>{t(o=>{if(o.isBottomTerminalOpen===n){if(!n)return o;if(!o.hasManuallyResizedBottomTerminal&&typeof window<"u"){const s=Math.floor(window.innerHeight*.32);return o.bottomTerminalHeight===s&&o.hasManuallyResizedBottomTerminal===!1?o:{isBottomTerminalOpen:n,bottomTerminalHeight:s,hasManuallyResizedBottomTerminal:!1}}return o}if(n&&typeof window<"u"){const s=Math.floor(window.innerHeight*.32);return{isBottomTerminalOpen:n,bottomTerminalHeight:s,hasManuallyResizedBottomTerminal:!1}}return{isBottomTerminalOpen:n}})},setBottomTerminalExpanded:n=>{t({isBottomTerminalExpanded:n})},setBottomTerminalHeight:n=>{t({bottomTerminalHeight:n,hasManuallyResizedBottomTerminal:!0})},setNotesPanelHeight:n=>{t({notesPanelHeight:n})},setTodoPanelHeight:n=>{t({todoPanelHeight:n})},setSessionSwitcherOpen:n=>{e().isSessionSwitcherOpen!==n&&t({isSessionSwitcherOpen:n})},setSessionDropdownOpen:n=>{e().isSessionDropdownOpen!==n&&t({isSessionDropdownOpen:n})},setMainTabGuard:n=>{e().mainTabGuard!==n&&t({mainTabGuard:n})},setActiveMainTab:n=>{const o=e().mainTabGuard;o&&!o(n)||(Ul.set(ql(),n),t({activeMainTab:n}))},prepareForRuntimeSwitch:n=>{Ul.set(ql(n),e().activeMainTab)},restoreForRuntimeSwitch:n=>{const o=Ul.get(ql(n))??"chat";t({activeMainTab:o})},setPendingDiffFile:(n,o=!1)=>{t({pendingDiffFile:n,pendingDiffStaged:n?o:!1})},setPendingFileNavigation:n=>{t({pendingFileNavigation:n})},setPendingFileFocusPath:n=>{t({pendingFileFocusPath:n})},navigateToDiff:(n,o=!1)=>{const s=e().mainTabGuard;s&&!s("diff")||t({pendingDiffFile:n,pendingDiffStaged:o,activeMainTab:"diff"})},consumePendingDiffFile:()=>{const{pendingDiffFile:n}=e();return n&&t({pendingDiffFile:null,pendingDiffStaged:!1}),n},setIsMobile:n=>{t({isMobile:n})},toggleCommandPalette:()=>{t(n=>({isCommandPaletteOpen:!n.isCommandPaletteOpen}))},setCommandPaletteOpen:n=>{t({isCommandPaletteOpen:n})},toggleHelpDialog:()=>{t(n=>({isHelpDialogOpen:!n.isHelpDialogOpen}))},setHelpDialogOpen:n=>{t({isHelpDialogOpen:n})},setAboutDialogOpen:n=>{t({isAboutDialogOpen:n})},setOpenCodeStatusDialogOpen:n=>{t({isOpenCodeStatusDialogOpen:n})},setOpenCodeStatusText:n=>{t({openCodeStatusText:n})},setSessionCreateDialogOpen:n=>{t({isSessionCreateDialogOpen:n})},setScheduledTasksDialogOpen:n=>{t({isScheduledTasksDialogOpen:n})},setSettingsDialogOpen:n=>{t(o=>n?o.settingsHasOpenedOnce?{isSettingsDialogOpen:!0}:{isSettingsDialogOpen:!0,settingsHasOpenedOnce:!0}:{isSettingsDialogOpen:!1})},setModelSelectorOpen:n=>{t({isModelSelectorOpen:n})},setSidebarSection:n=>{t({sidebarSection:n})},setSettingsPage:n=>{t({settingsPage:n})},setSettingsProjectsSelectedId:n=>{t({settingsProjectsSelectedId:n})},setSettingsRemoteInstancesSelectedId:n=>{t({settingsRemoteInstancesSelectedId:n})},setEventStreamStatus:(n,o)=>{t({eventStreamStatus:n,eventStreamHint:o??null})},setShowReasoningTraces:n=>{t({showReasoningTraces:n})},setCollapsibleThinkingBlocks:n=>{t({collapsibleThinkingBlocks:n})},setChatRenderMode:n=>{t({chatRenderMode:n})},setActivityRenderMode:n=>{t({activityRenderMode:n})},setShowDeletionDialog:n=>{t({showDeletionDialog:n})},setAutoDeleteEnabled:n=>{t({autoDeleteEnabled:n})},setAutoDeleteAfterDays:n=>{const o=Math.max(1,Math.min(365,n));t({autoDeleteAfterDays:o})},setSessionRetentionAction:n=>{t({sessionRetentionAction:n})},setAutoDeleteLastRunAt:n=>{t({autoDeleteLastRunAt:n})},setMessageLimit:n=>{const o=Math.max(10,Math.min(500,Math.round(n)));t({messageLimit:o})},setFontSize:n=>{const o=Math.max(50,Math.min(200,n));t({fontSize:o}),e().applyTypography()},setGlobalDraftStarters:n=>{t({globalDraftStarters:n})},setTerminalFontSize:n=>{const o=Math.round(n),s=Math.max(9,Math.min(52,o));t({terminalFontSize:s})},setUiFont:n=>{t({uiFont:n})},setMonoFont:n=>{t({monoFont:n})},setPadding:n=>{const o=Math.max(50,Math.min(200,n));t({padding:o}),e().applyPadding()},setCornerRadius:n=>{t({cornerRadius:n})},applyTypography:()=>{const{fontSize:n}=e(),o=document.documentElement,s=n/100,r=Object.entries(E4);if(s===1){for(const[i]of r)o.style.removeProperty(D5(i));return}for(const[i,l]of r){const c=parseFloat(l);Number.isFinite(c)&&o.style.setProperty(D5(i),`${c*s}rem`)}},applyPadding:()=>{const{padding:n}=e(),o=document.documentElement,s=n/100;if(s===1){o.style.removeProperty("--padding-scale"),o.style.removeProperty("--line-height-tight"),o.style.removeProperty("--line-height-normal"),o.style.removeProperty("--line-height-relaxed"),o.style.removeProperty("--line-height-loose");return}const r=Math.sqrt(s);o.style.setProperty("--padding-scale",r.toString());const i=1+(s-1)*.15;o.style.setProperty("--line-height-tight",(1.25*i).toFixed(3)),o.style.setProperty("--line-height-normal",(1.5*i).toFixed(3)),o.style.setProperty("--line-height-relaxed",(1.625*i).toFixed(3)),o.style.setProperty("--line-height-loose",(2*i).toFixed(3))},setDiffLayoutPreference:n=>{t({diffLayoutPreference:n})},setDiffFileLayout:(n,o)=>{t(s=>({diffFileLayout:{...s.diffFileLayout,[n]:o}}))},setDiffWrapLines:n=>{t({diffWrapLines:n})},setDiffViewMode:n=>{t({diffViewMode:n})},setGitChangesViewMode:n=>{t({gitChangesViewMode:n})},setInputBarOffset:n=>{t({inputBarOffset:n})},setMobileKeyboardMode:n=>{t(o=>o.mobileKeyboardMode===n?o:{mobileKeyboardMode:n})},toggleFavoriteModel:(n,o)=>{t(s=>s.favoriteModels.some(i=>i.providerID===n&&i.modelID===o)?{favoriteModels:s.favoriteModels.filter(i=>!(i.providerID===n&&i.modelID===o))}:{favoriteModels:[{providerID:n,modelID:o},...s.favoriteModels]})},reorderFavoriteModel:(n,o,s,r)=>{t(i=>{const l=i.favoriteModels.findIndex(f=>f.providerID===n&&f.modelID===o),c=i.favoriteModels.findIndex(f=>f.providerID===s&&f.modelID===r);if(l===-1||c===-1||l===c)return i;const d=i.favoriteModels.slice(),[u]=d.splice(l,1);return u?(d.splice(c,0,u),{favoriteModels:d}):i})},toggleHiddenModel:(n,o)=>{t(s=>s.hiddenModels.some(i=>i.providerID===n&&i.modelID===o)?{hiddenModels:s.hiddenModels.filter(i=>!(i.providerID===n&&i.modelID===o))}:{hiddenModels:[{providerID:n,modelID:o},...s.hiddenModels]})},isHiddenModel:(n,o)=>{const{hiddenModels:s}=e();return s.some(r=>r.providerID===n&&r.modelID===o)},hideAllModels:(n,o)=>{t(s=>{const r=s.hiddenModels.filter(l=>l.providerID!==n);return{hiddenModels:[...o.filter(l=>typeof l=="string"&&l.length>0).map(l=>({providerID:n,modelID:l})),...r]}})},showAllModels:n=>{t(o=>({hiddenModels:o.hiddenModels.filter(s=>s.providerID!==n)}))},toggleModelProviderCollapsed:n=>{const o=typeof n=="string"?n.trim():"";o&&t(s=>s.collapsedModelProviders.includes(o)?{collapsedModelProviders:s.collapsedModelProviders.filter(i=>i!==o)}:{collapsedModelProviders:[...s.collapsedModelProviders,o]})},setModelProvidersCollapsed:(n,o)=>{const s=Array.from(new Set(n.filter(r=>typeof r=="string").map(r=>r.trim()).filter(Boolean)));s.length!==0&&t(r=>{const i=new Set(s),l=r.collapsedModelProviders.filter(c=>!i.has(c));return{collapsedModelProviders:o?[...l,...s]:l}})},isFavoriteModel:(n,o)=>{const{favoriteModels:s}=e();return s.some(r=>r.providerID===n&&r.modelID===o)},addRecentModel:(n,o)=>{t(s=>{const r=s.recentModels.filter(i=>!(i.providerID===n&&i.modelID===o));return{recentModels:[{providerID:n,modelID:o},...r].slice(0,5)}})},addRecentAgent:n=>{const o=typeof n=="string"?n.trim():"";o&&t(s=>{if(s.recentAgents.includes(o))return s;const r=s.recentAgents;return{recentAgents:[o,...r].slice(0,5)}})},addRecentEffort:(n,o,s)=>{const r=typeof n=="string"?n.trim():"",i=typeof o=="string"?o.trim():"";if(!r||!i)return;const l=`${r}/${i}`,c=typeof s=="string"&&s.trim().length>0?s.trim():"default";t(d=>{const u=d.recentEfforts[l]??[];if(u.includes(c))return d;const f=u;return{recentEfforts:{...d.recentEfforts,[l]:[c,...f].slice(0,5)}}})},updateProportionalSidebarWidths:()=>{typeof window>"u"||t(n=>{const o={};if(n.isBottomTerminalOpen&&!n.hasManuallyResizedBottomTerminal){const s=Math.floor(window.innerHeight*.32);n.bottomTerminalHeight!==s&&(o.bottomTerminalHeight=s)}return Object.keys(o).length>0?o:n})},applyTheme:()=>{const{theme:n}=e(),o=document.documentElement;if(o.classList.remove("light","dark"),n==="system"){const s=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";o.classList.add(s)}else o.classList.add(n)},setMultiRunLauncherOpen:n=>{t(o=>({isMultiRunLauncherOpen:n,multiRunLauncherPrefillPrompt:n?o.multiRunLauncherPrefillPrompt:""}))},openMultiRunLauncher:()=>{t({isMultiRunLauncherOpen:!0,multiRunLauncherPrefillPrompt:"",isSessionSwitcherOpen:!1})},openMultiRunLauncherWithPrompt:n=>{t({isMultiRunLauncherOpen:!0,multiRunLauncherPrefillPrompt:n,isSessionSwitcherOpen:!1})},setTimelineDialogOpen:n=>{t({isTimelineDialogOpen:n})},setImagePreviewOpen:n=>{t({isImagePreviewOpen:n})},setNativeNotificationsEnabled:n=>{t({nativeNotificationsEnabled:n})},setNotificationMode:n=>{t({notificationMode:n})},setShowTerminalQuickKeysOnDesktop:n=>{t({showTerminalQuickKeysOnDesktop:n})},setNotifyOnSubtasks:n=>{t({notifyOnSubtasks:n})},setNotifyOnCompletion:n=>{t({notifyOnCompletion:n})},setNotifyOnError:n=>{t({notifyOnError:n})},setNotifyOnQuestion:n=>{t({notifyOnQuestion:n})},setNotificationTemplates:n=>{t({notificationTemplates:n})},setSummarizeLastMessage:n=>{t({summarizeLastMessage:n})},setSummaryThreshold:n=>{t({summaryThreshold:n})},setSummaryLength:n=>{t({summaryLength:n})},setMaxLastMessageLength:n=>{t({maxLastMessageLength:n})},setPersistChatDraft:n=>{t({persistChatDraft:n})},setShowOpenCodeUpdateNotifications:n=>{t({showOpenCodeUpdateNotifications:n})},setInputSpellcheckEnabled:n=>{t({inputSpellcheckEnabled:n})},setWideChatLayoutEnabled:n=>{t({wideChatLayoutEnabled:n})},setShowToolFileIcons:n=>{t({showToolFileIcons:n})},setShowTurnChangedFiles:n=>{t({showTurnChangedFiles:n})},setShowExpandedBashTools:n=>{t({showExpandedBashTools:n})},setShowExpandedEditTools:n=>{t({showExpandedEditTools:n})},setTimeFormatPreference:n=>{t({timeFormatPreference:n})},setWeekStartPreference:n=>{t({weekStartPreference:n})},setMermaidRenderingMode:n=>{t({mermaidRenderingMode:n})},setUserMessageRenderingMode:n=>{t({userMessageRenderingMode:n})},setStickyUserHeader:n=>{t({stickyUserHeader:n})},setShowSplitAssistantMessageActions:n=>{t({showSplitAssistantMessageActions:n})},setShowMobileSessionStatusBar:n=>{t({showMobileSessionStatusBar:n})},setIsMobileSessionStatusBarCollapsed:n=>{t({isMobileSessionStatusBarCollapsed:n})},setMobileSessionPanelOpen:n=>{t({mobileSessionPanelOpen:n})},setMobileSessionFilterProjectId:n=>{t({mobileSessionFilterProjectId:n})},setReportUsage:n=>{t({reportUsage:n})},viewPagerPage:"center",setViewPagerPage:n=>{t({viewPagerPage:n}),t(n==="left"?{isSessionSwitcherOpen:!0,isRightSidebarOpen:!1}:n==="right"?{isRightSidebarOpen:!0,isSessionSwitcherOpen:!1}:{isSessionSwitcherOpen:!1,isRightSidebarOpen:!1})},setShortcutOverride:(n,o)=>{t(s=>({shortcutOverrides:{...s.shortcutOverrides,[n]:o}}))},clearShortcutOverride:n=>{t(o=>{const s={...o.shortcutOverrides};return delete s[n],{shortcutOverrides:s}})},resetAllShortcutOverrides:()=>{t({shortcutOverrides:{}})},toggleExpandedInput:()=>{t(n=>({isExpandedInput:!n.isExpandedInput}))},setExpandedInput:n=>{t({isExpandedInput:n})}}),{name:"ui-store",storage:Wo(()=>Pn()),version:9,migrate:(t,e)=>{if(!t||typeof t!="object")return t;const n=t;if(e<9&&((typeof n.notesPanelHeight!="number"||!Number.isFinite(n.notesPanelHeight))&&(n.notesPanelHeight=112),(typeof n.todoPanelHeight!="number"||!Number.isFinite(n.todoPanelHeight))&&(n.todoPanelHeight=259)),e<1&&Vw(n.notificationTemplates)&&(n.notificationTemplates={completion:{...Xs.completion},error:{...Xs.error},question:{...Xs.question},subtask:{...Xs.subtask}}),e<3){const o=new Set([90,120,180,220]),s=n.memoryLimitHistorical,r=n.memoryLimitActiveSession;typeof s=="number"&&!o.has(s)?n.messageLimit=s:typeof r=="number"&&!o.has(r)&&(n.messageLimit=r),delete n.memoryLimitHistorical,delete n.memoryLimitViewport,delete n.memoryLimitActiveSession}if((typeof n.rightSidebarTab!="string"||n.rightSidebarTab!=="git"&&n.rightSidebarTab!=="files"&&n.rightSidebarTab!=="context")&&(n.rightSidebarTab="git"),n.contextPanelByDirectory=Wl(n.contextPanelByDirectory),e<5)if(!n.shortcutOverrides||typeof n.shortcutOverrides!="object")n.shortcutOverrides={};else{const o=n.shortcutOverrides,s={};for(const[r,i]of Object.entries(o))typeof r=="string"&&typeof i=="string"&&(s[r]=i);n.shortcutOverrides=s}return e<6&&(n.contextPanelByDirectory=Wl(n.contextPanelByDirectory)),e<7&&(n.contextPanelByDirectory=Wl(n.contextPanelByDirectory)),e<8&&n.gitChangesViewMode!=="flat"&&n.gitChangesViewMode!=="tree"&&(n.gitChangesViewMode="flat"),n},partialize:t=>({theme:t.theme,isSidebarOpen:t.isSidebarOpen,sidebarWidth:t.sidebarWidth,isRightSidebarOpen:t.isRightSidebarOpen,rightSidebarWidth:t.rightSidebarWidth,rightSidebarTab:t.rightSidebarTab,contextPanelByDirectory:t.contextPanelByDirectory,isBottomTerminalOpen:t.isBottomTerminalOpen,isBottomTerminalExpanded:t.isBottomTerminalExpanded,bottomTerminalHeight:t.bottomTerminalHeight,notesPanelHeight:t.notesPanelHeight,todoPanelHeight:t.todoPanelHeight,isSessionSwitcherOpen:t.isSessionSwitcherOpen,activeMainTab:t.activeMainTab,sidebarSection:t.sidebarSection,settingsPage:t.settingsPage,settingsHasOpenedOnce:t.settingsHasOpenedOnce,settingsProjectsSelectedId:t.settingsProjectsSelectedId,settingsRemoteInstancesSelectedId:t.settingsRemoteInstancesSelectedId,isSessionCreateDialogOpen:t.isSessionCreateDialogOpen,showReasoningTraces:t.showReasoningTraces,collapsibleThinkingBlocks:t.collapsibleThinkingBlocks,chatRenderMode:t.chatRenderMode,activityRenderMode:t.activityRenderMode,showDeletionDialog:t.showDeletionDialog,autoDeleteEnabled:t.autoDeleteEnabled,autoDeleteAfterDays:t.autoDeleteAfterDays,sessionRetentionAction:t.sessionRetentionAction,autoDeleteLastRunAt:t.autoDeleteLastRunAt,messageLimit:t.messageLimit,fontSize:t.fontSize,globalDraftStarters:t.globalDraftStarters,terminalFontSize:t.terminalFontSize,uiFont:t.uiFont,monoFont:t.monoFont,padding:t.padding,cornerRadius:t.cornerRadius,favoriteModels:t.favoriteModels,hiddenModels:t.hiddenModels,collapsedModelProviders:t.collapsedModelProviders,recentModels:t.recentModels,recentAgents:t.recentAgents,recentEfforts:t.recentEfforts,diffLayoutPreference:t.diffLayoutPreference,diffWrapLines:t.diffWrapLines,diffViewMode:t.diffViewMode,gitChangesViewMode:t.gitChangesViewMode,nativeNotificationsEnabled:t.nativeNotificationsEnabled,notificationMode:t.notificationMode,showTerminalQuickKeysOnDesktop:t.showTerminalQuickKeysOnDesktop,notifyOnSubtasks:t.notifyOnSubtasks,notifyOnCompletion:t.notifyOnCompletion,notifyOnError:t.notifyOnError,notifyOnQuestion:t.notifyOnQuestion,notificationTemplates:t.notificationTemplates,summarizeLastMessage:t.summarizeLastMessage,summaryThreshold:t.summaryThreshold,summaryLength:t.summaryLength,maxLastMessageLength:t.maxLastMessageLength,persistChatDraft:t.persistChatDraft,showOpenCodeUpdateNotifications:t.showOpenCodeUpdateNotifications,inputSpellcheckEnabled:t.inputSpellcheckEnabled,wideChatLayoutEnabled:t.wideChatLayoutEnabled,showToolFileIcons:t.showToolFileIcons,showTurnChangedFiles:t.showTurnChangedFiles,showExpandedBashTools:t.showExpandedBashTools,showExpandedEditTools:t.showExpandedEditTools,timeFormatPreference:t.timeFormatPreference,weekStartPreference:t.weekStartPreference,mermaidRenderingMode:t.mermaidRenderingMode,userMessageRenderingMode:t.userMessageRenderingMode,stickyUserHeader:t.stickyUserHeader,showSplitAssistantMessageActions:t.showSplitAssistantMessageActions,showMobileSessionStatusBar:t.showMobileSessionStatusBar,isMobileSessionStatusBarCollapsed:t.isMobileSessionStatusBarCollapsed,mobileSessionFilterProjectId:t.mobileSessionFilterProjectId,shortcutOverrides:t.shortcutOverrides})}),{name:"ui-store"})),Qo=Jt()(Un(qo((t,e)=>({queuedMessages:{},queueModeEnabled:!0,addToQueue:(n,o)=>{const r={id:`queued-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,content:o.content,attachments:o.attachments,createdAt:Date.now(),sendConfig:o.sendConfig};t(i=>{const l=i.queuedMessages[n]??[];return{queuedMessages:{...i.queuedMessages,[n]:[...l,r]}}})},removeFromQueue:(n,o)=>{t(s=>{const i=(s.queuedMessages[n]??[]).filter(l=>l.id!==o);if(i.length===0){const{[n]:l,...c}=s.queuedMessages;return{queuedMessages:c}}return{queuedMessages:{...s.queuedMessages,[n]:i}}})},popToInput:(n,o)=>{const i=(e().queuedMessages[n]??[]).find(l=>l.id===o);return i?(t(l=>{const d=(l.queuedMessages[n]??[]).filter(u=>u.id!==o);if(d.length===0){const{[n]:u,...f}=l.queuedMessages;return{queuedMessages:f}}return{queuedMessages:{...l.queuedMessages,[n]:d}}}),i):null},clearQueue:n=>{t(o=>{const{[n]:s,...r}=o.queuedMessages;return{queuedMessages:r}})},clearAllQueues:()=>{t({queuedMessages:{}})},setQueueMode:n=>{t({queueModeEnabled:n}),un({queueModeEnabled:n})},getQueueForSession:n=>e().queuedMessages[n]??[]}),{name:"message-queue-store",storage:Wo(()=>Pn()),partialize:t=>({queuedMessages:t.queuedMessages,queueModeEnabled:t.queueModeEnabled})}),{name:"message-queue-store"})),um="directoryTreeShowHidden",hd="directory-show-hidden-change",E5=()=>{if(typeof window>"u")return!0;try{const t=Pn().getItem(um);return t===null?!0:t==="true"}catch{return!0}},Gw=()=>{typeof window>"u"||window.dispatchEvent(new Event(hd))},Kw=(t,e={})=>{if(!(typeof window>"u")){try{Pn().setItem(um,t?"true":"false"),Gw()}catch{}e.persist!==!1&&un({directoryShowHidden:t})}},Yw=()=>{const t=le.c(2),[e,n]=g.useState(E5);let o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{if(typeof window>"u")return;const r=()=>{n(E5())};return window.addEventListener("storage",r),window.addEventListener(hd,r),()=>{window.removeEventListener("storage",r),window.removeEventListener(hd,r)}},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),g.useEffect(o,s),e},fm="filesViewShowGitignored",pd="files-view-show-gitignored-change",H5=()=>{if(typeof window>"u")return!1;try{return Pn().getItem(fm)==="true"}catch{return!1}},Jw=()=>{typeof window>"u"||window.dispatchEvent(new Event(pd))},Qw=(t,e={})=>{if(!(typeof window>"u")){try{Pn().setItem(fm,t?"true":"false"),Jw()}catch{}e.persist!==!1&&un({filesViewShowGitignored:t})}},Xw=()=>{const t=le.c(2),[e,n]=g.useState(H5);let o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{if(typeof window>"u")return;const r=()=>{n(H5())};return window.addEventListener("storage",r),window.addEventListener(pd,r),()=>{window.removeEventListener("storage",r),window.removeEventListener(pd,r)}},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),g.useEffect(o,s),e},ex=t=>{if(!t||typeof t!="object")return null;const e={};return typeof t.showReasoningTraces=="boolean"&&(e.showReasoningTraces=t.showReasoningTraces),typeof t.collapsibleThinkingBlocks=="boolean"&&(e.collapsibleThinkingBlocks=t.collapsibleThinkingBlocks),Object.keys(e).length>0?e:null},tx=t=>{if(!t||typeof t!="object")return null;const e=t;return{showReasoningTraces:e.showReasoningTraces,collapsibleThinkingBlocks:e.collapsibleThinkingBlocks}},nx=t=>{const e=ke.getState();typeof t.showReasoningTraces=="boolean"&&e.setShowReasoningTraces(t.showReasoningTraces),typeof t.collapsibleThinkingBlocks=="boolean"&&e.setCollapsibleThinkingBlocks(t.collapsibleThinkingBlocks)},ox=async()=>{if(typeof window>"u")return null;const t=localStorage.getItem("appearance-preferences");if(!t)return null;try{const e=JSON.parse(t),n=tx(e);return ex(n)}catch(e){return console.warn("Failed to parse stored appearance preferences:",e),null}},I4=[{name:"explore",icon:"compass-3",labelKey:"chat.draftPresets.explore.label",command:"/explore"},{name:"catch-up",icon:"history",labelKey:"chat.draftPresets.catchup.label",command:"/catch-up"},{name:"weigh",icon:"scales-3",labelKey:"chat.draftPresets.weigh.label",command:"/weigh"},{name:"plan-feature",icon:"survey",labelKey:"chat.draftPresets.plan.label",command:"/plan-feature"},{name:"debug",icon:"bug",labelKey:"chat.draftPresets.debug.label",command:"/debug"},{name:"review",icon:"search-eye",labelKey:"chat.draftPresets.review.label",command:"/workspace-review"}],sx=new Map(I4.map(t=>[t.name,t])),I5=t=>sx.get(t),t2=I4.map(t=>({type:"command",name:t.name})),j5="terminal-box",L5="book-open",gd=t=>`${t.type}:${t.name}`,n2=(t,e)=>t.type===e.type&&t.name===e.name,o2=t=>{const e=t.replace(/^\//,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return e?e.charAt(0).toUpperCase()+e.slice(1):t},ol=t=>{if(!Array.isArray(t))return[];const e=[],n=new Set;for(const o of t){if(!o||typeof o!="object")continue;const s=o,r=s.type==="command"||s.type==="skill"?s.type:null,i=typeof s.name=="string"?s.name.trim():"";if(!r||!i)continue;const l=`${r}:${i}`;n.has(l)||(n.add(l),e.push({type:r,name:i}))}return e},bd=t=>{if(!(typeof window>"u")){if(t.themeId&&localStorage.setItem("selectedThemeId",t.themeId),t.themeVariant&&localStorage.setItem("selectedThemeVariant",t.themeVariant),t.lightThemeId&&localStorage.setItem("lightThemeId",t.lightThemeId),t.darkThemeId&&localStorage.setItem("darkThemeId",t.darkThemeId),typeof t.useSystemTheme=="boolean"&&localStorage.setItem("useSystemTheme",String(t.useSystemTheme)),t.lastDirectory&&localStorage.setItem("lastDirectory",t.lastDirectory),t.homeDirectory){localStorage.setItem("homeDirectory",t.homeDirectory);try{window.__OPENCHAMBER_HOME__=t.homeDirectory}catch{}}if(Array.isArray(t.projects)&&t.projects.length>0?localStorage.setItem("projects",JSON.stringify(t.projects)):localStorage.removeItem("projects"),t.activeProjectId?localStorage.setItem("activeProjectId",t.activeProjectId):localStorage.removeItem("activeProjectId"),Array.isArray(t.pinnedDirectories)&&t.pinnedDirectories.length>0?localStorage.setItem("pinnedDirectories",JSON.stringify(t.pinnedDirectories)):localStorage.removeItem("pinnedDirectories"),Array.isArray(t.projects)&&t.projects.length>0){const e=t.projects.filter(n=>n.sidebarCollapsed===!0).map(n=>n.id).filter(n=>typeof n=="string"&&n.length>0);e.length>0?localStorage.setItem("oc.sessions.projectCollapse",JSON.stringify(e)):localStorage.removeItem("oc.sessions.projectCollapse")}if(typeof t.gitmojiEnabled=="boolean"?localStorage.setItem("gitmojiEnabled",String(t.gitmojiEnabled)):localStorage.removeItem("gitmojiEnabled"),typeof t.directoryShowHidden=="boolean"&&localStorage.setItem("directoryTreeShowHidden",t.directoryShowHidden?"true":"false"),typeof t.filesViewShowGitignored=="boolean"&&localStorage.setItem("filesViewShowGitignored",t.filesViewShowGitignored?"true":"false"),typeof t.openInAppId=="string"&&t.openInAppId.length>0&&localStorage.setItem("openInAppId",t.openInAppId),typeof t.pwaAppName=="string"){const e=t.pwaAppName.trim().replace(/\s+/g," ").slice(0,64);e.length>0?localStorage.setItem("openchamber.pwaName",e):localStorage.removeItem("openchamber.pwaName")}if(typeof t.mobileKeyboardMode=="string"&&nm(t.mobileKeyboardMode),typeof t.openCodeUpdateToastDismissedVersion=="string"){const e=t.openCodeUpdateToastDismissedVersion.trim();e?localStorage.setItem("opencode-update-toast-dismissed-version",e):localStorage.removeItem("opencode-update-toast-dismissed-version")}(t.sttProvider==="browser"||t.sttProvider==="server")&&localStorage.setItem("sttProvider",t.sttProvider),typeof t.sttServerUrl=="string"&&localStorage.setItem("sttServerUrl",t.sttServerUrl),typeof t.sttModel=="string"&&localStorage.setItem("sttModel",t.sttModel),typeof t.sttLanguage=="string"&&localStorage.setItem("sttLanguage",t.sttLanguage),typeof t.sttSilenceThresholdDb=="number"&&Number.isFinite(t.sttSilenceThresholdDb)&&localStorage.setItem("sttSilenceThresholdDb",String(t.sttSilenceThresholdDb)),typeof t.sttSilenceHoldMs=="number"&&Number.isFinite(t.sttSilenceHoldMs)&&localStorage.setItem("sttSilenceHoldMs",String(t.sttSilenceHoldMs)),typeof t.sttTranscribeOnStop=="boolean"&&localStorage.setItem("sttTranscribeOnStop",String(t.sttTranscribeOnStop))}},yd=t=>{typeof window>"u"||window.dispatchEvent(new CustomEvent("openchamber:settings-synced",{detail:t}))},rx=t=>{if(!Array.isArray(t))return;const e=[],n=new Set;for(const o of t){if(!o||typeof o!="object")continue;const s=o,r=typeof s.id=="string"?s.id.trim():"",i=typeof s.label=="string"?s.label.trim():"",l=typeof s.source=="string"?s.source.trim():"",c=typeof s.subpath=="string"?s.subpath.trim():"",d=typeof s.gitIdentityId=="string"?s.gitIdentityId.trim():"";!r||!i||!l||n.has(r)||(n.add(r),e.push({id:r,label:i,source:l,...c?{subpath:c}:{},...d?{gitIdentityId:d}:{}}))}return e},ix=t=>{if(!t||typeof t!="object"||Array.isArray(t))return;const e={};for(const[n,o]of Object.entries(t)){const s=typeof n=="string"?n.trim():"",r=typeof o=="string"?o.trim():"";!s||!r||(e[s]=r)}return e},ax=(t,e)=>{const n=Object.entries(t),o=Object.entries(e);return n.length!==o.length?!1:n.every(([s,r])=>e[s]===r)},lx=/^#(?:[\da-fA-F]{3}|[\da-fA-F]{6})$/,cx=t=>{if(typeof t!="string")return null;const e=t.trim();return e&&lx.test(e)?e.toLowerCase():null},dx=t=>{if(!Array.isArray(t))return;const e=[],n=new Set,o=new Set;for(const s of t){if(!s||typeof s!="object")continue;const r=s,i=typeof r.path=="string"?r.path.trim():"";if(!i)continue;const l=i==="/"?i:i.replace(/\\/g,"/").replace(/\/+$/,"");if(!l)continue;const c=A1(l);if(!c||n.has(c)||o.has(l))continue;n.add(c),o.add(l);const d={id:c,path:l};if(typeof r.label=="string"&&r.label.trim().length>0&&(d.label=r.label.trim()),typeof r.icon=="string"&&r.icon.trim().length>0&&(d.icon=r.icon.trim()),r.iconImage===null)d.iconImage=null;else if(r.iconImage&&typeof r.iconImage=="object"){const u=r.iconImage,f=typeof u.mime=="string"?u.mime.trim():"",m=typeof u.updatedAt=="number"&&Number.isFinite(u.updatedAt)?Math.max(0,Math.round(u.updatedAt)):0,h=u.source==="custom"||u.source==="auto"?u.source:null;f&&m>0&&h&&(d.iconImage={mime:f,updatedAt:m,source:h})}if(typeof r.color=="string"&&r.color.trim().length>0&&(d.color=r.color.trim()),r.iconBackground===null)d.iconBackground=null;else{const u=cx(r.iconBackground);u&&(d.iconBackground=u)}typeof r.addedAt=="number"&&Number.isFinite(r.addedAt)&&r.addedAt>=0&&(d.addedAt=r.addedAt),typeof r.lastOpenedAt=="number"&&Number.isFinite(r.lastOpenedAt)&&r.lastOpenedAt>=0&&(d.lastOpenedAt=r.lastOpenedAt),typeof r.sidebarCollapsed=="boolean"&&(d.sidebarCollapsed=r.sidebarCollapsed),e.push(d)}return e.length>0?e:void 0},ux=t=>{if(!Array.isArray(t))return;const e=[],n=new Set,o=new Set;for(const s of t){if(!s||typeof s!="object")continue;const r=s,i=typeof r.id=="string"?r.id.trim():"",l=typeof r.name=="string"?r.name.trim():"",c=typeof r.hostname=="string"?r.hostname.trim().toLowerCase():"";!i||!l||!c||n.has(i)||o.has(c)||(n.add(i),o.add(c),e.push({id:i,name:l,hostname:c}))}return e},fx=t=>{if(!t||typeof t!="object"||Array.isArray(t))return;const e=t,n={};for(const[o,s]of Object.entries(e)){const r=o.trim(),i=typeof s=="string"?s.trim():"";!r||!i||(n[r]=i)}return Object.keys(n).length>0?n:void 0},N5=(t,e)=>{if(!Array.isArray(t))return;const n=[],o=new Set;for(const s of t){if(!s||typeof s!="object")continue;const r=s,i=typeof r.providerID=="string"?r.providerID.trim():"",l=typeof r.modelID=="string"?r.modelID.trim():"";if(!i||!l)continue;const c=`${i}/${l}`;if(!o.has(c)&&(o.add(c),n.push({providerID:i,modelID:l}),n.length>=e))break}return n},mm=()=>{const t=ke.persist;if(t&&typeof t=="object")return t},hm=()=>yo()?.settings??null,vd=t=>{const e=ke.getState(),n=typeof window<"u"?window.__zustand_config_store__?.getState?.()??null:null,o=typeof window<"u"?window.__zustand_config_store__??null:null,s=Qo.getState();if(typeof t.showReasoningTraces=="boolean"&&t.showReasoningTraces!==e.showReasoningTraces&&e.setShowReasoningTraces(t.showReasoningTraces),typeof t.collapsibleThinkingBlocks=="boolean"&&t.collapsibleThinkingBlocks!==e.collapsibleThinkingBlocks&&e.setCollapsibleThinkingBlocks(t.collapsibleThinkingBlocks),typeof t.autoDeleteEnabled=="boolean"&&t.autoDeleteEnabled!==e.autoDeleteEnabled&&e.setAutoDeleteEnabled(t.autoDeleteEnabled),typeof t.autoDeleteAfterDays=="number"&&Number.isFinite(t.autoDeleteAfterDays)){const r=Math.max(1,Math.min(365,t.autoDeleteAfterDays));r!==e.autoDeleteAfterDays&&e.setAutoDeleteAfterDays(r)}if((t.sessionRetentionAction==="archive"||t.sessionRetentionAction==="delete")&&t.sessionRetentionAction!==e.sessionRetentionAction&&e.setSessionRetentionAction(t.sessionRetentionAction),typeof t.queueModeEnabled=="boolean"&&t.queueModeEnabled!==s.queueModeEnabled&&s.setQueueMode(t.queueModeEnabled),typeof t.showDeletionDialog=="boolean"&&t.showDeletionDialog!==e.showDeletionDialog&&e.setShowDeletionDialog(t.showDeletionDialog),typeof t.nativeNotificationsEnabled=="boolean"&&t.nativeNotificationsEnabled!==e.nativeNotificationsEnabled&&e.setNativeNotificationsEnabled(t.nativeNotificationsEnabled),typeof t.notificationMode=="string"&&(t.notificationMode==="always"||t.notificationMode==="hidden-only")&&t.notificationMode!==e.notificationMode&&e.setNotificationMode(t.notificationMode),typeof t.notifyOnSubtasks=="boolean"&&t.notifyOnSubtasks!==e.notifyOnSubtasks&&e.setNotifyOnSubtasks(t.notifyOnSubtasks),typeof t.notifyOnCompletion=="boolean"&&t.notifyOnCompletion!==e.notifyOnCompletion&&e.setNotifyOnCompletion(t.notifyOnCompletion),typeof t.notifyOnError=="boolean"&&t.notifyOnError!==e.notifyOnError&&e.setNotifyOnError(t.notifyOnError),typeof t.notifyOnQuestion=="boolean"&&t.notifyOnQuestion!==e.notifyOnQuestion&&e.setNotifyOnQuestion(t.notifyOnQuestion),t.notificationTemplates&&typeof t.notificationTemplates=="object"&&e.setNotificationTemplates(t.notificationTemplates),typeof t.summarizeLastMessage=="boolean"&&t.summarizeLastMessage!==e.summarizeLastMessage&&e.setSummarizeLastMessage(t.summarizeLastMessage),typeof t.summaryThreshold=="number"&&Number.isFinite(t.summaryThreshold)&&e.setSummaryThreshold(t.summaryThreshold),typeof t.summaryLength=="number"&&Number.isFinite(t.summaryLength)&&e.setSummaryLength(t.summaryLength),typeof t.maxLastMessageLength=="number"&&Number.isFinite(t.maxLastMessageLength)&&e.setMaxLastMessageLength(t.maxLastMessageLength),typeof t.inputSpellcheckEnabled=="boolean"&&t.inputSpellcheckEnabled!==e.inputSpellcheckEnabled&&e.setInputSpellcheckEnabled(t.inputSpellcheckEnabled),typeof t.showOpenCodeUpdateNotifications=="boolean"&&t.showOpenCodeUpdateNotifications!==e.showOpenCodeUpdateNotifications&&e.setShowOpenCodeUpdateNotifications(t.showOpenCodeUpdateNotifications),typeof t.showToolFileIcons=="boolean"&&t.showToolFileIcons!==e.showToolFileIcons&&e.setShowToolFileIcons(t.showToolFileIcons),typeof t.showTurnChangedFiles=="boolean"&&t.showTurnChangedFiles!==e.showTurnChangedFiles&&e.setShowTurnChangedFiles(t.showTurnChangedFiles),typeof t.showExpandedBashTools=="boolean"&&t.showExpandedBashTools!==e.showExpandedBashTools&&e.setShowExpandedBashTools(t.showExpandedBashTools),typeof t.showExpandedEditTools=="boolean"&&t.showExpandedEditTools!==e.showExpandedEditTools&&e.setShowExpandedEditTools(t.showExpandedEditTools),typeof t.timeFormatPreference=="string"&&(t.timeFormatPreference==="auto"||t.timeFormatPreference==="12h"||t.timeFormatPreference==="24h")&&t.timeFormatPreference!==e.timeFormatPreference&&e.setTimeFormatPreference(t.timeFormatPreference),typeof t.weekStartPreference=="string"&&(t.weekStartPreference==="auto"||t.weekStartPreference==="sunday"||t.weekStartPreference==="monday")&&t.weekStartPreference!==e.weekStartPreference&&e.setWeekStartPreference(t.weekStartPreference),typeof t.chatRenderMode=="string"&&(t.chatRenderMode==="sorted"||t.chatRenderMode==="live")&&t.chatRenderMode!==e.chatRenderMode&&e.setChatRenderMode(t.chatRenderMode),typeof t.activityRenderMode=="string"&&(t.activityRenderMode==="collapsed"||t.activityRenderMode==="summary")&&t.activityRenderMode!==e.activityRenderMode&&e.setActivityRenderMode(t.activityRenderMode),typeof t.mermaidRenderingMode=="string"&&(t.mermaidRenderingMode==="svg"||t.mermaidRenderingMode==="ascii")&&t.mermaidRenderingMode!==e.mermaidRenderingMode&&e.setMermaidRenderingMode(t.mermaidRenderingMode),typeof t.userMessageRenderingMode=="string"&&(t.userMessageRenderingMode==="markdown"||t.userMessageRenderingMode==="plain")&&t.userMessageRenderingMode!==e.userMessageRenderingMode&&e.setUserMessageRenderingMode(t.userMessageRenderingMode),typeof t.messageStreamTransport=="string"&&(t.messageStreamTransport==="auto"||t.messageStreamTransport==="ws"||t.messageStreamTransport==="sse")&&n&&t.messageStreamTransport!==n.settingsMessageStreamTransport&&n.setSettingsMessageStreamTransport(t.messageStreamTransport),typeof t.stickyUserHeader=="boolean"&&t.stickyUserHeader!==e.stickyUserHeader&&e.setStickyUserHeader(t.stickyUserHeader),typeof t.wideChatLayoutEnabled=="boolean"&&t.wideChatLayoutEnabled!==e.wideChatLayoutEnabled&&e.setWideChatLayoutEnabled(t.wideChatLayoutEnabled),typeof t.showSplitAssistantMessageActions=="boolean"&&t.showSplitAssistantMessageActions!==e.showSplitAssistantMessageActions&&e.setShowSplitAssistantMessageActions(t.showSplitAssistantMessageActions),typeof t.reportUsage=="boolean"&&t.reportUsage!==e.reportUsage&&e.setReportUsage(t.reportUsage),typeof t.fontSize=="number"&&Number.isFinite(t.fontSize)&&t.fontSize!==e.fontSize&&e.setFontSize(t.fontSize),Array.isArray(t.draftStarters)){const r=ol(t.draftStarters);JSON.stringify(e.globalDraftStarters)!==JSON.stringify(r)&&e.setGlobalDraftStarters(r)}if(typeof t.terminalFontSize=="number"&&Number.isFinite(t.terminalFontSize)&&t.terminalFontSize!==e.terminalFontSize&&e.setTerminalFontSize(t.terminalFontSize),em(t.uiFont)&&t.uiFont!==e.uiFont&&e.setUiFont(t.uiFont),tm(t.monoFont)&&t.monoFont!==e.monoFont&&e.setMonoFont(t.monoFont),typeof t.padding=="number"&&Number.isFinite(t.padding)&&t.padding!==e.padding&&e.setPadding(t.padding),typeof t.cornerRadius=="number"&&Number.isFinite(t.cornerRadius)&&t.cornerRadius!==e.cornerRadius&&e.setCornerRadius(t.cornerRadius),typeof t.inputBarOffset=="number"&&Number.isFinite(t.inputBarOffset)&&t.inputBarOffset!==e.inputBarOffset&&e.setInputBarOffset(t.inputBarOffset),t.shortcutOverrides&&!ax(t.shortcutOverrides,e.shortcutOverrides)&&ke.setState({shortcutOverrides:t.shortcutOverrides}),typeof t.mobileKeyboardMode=="string"){const r=nl(t.mobileKeyboardMode,e.mobileKeyboardMode);r!==e.mobileKeyboardMode&&e.setMobileKeyboardMode(r)}if(o&&n){const r={};(t.sttProvider==="browser"||t.sttProvider==="server")&&t.sttProvider!==n.sttProvider&&(r.sttProvider=t.sttProvider),typeof t.sttServerUrl=="string"&&t.sttServerUrl!==n.sttServerUrl&&(r.sttServerUrl=t.sttServerUrl),typeof t.sttModel=="string"&&t.sttModel!==n.sttModel&&(r.sttModel=t.sttModel),typeof t.sttLanguage=="string"&&t.sttLanguage!==n.sttLanguage&&(r.sttLanguage=t.sttLanguage),typeof t.sttSilenceThresholdDb=="number"&&Number.isFinite(t.sttSilenceThresholdDb)&&t.sttSilenceThresholdDb!==n.sttSilenceThresholdDb&&(r.sttSilenceThresholdDb=t.sttSilenceThresholdDb),typeof t.sttSilenceHoldMs=="number"&&Number.isFinite(t.sttSilenceHoldMs)&&t.sttSilenceHoldMs!==n.sttSilenceHoldMs&&(r.sttSilenceHoldMs=t.sttSilenceHoldMs),typeof t.sttTranscribeOnStop=="boolean"&&t.sttTranscribeOnStop!==n.sttTranscribeOnStop&&(r.sttTranscribeOnStop=t.sttTranscribeOnStop),Object.keys(r).length>0&&o.setState(r)}if(Array.isArray(t.favoriteModels)){const r=e.favoriteModels,i=t.favoriteModels;r.length===i.length&&r.every((c,d)=>c.providerID===i[d]?.providerID&&c.modelID===i[d]?.modelID)||ke.setState({favoriteModels:i})}if(Array.isArray(t.recentModels)){const r=e.recentModels,i=t.recentModels;r.length===i.length&&r.every((c,d)=>c.providerID===i[d]?.providerID&&c.modelID===i[d]?.modelID)||ke.setState({recentModels:i})}typeof t.diffLayoutPreference=="string"&&(t.diffLayoutPreference==="dynamic"||t.diffLayoutPreference==="inline"||t.diffLayoutPreference==="side-by-side")&&t.diffLayoutPreference!==e.diffLayoutPreference&&e.setDiffLayoutPreference(t.diffLayoutPreference),typeof t.diffViewMode=="string"&&(t.diffViewMode==="single"||t.diffViewMode==="stacked")&&t.diffViewMode!==e.diffViewMode&&e.setDiffViewMode(t.diffViewMode),typeof t.gitChangesViewMode=="string"&&(t.gitChangesViewMode==="flat"||t.gitChangesViewMode==="tree")&&t.gitChangesViewMode!==e.gitChangesViewMode&&e.setGitChangesViewMode(t.gitChangesViewMode),typeof t.directoryShowHidden=="boolean"&&Kw(t.directoryShowHidden,{persist:!1}),typeof t.filesViewShowGitignored=="boolean"&&Qw(t.filesViewShowGitignored,{persist:!1})},R5=t=>{if(!t||typeof t!="object")return null;const e=t,n={};if(typeof e.themeId=="string"&&e.themeId.length>0&&(n.themeId=e.themeId),(e.useSystemTheme===!0||e.useSystemTheme===!1)&&(n.useSystemTheme=e.useSystemTheme),typeof e.themeVariant=="string"&&(e.themeVariant==="light"||e.themeVariant==="dark")&&(n.themeVariant=e.themeVariant),typeof e.lightThemeId=="string"&&e.lightThemeId.length>0&&(n.lightThemeId=e.lightThemeId),typeof e.darkThemeId=="string"&&e.darkThemeId.length>0&&(n.darkThemeId=e.darkThemeId),typeof e.lastDirectory=="string"&&e.lastDirectory.length>0&&(n.lastDirectory=e.lastDirectory),typeof e.homeDirectory=="string"&&e.homeDirectory.length>0&&(n.homeDirectory=e.homeDirectory),typeof e.opencodeBinary=="string"){const u=e.opencodeBinary.trim();n.opencodeBinary=u.length>0?u:void 0}typeof e.desktopLanAccessEnabled=="boolean"&&(n.desktopLanAccessEnabled=e.desktopLanAccessEnabled);const o=dx(e.projects);if(o&&(n.projects=o),typeof e.activeProjectId=="string"&&e.activeProjectId.length>0&&(n.activeProjectId=e.activeProjectId),Array.isArray(e.approvedDirectories)&&(n.approvedDirectories=e.approvedDirectories.filter(u=>typeof u=="string"&&u.length>0)),Array.isArray(e.securityScopedBookmarks)&&(n.securityScopedBookmarks=e.securityScopedBookmarks.filter(u=>typeof u=="string"&&u.length>0)),Array.isArray(e.pinnedDirectories)&&(n.pinnedDirectories=Array.from(new Set(e.pinnedDirectories.filter(u=>typeof u=="string"&&u.length>0)))),Array.isArray(e.draftStarters)&&(n.draftStarters=ol(e.draftStarters)),typeof e.showReasoningTraces=="boolean"&&(n.showReasoningTraces=e.showReasoningTraces),typeof e.collapsibleThinkingBlocks=="boolean"&&(n.collapsibleThinkingBlocks=e.collapsibleThinkingBlocks),typeof e.autoDeleteEnabled=="boolean"&&(n.autoDeleteEnabled=e.autoDeleteEnabled),typeof e.autoDeleteAfterDays=="number"&&Number.isFinite(e.autoDeleteAfterDays)&&(n.autoDeleteAfterDays=e.autoDeleteAfterDays),(e.sessionRetentionAction==="archive"||e.sessionRetentionAction==="delete")&&(n.sessionRetentionAction=e.sessionRetentionAction),typeof e.tunnelProvider=="string"){const u=e.tunnelProvider.trim().toLowerCase();u.length>0&&(n.tunnelProvider=u)}if(typeof e.tunnelMode=="string"){const u=e.tunnelMode.trim().toLowerCase();(u==="quick"||u==="managed-remote"||u==="managed-local")&&(n.tunnelMode=u)}if(e.tunnelBootstrapTtlMs===null?n.tunnelBootstrapTtlMs=null:typeof e.tunnelBootstrapTtlMs=="number"&&Number.isFinite(e.tunnelBootstrapTtlMs)&&(n.tunnelBootstrapTtlMs=e.tunnelBootstrapTtlMs),typeof e.tunnelSessionTtlMs=="number"&&Number.isFinite(e.tunnelSessionTtlMs)&&(n.tunnelSessionTtlMs=e.tunnelSessionTtlMs),e.managedLocalTunnelConfigPath===null)n.managedLocalTunnelConfigPath=null;else if(typeof e.managedLocalTunnelConfigPath=="string"){const u=e.managedLocalTunnelConfigPath.trim();n.managedLocalTunnelConfigPath=u.length>0?u:null}typeof e.managedRemoteTunnelHostname=="string"&&(n.managedRemoteTunnelHostname=e.managedRemoteTunnelHostname.trim()),e.managedRemoteTunnelToken===null?n.managedRemoteTunnelToken=null:typeof e.managedRemoteTunnelToken=="string"&&(n.managedRemoteTunnelToken=e.managedRemoteTunnelToken.trim());const s=ux(e.managedRemoteTunnelPresets);if(s&&(n.managedRemoteTunnelPresets=s),typeof e.managedRemoteTunnelSelectedPresetId=="string"){const u=e.managedRemoteTunnelSelectedPresetId.trim();n.managedRemoteTunnelSelectedPresetId=u.length>0?u:void 0}const r=fx(e.managedRemoteTunnelPresetTokens);if(r&&(n.managedRemoteTunnelPresetTokens=r),typeof e.defaultModel=="string"&&e.defaultModel.length>0&&(n.defaultModel=e.defaultModel),typeof e.defaultVariant=="string"&&e.defaultVariant.length>0&&(n.defaultVariant=e.defaultVariant),typeof e.defaultAgent=="string"&&e.defaultAgent.length>0&&(n.defaultAgent=e.defaultAgent),typeof e.autoCreateWorktree=="boolean"&&(n.autoCreateWorktree=e.autoCreateWorktree),typeof e.gitmojiEnabled=="boolean"&&(n.gitmojiEnabled=e.gitmojiEnabled),typeof e.queueModeEnabled=="boolean"&&(n.queueModeEnabled=e.queueModeEnabled),typeof e.showDeletionDialog=="boolean"&&(n.showDeletionDialog=e.showDeletionDialog),typeof e.nativeNotificationsEnabled=="boolean"&&(n.nativeNotificationsEnabled=e.nativeNotificationsEnabled),typeof e.notificationMode=="string"&&(e.notificationMode==="always"||e.notificationMode==="hidden-only")&&(n.notificationMode=e.notificationMode),typeof e.notifyOnSubtasks=="boolean"&&(n.notifyOnSubtasks=e.notifyOnSubtasks),typeof e.notifyOnCompletion=="boolean"&&(n.notifyOnCompletion=e.notifyOnCompletion),typeof e.notifyOnError=="boolean"&&(n.notifyOnError=e.notifyOnError),typeof e.notifyOnQuestion=="boolean"&&(n.notifyOnQuestion=e.notifyOnQuestion),e.notificationTemplates&&typeof e.notificationTemplates=="object"){const u=e.notificationTemplates,f=y=>{const v=u[y];if(!v||typeof v!="object")return;const x=v,w=typeof x.title=="string"?x.title:"",S=typeof x.message=="string"?x.message:"";return{title:w,message:S}},m=f("completion"),h=f("error"),p=f("question"),b=f("subtask");(m||h||p||b)&&(n.notificationTemplates={completion:m??{title:"Task Complete",message:"Your task has finished."},error:h??{title:"Error Occurred",message:"An error occurred while processing your task."},question:p??{title:"Input Needed",message:"Please provide input to continue."},subtask:b??{title:"Subtask Complete",message:"A subtask has finished."}})}if(typeof e.summarizeLastMessage=="boolean"&&(n.summarizeLastMessage=e.summarizeLastMessage),typeof e.summaryThreshold=="number"&&Number.isFinite(e.summaryThreshold)&&(n.summaryThreshold=Math.max(0,Math.round(e.summaryThreshold))),typeof e.summaryLength=="number"&&Number.isFinite(e.summaryLength)&&(n.summaryLength=Math.max(10,Math.round(e.summaryLength))),typeof e.maxLastMessageLength=="number"&&Number.isFinite(e.maxLastMessageLength)&&(n.maxLastMessageLength=Math.max(10,Math.round(e.maxLastMessageLength))),typeof e.usageAutoRefresh=="boolean"&&(n.usageAutoRefresh=e.usageAutoRefresh),typeof e.usageRefreshIntervalMs=="number"&&Number.isFinite(e.usageRefreshIntervalMs)&&(n.usageRefreshIntervalMs=e.usageRefreshIntervalMs),(e.usageDisplayMode==="usage"||e.usageDisplayMode==="remaining")&&(n.usageDisplayMode=e.usageDisplayMode),typeof e.usageShowPredValues=="boolean"&&(n.usageShowPredValues=e.usageShowPredValues),Array.isArray(e.usageDropdownProviders)&&(n.usageDropdownProviders=e.usageDropdownProviders.filter(u=>typeof u=="string"&&u.length>0)),e.usageSelectedModels&&typeof e.usageSelectedModels=="object"){const u={};for(const[f,m]of Object.entries(e.usageSelectedModels))Array.isArray(m)&&(u[f]=m.filter(h=>typeof h=="string"));Object.keys(u).length>0&&(n.usageSelectedModels=u)}if(e.usageCollapsedFamilies&&typeof e.usageCollapsedFamilies=="object"){const u={};for(const[f,m]of Object.entries(e.usageCollapsedFamilies))Array.isArray(m)&&(u[f]=m.filter(h=>typeof h=="string"));Object.keys(u).length>0&&(n.usageCollapsedFamilies=u)}if(e.usageExpandedFamilies&&typeof e.usageExpandedFamilies=="object"){const u={};for(const[f,m]of Object.entries(e.usageExpandedFamilies))Array.isArray(m)&&(u[f]=m.filter(h=>typeof h=="string"));Object.keys(u).length>0&&(n.usageExpandedFamilies=u)}if(e.usageModelGroups&&typeof e.usageModelGroups=="object"){const u={};for(const[f,m]of Object.entries(e.usageModelGroups))if(m&&typeof m=="object"){const h=m,p={};Array.isArray(h.customGroups)&&(p.customGroups=h.customGroups.filter(b=>b&&typeof b=="object").map(b=>({id:String(b.id??""),label:String(b.label??""),models:Array.isArray(b.models)?b.models.filter(y=>typeof y=="string"):[],order:typeof b.order=="number"?b.order:0}))),h.modelAssignments&&typeof h.modelAssignments=="object"&&(p.modelAssignments=Object.fromEntries(Object.entries(h.modelAssignments).filter(([,b])=>typeof b=="string").map(([b,y])=>[b,String(y)]))),h.renamedGroups&&typeof h.renamedGroups=="object"&&(p.renamedGroups=Object.fromEntries(Object.entries(h.renamedGroups).filter(([,b])=>typeof b=="string").map(([b,y])=>[b,String(y)]))),Object.keys(p).length>0&&(u[f]=p)}Object.keys(u).length>0&&(n.usageModelGroups=u)}typeof e.inputSpellcheckEnabled=="boolean"&&(n.inputSpellcheckEnabled=e.inputSpellcheckEnabled),typeof e.showOpenCodeUpdateNotifications=="boolean"&&(n.showOpenCodeUpdateNotifications=e.showOpenCodeUpdateNotifications),typeof e.openCodeUpdateToastDismissedVersion=="string"&&(n.openCodeUpdateToastDismissedVersion=e.openCodeUpdateToastDismissedVersion.trim().slice(0,128)),typeof e.showToolFileIcons=="boolean"&&(n.showToolFileIcons=e.showToolFileIcons),typeof e.showTurnChangedFiles=="boolean"&&(n.showTurnChangedFiles=e.showTurnChangedFiles),typeof e.showExpandedBashTools=="boolean"&&(n.showExpandedBashTools=e.showExpandedBashTools),typeof e.showExpandedEditTools=="boolean"&&(n.showExpandedEditTools=e.showExpandedEditTools),typeof e.timeFormatPreference=="string"&&(e.timeFormatPreference==="auto"||e.timeFormatPreference==="12h"||e.timeFormatPreference==="24h")&&(n.timeFormatPreference=e.timeFormatPreference),typeof e.weekStartPreference=="string"&&(e.weekStartPreference==="auto"||e.weekStartPreference==="sunday"||e.weekStartPreference==="monday")&&(n.weekStartPreference=e.weekStartPreference),typeof e.chatRenderMode=="string"&&(e.chatRenderMode==="sorted"||e.chatRenderMode==="live")&&(n.chatRenderMode=e.chatRenderMode),typeof e.messageStreamTransport=="string"&&(e.messageStreamTransport==="auto"||e.messageStreamTransport==="ws"||e.messageStreamTransport==="sse")&&(n.messageStreamTransport=e.messageStreamTransport),typeof e.activityRenderMode=="string"&&(e.activityRenderMode==="collapsed"||e.activityRenderMode==="summary")&&(n.activityRenderMode=e.activityRenderMode),typeof e.mermaidRenderingMode=="string"&&(e.mermaidRenderingMode==="svg"||e.mermaidRenderingMode==="ascii")&&(n.mermaidRenderingMode=e.mermaidRenderingMode),typeof e.userMessageRenderingMode=="string"&&(e.userMessageRenderingMode==="markdown"||e.userMessageRenderingMode==="plain")&&(n.userMessageRenderingMode=e.userMessageRenderingMode),typeof e.stickyUserHeader=="boolean"&&(n.stickyUserHeader=e.stickyUserHeader),typeof e.wideChatLayoutEnabled=="boolean"&&(n.wideChatLayoutEnabled=e.wideChatLayoutEnabled),typeof e.showSplitAssistantMessageActions=="boolean"&&(n.showSplitAssistantMessageActions=e.showSplitAssistantMessageActions),typeof e.fontSize=="number"&&Number.isFinite(e.fontSize)&&(n.fontSize=e.fontSize),typeof e.terminalFontSize=="number"&&Number.isFinite(e.terminalFontSize)&&(n.terminalFontSize=e.terminalFontSize),em(e.uiFont)&&(n.uiFont=e.uiFont),tm(e.monoFont)&&(n.monoFont=e.monoFont),typeof e.padding=="number"&&Number.isFinite(e.padding)&&(n.padding=e.padding),typeof e.cornerRadius=="number"&&Number.isFinite(e.cornerRadius)&&(n.cornerRadius=e.cornerRadius),typeof e.inputBarOffset=="number"&&Number.isFinite(e.inputBarOffset)&&(n.inputBarOffset=e.inputBarOffset);const i=ix(e.shortcutOverrides);i&&(n.shortcutOverrides=i),typeof e.mobileKeyboardMode=="string"&&(e.mobileKeyboardMode==="native"||e.mobileKeyboardMode==="resize-content")&&(n.mobileKeyboardMode=e.mobileKeyboardMode);const l=N5(e.favoriteModels,64);l&&(n.favoriteModels=l);const c=N5(e.recentModels,16);if(c&&(n.recentModels=c),typeof e.diffLayoutPreference=="string"&&(e.diffLayoutPreference==="dynamic"||e.diffLayoutPreference==="inline"||e.diffLayoutPreference==="side-by-side")&&(n.diffLayoutPreference=e.diffLayoutPreference),typeof e.diffViewMode=="string"&&(e.diffViewMode==="single"||e.diffViewMode==="stacked")&&(n.diffViewMode=e.diffViewMode),typeof e.gitChangesViewMode=="string"&&(e.gitChangesViewMode==="flat"||e.gitChangesViewMode==="tree")&&(n.gitChangesViewMode=e.gitChangesViewMode),typeof e.directoryShowHidden=="boolean"&&(n.directoryShowHidden=e.directoryShowHidden),typeof e.filesViewShowGitignored=="boolean"&&(n.filesViewShowGitignored=e.filesViewShowGitignored),typeof e.openInAppId=="string"&&e.openInAppId.length>0&&(n.openInAppId=e.openInAppId),typeof e.pwaAppName=="string"){const u=e.pwaAppName.trim().replace(/\s+/g," ").slice(0,64);n.pwaAppName=u.length>0?u:""}const d=rx(e.skillCatalogs);return d&&(n.skillCatalogs=d),typeof e.reportUsage=="boolean"&&(n.reportUsage=e.reportUsage),typeof e.globalBehaviorPrompt=="string"&&(n.globalBehaviorPrompt=e.globalBehaviorPrompt),typeof e.responseStyleEnabled=="boolean"&&(n.responseStyleEnabled=e.responseStyleEnabled),typeof e.responseStylePreset=="string"&&(e.responseStylePreset==="concise"||e.responseStylePreset==="detailed"||e.responseStylePreset==="mentor"||e.responseStylePreset==="pushback"||e.responseStylePreset==="noFiller"||e.responseStylePreset==="matchEnergy"||e.responseStylePreset==="warmPeer"||e.responseStylePreset==="custom")&&(n.responseStylePreset=e.responseStylePreset),typeof e.responseStyleCustomInstructions=="string"&&(n.responseStyleCustomInstructions=e.responseStyleCustomInstructions),(e.sttProvider==="browser"||e.sttProvider==="server")&&(n.sttProvider=e.sttProvider),typeof e.sttServerUrl=="string"&&(n.sttServerUrl=e.sttServerUrl.trim()),typeof e.sttModel=="string"&&(n.sttModel=e.sttModel.trim()),typeof e.sttLanguage=="string"&&(n.sttLanguage=e.sttLanguage.trim()),typeof e.sttSilenceThresholdDb=="number"&&Number.isFinite(e.sttSilenceThresholdDb)&&(n.sttSilenceThresholdDb=e.sttSilenceThresholdDb),typeof e.sttSilenceHoldMs=="number"&&Number.isFinite(e.sttSilenceHoldMs)&&(n.sttSilenceHoldMs=e.sttSilenceHoldMs),typeof e.sttTranscribeOnStop=="boolean"&&(n.sttTranscribeOnStop=e.sttTranscribeOnStop),n};let Di=null,wa=null;const mx=2e3,hx=async()=>Di&&Date.now()-Di.at<mx?Di.value:wa||(wa=(async()=>{const t=hm();if(t)try{const e=await t.load(),n=R5(e.settings);return Di={value:n,at:Date.now()},n}catch(e){console.warn("Failed to load shared settings from runtime settings API:",e)}try{const e=await We("/api/config/settings",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)return null;const n=await e.json().catch(()=>null),o=R5(n);return Di={value:o,at:Date.now()},o}catch(e){return console.warn("Failed to load shared settings from server:",e),null}})().finally(()=>{wa=null}),wa),px=async()=>{if(typeof window>"u")return;const t=mm(),e=()=>!t?.hasHydrated||t.hasHydrated()||!t.onFinishHydration?Promise.resolve():new Promise(o=>{let s=!1;const r=()=>{s||(s=!0,o())},i=t.onFinishHydration(()=>{i?.(),r()});t.hasHydrated?.()&&r()}),n=async o=>{try{bd(o)}catch(s){console.warn("persistToLocalStorage failed:",s)}await e();try{vd(o)}catch(s){console.warn("applyDesktopUiPreferences failed:",s)}yd(o)};try{const o=await hx();o&&await n(o)}catch(o){console.warn("Failed to synchronise settings:",o)}};let g0=null,K2=null;const gx=200,bx=async()=>{const t=g0;if(g0=null,K2=null,!t||Object.keys(t).length===0)return;const e=hm();if(e)try{const n=await e.save(t);n&&(bd(n),vd(n),yd(n));return}catch(n){console.warn("Failed to update settings via runtime settings API:",n)}try{const n=await We("/api/config/settings",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(t)});if(!n.ok){console.warn("Failed to update shared settings via API:",n.status,n.statusText);return}const o=await n.json().catch(()=>null);o&&(bd(o),vd(o),yd(o),Di=null)}catch(n){console.warn("Failed to update shared settings via API:",n)}},un=async t=>{typeof window>"u"||(g0={...g0??{},...t},K2&&clearTimeout(K2),K2=setTimeout(()=>{bx()},gx))},yx=async()=>{if(typeof window>"u")return;const t=mm();try{const e=await ox();if(!e)return;const n=()=>nx(e);if(t?.hasHydrated?.()){n();return}if(n(),t?.onFinishHydration){const o=t.onFinishHydration(()=>{o?.(),n()})}}catch(e){console.warn("Failed to load appearance preferences:",e)}},vx=3e4,wx=40,xx=60,Cx=(t,e,n,o,s,r)=>{const i=t.trim(),l=e.trim().toLowerCase();return JSON.stringify([i,l,n,o,s,r])},V5=(t,e)=>{try{const n=JSON.parse(t);return Array.isArray(n)&&n[0]===e}catch{return!1}},pm=Jt()(Un((t,e)=>({cache:{},cacheKeys:[],inFlight:{},async searchFiles(n,o,s=xx,r){if(!n||n.trim().length===0)return[];const i=n.trim(),l=typeof o=="string"?o.trim():"",c=!!r?.includeHidden,d=r?.respectGitignore??!0,u=r?.type==="directory"?"directory":"file",f=Cx(i,l,s,c,d,u),m=Date.now(),h=e().cache[f];if(h&&m-h.timestamp<vx)return h.files;const p=e().inFlight[f];if(p)return p;const b=Je.searchFiles(l,{directory:i,limit:s,includeHidden:c,respectGitignore:d,dirs:u!=="file",type:u}).then(y=>(t(v=>{if(v.inFlight[f]!==b)return v;const x={...v.cache,[f]:{files:y,timestamp:Date.now()}},w=v.cacheKeys.filter(S=>S!==f);for(w.push(f);w.length>wx;){const S=w.shift();S&&delete x[S]}return{cache:x,cacheKeys:w}}),y)).finally(()=>{t(y=>{if(y.inFlight[f]!==b)return y;const v={...y.inFlight};return delete v[f],{inFlight:v}})});return t(y=>({inFlight:{...y.inFlight,[f]:b}})),b},invalidateDirectory(n){if(!n||n.trim().length===0){t({cache:{},cacheKeys:[],inFlight:{}});return}const o=n.trim();t(s=>{const r={...s.cache},i=s.cacheKeys.filter(d=>V5(d,o)?(delete r[d],!1):!0),l=Object.entries(s.inFlight).filter(([d])=>!V5(d,o)),c=Object.fromEntries(l);return{cache:r,cacheKeys:i,inFlight:c}})}}),{name:"file-search-store"})),F1=()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem("openchamber_stream_debug")==="1"}catch{return!1}},wd="openchamber_stream_perf",_1=()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(wd)==="1"}catch{return!1}},z5=()=>typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),Sx=()=>{if(!_1()||typeof window>"u")return null;if(!window.__openchamberStreamPerfState){const t=Date.now();window.__openchamberStreamPerfState={counters:new Map,startedAt:t,lastUpdatedAt:t}}return window.__openchamberStreamPerfState},gm=t=>Array.from(t.entries()).map(([e,n])=>({metric:e,count:n.count,avg:n.count>0?Number((n.total/n.count).toFixed(3)):0,max:Number(n.max.toFixed(3)),total:Number(n.total.toFixed(3)),last:Number(n.last.toFixed(3))})).sort((e,n)=>n.total-e.total||n.count-e.count),j4=(t,e)=>{const n=Sx();if(!n)return;const o=n.counters.get(t)??{count:0,total:0,max:0,last:0};o.count+=1,o.total+=e,o.max=Math.max(o.max,e),o.last=e,n.counters.set(t,o),n.lastUpdatedAt=Date.now()},bJ=t=>{if(!(typeof window>"u"))try{if(t){window.localStorage.setItem(wd,"1"),window.__openchamberStreamPerfState={counters:new Map,startedAt:Date.now(),lastUpdatedAt:Date.now()};return}window.localStorage.removeItem(wd),delete window.__openchamberStreamPerfState,delete window.__openchamberVsCodeStreamPerfState}catch{}},yJ=()=>{typeof window>"u"||(_1()&&(window.__openchamberStreamPerfState={counters:new Map,startedAt:Date.now(),lastUpdatedAt:Date.now()}),window.__openchamberVsCodeStreamPerfState&&(window.__openchamberVsCodeStreamPerfState={...window.__openchamberVsCodeStreamPerfState,counters:new Map,startedAt:Date.now(),lastUpdatedAt:Date.now()}))},vJ=()=>{if(typeof window>"u")return{enabled:!1,startedAt:null,lastUpdatedAt:null,durationMs:0,entries:[]};const t=window.__openchamberStreamPerfState;return!_1()||!t?{enabled:!1,startedAt:null,lastUpdatedAt:null,durationMs:0,entries:[]}:{enabled:!0,startedAt:t.startedAt,lastUpdatedAt:t.lastUpdatedAt,durationMs:Math.max(0,Date.now()-t.startedAt),entries:gm(t.counters)}},wJ=()=>{if(typeof window>"u")return{enabled:!1,startedAt:null,lastUpdatedAt:null,durationMs:0,entries:[]};const t=window.__openchamberVsCodeStreamPerfState;if(!_1()||!t)return{enabled:!1,startedAt:null,lastUpdatedAt:null,durationMs:0,entries:[]};const e=typeof t.startedAt=="number"?t.startedAt:null,n=typeof t.lastUpdatedAt=="number"?t.lastUpdatedAt:null;return{enabled:!0,startedAt:e,lastUpdatedAt:n,durationMs:e?Math.max(0,Date.now()-e):0,entries:gm(t.counters)}},Xi=(t,e=1)=>{j4(t,e)},kx=(t,e)=>{j4(t,e)},Y2=(t,e)=>{if(!_1())return e();const n=z5();try{return e()}finally{j4(t,z5()-n)}};var Mx={};let hs=null;const Jo=Pn(),O5=Jo.getItem("lastDirectory"),Ax=typeof O5=="string"&&O5.length>0,s2=t=>{try{pm.getState().invalidateDirectory(t)}catch(e){console.warn("Failed to invalidate file search cache:",e)}},ea=t=>{const e=t.trim();if(!e)return e;const n=e.replace(/\\/g,"/").replace(/^([a-z]):/,(o,s)=>s.toUpperCase()+":");return n.length>1?n.replace(/\/+$/,""):n},Fx=(t,e)=>{const n=t.trim();return n.startsWith("~")?n==="~"?e||n:(n.startsWith("~/")||n.startsWith("~\\"))&&e?`${e}${n.slice(1)}`:n:n},J2=(t,e)=>{const n=Fx(t,e);return ea(n)},_x=()=>{const t=Jo.getItem("homeDirectory");if(typeof t!="string"||t.trim().length===0)return null;const e=ea(t);return e.length>0?e:null},Bx=()=>{const t=Jo.getItem("lastDirectory");if(typeof t!="string"||t.trim().length===0)return null;const e=ea(t);return e.length>0?e:null},Dx=()=>{if(typeof process>"u")return null;const t=Mx,e=t?.HOME||t?.USERPROFILE||(t?.HOMEDRIVE&&t?.HOMEPATH?`${t.HOMEDRIVE}${t.HOMEPATH}`:void 0);if(typeof e=="string"&&e.trim().length>0){const o=ea(e);return o.length>0?o:null}const n=process?.cwd?.();if(typeof n=="string"&&n.trim().length>0){const o=ea(n);return o.length>0?o:null}return null},b0=()=>{if(typeof window<"u"){if(hs)return hs;const e=typeof window.__OPENCHAMBER_HOME__=="string"&&window.__OPENCHAMBER_HOME__.length>0?window.__OPENCHAMBER_HOME__:null;if(e&&e.length>0)return hs=e,Jo.setItem("homeDirectory",e),e;const n=_x();if(n&&!Ht())return hs=n,n}const t=Dx();return t||"/"},Tx=t=>{if(typeof t!="string")return null;const e=t.trim();if(!e)return null;const n=e.replace(/\\/g,"/");if(n.length>1){const o=n.replace(/\/+$/,"");if(o&&o.length>0)return o==="/"?null:o}return n==="/"||n.length===0?null:n},Px=t=>(hs=t,typeof window<"u"&&Jo.setItem("homeDirectory",t),un({homeDirectory:t}),t),bm=async()=>{const t=o=>{const s=Tx(o);return s?Px(s):null};try{const o=await Je.getFilesystemHome(),s=t(o);if(s)return s}catch(o){console.warn("Failed to obtain filesystem home directory:",o)}try{const o=await Je.getSystemInfo(),s=t(o?.homeDirectory);if(s)return s}catch(o){console.warn("Failed to get home directory from system info:",o)}try{const o=await T4(),s=t(o);if(s)return s}catch(o){console.warn("Failed to obtain desktop-integrated home directory:",o)}const e=b0(),n=t(e);return n||e},Ex=()=>{if(!Ht())return null;const t=window.__VSCODE_CONFIG__?.workspaceFolder;if(typeof t!="string"||t.trim().length===0)return null;const e=ea(t);return e.length>0?e:null},l1=Ex()||b0(),y0=(()=>{const t=Bx();return t&&!Ht()?J2(t,l1):l1})();y0&&Je.setDirectory(y0);const Hx=!!(l1&&l1!=="/"),en=Jt()(Un((t,e)=>({currentDirectory:y0,directoryHistory:[y0],historyIndex:0,homeDirectory:l1,hasPersistedDirectory:Ax,isHomeReady:Hx,isSwitchingDirectory:!1,setDirectory:(n,o)=>{const s=hs||e().homeDirectory||Jo.getItem("homeDirectory"),r=J2(n,s);F1()&&console.log("[DirectoryStore] setDirectory called with path:",r),Je.setDirectory(r),s2(),t(i=>{const l=[...i.directoryHistory.slice(0,i.historyIndex+1),r];return Jo.setItem("lastDirectory",r),un({lastDirectory:r}),{currentDirectory:r,directoryHistory:l,historyIndex:l.length-1,hasPersistedDirectory:!0,isHomeReady:!0,isSwitchingDirectory:!1}})},goBack:()=>{const n=e();if(n.historyIndex>0){const o=n.historyIndex-1,s=n.directoryHistory[o];Je.setDirectory(s),s2(),Jo.setItem("lastDirectory",s),un({lastDirectory:s}),t({currentDirectory:s,historyIndex:o,hasPersistedDirectory:!0,isHomeReady:!0,isSwitchingDirectory:!1})}},goForward:()=>{const n=e();if(n.historyIndex<n.directoryHistory.length-1){const o=n.historyIndex+1,s=n.directoryHistory[o];Je.setDirectory(s),s2(),Jo.setItem("lastDirectory",s),un({lastDirectory:s}),t({currentDirectory:s,historyIndex:o,hasPersistedDirectory:!0,isHomeReady:!0,isSwitchingDirectory:!1})}},goToParent:()=>{const{currentDirectory:n,setDirectory:o}=e(),s=hs||e().homeDirectory||b0();if(n===s||n==="/")return;const r=n.endsWith("/")?n.slice(0,-1):n,i=r.lastIndexOf("/");if(i===-1){const l=hs||b0();o(l)}else o(i===0?"/":r.substring(0,i))},goHome:async()=>{const n=hs||e().homeDirectory||await bm();e().setDirectory(n)},synchronizeHomeDirectory:n=>{const o=e(),s=n;hs=s;const r=o.homeDirectory!==s,i=Jo.getItem("lastDirectory"),l=typeof i=="string"&&i.length>0,c=!l&&(o.currentDirectory==="/"||o.currentDirectory===o.homeDirectory||!o.currentDirectory);if(!r&&!c){o.isHomeReady||t({isHomeReady:!0});return}const d=typeof s=="string"&&s!==""&&s!=="/",u=o.currentDirectory?J2(o.currentDirectory,s):o.currentDirectory,f=o.directoryHistory.map(b=>J2(b,s)),m=f.some((b,y)=>b!==o.directoryHistory[y]),h=!!(u&&u!==o.currentDirectory),p={homeDirectory:s,hasPersistedDirectory:l,isHomeReady:d};if(c?(p.currentDirectory=s,p.directoryHistory=[s],p.historyIndex=0,p.isSwitchingDirectory=!1):(h||m)&&(p.currentDirectory=u,p.directoryHistory=f,p.historyIndex=Math.min(o.historyIndex,f.length-1),p.isSwitchingDirectory=!1),t(()=>p),(c||h)&&d){const b=c?s:u;Je.setDirectory(b),s2(),Jo.setItem("lastDirectory",b),un({lastDirectory:b})}un({homeDirectory:s})}}),{name:"directory-store"}));typeof window<"u"&&bm().then(t=>{en.getState().synchronizeHomeDirectory(t)});const Ix=200,Xo=new Map,jx=[{key:"code",Icon:"code-box",label:"Code"},{key:"terminal",Icon:"terminal-box",label:"Terminal"},{key:"rocket",Icon:"rocket",label:"Rocket"},{key:"flask",Icon:"flask",label:"Lab"},{key:"gamepad",Icon:"gamepad",label:"Game"},{key:"briefcase",Icon:"briefcase",label:"Work"},{key:"home",Icon:"home",label:"Home"},{key:"globe",Icon:"global",label:"Web"},{key:"leaf",Icon:"leaf",label:"Nature"},{key:"shield",Icon:"shield",label:"Security"},{key:"palette",Icon:"palette",label:"Design"},{key:"server",Icon:"server",label:"Server"},{key:"phone",Icon:"smartphone",label:"Mobile"},{key:"database",Icon:"database-2",label:"Data"},{key:"lightbulb",Icon:"lightbulb",label:"Idea"},{key:"music",Icon:"music",label:"Music"},{key:"camera",Icon:"camera",label:"Media"},{key:"book",Icon:"book-open",label:"Docs"},{key:"heart",Icon:"heart",label:"Favorite"}],ym=Object.fromEntries(jx.map(t=>[t.key,t.Icon])),vm=[{key:"keyword",label:"Purple",cssVar:"var(--syntax-keyword)"},{key:"string",label:"Green",cssVar:"var(--syntax-string)"},{key:"number",label:"Pink",cssVar:"var(--syntax-number)"},{key:"type",label:"Gold",cssVar:"var(--syntax-type)"},{key:"constant",label:"Cyan",cssVar:"var(--syntax-constant)"},{key:"comment",label:"Muted",cssVar:"var(--syntax-comment)"},{key:"error",label:"Red",cssVar:"var(--status-error)"},{key:"primary",label:"Blue",cssVar:"var(--primary)"},{key:"success",label:"Green",cssVar:"var(--status-success)"}],wm=Object.fromEntries(vm.map(t=>[t.key,t.cssVar])),Lx=(t,e)=>{if(typeof t!="number"||t<=0)return null;const n=new URLSearchParams({v:String(t)});return typeof e?.iconColor=="string"&&e.iconColor.trim()&&n.set("iconColor",e.iconColor.trim()),(e?.themeVariant==="light"||e?.themeVariant==="dark")&&n.set("theme",e.themeVariant),n},Nx=(t,e)=>t?[wr()||"same-origin",t,e.toString()].join("|"):null,Rx=(t,e,n)=>{const o=Lx(e,n);if(!o)return null;const s=Nx(t,o);return s?{cacheKey:s,projectId:t,query:o}:null},Vx=()=>{for(;Xo.size>Ix;){const t=Xo.keys().next().value;if(typeof t!="string")return;const e=Xo.get(t);e?.url&&typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&URL.revokeObjectURL(e.url),Xo.delete(t)}},zx=t=>{const e=Xo.get(t.cacheKey);if(e?.url)return Promise.resolve(e.url);if(e?.promise)return e.promise;const n=We(`/api/projects/${encodeURIComponent(t.projectId)}/icon`,{method:"GET",headers:{Accept:"image/*"},query:t.query}).then(async o=>{if(!o.ok||typeof URL>"u"||typeof URL.createObjectURL!="function")return null;const s=await o.blob(),r=URL.createObjectURL(s);return Xo.set(t.cacheKey,{url:r}),Vx(),r}).catch(()=>null).finally(()=>{const o=Xo.get(t.cacheKey);o?.promise===n&&!o.url&&Xo.delete(t.cacheKey)});return Xo.set(t.cacheKey,{promise:n}),n},Ox=(t,e)=>{const n=le.c(10),o=t.id,s=t.iconImage?.updatedAt,r=e?.themeVariant,i=e?.iconColor;let l;n[0]!==i||n[1]!==o||n[2]!==r||n[3]!==s?(l=Rx(o,s,{themeVariant:r,iconColor:i}),n[0]=i,n[1]=o,n[2]=r,n[3]=s,n[4]=l):l=n[4];const c=l;let d;n[5]!==c?(d=()=>c?Xo.get(c.cacheKey)?.url??null:null,n[5]=c,n[6]=d):d=n[6];const[u,f]=g.useState(d);let m,h;return n[7]!==c?(m=()=>{if(!c){f(null);return}const p=Xo.get(c.cacheKey)?.url;if(p){f(p);return}let b=!1;return f(null),zx(c).then(y=>{b||f(y)}),()=>{b=!0}},h=[c],n[7]=c,n[8]=m,n[9]=h):(m=n[8],h=n[9]),g.useEffect(m,h),u},xm=t=>{const e=le.c(21),{project:n,options:o,className:s,alt:r,draggable:i,fallback:l,onError:c}=t,d=r===void 0?"":r,u=i===void 0?!1:i,f=l===void 0?null:l,m=Ox(n,o),[h,p]=g.useState(!1);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{p(!1)},e[0]=b):b=e[0];const y=n.iconImage?.updatedAt;let v;if(e[1]!==n.id||e[2]!==m||e[3]!==y?(v=[m,n.id,y],e[1]=n.id,e[2]=m,e[3]=y,e[4]=v):v=e[4],g.useEffect(b,v),!m||h){let w;return e[5]!==f?(w=g.createElement(g.Fragment,null,f),e[5]=f,e[6]=w):w=e[6],w}let x;if(e[7]!==d||e[8]!==s||e[9]!==u||e[10]!==c||e[11]!==m){let w;e[13]!==c?(w=C=>{p(!0),c?.(C)},e[13]=c,e[14]=w):w=e[14];let S;e[15]!==d||e[16]!==s||e[17]!==u||e[18]!==m||e[19]!==w?(S={src:m,alt:d,className:s,draggable:u,onError:w},e[15]=d,e[16]=s,e[17]=u,e[18]=m,e[19]=w,e[20]=S):S=e[20],x=g.createElement("img",S),e[7]=d,e[8]=s,e[9]=u,e[10]=c,e[11]=m,e[12]=x}else x=e[12];return x},$x=t=>{const e=vm.map(r=>r.key),n=new Map;for(const r of e)n.set(r,0);for(const r of t)r.color&&n.has(r.color)&&n.set(r.color,(n.get(r.color)??0)+1);const o=Math.min(...n.values()),s=e.filter(r=>n.get(r)===o);return s[Math.floor(Math.random()*s.length)]},cr=Pn(),xd="projects",Cd="activeProjectId",Zx=()=>{if(typeof window>"u")return"";const t=window.__OPENCHAMBER_LOCAL_ORIGIN__;return typeof t=="string"?t.trim().replace(/\/+$/,""):""},L4=()=>{const t=wr().trim().replace(/\/+$/,"");return t||""},Cm=()=>{const t=L4();return t?`${xd}:${encodeURIComponent(t)}`:xd},Sm=()=>{const t=L4();return t?`${Cd}:${encodeURIComponent(t)}`:Cd},km=()=>{const t=L4();if(!t)return!0;const e=Zx();return!!(e&&t===e)},Ux=(t,e)=>{const n=t.trim();return!n.startsWith("~")||!e?n:n==="~"?e:n.startsWith("~/")||n.startsWith("~\\")?`${e}${n.slice(1)}`:n},qx=/^#(?:[\da-fA-F]{3}|[\da-fA-F]{6})$/,Mm=t=>{if(typeof t!="string")return null;const e=t.trim();return e&&qx.test(e)?e.toLowerCase():null},sl=t=>{const e=t.trim();if(!e)return"";const n=cr.getItem("homeDirectory")||en.getState().homeDirectory||"",s=Ux(e,n).replace(/\\/g,"/");return s==="/"?"/":s.length>1?s.replace(/\/+$/,""):s},Am=t=>{const e=sl(t);if(!e||e==="/")return"Root";const n=e.split("/").filter(Boolean);return(n[n.length-1]||e).replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())},Wx=t=>{if(!t||typeof t!="object")return;const e=t,n=typeof e.mime=="string"?e.mime.trim():"",o=typeof e.updatedAt=="number"&&Number.isFinite(e.updatedAt)?Math.max(0,Math.round(e.updatedAt)):0,s=e.source==="custom"||e.source==="auto"?e.source:null;if(!(!n||!o||!s))return{mime:n,updatedAt:o,source:s}},Gx=t=>{const e=typeof t.type=="string"?t.type.trim().toLowerCase():"";if(e==="image/png"||e==="image/jpeg"||e==="image/svg+xml")return e;const n=t.name.toLowerCase();return n.endsWith(".png")?"image/png":n.endsWith(".jpg")||n.endsWith(".jpeg")?"image/jpeg":n.endsWith(".svg")?"image/svg+xml":null},Kx=async t=>await new Promise((e,n)=>{const o=new FileReader;o.onerror=()=>{n(new Error("Failed to read icon file"))},o.onload=()=>{const s=typeof o.result=="string"?o.result:"";if(!s){n(new Error("Failed to read icon file"));return}e(s)},o.readAsDataURL(t)}),Fm=t=>{if(!Array.isArray(t))return[];const e=[],n=new Set,o=new Set;for(const s of t){if(!s||typeof s!="object")continue;const r=s,i=typeof r.path=="string"?r.path.trim():"";if(!i)continue;const l=sl(i);if(!l)continue;const c=A1(l);if(!c||n.has(c)||o.has(l))continue;n.add(c),o.add(l);const d={id:c,path:l};if(typeof r.label=="string"&&r.label.trim().length>0&&(d.label=r.label.trim()),typeof r.icon=="string"&&r.icon.trim().length>0&&(d.icon=r.icon.trim()),r.iconImage===null)d.iconImage=null;else{const u=Wx(r.iconImage);u&&(d.iconImage=u)}if(typeof r.color=="string"&&r.color.trim().length>0&&(d.color=r.color.trim()),r.iconBackground===null)d.iconBackground=null;else{const u=Mm(r.iconBackground);u&&(d.iconBackground=u)}typeof r.addedAt=="number"&&Number.isFinite(r.addedAt)&&r.addedAt>=0&&(d.addedAt=r.addedAt),typeof r.lastOpenedAt=="number"&&Number.isFinite(r.lastOpenedAt)&&r.lastOpenedAt>=0&&(d.lastOpenedAt=r.lastOpenedAt),typeof r.sidebarCollapsed=="boolean"&&(d.sidebarCollapsed=r.sidebarCollapsed),e.push(d)}return e},_m=()=>{try{const t=cr.getItem(Cm())||(km()?cr.getItem(xd):null);return t?Fm(JSON.parse(t)):[]}catch{return[]}},Bm=()=>{try{const t=cr.getItem(Sm())||(km()?cr.getItem(Cd):null);if(typeof t=="string"&&t.trim().length>0)return t.trim()}catch{return null}return null},v0=(t,e)=>{try{cr.setItem(Cm(),JSON.stringify(t))}catch{}try{const n=Sm();e?cr.setItem(n,e):cr.removeItem(n)}catch{}},bi=(t,e)=>{v0(t,e),un({projects:t,activeProjectId:e??void 0})},Yx=_m(),Jx=()=>{if(typeof window>"u"||!yo()?.runtime?.isVSCode)return null;const e=window.__VSCODE_CONFIG__?.workspaceFolder;if(typeof e!="string"||e.trim().length===0)return null;const n=sl(e);if(!n)return null;const o=A1(n),s={id:o,path:n,label:Am(n),addedAt:Date.now(),lastOpenedAt:Date.now()};return F1()&&console.log("[OpenChamber][VSCode][projects] Using workspace fallback project",s),{projects:[s],activeProjectId:o}},fo=Jx(),w0=fo?.projects??Yx,$5=fo?.activeProjectId??Bm(),Dm=w0.some(t=>t.id===$5)?$5:w0[0]?.id??null;fo&&v0(w0,Dm);const tn=Jt()(Un((t,e)=>({projects:w0,activeProjectId:Dm,validateProjectPath:n=>{if(typeof n!="string"||n.trim().length===0)return{ok:!1,reason:"Provide a directory path."};const o=sl(n);return o?{ok:!0,normalizedPath:o}:{ok:!1,reason:"Directory path cannot be empty."}},addProject:(n,o)=>{if(fo)return null;const{validateProjectPath:s}=e(),r=s(n);if(!r.ok||!r.normalizedPath)return null;const i=r.normalizedPath,l=e().projects.find(h=>h.path===i);if(l)return e().setActiveProject(l.id),l;const c=Date.now(),d=o?.label?.trim()||Am(i),f={id:A1(i),path:i,label:d,color:$x(e().projects),addedAt:c,lastOpenedAt:c},m=[...e().projects,f];return t({projects:m}),F1()&&console.info("[ProjectsStore] Added project",f),e().setActiveProject(f.id),e().discoverProjectIcon(f.id),f},removeProject:n=>{if(fo)return;const o=e(),s=o.projects.find(l=>l.id===n),r=o.projects.filter(l=>l.id!==n);let i=o.activeProjectId;if(o.activeProjectId===n&&(i=r[0]?.id??null),t({projects:r,activeProjectId:i}),bi(r,i),s){const l=s.path.replace(/\\/g,"/").replace(/\/+$/,"")||"/";He.setState(c=>{const d=new Map(c.availableWorktreesByProject);return d.delete(l),{availableWorktreesByProject:d}})}if(i){const l=r.find(c=>c.id===i);l&&(Je.setDirectory(l.path),en.getState().setDirectory(l.path,{showOverlay:!1}))}else en.getState().goHome()},setActiveProject:n=>{if(fo)return;const{projects:o,activeProjectId:s}=e();if(s===n)return;const r=o.find(c=>c.id===n);if(!r)return;const i=Date.now(),l=o.map(c=>c.id===n?{...c,lastOpenedAt:i}:c);t({projects:l,activeProjectId:n}),bi(l,n),Je.setDirectory(r.path),en.getState().setDirectory(r.path,{showOverlay:!1})},setActiveProjectIdOnly:n=>{if(fo)return;const{projects:o,activeProjectId:s}=e();if(s===n||!o.find(c=>c.id===n))return;const i=Date.now(),l=o.map(c=>c.id===n?{...c,lastOpenedAt:i}:c);t({projects:l,activeProjectId:n}),bi(l,n)},renameProject:(n,o)=>{if(fo)return;const s=o.trim();if(!s)return;const{projects:r,activeProjectId:i}=e(),l=r.map(c=>c.id===n?{...c,label:s}:c);t({projects:l}),bi(l,i)},updateProjectMeta:(n,o)=>{if(fo)return;const{projects:s,activeProjectId:r}=e(),i=s.map(l=>{if(l.id!==n)return l;const c={...l};if(o.label!==void 0){const d=o.label.trim();d&&(c.label=d)}return o.icon!==void 0&&(c.icon=o.icon),o.color!==void 0&&(c.color=o.color),o.iconBackground!==void 0&&(c.iconBackground=Mm(o.iconBackground)),c});t({projects:i}),bi(i,r)},uploadProjectIcon:async(n,o)=>{if(fo)return{ok:!1,error:"Custom icons are not supported in this runtime"};const s=Gx(o);if(!s)return{ok:!1,error:"Only PNG, JPEG, and SVG are supported"};if(!Number.isFinite(o.size)||o.size<=0)return{ok:!1,error:"Icon file is empty"};if(o.size>5*1024*1024)return{ok:!1,error:"Icon exceeds size limit (5 MB)"};try{const i=(await Kx(o)).replace(/^data:[^;]+;/i,`data:${s};`),l=await We(`/api/projects/${encodeURIComponent(n)}/icon`,{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({dataUrl:i})});if(!l.ok)return{ok:!1,error:(await l.json().catch(()=>null))?.error||"Failed to upload project icon"};const c=await l.json().catch(()=>null);return c?.settings&&e().synchronizeFromSettings(c.settings),{ok:!0}}catch(r){return{ok:!1,error:(r instanceof Error?r.message:String(r))||"Failed to upload project icon"}}},removeProjectIcon:async n=>{if(fo)return{ok:!1,error:"Custom icons are not supported in this runtime"};try{const o=await We(`/api/projects/${encodeURIComponent(n)}/icon`,{method:"DELETE",headers:{Accept:"application/json"}});if(!o.ok)return{ok:!1,error:(await o.json().catch(()=>null))?.error||"Failed to remove project icon"};const s=await o.json().catch(()=>null);return s?.settings&&e().synchronizeFromSettings(s.settings),{ok:!0}}catch(o){return{ok:!1,error:(o instanceof Error?o.message:String(o))||"Failed to remove project icon"}}},discoverProjectIcon:async(n,o)=>{if(fo)return{ok:!1,error:"Custom icons are not supported in this runtime"};try{const s=await We(`/api/projects/${encodeURIComponent(n)}/icon/discover`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({force:o?.force===!0})}),r=await s.json().catch(()=>null);return s.ok?(r?.settings&&e().synchronizeFromSettings(r.settings),{ok:!0,skipped:r?.skipped===!0,reason:typeof r?.reason=="string"?r.reason:void 0}):{ok:!1,error:r?.error||"Failed to discover project icon"}}catch(s){return{ok:!1,error:(s instanceof Error?s.message:String(s))||"Failed to discover project icon"}}},reorderProjects:(n,o)=>{if(fo)return;const{projects:s,activeProjectId:r}=e();if(n<0||n>=s.length||o<0||o>=s.length||n===o)return;const i=[...s],[l]=i.splice(n,1);i.splice(o,0,l),t({projects:i}),bi(i,r)},resetForRuntimeSwitch:()=>{if(fo)return;const n=_m(),o=Bm(),s=n.some(r=>r.id===o)?o:n[0]?.id??null;t({projects:n,activeProjectId:s})},synchronizeFromSettings:n=>{if(fo)return;const o=Fm(n.projects??[]),s=typeof n.activeProjectId=="string"&&n.activeProjectId.trim()?n.activeProjectId.trim():null,r=e();if(o.length===0&&r.projects.length>0){s!==r.activeProjectId&&(!s||r.projects.some(d=>d.id===s))&&(t({activeProjectId:s}),v0(r.projects,s));return}const i=JSON.stringify(r.projects)!==JSON.stringify(o),l=r.activeProjectId!==s;if(!(!i&&!l)&&(t({projects:o,activeProjectId:s}),v0(o,s),s)){const c=o.find(d=>d.id===s);c&&(Je.setDirectory(c.path),en.getState().setDirectory(c.path,{showOverlay:!1}))}},getActiveProject:()=>{const{projects:n,activeProjectId:o}=e();return o?n.find(s=>s.id===o)??null:null}}),{name:"projects-store"}));typeof window<"u"&&window.addEventListener("openchamber:settings-synced",t=>{const e=t.detail;e&&typeof e=="object"&&tn.getState().synchronizeFromSettings(e)});const Qx=new Set(["init","review"]),xJ=t=>Qx.has(t.name),Wa="useCommandsStore",Sd=t=>new Promise(e=>setTimeout(e,t)),Xx=5e3,eC="__default__",Z5=new Map,Gl=new Map,tC=t=>t?.trim()||eC,U5=t=>t.map(e=>[e.name,e.scope??"",e.description??"",e.agent??"",e.model??"",String(e.isBuiltIn===!0)].join("|")).join("||"),r2=()=>{try{const e=tn.getState().getActiveProject?.();if(e?.path?.trim())return e.path.trim();const n=Je.getDirectory();if(n?.trim())return n.trim()}catch(t){console.warn("[CommandsStore] Error resolving config directory:",t)}return null},nC=2e4,q5=300,W5=4,oC=800,sC=200,rC=2e3,ys=Jt()(Un(qo((t,e)=>({selectedCommandName:null,commands:[],isLoading:!1,commandDraft:null,setSelectedCommand:n=>{t({selectedCommandName:n})},setCommandDraft:n=>{t({commandDraft:n})},loadCommands:async()=>{const n=r2(),o=tC(n),s=Date.now(),r=Z5.get(o)??0;if(e().commands.length>0&&s-r<Xx)return!0;const l=Gl.get(o);if(l)return l;const c=(async()=>{t({isLoading:!0});const d=e().commands,u=U5(d);let f=null;for(let m=0;m<3;m++)try{const h=n?`?directory=${encodeURIComponent(n)}`:"",b=(await Je.withDirectory(n,()=>Je.listCommandsWithDetails())).filter(x=>x.source!=="skill"),y=await Promise.all(b.map(async x=>{try{const w=await We(`/api/config/commands/${encodeURIComponent(x.name)}${h}`,{headers:{"Cache-Control":"no-cache",...n?{"x-opencode-directory":n}:{}}});if(w.ok){const S=await w.json();let C=S.scope;if(!C&&S.sources){const M=S.sources;C=(M.md?.exists?M.md.scope:void 0)??(M.json?.exists?M.json.scope:void 0)??M.md?.scope??M.json?.scope}return C==="project"||C==="user"?{...x,scope:C}:{...x,scope:void 0}}}catch(w){console.warn(`[CommandsStore] Failed to fetch config for command ${x.name}:`,w)}return x})),v=U5(y);return t(u!==v?{commands:y,isLoading:!1}:{isLoading:!1}),Z5.set(o,Date.now()),!0}catch(h){f=h;const p=200*(m+1);await new Promise(b=>setTimeout(b,p))}return console.error("Failed to load commands:",f),t({commands:d,isLoading:!1}),!1})();Gl.set(o,c);try{return await c}finally{Gl.delete(o)}},createCommand:async n=>{ss("Creating command configuration…");let o=!1;try{console.log("[CommandsStore] Creating command:",n.name);const s={template:n.template||""};n.description&&(s.description=n.description),n.agent&&(s.agent=n.agent),n.model&&(s.model=n.model),n.scope&&(s.scope=n.scope),console.log("[CommandsStore] Command config to save:",s);const r=r2(),i=r?`?directory=${encodeURIComponent(r)}`:"",l=await We(`/api/config/commands/${encodeURIComponent(n.name)}${i}`,{method:"POST",headers:{"Content-Type":"application/json",...r?{"x-opencode-directory":r}:{}},body:JSON.stringify(s)}),c=await l.json().catch(()=>null);if(!l.ok){const f=c?.error||"Failed to create command";throw new Error(f)}if(console.log("[CommandsStore] Command created successfully"),c?.requiresReload??!0)return o=!0,await Kl({message:c?.message,delayMs:c?.reloadDelayMs}),!0;const u=await e().loadCommands();return u&&os("commands",{source:Wa}),u}catch(s){return console.error("[CommandsStore] Failed to create command:",s),!1}finally{o||bo()}},updateCommand:async(n,o)=>{ss("Updating command configuration…");let s=!1;try{console.log("[CommandsStore] Updating command:",n),console.log("[CommandsStore] Config received:",o);const r={};o.description!==void 0&&(r.description=o.description),o.agent!==void 0&&(r.agent=o.agent),o.model!==void 0&&(r.model=o.model),o.template!==void 0&&(r.template=o.template),console.log("[CommandsStore] Command config to update:",r);const i=r2(),l=i?`?directory=${encodeURIComponent(i)}`:"",c=await We(`/api/config/commands/${encodeURIComponent(n)}${l}`,{method:"PATCH",headers:{"Content-Type":"application/json",...i?{"x-opencode-directory":i}:{}},body:JSON.stringify(r)}),d=await c.json().catch(()=>null);if(!c.ok){const m=d?.error||"Failed to update command";throw new Error(m)}if(console.log("[CommandsStore] Command updated successfully"),d?.requiresReload??!0)return s=!0,await Kl({message:d?.message,delayMs:d?.reloadDelayMs}),!0;const f=await e().loadCommands();return f&&os("commands",{source:Wa}),f}catch(r){return console.error("[CommandsStore] Failed to update command:",r),!1}finally{s||bo()}},deleteCommand:async n=>{ss("Deleting command configuration…");let o=!1;try{const s=r2(),r=s?`?directory=${encodeURIComponent(s)}`:"",i=await We(`/api/config/commands/${encodeURIComponent(n)}${r}`,{method:"DELETE",headers:s?{"x-opencode-directory":s}:void 0}),l=await i.json().catch(()=>null);if(!i.ok){const u=l?.error||"Failed to delete command";throw new Error(u)}if(console.log("[CommandsStore] Command deleted successfully"),l?.requiresReload??!0)return o=!0,await Kl({message:l?.message,delayMs:l?.reloadDelayMs}),!0;const d=await e().loadCommands();return d&&os("commands",{source:Wa}),e().selectedCommandName===n&&t({selectedCommandName:null}),d}catch(s){return console.error("Failed to delete command:",s),!1}finally{o||bo()}},getCommandByName:n=>{const{commands:o}=e();return o.find(s=>s.name===n)}}),{name:"commands-store",storage:Wo(()=>Pn()),partialize:t=>({selectedCommandName:t.selectedCommandName})}),{name:"commands-store"}));typeof window<"u"&&(window.__zustand_commands_store__=ys);async function iC(t){const e=typeof t=="number"&&t>0?Math.min(t,q5):0;e>0&&await Sd(e);const n=Date.now();let o=0,s=null;for(;Date.now()-n<nC;){o+=1,Yn(`Waiting for OpenCode… (attempt ${o})`);try{if(await Je.checkHealth())return;s=new Error("OpenCode health check reported not ready")}catch(l){s=l}const r=Date.now()-n,i=o<=W5&&r<1200?q5:Math.min(oC+Math.max(0,o-W5)*sC,rC);await Sd(i)}throw s||new Error("OpenCode did not become ready in time")}async function Kl(t={}){const{message:e,delayMs:n}=t;try{Yn(e||"Refreshing commands…")}catch{}try{await iC(n),Yn("Refreshing commands…"),await ys.getState().loadCommands(),os("commands",{source:Wa})}catch(o){console.error("[CommandsStore] Failed to refresh configuration after OpenCode restart:",o),Yn("OpenCode refresh failed. Please retry refreshing configuration manually."),await Sd(1500)}finally{bo()}}let G5=null;G5||(G5=tl(t=>{if(t.source!==Wa&&i1(t,"commands")){const{loadCommands:e}=ys.getState();e()}}));const er=()=>{const t=Je.getDirectory();if(typeof t=="string"&&t.trim().length>0)return t;try{const e=window.__zustand_directory_store__;if(e)return e.getState().currentDirectory}catch{}return null};function aC(t){const e=t.replace(/\\/g,"/"),n=e.lastIndexOf("/skills/");if(n===-1)return;const s=e.substring(n+8).split("/");return s.length>=3?s[0]:void 0}const Ga="useSkillsStore",kd=t=>new Promise(e=>setTimeout(e,t)),lC=5e3,cC="__default__",K5=new Map,Yl=new Map,dC=t=>t?.trim()||cC,uC=2e4,Y5=300,J5=4,fC=800,mC=200,hC=2e3,mo=Jt()(Un(qo((t,e)=>({selectedSkillName:null,skills:[],isLoading:!1,skillDraft:null,setSelectedSkill:n=>{t({selectedSkillName:n})},setSkillDraft:n=>{t({skillDraft:n})},loadSkills:async()=>{const n=er(),o=dC(n),s=Date.now(),r=K5.get(o)??0;if(e().skills.length>0&&s-r<lC)return!0;const l=Yl.get(o);if(l)return l;const c=(async()=>{t({isLoading:!0});const d=e().skills;let u=null;for(let f=0;f<3;f++)try{const m=n?`?directory=${encodeURIComponent(n)}`:"",h=await We(`/api/config/skills${m}`);if(!h.ok)throw new Error(`Failed to list skills: ${h.status}`);const y=((await h.json()).skills||[]).map(v=>({name:v.name,path:v.path,scope:v.scope??"user",source:v.source??"opencode",description:v.sources?.md?.description||"",group:aC(v.path)}));return t({skills:y,isLoading:!1}),K5.set(o,Date.now()),!0}catch(m){u=m;const h=200*(f+1);await new Promise(p=>setTimeout(p,h))}return console.error("Failed to load skills:",u),t({skills:d,isLoading:!1}),!1})();Yl.set(o,c);try{return await c}finally{Yl.delete(o)}},getSkillDetail:async n=>{try{const o=er(),s=o?`?directory=${encodeURIComponent(o)}`:"",r=await We(`/api/config/skills/${encodeURIComponent(n)}${s}`);return r.ok?await r.json():null}catch{return null}},createSkill:async n=>{ss("Creating skill...");let o=!1;try{const s={name:n.name,description:n.description};n.instructions&&(s.instructions=n.instructions),n.scope&&(s.scope=n.scope),n.source&&(s.source=n.source),n.supportingFiles&&(s.supportingFiles=n.supportingFiles);const r=er(),i=r?`?directory=${encodeURIComponent(r)}`:"",l=await We(`/api/config/skills/${encodeURIComponent(n.name)}${i}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),c=await l.json().catch(()=>null);if(!l.ok){const f=c?.error||"Failed to create skill";throw new Error(f)}if(c?.requiresReload??!1)return o=!0,await Q2({message:c?.message,delayMs:c?.reloadDelayMs}),!0;const u=await e().loadSkills();return u&&os("skills",{source:Ga}),u}catch{return!1}finally{o||bo()}},updateSkill:async(n,o)=>{ss("Updating skill...");let s=!1;try{const r={};o.description!==void 0&&(r.description=o.description),o.instructions!==void 0&&(r.instructions=o.instructions),o.supportingFiles!==void 0&&(r.supportingFiles=o.supportingFiles),o.targetPath!==void 0&&(r.targetPath=o.targetPath);const i=er(),l=i?`?directory=${encodeURIComponent(i)}`:"",c=await We(`/api/config/skills/${encodeURIComponent(n)}${l}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),d=await c.json().catch(()=>null);if(!c.ok){const m=d?.error||"Failed to update skill";throw new Error(m)}if(d?.requiresReload??!1)return s=!0,await Q2({message:d?.message,delayMs:d?.reloadDelayMs}),!0;const f=await e().loadSkills();return f&&os("skills",{source:Ga}),f}catch{return!1}finally{s||bo()}},deleteSkill:async n=>{ss("Deleting skill...");let o=!1;try{const s=er(),r=s?`?directory=${encodeURIComponent(s)}`:"",i=await We(`/api/config/skills/${encodeURIComponent(n)}${r}`,{method:"DELETE"}),l=await i.json().catch(()=>null);if(!i.ok){const u=l?.error||"Failed to delete skill";throw new Error(u)}if(l?.requiresReload??!1)return o=!0,await Q2({message:l?.message,delayMs:l?.reloadDelayMs}),!0;const d=await e().loadSkills();return d&&os("skills",{source:Ga}),e().selectedSkillName===n&&t({selectedSkillName:null}),d}catch{return!1}finally{o||bo()}},getSkillByName:n=>{const{skills:o}=e();return o.find(s=>s.name===n)},readSupportingFile:async(n,o)=>{try{const s=er(),r=s?`&directory=${encodeURIComponent(s)}`:"",i=await We(`/api/config/skills/${encodeURIComponent(n)}/files/${encodeURIComponent(o)}?${r.slice(1)}`);return i.ok?(await i.json()).content??null:null}catch{return null}},writeSupportingFile:async(n,o,s)=>{try{const r=er(),i=r?`?directory=${encodeURIComponent(r)}`:"";return(await We(`/api/config/skills/${encodeURIComponent(n)}/files/${encodeURIComponent(o)}${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})})).ok}catch{return!1}},deleteSupportingFile:async(n,o)=>{try{const s=er(),r=s?`?directory=${encodeURIComponent(s)}`:"";return(await We(`/api/config/skills/${encodeURIComponent(n)}/files/${encodeURIComponent(o)}${r}`,{method:"DELETE"})).ok}catch{return!1}}}),{name:"skills-store",storage:Wo(()=>Pn()),partialize:t=>({selectedSkillName:t.selectedSkillName})}),{name:"skills-store"}));typeof window<"u"&&(window.__zustand_skills_store__=mo);async function pC(t){const e=typeof t=="number"&&t>0?Math.min(t,Y5):0;e>0&&await kd(e);const n=Date.now();let o=0,s=null;for(;Date.now()-n<uC;){o+=1,Yn(`Waiting for OpenCode… (attempt ${o})`);try{if(await Je.checkHealth())return;s=new Error("OpenCode health check reported not ready")}catch(l){s=l}const r=Date.now()-n,i=o<=J5&&r<1200?Y5:Math.min(fC+Math.max(0,o-J5)*mC,hC);await kd(i)}throw s||new Error("OpenCode did not become ready in time")}async function Q2(t){try{Yn(t?.message||"Refreshing skills…")}catch{}try{await pC(t?.delayMs),Yn("Refreshing skills…"),await mo.getState().loadSkills()&&os("skills",{source:Ga})}catch{Yn("OpenCode refresh failed. Please retry."),await kd(1500)}finally{bo()}}let Q5=null;Q5||(Q5=tl(t=>{if(t.source!==Ga&&i1(t,"skills")){const{loadSkills:e}=mo.getState();e()}}));const X5=[{id:"anthropic",label:"Anthropic",description:"Anthropic's public skills repository",source:"anthropics/skills",defaultSubpath:"skills",sourceType:"github"},{id:"clawdhub",label:"ClawdHub",description:"Community skill registry with vector search",source:"clawdhub:registry",sourceType:"clawdhub"}],gC=5e3,bC="__default__",e6=new Map,Jl=new Map,yC=t=>t?.trim()||bC,xa=()=>{const t=Je.getDirectory();if(typeof t=="string"&&t.trim().length>0)return t;try{const e=window.__zustand_directory_store__;if(e)return e.getState().currentDirectory}catch{}return null},vC=Jt()(Un((t,e)=>({sources:X5,itemsBySource:{},selectedSourceId:X5[0]?.id??null,pageInfoBySource:{},loadedSourceIds:{},clawdhubHasMoreBySource:{},isLoadingCatalog:!1,isLoadingSource:!1,isLoadingMore:!1,isScanning:!1,isInstalling:!1,lastCatalogError:null,lastScanError:null,lastInstallError:null,scanResults:null,setSelectedSource:n=>t({selectedSourceId:n}),loadCatalog:async n=>{const o=xa(),s=yC(o),r=Date.now(),i=e6.get(s)??0,l=e().sources.length>0;if(!n?.refresh&&l&&r-i<gC)return!0;const c=Jl.get(s);if(!n?.refresh&&c)return c;const d=(async()=>{t({isLoadingCatalog:!0,lastCatalogError:null});const u={sources:e().sources,itemsBySource:e().itemsBySource,pageInfoBySource:e().pageInfoBySource,loadedSourceIds:e().loadedSourceIds,clawdhubHasMoreBySource:e().clawdhubHasMoreBySource};let f=null;try{const m=n?.refresh?"?refresh=true":"",h=new AbortController,p=window.setTimeout(()=>h.abort(),3e3);try{const b=await We(`/api/config/skills/catalog${m}`,{method:"GET",headers:{Accept:"application/json"},signal:h.signal}),y=await b.json().catch(()=>null);if(!b.ok||!y?.ok)throw f=y?.error||{kind:"unknown",message:`Failed to load catalog (${b.status})`},new Error(f.message);const v=y.sources&&y.sources.length>0?y.sources:u.sources,x=n?.refresh?{}:e().itemsBySource||{},w=n?.refresh?{}:e().pageInfoBySource||{},S=n?.refresh?{}:e().loadedSourceIds||{},C=n?.refresh?{}:e().clawdhubHasMoreBySource||{},M=e().selectedSourceId,A=M&&v.some(k=>k.id===M)?M:v[0]?.id??null;return t({sources:v,itemsBySource:x,pageInfoBySource:w,loadedSourceIds:S,clawdhubHasMoreBySource:C,selectedSourceId:A}),e6.set(s,Date.now()),!0}finally{window.clearTimeout(p)}}catch(m){return f=f||{kind:"unknown",message:m instanceof Error?m.message:String(m)},t({sources:u.sources,itemsBySource:u.itemsBySource,pageInfoBySource:u.pageInfoBySource,loadedSourceIds:u.loadedSourceIds,clawdhubHasMoreBySource:u.clawdhubHasMoreBySource,lastCatalogError:f||{kind:"unknown",message:"Failed to load catalog"}}),!1}finally{t({isLoadingCatalog:!1})}})();Jl.set(s,d);try{return await d}finally{Jl.delete(s)}},loadSource:async(n,o)=>{if(!n)return!1;t({isLoadingSource:!0,lastCatalogError:null});try{const s=xa(),r=o?.refresh?"&refresh=true":"",i=s?`?directory=${encodeURIComponent(s)}&sourceId=${encodeURIComponent(n)}${r}`:`?sourceId=${encodeURIComponent(n)}${r}`,l=await We(`/api/config/skills/catalog/source${i}`,{method:"GET",headers:{Accept:"application/json"}}),c=await l.json().catch(()=>null),d=Array.isArray(c?.items);if(!l.ok||!c?.ok&&!d){const m=await We(`/api/config/skills/catalog${i}`,{method:"GET",headers:{Accept:"application/json"}}),h=await m.json().catch(()=>null),p=h?.itemsBySource?.[n];return m.ok&&h?.ok&&Array.isArray(p)?(t(b=>({itemsBySource:{...b.itemsBySource,[n]:p},pageInfoBySource:{...b.pageInfoBySource,[n]:{nextCursor:null}},loadedSourceIds:{...b.loadedSourceIds,[n]:!0},clawdhubHasMoreBySource:{...b.clawdhubHasMoreBySource,[n]:!1}})),!0):(t({lastCatalogError:c?.error||{kind:"unknown",message:`Failed to load source (${l.status})`}}),!1)}const u=c?.items||[],f=c?.nextCursor??null;return t(m=>({itemsBySource:{...m.itemsBySource,[n]:u},pageInfoBySource:{...m.pageInfoBySource,[n]:{nextCursor:f}},loadedSourceIds:{...m.loadedSourceIds,[n]:!0},clawdhubHasMoreBySource:{...m.clawdhubHasMoreBySource,[n]:u.length>0}})),!0}catch(s){return t({lastCatalogError:{kind:"unknown",message:s instanceof Error?s.message:String(s)}}),!1}finally{t({isLoadingSource:!1})}},loadMoreClawdHub:async()=>{const n=e().selectedSourceId;if(!n)return!1;const s=e().pageInfoBySource[n]?.nextCursor||null;t({isLoadingMore:!0});try{const r=xa(),i=[`sourceId=${encodeURIComponent(n)}`];r&&i.push(`directory=${encodeURIComponent(r)}`),s&&i.push(`cursor=${encodeURIComponent(s)}`);const l=`?${i.join("&")}`,c=await We(`/api/config/skills/catalog/source${l}`,{method:"GET",headers:{Accept:"application/json"}}),d=await c.json().catch(()=>null);if(!c.ok||!d?.ok)return!1;const u=d.nextCursor??null,f=e().itemsBySource[n]||[],m=d.items||[],h=new Map(f.map(y=>[`${y.sourceId}:${y.skillDir}`,y]));let p=0;for(const y of m){const v=`${y.sourceId}:${y.skillDir}`;h.has(v)||(p+=1),h.set(v,y)}const b=m.length===0||p===0;return t(y=>({itemsBySource:{...y.itemsBySource,[n]:Array.from(h.values())},pageInfoBySource:{...y.pageInfoBySource,[n]:{nextCursor:u}},clawdhubHasMoreBySource:{...y.clawdhubHasMoreBySource,[n]:!b}})),!0}catch{return!1}finally{t({isLoadingMore:!1})}},scanRepo:async n=>{t({isScanning:!0,lastScanError:null,scanResults:null});try{const o=xa(),s=o?`?directory=${encodeURIComponent(o)}`:"",r=await We(`/api/config/skills/scan${s}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)}),i=await r.json().catch(()=>null);if(!r.ok||!i){const l=i?.error||{kind:"unknown",message:"Failed to scan repository"};return t({lastScanError:l}),{ok:!1,error:l}}return i.ok?(t({scanResults:i.items||[]}),i):(t({lastScanError:i.error||{kind:"unknown",message:"Failed to scan repository"}}),i)}finally{t({isScanning:!1})}},installSkills:async(n,o)=>{ss("Installing skills…"),t({isInstalling:!0,lastInstallError:null});let s=!1;try{const i=(typeof o?.directory=="string"&&o.directory.trim().length>0?o.directory.trim():null)??xa(),l=i?`?directory=${encodeURIComponent(i)}`:"",c=await We(`/api/config/skills/install${l}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)}),d=await c.json().catch(()=>null);if(!d){const u={kind:"unknown",message:"Failed to install skills"};return t({lastInstallError:u}),Yn("Failed to install skills. Please retry."),{ok:!1,error:u}}if(!c.ok||!d.ok){const u=d.error||{kind:"unknown",message:"Failed to install skills"};return t({lastInstallError:u}),Yn(u.message||"Failed to install skills. Please retry."),{ok:!1,error:u}}return d.requiresReload?(s=!0,await Q2({message:d.message,delayMs:d.reloadDelayMs})):(Yn(d.message||"Refreshing skills…"),mo.getState().loadSkills()),d}catch(r){const i={kind:"unknown",message:r instanceof Error?r.message:String(r)};return t({lastInstallError:i}),Yn("Failed to install skills. Please retry."),{ok:!1,error:i}}finally{t({isInstalling:!1}),s||bo()}}}),{name:"skills-catalog-store"})),wC=()=>{const t=Je.getDirectory();if(typeof t=="string"&&t.trim().length>0)return t;try{const e=window.__zustand_directory_store__;if(e)return e.getState().currentDirectory}catch{}return null},i2=()=>{try{const e=tn.getState().getActiveProject?.();if(e?.path?.trim())return e.path.trim();const n=Je.getDirectory();if(n?.trim())return n.trim()}catch(t){console.warn("[AgentsStore] Error resolving config directory:",t)}return null},xC=5e3,CC="__default__",t6=new Map,Ql=new Map,SC=t=>t?.trim()||CC,n6=t=>t.map(e=>{const n=e;return[e.name,n.scope??"",n.group??"",n.description??"",String(n.hidden===!0),String(n.native===!0)].join("|")}).join("||");function kC(t){if(!t)return;const e=t.replace(/\\/g,"/"),n=e.lastIndexOf("/agents/");if(n===-1)return;const s=e.substring(n+8).split("/");return s.length>1?s[0]:void 0}const CJ=t=>{const e=t;return e.native===!0||e.builtIn===!0},MC=t=>{const e=t;return e.hidden===!0||e.options?.hidden===!0},N4=t=>t.filter(e=>!MC(e)),X2="useAgentsStore",x0=t=>new Promise(e=>setTimeout(e,t)),AC=2e4,o6=300,s6=4,FC=800,_C=200,BC=2e3,ta=Jt()(Un(qo((t,e)=>({selectedAgentName:null,agents:[],isLoading:!1,agentDraft:null,setSelectedAgent:n=>{t({selectedAgentName:n})},setAgentDraft:n=>{t({agentDraft:n})},loadAgents:async()=>{const n=i2(),o=SC(n),s=Date.now(),r=t6.get(o)??0;if(e().agents.length>0&&s-r<xC)return!0;const l=Ql.get(o);if(l)return l;const c=(async()=>{t({isLoading:!0});const d=e().agents,u=n6(d);for(let f=0;f<3;f++)try{const m=n?`?directory=${encodeURIComponent(n)}`:"",h=await Je.withDirectory(n,()=>Je.listAgents()),p=await Promise.all(h.map(async y=>{try{const v=await We(`/api/config/agents/${encodeURIComponent(y.name)}${m}`,{headers:{"Cache-Control":"no-cache",...n?{"x-opencode-directory":n}:{}}});if(v.ok){const x=await v.json();let w=x.scope;if(!w&&x.sources){const M=x.sources;w=(M.md?.exists?M.md.scope:void 0)??(M.json?.exists?M.json.scope:void 0)??M.md?.scope??M.json?.scope}const S=x.sources?.md?.path,C=kC(S);return w==="project"||w==="user"?{...y,scope:w,group:C}:{...y,scope:void 0,group:C}}}catch(v){console.warn(`[AgentsStore] Failed to fetch config for agent ${y.name}:`,v)}return y})),b=n6(p);return t(u!==b?{agents:p,isLoading:!1}:{isLoading:!1}),t6.set(o,Date.now()),!0}catch{}return t({isLoading:!1}),!1})();Ql.set(o,c);try{return await c}finally{Ql.delete(o)}},createAgent:async n=>{ss("Creating agent configuration…");let o=!1;try{console.log("[AgentsStore] Creating agent:",n.name);const s={mode:n.mode||"subagent"};n.description&&(s.description=n.description),n.model&&(s.model=n.model),n.temperature!==void 0&&(s.temperature=n.temperature),n.top_p!==void 0&&(s.top_p=n.top_p),n.prompt&&(s.prompt=n.prompt),n.permission&&(s.permission=n.permission),n.disable!==void 0&&(s.disable=n.disable),n.scope&&(s.scope=n.scope),console.log("[AgentsStore] Agent config to save:",s);const r=i2(),i=r?`?directory=${encodeURIComponent(r)}`:"",l=await We(`/api/config/agents/${encodeURIComponent(n.name)}${i}`,{method:"POST",headers:{"Content-Type":"application/json",...r?{"x-opencode-directory":r}:{}},body:JSON.stringify(s)}),c=await l.json().catch(()=>null);if(!l.ok){const f=c?.error||"Failed to create agent";throw new Error(f)}if(c?.requiresReload??!0)return o=!0,await Ka({message:c?.message,delayMs:c?.reloadDelayMs,scopes:["agents"],mode:"active"}),!0;const u=await e().loadAgents();return u&&os("agents",{source:X2}),u}catch(s){return console.error("Failed to create agent:",s),!1}finally{o||bo()}},updateAgent:async(n,o)=>{ss("Updating agent configuration…");let s=!1;try{const r={};o.mode!==void 0&&(r.mode=o.mode),o.description!==void 0&&(r.description=o.description),o.model!==void 0&&(r.model=o.model),o.temperature!==void 0&&(r.temperature=o.temperature),o.top_p!==void 0&&(r.top_p=o.top_p),o.prompt!==void 0&&(r.prompt=o.prompt),o.permission!==void 0&&(r.permission=o.permission),o.disable!==void 0&&(r.disable=o.disable);const i=i2(),l=i?`?directory=${encodeURIComponent(i)}`:"",c=await We(`/api/config/agents/${encodeURIComponent(n)}${l}`,{method:"PATCH",headers:{"Content-Type":"application/json",...i?{"x-opencode-directory":i}:{}},body:JSON.stringify(r)}),d=await c.json().catch(()=>null);if(!c.ok){const m=d?.error||"Failed to update agent";throw new Error(m)}if(d?.requiresReload??!0)return s=!0,await Ka({message:d?.message,delayMs:d?.reloadDelayMs,scopes:["agents"],mode:"active"}),!0;const f=await e().loadAgents();return f&&os("agents",{source:X2}),f}catch(r){throw console.error("Failed to update agent:",r),r}finally{s||bo()}},deleteAgent:async n=>{ss("Deleting agent configuration…");let o=!1;try{const s=i2(),r=s?`?directory=${encodeURIComponent(s)}`:"",i=await We(`/api/config/agents/${encodeURIComponent(n)}${r}`,{method:"DELETE",headers:s?{"x-opencode-directory":s}:void 0}),l=await i.json().catch(()=>null);if(!i.ok){const u=l?.error||"Failed to delete agent";throw new Error(u)}if(l?.requiresReload??!0)return o=!0,await Ka({message:l?.message,delayMs:l?.reloadDelayMs,scopes:["agents"],mode:"active"}),!0;const d=await e().loadAgents();return d&&os("agents",{source:X2}),e().selectedAgentName===n&&t({selectedAgentName:null}),d}catch{return!1}finally{o||bo()}},getAgentByName:n=>{const{agents:o}=e();return o.find(s=>s.name===n)},getVisibleAgents:()=>{const{agents:n}=e();return N4(n)}}),{name:"agents-store",storage:Wo(()=>Pn()),partialize:t=>({selectedAgentName:t.selectedAgentName})}),{name:"agents-store"}));typeof window<"u"&&(window.__zustand_agents_store__=ta);async function DC(t){const e=typeof t=="number"&&t>0?Math.min(t,o6):0;e>0&&await x0(e);const n=Date.now();let o=0,s=null;for(;Date.now()-n<AC;){o+=1,Yn(`Waiting for OpenCode… (attempt ${o})`);try{if(await Je.checkHealth())return;s=new Error("OpenCode health check reported not ready")}catch(l){s=l}const r=Date.now()-n,i=o<=s6&&r<1200?o6:Math.min(FC+Math.max(0,o-s6)*_C,BC);await x0(i)}throw s||new Error("OpenCode did not become ready in time")}const TC=t=>{if(!t||t.length===0)return["all"];const e=Array.from(new Set(t));return e.includes("all")?["all"]:e};async function PC(t={}){const{message:e,delayMs:n}=t,o=TC(t.scopes),s=t.mode??(o.includes("all")?"projects":"active");try{Yn(e||"Refreshing configuration…")}catch{}try{await DC(n);const r=Ee.getState(),i=ta.getState(),l=ys.getState(),c=mo.getState(),d=vC.getState(),u=o.includes("all")||o.includes("providers"),f=o.includes("all")||o.includes("agents"),m=o.includes("all")||o.includes("agents"),h=o.includes("all")||o.includes("commands"),p=o.includes("all")||o.includes("skills"),b=wC(),y=s==="projects"?tn.getState().projects:[],v=Array.from(new Set([...b?[b]:[],...y.map(S=>S.path).filter(Boolean)]));o.includes("all")&&s==="projects"&&Ee.setState({directoryScoped:{}}),u&&Ee.getState().invalidateModelMetadataCache();const x=[];for(const S of v)u&&x.push(r.loadProviders({directory:S,source:"agentsStore:refreshConfig"}).then(()=>{})),f&&x.push(r.loadAgents({directory:S,source:"agentsStore:refreshConfig"}).then(()=>{}));const w=[];m&&w.push(i.loadAgents().then(()=>{})),h&&w.push(l.loadCommands().then(()=>{})),p&&(w.push(c.loadSkills().then(()=>{})),w.push(d.loadCatalog().then(()=>{}))),Yn("Refreshing configuration…"),await Promise.all([...x,...w])}catch{Yn("OpenCode refresh failed. Please retry."),await x0(1500)}finally{bo()}}async function Ka(t){await PC(t)}async function SJ(t){ss(t?.message||"Reloading OpenCode configuration…");try{const e=await We("/api/config/reload",{method:"POST",headers:{"Content-Type":"application/json"}}),n=await e.json().catch(()=>null);if(!e.ok){const s=n?.error||"Failed to reload configuration";throw new Error(s)}const o={...t,scopes:t?.scopes??["all"],mode:t?.mode??"projects"};n?.requiresReload?await Ka({...o,message:n.message,delayMs:n.reloadDelayMs}):await Ka(o)}catch(e){throw console.error("[reloadOpenCodeConfiguration] Failed:",e),Yn("Failed to reload configuration. Please try again."),await x0(2e3),bo(),e}}let r6=null;r6||(r6=tl(t=>{if(t.source!==X2&&i1(t,"agents")){const{loadAgents:e}=ta.getState();e()}}));const EC=t=>typeof t=="object"&&t!==null,a2=new Map,zt=Jt()(qo((t,e)=>({sessionModelSelections:new Map,sessionAgentSelections:new Map,sessionAgentModelSelections:new Map,lastUsedProvider:null,saveSessionModelSelection:(n,o,s)=>t(r=>{const i=new Map(r.sessionModelSelections);return i.delete(n),i.set(n,{providerId:o,modelId:s}),{sessionModelSelections:i,lastUsedProvider:{providerID:o,modelID:s}}}),getSessionModelSelection:n=>e().sessionModelSelections.get(n)??null,saveSessionAgentSelection:(n,o)=>t(s=>{if(s.sessionAgentSelections.get(n)===o)return s;const r=new Map(s.sessionAgentSelections);return r.delete(n),r.set(n,o),{sessionAgentSelections:r}}),getSessionAgentSelection:n=>e().sessionAgentSelections.get(n)??null,saveAgentModelForSession:(n,o,s,r)=>t(i=>{const l=i.sessionAgentModelSelections.get(n)?.get(o);if(l?.providerId===s&&l?.modelId===r)return i;const c=new Map(i.sessionAgentModelSelections),d=new Map(c.get(n)??new Map);return c.delete(n),d.set(o,{providerId:s,modelId:r}),c.set(n,d),{sessionAgentModelSelections:c}}),getAgentModelForSession:(n,o)=>e().sessionAgentModelSelections.get(n)?.get(o)??null,saveAgentModelVariantForSession:(n,o,s,r,i)=>{const l=`${s}/${r}`;let c=a2.get(n);if(!c&&i&&(c=new Map,a2.set(n,c)),!c)return;let d=c.get(o);if(!d&&i&&(d=new Map,c.set(o,d)),!!d){if(!i){d.delete(l),d.size===0&&c.delete(o),c.size===0&&a2.delete(n);return}d.set(l,i)}},getAgentModelVariantForSession:(n,o,s,r)=>{const i=`${s}/${r}`;return a2.get(n)?.get(o)?.get(i)}}),{name:"selection-store",version:1,storage:Wo(()=>Pn()),partialize:t=>{const e=Array.from(t.sessionModelSelections.entries()).slice(-150),n=Array.from(t.sessionAgentSelections.entries()).slice(-150),o=Array.from(t.sessionAgentModelSelections.entries()).slice(-150).map(([s,r])=>[s,Array.from(r.entries())]);return{sessionModelSelections:e,sessionAgentSelections:n,sessionAgentModelSelections:o,lastUsedProvider:t.lastUsedProvider}},merge:(t,e)=>{const n=EC(t)?t:void 0,o=new Map;return Array.isArray(n?.sessionAgentModelSelections)&&n.sessionAgentModelSelections.forEach(([s,r])=>{o.set(s,new Map(r))}),{...e,lastUsedProvider:n?.lastUsedProvider??e.lastUsedProvider,sessionModelSelections:new Map(n?.sessionModelSelections??[]),sessionAgentSelections:new Map(n?.sessionAgentSelections??[]),sessionAgentModelSelections:o}},migrate:t=>t})),R4=t=>{if(!t)return null;const e=t.indexOf("/");return e<=0||e>=t.length-1?null:{providerId:t.slice(0,e),modelId:t.slice(e+1)}},HC="https://models.dev/api.json",IC="/api/openchamber/models-metadata",jC=-100,LC=0,NC=250,RC=1e4,i6="opencode",a6="big-pickle",Er="zen",l6="big-pickle",c6=t=>{if(!(typeof t!="number"||!Number.isFinite(t)))return Math.max(jC,Math.min(LC,t))},d6=t=>{if(!(typeof t!="number"||!Number.isFinite(t)))return Math.max(NC,Math.min(RC,Math.round(t)))},VC=async()=>{Tt("config.defaults:start");const t=typeof performance<"u"?performance.now():Date.now(),e=(n,o)=>{const s=typeof performance<"u"?performance.now():Date.now();return Tt("config.defaults:end",{source:n,durationMs:Math.round(s-t),hasDefaultModel:!!o.defaultModel,hasDefaultAgent:!!o.defaultAgent}),o};try{const n=yo()?.settings;if(n)try{const w=(await n.load())?.settings;if(w){const S=typeof w?.defaultModel=="string"?w.defaultModel.trim():"",C=typeof w?.defaultVariant=="string"?w.defaultVariant.trim():"",M=typeof w?.defaultAgent=="string"?w.defaultAgent.trim():"",A=typeof w?.gitmojiEnabled=="boolean"?w.gitmojiEnabled:void 0,k=typeof w?.defaultFileViewerPreview=="boolean"?w.defaultFileViewerPreview:void 0,D=typeof w?.zenModel=="string"?w.zenModel.trim():"",_=w?.messageStreamTransport==="ws"||w?.messageStreamTransport==="sse"||w?.messageStreamTransport==="auto"?w.messageStreamTransport:void 0,F=w?.sttProvider==="browser"||w?.sttProvider==="server"||w?.sttProvider==="wasm"?w.sttProvider:void 0,B=typeof w?.sttServerUrl=="string"?w.sttServerUrl.trim():void 0,j=typeof w?.sttModel=="string"?w.sttModel.trim():void 0,T=typeof w?.sttLanguage=="string"?w.sttLanguage.trim():void 0,P=c6(w?.sttSilenceThresholdDb),I=d6(w?.sttSilenceHoldMs);return e("runtime-settings",{defaultModel:S.length>0?S:void 0,defaultVariant:C.length>0?C:void 0,defaultAgent:M.length>0?M:void 0,autoCreateWorktree:typeof w?.autoCreateWorktree=="boolean"?w.autoCreateWorktree:void 0,gitmojiEnabled:A,defaultFileViewerPreview:k,zenModel:D.length>0?D:void 0,messageStreamTransport:_,sttProvider:F,sttServerUrl:B,sttModel:j,sttLanguage:T,sttSilenceThresholdDb:P,sttSilenceHoldMs:I})}}catch{}const o=await We("/api/config/settings",{method:"GET",headers:{Accept:"application/json"}});if(!o.ok)return e("settings-route-not-ok",{});const s=await o.json(),r=typeof s?.defaultModel=="string"?s.defaultModel.trim():"",i=typeof s?.defaultVariant=="string"?s.defaultVariant.trim():"",l=typeof s?.defaultAgent=="string"?s.defaultAgent.trim():"",c=typeof s?.gitmojiEnabled=="boolean"?s.gitmojiEnabled:void 0,d=typeof s?.defaultFileViewerPreview=="boolean"?s.defaultFileViewerPreview:void 0,u=typeof s?.zenModel=="string"?s.zenModel.trim():"",f=s?.messageStreamTransport==="ws"||s?.messageStreamTransport==="sse"||s?.messageStreamTransport==="auto"?s.messageStreamTransport:void 0,m=s?.sttProvider==="browser"||s?.sttProvider==="server"?s.sttProvider:void 0,h=typeof s?.sttServerUrl=="string"?s.sttServerUrl.trim():void 0,p=typeof s?.sttModel=="string"?s.sttModel.trim():void 0,b=typeof s?.sttLanguage=="string"?s.sttLanguage.trim():void 0,y=c6(s?.sttSilenceThresholdDb),v=d6(s?.sttSilenceHoldMs);return e("settings-route",{defaultModel:r.length>0?r:void 0,defaultVariant:i.length>0?i:void 0,defaultAgent:l.length>0?l:void 0,autoCreateWorktree:typeof s?.autoCreateWorktree=="boolean"?s.autoCreateWorktree:void 0,gitmojiEnabled:c,defaultFileViewerPreview:d,zenModel:u.length>0?u:void 0,messageStreamTransport:f,sttProvider:m,sttServerUrl:h,sttModel:p,sttLanguage:b,sttSilenceThresholdDb:y,sttSilenceHoldMs:v})}catch(n){return Tt("config.defaults:error",{error:n instanceof Error?n.message:String(n)}),e("error",{})}},l2=t=>R4(t),zC=t=>t?.toLowerCase?.()??"",OC=t=>t==="primary"||t==="all"||t===void 0||t===null,C0=t=>{if(typeof t!="string")return;const e=t.trim();return e.length>0?e:void 0},Md=(t,e,n)=>{const o=t.find(s=>s.id===e);return o?o.models.some(s=>s.id===n):!1},Xl=({providers:t,settingsZenModel:e})=>{const n=C0(e);if(!Array.isArray(t)||t.length===0)return n?{providerId:Er,modelId:n}:null;if(n&&Md(t,Er,n))return{providerId:Er,modelId:n};if(Md(t,Er,l6))return{providerId:Er,modelId:l6};const o=t.find(s=>s.id===Er);if(o?.models.length){const s=Math.floor(Math.random()*o.models.length),r=C0(o.models[s]?.id);if(r)return{providerId:Er,modelId:r}}return null},c1=t=>typeof t=="object"&&t!==null,S0=t=>Array.isArray(t)&&t.every(e=>typeof e=="string"),$C=t=>{if(!c1(t))return!1;const e=t;if(e.modalities){const{input:n,output:o}=e.modalities;if(n&&!S0(n)||o&&!S0(o))return!1}return!0},ZC=t=>{if(!c1(t))return!1;const e=t;return e.models===void 0||c1(e.models)},Tm=(t,e)=>{const n=zC(t);return!n||!e?"":`${n}/${e}`},u6=t=>{if(!t)return[];const e=[];return t.text&&e.push("text"),t.audio&&e.push("audio"),t.image&&e.push("image"),t.video&&e.push("video"),t.pdf&&e.push("pdf"),e},UC=(t,e)=>({id:e.id,providerId:t,name:e.name,tool_call:e.capabilities?.toolcall,reasoning:e.capabilities?.reasoning,temperature:e.capabilities?.temperature,attachment:e.capabilities?.attachment,modalities:e.capabilities?{input:u6(e.capabilities.input),output:u6(e.capabilities.output)}:void 0,cost:e.cost?{input:e.cost.input,output:e.cost.output,cache_read:e.cost.cache?.read,cache_write:e.cost.cache?.write}:void 0,limit:e.limit,release_date:e.release_date}),qC=t=>{const e=new Map;if(!c1(t))return e;for(const[n,o]of Object.entries(t)){if(!ZC(o))continue;const s=typeof o.id=="string"&&o.id.length>0?o.id:n,r=o.models;if(!(!r||!c1(r)))for(const[i,l]of Object.entries(r)){if(!$C(l))continue;const c=typeof i=="string"&&i.length>0?i:l.id;if(!c||typeof c!="string"||c.length===0)continue;const d={id:typeof l.id=="string"&&l.id.length>0?l.id:c,providerId:s,name:typeof l.name=="string"?l.name:void 0,tool_call:typeof l.tool_call=="boolean"?l.tool_call:void 0,reasoning:typeof l.reasoning=="boolean"?l.reasoning:void 0,temperature:typeof l.temperature=="boolean"?l.temperature:void 0,attachment:typeof l.attachment=="boolean"?l.attachment:void 0,modalities:l.modalities?{input:S0(l.modalities.input)?l.modalities.input:void 0,output:S0(l.modalities.output)?l.modalities.output:void 0}:void 0,cost:l.cost,limit:l.limit,knowledge:typeof l.knowledge=="string"?l.knowledge:void 0,release_date:typeof l.release_date=="string"?l.release_date:void 0,last_updated:typeof l.last_updated=="string"?l.last_updated:void 0},u=Tm(s,c);u&&e.set(u,d)}}return e},WC=async()=>{if(typeof fetch!="function")return new Map;const t=[IC,HC];for(const e of t){const n=typeof AbortController<"u"?new AbortController:void 0,o=n?setTimeout(()=>n.abort(),8e3):void 0;try{const s=/^https?:\/\//i.test(e),r={signal:n?.signal,headers:{Accept:"application/json"},cache:"no-store"};s?r.mode="cors":r.credentials="same-origin";const i=s?await fetch(e,r):await We(e,r);if(!i.ok)throw new Error(`Metadata request to ${e} returned status ${i.status}`);const l=await i.json();return qC(l)}catch(s){s?.name==="AbortError"?console.warn(`Model metadata request aborted (${e})`):console.warn(`Failed to fetch model metadata from ${e}:`,s)}finally{o&&clearTimeout(o)}}return new Map};let e0=null;const GC=(t,e)=>{t().size>0||e0||(Tt("modelsMetadata:queued"),e0=G2("modelsMetadata",WC).then(o=>(o.size>0&&(Tt("modelsMetadata:set",{entries:o.size}),e(o)),o)).catch(()=>new Map).finally(()=>{e0=null}))},Ad=t=>new Promise(e=>setTimeout(e,t)),KC=800,YC=async(t=KC)=>Promise.race([Je.checkHealth().catch(()=>!1),Ad(Math.max(1,t)).then(()=>!1)]),V4="__global__",Oi=t=>{const e=typeof t=="string"?t.trim():"";return e.length>0?e:V4},yi=t=>t===V4?null:t,JC=()=>{if(typeof window>"u")return V4;const t=Je.getDirectory()??en.getState().currentDirectory;return Oi(t)},c2=new Map,ec=new Map;let d2=null;const Ee=Jt()(Un(qo((t,e)=>({activeDirectoryKey:JC(),directoryScoped:{},providers:[],agents:[],currentProviderId:"",currentModelId:"",currentVariant:void 0,currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{},isConnected:!1,hasEverConnected:!1,connectionPhase:"connecting",lastDisconnectReason:null,isInitialized:!1,modelsMetadata:new Map,settingsDefaultModel:void 0,settingsDefaultVariant:void 0,settingsDefaultAgent:void 0,settingsAutoCreateWorktree:!1,settingsGitmojiEnabled:!1,settingsDefaultFileViewerPreview:!1,settingsZenModel:void 0,settingsMessageStreamTransport:"auto",voiceProvider:(()=>{if(typeof window<"u"){const n=localStorage.getItem("voiceProvider");if(n==="openai"||n==="browser"||n==="say"||n==="openai-compatible")return n}return"browser"})(),speechRate:(()=>{if(typeof window<"u"){const n=localStorage.getItem("speechRate");if(n){const o=parseFloat(n);if(!isNaN(o)&&o>=.5&&o<=2)return o}}return 1})(),speechPitch:(()=>{if(typeof window<"u"){const n=localStorage.getItem("speechPitch");if(n){const o=parseFloat(n);if(!isNaN(o)&&o>=.5&&o<=2)return o}}return 1})(),speechVolume:(()=>{if(typeof window<"u"){const n=localStorage.getItem("speechVolume");if(n){const o=parseFloat(n);if(!isNaN(o)&&o>=0&&o<=1)return o}}return 1})(),sayVoice:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sayVoice");if(n)return n}return"Samantha"})(),browserVoice:(()=>{if(typeof window<"u"){const n=localStorage.getItem("browserVoice");if(n)return n}return""})(),openaiVoice:(()=>{if(typeof window<"u"){const n=localStorage.getItem("openaiVoice");if(n)return n}return"nova"})(),openaiApiKey:(()=>{if(typeof window<"u"){const n=localStorage.getItem("openaiApiKey");if(n)return n}return""})(),openaiCompatibleUrl:(()=>{if(typeof window<"u"){const n=localStorage.getItem("openaiCompatibleUrl");if(n)return n}return""})(),openaiCompatibleApiKey:(()=>{if(typeof window<"u"){const n=localStorage.getItem("openaiCompatibleApiKey");if(n)return n}return""})(),openaiCompatibleVoice:(()=>{if(typeof window<"u"){const n=localStorage.getItem("openaiCompatibleVoice");if(n)return n}return"af_sky"})(),openaiCompatibleTtsModel:(()=>{if(typeof window<"u"){const n=localStorage.getItem("openaiCompatibleTtsModel");if(n&&n!=="speaches-ai/Kokoro-82M-v1.0-ONNX")return n}return"kokoro"})(),sttProvider:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sttProvider");if(n==="browser"||n==="server"||n==="wasm")return n;if(window.__OPENCHAMBER_ELECTRON__?.runtime==="electron")return"wasm"}return"browser"})(),sttServerUrl:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sttServerUrl");if(n)return n}return"http://localhost:8001/v1"})(),sttApiKey:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sttApiKey");if(n)return n}return""})(),sttModel:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sttModel");if(n)return n}return"deepdml/faster-whisper-large-v3-turbo-ct2"})(),wasmSttModel:(()=>{if(typeof window<"u"){const n=localStorage.getItem("wasmSttModel");if(n)return n}return"Xenova/whisper-base.en"})(),sttLanguage:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sttLanguage");if(n!==null)return n}return""})(),sttSilenceThresholdDb:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sttSilenceThresholdDb");if(n){const o=parseFloat(n);if(!isNaN(o))return o}}return-45})(),sttSilenceHoldMs:(()=>{if(typeof window<"u"){const n=localStorage.getItem("sttSilenceHoldMs");if(n){const o=parseInt(n,10);if(!isNaN(o))return o}}return 1500})(),sttTranscribeOnStop:typeof window<"u"&&localStorage.getItem("sttTranscribeOnStop")==="true",showMessageTTSButtons:typeof window<"u"&&localStorage.getItem("showMessageTTSButtons")==="true",voiceModeEnabled:typeof window<"u"&&localStorage.getItem("voiceModeEnabled")==="true",summarizeMessageTTS:typeof window<"u"&&localStorage.getItem("summarizeMessageTTS")==="true",summarizeVoiceConversation:typeof window<"u"&&localStorage.getItem("summarizeVoiceConversation")==="true",summarizeCharacterThreshold:(()=>{if(typeof window<"u"){const n=localStorage.getItem("summarizeCharacterThreshold");if(n){const o=parseInt(n,10);if(!isNaN(o)&&o>=50&&o<=2e3)return o}}return 200})(),summarizeMaxLength:(()=>{if(typeof window<"u"){const n=localStorage.getItem("summarizeMaxLength");if(n){const o=parseInt(n,10);if(!isNaN(o)&&o>=50&&o<=2e3)return o}}return 500})(),activateDirectory:async n=>{const o=Oi(n);let s=!1,r=!1;t(i=>{const l=i.directoryScoped[o];return l?(s=l.providers.length>0,r=l.agents.length>0,{activeDirectoryKey:o,providers:l.providers,agents:l.agents,currentProviderId:l.currentProviderId,currentModelId:l.currentModelId,currentVariant:l.currentVariant,currentAgentName:l.currentAgentName,selectedProviderId:l.selectedProviderId,agentModelSelections:l.agentModelSelections,defaultProviders:l.defaultProviders}):{activeDirectoryKey:o,providers:[],agents:[],currentProviderId:"",currentModelId:"",currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{}}}),e().isConnected&&(s?Tt("activateDirectory:skipProviders",{directoryKey:o}):await e().loadProviders({directory:yi(o),source:"activateDirectory"}),r?Tt("activateDirectory:skipAgents",{directoryKey:o}):await e().loadAgents({directory:yi(o),source:"activateDirectory"}))},loadProviders:async n=>{const o=n?.directory??yi(e().activeDirectoryKey),s=o??Je.getDirectory()??null,r=Oi(o),i=n?.source??"unknown";Tt("loadProviders:called",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s});const l=c2.get(r);if(l)return Tt("loadProviders:deduped",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s}),l;const c=(async()=>{const d=typeof performance<"u"?performance.now():Date.now();Tt("loadProviders:start",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s});const u=e().directoryScoped[r],f=u?.providers??(e().activeDirectoryKey===r?e().providers:[]),m=u?.defaultProviders??(e().activeDirectoryKey===r?e().defaultProviders:{});let h=null;for(let p=0;p<3;p++)try{GC(()=>e().modelsMetadata,S=>t({modelsMetadata:S}));const b=await G2("loadProviders:api",()=>Je.withDirectory(yi(r),()=>Je.getProviders()),{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,attempt:p+1}),y=Array.isArray(b?.providers)?b.providers:[],v=b?.default||{},x=y.map(S=>{const C=S.models??{},M=Object.keys(C).map(A=>C[A]);return{...S,models:M}});t(S=>{const M={...S.directoryScoped[r]??{providers:[],agents:[],currentProviderId:"",currentModelId:"",currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{}},providers:x,defaultProviders:v},A={directoryScoped:{...S.directoryScoped,[r]:M}};if(S.activeDirectoryKey===r&&(A.providers=x,A.defaultProviders=v,!S.currentProviderId&&!S.currentModelId&&S.settingsDefaultModel)){const k=l2(S.settingsDefaultModel);if(k){const D=x.find(_=>_.id===k.providerId);if(D?.models.some(_=>_.id===k.modelId)){const _=D.models.find(B=>B.id===k.modelId),F=S.settingsDefaultVariant&&_?.variants?.[S.settingsDefaultVariant]?S.settingsDefaultVariant:void 0;A.currentProviderId=k.providerId,A.currentModelId=k.modelId,A.currentVariant=F,A.selectedProviderId=k.providerId,M.currentProviderId=k.providerId,M.currentModelId=k.modelId,M.currentVariant=F,M.selectedProviderId=k.providerId}}}return A});const w=typeof performance<"u"?performance.now():Date.now();Tt("loadProviders:end",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,durationMs:Math.round(w-d),providers:x.length,models:x.reduce((S,C)=>S+C.models.length,0)});return}catch(b){h=b,Tt("loadProviders:attemptError",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,attempt:p+1,error:b instanceof Error?b.message:String(b)});const y=200*(p+1);await new Promise(v=>setTimeout(v,y))}console.error("Failed to load providers:",h),Tt("loadProviders:error",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,error:h instanceof Error?h.message:String(h)}),t(p=>{const y={...p.directoryScoped[r]??{providers:[],agents:[],currentProviderId:"",currentModelId:"",currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{}},providers:f,defaultProviders:m},v={directoryScoped:{...p.directoryScoped,[r]:y}};if(p.activeDirectoryKey===r&&(v.providers=f,v.defaultProviders=m,!p.currentProviderId&&!p.currentModelId&&p.settingsDefaultModel)){const x=l2(p.settingsDefaultModel);if(x){const w=f.find(S=>S.id===x.providerId);if(w?.models.some(S=>S.id===x.modelId)){const S=w.models.find(M=>M.id===x.modelId),C=p.settingsDefaultVariant&&S?.variants?.[p.settingsDefaultVariant]?p.settingsDefaultVariant:void 0;v.currentProviderId=x.providerId,v.currentModelId=x.modelId,v.currentVariant=C,v.selectedProviderId=x.providerId,y.currentProviderId=x.providerId,y.currentModelId=x.modelId,y.currentVariant=C,y.selectedProviderId=x.providerId}}}return v})})().finally(()=>c2.delete(r));return c2.set(r,c),c},setProvider:n=>{const{providers:o}=e(),s=o.find(l=>l.id===n);if(!s)return;const i=s.models[0]?.id||"";t(l=>{const c=l.activeDirectoryKey,u={...l.directoryScoped[c]??{providers:l.providers,agents:l.agents,currentProviderId:l.currentProviderId,currentModelId:l.currentModelId,currentVariant:l.currentVariant,currentAgentName:l.currentAgentName,selectedProviderId:l.selectedProviderId,agentModelSelections:l.agentModelSelections,defaultProviders:l.defaultProviders},currentProviderId:n,currentModelId:i,selectedProviderId:n};return{currentProviderId:n,currentModelId:i,selectedProviderId:n,directoryScoped:{...l.directoryScoped,[c]:u}}})},setModel:n=>{t(o=>{const s=o.activeDirectoryKey,i={...o.directoryScoped[s]??{providers:o.providers,agents:o.agents,currentProviderId:o.currentProviderId,currentModelId:o.currentModelId,currentVariant:o.currentVariant,currentAgentName:o.currentAgentName,selectedProviderId:o.selectedProviderId,agentModelSelections:o.agentModelSelections,defaultProviders:o.defaultProviders},currentModelId:n};return{currentModelId:n,directoryScoped:{...o.directoryScoped,[s]:i}}})},setCurrentVariant:n=>{t(o=>{if(o.currentVariant===n)return o;const s=o.activeDirectoryKey,i={...o.directoryScoped[s]??{providers:o.providers,agents:o.agents,currentProviderId:o.currentProviderId,currentModelId:o.currentModelId,currentVariant:o.currentVariant,currentAgentName:o.currentAgentName,selectedProviderId:o.selectedProviderId,agentModelSelections:o.agentModelSelections,defaultProviders:o.defaultProviders},currentVariant:n};return{currentVariant:n,directoryScoped:{...o.directoryScoped,[s]:i}}})},getCurrentModelVariants:()=>{const o=e().getCurrentModel()?.variants;return o?Object.keys(o):[]},cycleCurrentVariant:()=>{const n=e().getCurrentModelVariants();if(n.length===0)return;const o=e().currentVariant;if(!o){e().setCurrentVariant(n[0]);return}const s=n.indexOf(o);if(s===-1||s===n.length-1){e().setCurrentVariant(void 0);return}e().setCurrentVariant(n[s+1])},setSelectedProvider:n=>{t(o=>{const s=o.activeDirectoryKey,i={...o.directoryScoped[s]??{providers:o.providers,agents:o.agents,currentProviderId:o.currentProviderId,currentModelId:o.currentModelId,currentAgentName:o.currentAgentName,selectedProviderId:o.selectedProviderId,agentModelSelections:o.agentModelSelections,defaultProviders:o.defaultProviders},selectedProviderId:n};return{selectedProviderId:n,directoryScoped:{...o.directoryScoped,[s]:i}}})},saveAgentModelSelection:(n,o,s)=>{t(r=>{const i=r.activeDirectoryKey,l={...r.agentModelSelections,[n]:{providerId:o,modelId:s}},d={...r.directoryScoped[i]??{providers:r.providers,agents:r.agents,currentProviderId:r.currentProviderId,currentModelId:r.currentModelId,currentAgentName:r.currentAgentName,selectedProviderId:r.selectedProviderId,agentModelSelections:r.agentModelSelections,defaultProviders:r.defaultProviders},agentModelSelections:l};return{agentModelSelections:l,directoryScoped:{...r.directoryScoped,[i]:d}}})},getAgentModelSelection:n=>{const{agentModelSelections:o}=e();return o[n]||null},loadAgents:async n=>{const o=n?.directory??yi(e().activeDirectoryKey),s=o??Je.getDirectory()??null,r=Oi(o),i=n?.source??"unknown";Tt("loadAgents:called",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s});const l=ec.get(r);if(l)return Tt("loadAgents:deduped",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s}),l;const c=(async()=>{const d=typeof performance<"u"?performance.now():Date.now();Tt("loadAgents:start",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s});const f=e().directoryScoped[r]?.agents??(e().activeDirectoryKey===r?e().agents:[]);let m=null;for(let h=0;h<3;h++)try{const[p,b]=await Promise.all([G2("loadAgents:api",()=>Je.withDirectory(yi(r),()=>Je.listAgents()),{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,attempt:h+1}),VC()]),y=Array.isArray(p)?p:[],v=c2.get(r);v&&(Tt("loadAgents:awaitProviders",{directoryKey:r,source:i}),await v);const x=e().activeDirectoryKey===r?e().providers:e().directoryScoped[r]?.providers??[],w=C0(e().settingsZenModel),S=C0(b.zenModel),C=Xl({providers:x,settingsZenModel:w}),M=Xl({providers:x,settingsZenModel:S}),D=(C||M)?.modelId||S||w;if(t(V=>{const E={...V.directoryScoped[r]??{providers:x,agents:f,currentProviderId:"",currentModelId:"",currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{}},providers:x,agents:y},X={settingsDefaultModel:b.defaultModel,settingsDefaultVariant:b.defaultVariant,settingsDefaultAgent:b.defaultAgent,settingsAutoCreateWorktree:b.autoCreateWorktree??!1,settingsGitmojiEnabled:b.gitmojiEnabled??!1,settingsDefaultFileViewerPreview:b.defaultFileViewerPreview??!1,settingsZenModel:D,settingsMessageStreamTransport:b.messageStreamTransport??V.settingsMessageStreamTransport??"auto",sttProvider:b.sttProvider??V.sttProvider,sttServerUrl:b.sttServerUrl??V.sttServerUrl,sttModel:b.sttModel??V.sttModel,sttLanguage:b.sttLanguage??V.sttLanguage,sttSilenceThresholdDb:b.sttSilenceThresholdDb??V.sttSilenceThresholdDb,sttSilenceHoldMs:b.sttSilenceHoldMs??V.sttSilenceHoldMs,directoryScoped:{...V.directoryScoped,[r]:E}};return V.activeDirectoryKey===r&&(X.agents=y),X}),D&&D!==S&&D&&un({zenModel:D,gitProviderId:"",gitModelId:""}).catch(()=>{}),y.length===0){t(W=>{const X={...W.directoryScoped[r]??{providers:x,agents:[],currentProviderId:"",currentModelId:"",currentVariant:void 0,currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{}},providers:x,agents:[],currentAgentName:void 0},R={directoryScoped:{...W.directoryScoped,[r]:X}};return W.activeDirectoryKey===r&&(R.currentAgentName=void 0),R});const V=typeof performance<"u"?performance.now():Date.now();return Tt("loadAgents:end",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,durationMs:Math.round(V-d),agents:y.length}),!0}const F=(V,W)=>{const E=x.find(X=>X.id===V);return E?E.models.some(X=>X.id===W):!1},B=y.filter(V=>OC(V.mode));let P=B.find(V=>V.name==="build")||B[0]||y[0];const I={};if(b.defaultAgent){const V=y.find(W=>W.name===b.defaultAgent);V?P=V:I.defaultAgent=""}let O,L,q;if(b.defaultModel){const V=l2(b.defaultModel);if(V&&F(V.providerId,V.modelId)){if(O=V.providerId,L=V.modelId,b.defaultVariant){const X=x.find(R=>R.id===V.providerId)?.models.find(R=>R.id===V.modelId)?.variants;X&&Object.prototype.hasOwnProperty.call(X,b.defaultVariant)?q=b.defaultVariant:I.defaultVariant=""}}else I.defaultModel=""}if(!O&&P?.model?.providerID&&P?.model?.modelID){const{providerID:V,modelID:W}=P.model;F(V,W)&&(O=V,L=W)}if(!O)if(F(i6,a6))O=i6,L=a6;else{const V=x[0],W=V?.models[0];V&&W&&(O=V.id,L=W.id)}t(V=>{const W=V.directoryScoped[r]??{providers:x,agents:y,currentProviderId:"",currentModelId:"",currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{}},E={...W,providers:x,agents:y,currentAgentName:P.name,currentProviderId:O??W.currentProviderId,currentModelId:L??W.currentModelId,currentVariant:q},X={directoryScoped:{...V.directoryScoped,[r]:E}};return V.activeDirectoryKey===r&&(X.currentAgentName=P.name,O&&L&&(X.currentProviderId=O,X.currentModelId=L,X.currentVariant=q)),X}),Object.keys(I).length>0&&(t({settingsDefaultModel:I.defaultModel!==void 0?void 0:e().settingsDefaultModel,settingsDefaultVariant:I.defaultVariant!==void 0?void 0:e().settingsDefaultVariant,settingsDefaultAgent:I.defaultAgent!==void 0?void 0:e().settingsDefaultAgent}),un(I).catch(()=>{}));const $=typeof performance<"u"?performance.now():Date.now();return Tt("loadAgents:end",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,durationMs:Math.round($-d),agents:y.length}),!0}catch(p){m=p,Tt("loadAgents:attemptError",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,attempt:h+1,error:p instanceof Error?p.message:String(p)});const b=200*(h+1);await new Promise(y=>setTimeout(y,b))}return console.error("Failed to load agents:",m),Tt("loadAgents:error",{directoryKey:r,source:i,requestedDirectory:o,effectiveDirectory:s,error:m instanceof Error?m.message:String(m)}),t(h=>{const p=h.activeDirectoryKey===r?h.providers:h.directoryScoped[r]?.providers??[],y={...h.directoryScoped[r]??{providers:p,agents:[],currentProviderId:"",currentModelId:"",currentAgentName:void 0,selectedProviderId:"",agentModelSelections:{},defaultProviders:{}},providers:p,agents:f},v={directoryScoped:{...h.directoryScoped,[r]:y}};return h.activeDirectoryKey===r&&(v.agents=f),v}),!1})().finally(()=>ec.delete(r));return ec.set(r,c),c},invalidateModelMetadataCache:()=>{e0=null,t({modelsMetadata:new Map})},setAgent:n=>{const{agents:o,providers:s,settingsDefaultModel:r,settingsDefaultVariant:i,currentProviderId:l,currentModelId:c}=e();if(t(d=>{const u=d.activeDirectoryKey,m={...d.directoryScoped[u]??{providers:d.providers,agents:d.agents,currentProviderId:d.currentProviderId,currentModelId:d.currentModelId,currentAgentName:d.currentAgentName,selectedProviderId:d.selectedProviderId,agentModelSelections:d.agentModelSelections,defaultProviders:d.defaultProviders},currentAgentName:n};return{currentAgentName:n,directoryScoped:{...d.directoryScoped,[u]:m}}}),n){const{currentSessionId:d}=He.getState(),u=zt.getState();d&&u.saveSessionAgentSelection(d,n),d&&He.getState().isOpenChamberCreatedSession(d)&&(u.getAgentModelForSession(d,n)||He.getState().initializeNewOpenChamberSession(d,o))}if(n){const{currentSessionId:d}=He.getState(),u=(h,p,b)=>{t(y=>{const v=y.activeDirectoryKey,w={...y.directoryScoped[v]??{providers:y.providers,agents:y.agents,currentProviderId:y.currentProviderId,currentModelId:y.currentModelId,currentVariant:y.currentVariant,currentAgentName:y.currentAgentName,selectedProviderId:y.selectedProviderId,agentModelSelections:y.agentModelSelections,defaultProviders:y.defaultProviders},currentProviderId:h,currentModelId:p,currentVariant:b,selectedProviderId:h};return{currentProviderId:h,currentModelId:p,currentVariant:b,selectedProviderId:h,directoryScoped:{...y.directoryScoped,[v]:w}}})},m=o.find(h=>h.name===n)?.model;if(m?.providerID&&m?.modelID){const{providerID:h,modelID:p}=m;if(s.find(v=>v.id===h)?.models.find(v=>v.id===p)){u(h,p,void 0);return}}if(d){const h=zt.getState().getAgentModelForSession(d,n);if(h&&Md(s,h.providerId,h.modelId)){const p=zt.getState().getAgentModelVariantForSession(d,n,h.providerId,h.modelId);(l!==h.providerId||c!==h.modelId||e().currentVariant!==p)&&u(h.providerId,h.modelId,p);return}}if(r){const h=l2(r);if(h){const p=s.find(b=>b.id===h.providerId);if(p?.models.some(b=>b.id===h.modelId)){let b;if(i){const v=p.models.find(x=>x.id===h.modelId)?.variants;v&&Object.prototype.hasOwnProperty.call(v,i)&&(b=i)}u(h.providerId,h.modelId,b);return}}}}},setSettingsDefaultModel:n=>{t({settingsDefaultModel:n})},setSettingsDefaultVariant:n=>{t({settingsDefaultVariant:n})},setSettingsDefaultAgent:n=>{t({settingsDefaultAgent:n})},setSettingsAutoCreateWorktree:n=>{t({settingsAutoCreateWorktree:n})},setSettingsGitmojiEnabled:n=>{t({settingsGitmojiEnabled:n})},setSettingsDefaultFileViewerPreview:n=>{t({settingsDefaultFileViewerPreview:n})},setSettingsZenModel:n=>{t({settingsZenModel:n})},setSettingsMessageStreamTransport:n=>{t({settingsMessageStreamTransport:n})},getResolvedGitGenerationModel:()=>{const n=e();return Xl({providers:n.providers,settingsZenModel:n.settingsZenModel})},setVoiceProvider:n=>{t({voiceProvider:n}),typeof window<"u"&&localStorage.setItem("voiceProvider",n)},setSpeechRate:n=>{const o=Math.max(.5,Math.min(2,n));t({speechRate:o}),typeof window<"u"&&localStorage.setItem("speechRate",String(o))},setSpeechPitch:n=>{const o=Math.max(.5,Math.min(2,n));t({speechPitch:o}),typeof window<"u"&&localStorage.setItem("speechPitch",String(o))},setSpeechVolume:n=>{const o=Math.max(0,Math.min(1,n));t({speechVolume:o}),typeof window<"u"&&localStorage.setItem("speechVolume",String(o))},setSayVoice:n=>{t({sayVoice:n}),typeof window<"u"&&localStorage.setItem("sayVoice",n)},setBrowserVoice:n=>{t({browserVoice:n}),typeof window<"u"&&localStorage.setItem("browserVoice",n)},setOpenaiVoice:n=>{t({openaiVoice:n}),typeof window<"u"&&localStorage.setItem("openaiVoice",n)},setOpenaiApiKey:n=>{t({openaiApiKey:n}),typeof window<"u"&&localStorage.setItem("openaiApiKey",n)},setOpenaiCompatibleUrl:n=>{t({openaiCompatibleUrl:n}),typeof window<"u"&&localStorage.setItem("openaiCompatibleUrl",n)},setOpenaiCompatibleApiKey:n=>{t({openaiCompatibleApiKey:n}),typeof window<"u"&&localStorage.setItem("openaiCompatibleApiKey",n)},setOpenaiCompatibleVoice:n=>{t({openaiCompatibleVoice:n}),typeof window<"u"&&localStorage.setItem("openaiCompatibleVoice",n)},setOpenaiCompatibleTtsModel:n=>{t({openaiCompatibleTtsModel:n}),typeof window<"u"&&localStorage.setItem("openaiCompatibleTtsModel",n)},setSttProvider:n=>{t({sttProvider:n}),typeof window<"u"&&localStorage.setItem("sttProvider",n),un({sttProvider:n}).catch(()=>{})},setSttServerUrl:n=>{t({sttServerUrl:n}),typeof window<"u"&&localStorage.setItem("sttServerUrl",n),un({sttServerUrl:n}).catch(()=>{})},setSttApiKey:n=>{t({sttApiKey:n}),typeof window<"u"&&localStorage.setItem("sttApiKey",n)},setSttModel:n=>{t({sttModel:n}),typeof window<"u"&&localStorage.setItem("sttModel",n),un({sttModel:n}).catch(()=>{})},setWasmSttModel:n=>{t({wasmSttModel:n}),typeof window<"u"&&localStorage.setItem("wasmSttModel",n),un({wasmSttModel:n}).catch(()=>{})},setSttLanguage:n=>{t({sttLanguage:n}),typeof window<"u"&&localStorage.setItem("sttLanguage",n),un({sttLanguage:n}).catch(()=>{})},setSttSilenceThresholdDb:n=>{t({sttSilenceThresholdDb:n}),typeof window<"u"&&localStorage.setItem("sttSilenceThresholdDb",String(n)),un({sttSilenceThresholdDb:n}).catch(()=>{})},setSttSilenceHoldMs:n=>{t({sttSilenceHoldMs:n}),typeof window<"u"&&localStorage.setItem("sttSilenceHoldMs",String(n)),un({sttSilenceHoldMs:n}).catch(()=>{})},setSttTranscribeOnStop:n=>{t({sttTranscribeOnStop:n}),typeof window<"u"&&localStorage.setItem("sttTranscribeOnStop",String(n)),un({sttTranscribeOnStop:n}).catch(()=>{})},setShowMessageTTSButtons:n=>{t({showMessageTTSButtons:n}),typeof window<"u"&&localStorage.setItem("showMessageTTSButtons",String(n))},setVoiceModeEnabled:n=>{t({voiceModeEnabled:n}),typeof window<"u"&&localStorage.setItem("voiceModeEnabled",String(n))},setSummarizeMessageTTS:n=>{t({summarizeMessageTTS:n}),typeof window<"u"&&localStorage.setItem("summarizeMessageTTS",String(n))},setSummarizeVoiceConversation:n=>{t({summarizeVoiceConversation:n}),typeof window<"u"&&localStorage.setItem("summarizeVoiceConversation",String(n))},setSummarizeCharacterThreshold:n=>{const o=Math.max(50,Math.min(2e3,n));t({summarizeCharacterThreshold:o}),typeof window<"u"&&localStorage.setItem("summarizeCharacterThreshold",String(o))},setSummarizeMaxLength:n=>{const o=Math.max(50,Math.min(2e3,n));t({summarizeMaxLength:o}),typeof window<"u"&&localStorage.setItem("summarizeMaxLength",String(o))},probeConnection:async n=>{if(await YC(n?.timeoutMs))return t({isConnected:!0,hasEverConnected:!0,connectionPhase:"connected"}),!0;const s=e();return s.isConnected?!0:(t({isConnected:!1,connectionPhase:s.hasEverConnected?"reconnecting":"connecting",lastDisconnectReason:"health_probe_unhealthy"}),!1)},checkConnection:async()=>{Tt("checkConnection:start");const n=5;let o=0,s=null;for(;o<n;)try{Tt("checkConnection:attempt",{attempt:o+1});const r=await G2("checkConnection:health",()=>Je.checkHealth(),{attempt:o+1});if(!r&&o<n-1){const l=e().hasEverConnected;t({isConnected:!1,connectionPhase:l?"reconnecting":"connecting",lastDisconnectReason:"health_check_unhealthy"}),o+=1,await Ad(400*o);continue}const i=e().hasEverConnected;return t(r?{isConnected:!0,hasEverConnected:!0,connectionPhase:"connected"}:{isConnected:!1,connectionPhase:i?"reconnecting":"connecting",lastDisconnectReason:"health_check_unhealthy"}),Tt("checkConnection:end",{healthy:r,attempts:o+1}),r}catch(r){s=r,o+=1;const i=400*o;await Ad(i)}return s&&console.warn("[ConfigStore] Failed to reach OpenCode after retrying:",s),t({isConnected:!1,connectionPhase:e().hasEverConnected?"reconnecting":"connecting",lastDisconnectReason:"health_check_failed"}),Tt("checkConnection:end",{healthy:!1,attempts:n}),!1},initializeApp:async()=>{if(d2)return Tt("initializeApp:deduped"),d2;const n=(async()=>{const o=typeof performance<"u"?performance.now():Date.now();Tt("initializeApp:start");try{const s=F1();s&&console.log("Starting app initialization...");const r=await e().checkConnection();if(s&&console.log("Connection check result:",r),!r){s&&console.log("Server not connected"),t({isConnected:!1,connectionPhase:e().hasEverConnected?"reconnecting":"connecting"});return}s&&console.log("Initializing app..."),Tt("initApp:skipped",{reason:"checkConnection already verified health"}),s&&console.log("Loading providers and agents..."),await Promise.all([e().loadProviders({source:"initializeApp"}),e().loadAgents({source:"initializeApp"})]),t({isInitialized:!0,isConnected:!0,hasEverConnected:!0,connectionPhase:"connected"});const i=typeof performance<"u"?performance.now():Date.now();Tt("initializeApp:end",{durationMs:Math.round(i-o),providers:e().providers.length,agents:e().agents.length}),s&&console.log("App initialized successfully")}catch(s){console.error("Failed to initialize app:",s),t({isInitialized:!1,isConnected:!1,connectionPhase:e().hasEverConnected?"reconnecting":"connecting",lastDisconnectReason:"init_error"}),Tt("initializeApp:error",{error:s instanceof Error?s.message:String(s)})}})().finally(()=>{d2=null});return d2=n,n},getCurrentProvider:()=>{const{providers:n,currentProviderId:o}=e();return n.find(s=>s.id===o)},getCurrentModel:()=>{const n=e().getCurrentProvider(),{currentModelId:o}=e();if(n)return n.models.find(s=>s.id===o)},getCurrentAgent:()=>{const{agents:n,currentAgentName:o}=e();if(o)return n.find(s=>s.name===o)},getModelMetadata:(n,o)=>{const s=Tm(n,o);if(!s)return;const{modelsMetadata:r,providers:i}=e(),l=r.get(s);if(l)return l;const c=i.find(u=>u.id===n);if(!c)return;const d=c.models.find(u=>u.id===o);if(d)return UC(n,d)},getVisibleAgents:()=>{const{agents:n}=e();return N4(n)}}),{name:"config-store",storage:Wo(()=>Pn()),partialize:t=>({activeDirectoryKey:t.activeDirectoryKey,directoryScoped:t.directoryScoped,currentProviderId:t.currentProviderId,currentModelId:t.currentModelId,currentVariant:t.currentVariant,currentAgentName:t.currentAgentName,selectedProviderId:t.selectedProviderId,agentModelSelections:t.agentModelSelections,defaultProviders:t.defaultProviders,settingsDefaultModel:t.settingsDefaultModel,settingsDefaultVariant:t.settingsDefaultVariant,settingsDefaultAgent:t.settingsDefaultAgent,settingsAutoCreateWorktree:t.settingsAutoCreateWorktree,settingsGitmojiEnabled:t.settingsGitmojiEnabled,settingsDefaultFileViewerPreview:t.settingsDefaultFileViewerPreview,settingsZenModel:t.settingsZenModel,settingsMessageStreamTransport:t.settingsMessageStreamTransport,speechRate:t.speechRate,speechPitch:t.speechPitch,speechVolume:t.speechVolume})})));typeof window<"u"&&(window.__zustand_config_store__=Ee);let f6=null;f6||(f6=tl(async t=>{const e=[];if(i1(t,"agents")){const{loadAgents:n}=Ee.getState();e.push(n({source:"configChange:agents"}).then(()=>{}))}if(i1(t,"providers")){const{loadProviders:n}=Ee.getState();e.push(n({source:"configChange:providers"}))}e.length>0&&await Promise.all(e)}));let m6=null;typeof window<"u"&&!m6&&(m6=en.subscribe((t,e)=>{const n=Oi(t.currentDirectory),o=Oi(e.currentDirectory);n!==o&&(Tt("directoryStore:changed",{previous:o,next:n}),Ee.getState().activateDirectory(t.currentDirectory))}));const QC=["load failed","network connection was lost","network request failed","failed to fetch","econnreset","econnrefused","etimedout","socket hang up","opencode api unavailable","503","502"];function XC(t){if(!t)return!1;const e=String(t instanceof Error?t.message:t).toLowerCase();if(QC.some(o=>e.includes(o)))return!0;const n=t?.status;return typeof n=="number"&&n>=500&&n<600}async function bn(t,e={}){const{attempts:n=3,delay:o=500,factor:s=2,maxDelay:r=1e4,retryIf:i=XC}=e;let l;for(let c=0;c<n;c++)try{return await t()}catch(d){if(l=d,c===n-1||!i(d))throw d;const u=Math.min(o*Math.pow(s,c),r);await new Promise(f=>setTimeout(f,u))}throw l}const eS=t=>{if(!t)return null;const e=Number(t);return Number.isFinite(e)?e:null},tS=(t,e)=>{if(!t||typeof t!="object")return null;const o=t.headers;if(!o||typeof o!="object")return null;const s=o;if(typeof s.get=="function")return s.get(e);const r=o,i=r[e]??r[e.toLowerCase()];return typeof i=="string"?i:null},nS=t=>{if(t instanceof Error)return t.message;if(typeof t=="string")return t;if(t&&typeof t=="object"&&"message"in t&&typeof t.message=="string")return t.message;try{return JSON.stringify(t)}catch{return String(t)}},oS=(t,e)=>{if(t.error){const n=t.response?.status,o=new Error(`${e} failed${n?` (${n})`:""}: ${nS(t.error)}`);throw n!==void 0&&(o.status=n),o}if(!Array.isArray(t.data)){const n=new Error(`${e} returned no data`);throw n.status=503,n}return t.data};async function k0(t,e){const n=[],o=new Set;let s;for(;;){const r=await bn(()=>t.experimental.session.list({...e.directory?{directory:e.directory}:{},archived:e.archived,...e.roots!==void 0?{roots:e.roots}:{},limit:e.pageSize,...s!==void 0?{cursor:s}:{}}),{attempts:3,delay:500,retryIf:()=>!0}),i=oS(r,"experimental.session.list");if(i.length===0)break;let l=0;for(const f of i)!f?.id||o.has(f.id)||(o.add(f.id),n.push(f),l+=1);if(l>0&&e.onPage?.(i),i.length<e.pageSize)break;const c=eS(tS(r,"x-next-cursor")),d=i[i.length-1]?.time?.updated,u=c??(typeof d=="number"&&Number.isFinite(d)?d:void 0);if(u===void 0||s!==void 0&&u>=s||l===0)break;s=u}return n}const Fd=500;let Ca=null;const Nr=t=>{if(typeof t!="string")return null;const e=t.trim();if(!e)return null;const n=e.replace(/\\/g,"/");return n==="/"?"/":n.length>1?n.replace(/\/+$/,""):n},B1=t=>{const e=t;return Nr(e.directory??null)??Nr(e.project?.worktree??null)},D1=(t,e)=>{if(!e)return t;const n=t,o=e,s=Nr(n.directory??null),r=Nr(n.project?.worktree??null),i=Nr(o.directory??null),l=Nr(o.project?.worktree??null);let c=!1;const d={...n};return!s&&i&&(d.directory=o.directory,c=!0),!r&&l?(d.project={...o.project??{},...n.project??{},worktree:o.project?.worktree},c=!0):!n.project&&o.project&&(d.project=o.project,c=!0),c?d:t},Oa=t=>{const e=new Map;for(const n of t){const o=B1(n);if(!o)continue;const s=e.get(o);if(s){s.push(n);continue}e.set(o,[n])}return e},M0=t=>[t.id,t.title??"",t.time?.created??0,t.time?.updated??0,t.time?.archived??0,t.share?.url??"",B1(t)??""].join(":"),A0=(t,e)=>{if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(M0(t[n])!==M0(e[n]))return!1;return!0},h6=t=>{const e=t.time?.updated;if(typeof e=="number"&&Number.isFinite(e))return e;const n=t.time?.created;return typeof n=="number"&&Number.isFinite(n)?n:0},sS=t=>[...t].sort((e,n)=>{const o=h6(n)-h6(e);return o!==0?o:n.id.localeCompare(e.id)}),rS=t=>{const e=new Set;for(const n of t){const o=Nr(n);o&&e.add(o)}return e},p6=(t,e,n)=>{if(n.size===0)return t;const o=new Map(t.map(i=>[i.id,i])),s=new Map;for(const i of e)i?.id&&s.set(i.id,D1(i,o.get(i.id)));const r=t.filter(i=>{if(s.has(i.id))return!1;const l=B1(i);return!l||!n.has(l)});return sS([...s.values(),...r])},g6=async(t,e,n)=>{const o=await Promise.allSettled([...e].map(async l=>({directory:l,sessions:await k0(t,{directory:l,archived:n,pageSize:Fd})}))),s=new Set,r=[],i=[];for(const l of o)l.status==="fulfilled"?(s.add(l.value.directory),r.push(...l.value.sessions)):i.push(l.reason);return{directories:s,sessions:r,errors:i}},b6=(t,e)=>{const n=t.findIndex(r=>r.id===e.id);if(n===-1)return[e,...t];const o=D1(e,t[n]);if(M0(t[n])===M0(o))return t;const s=[...t];return s[n]=o,s},tc=(t,e)=>{if(!e||e.length===0)return t;if(t.length===0)return e;const n=new Map(t.map(r=>[r.id,r]));e.forEach(r=>{n.set(r.id,D1(r,n.get(r.id)))});const o=[],s=new Set;return t.forEach(r=>{const i=n.get(r.id);i&&(o.push(i),s.add(r.id))}),e.forEach(r=>{if(s.has(r.id))return;const i=n.get(r.id);i&&(o.push(i),s.add(r.id))}),o},nc=(t,e,n,o)=>{const s=A0(t.activeSessions,e)?t.activeSessions:e,r=A0(t.archivedSessions,n)?t.archivedSessions:n,i=s===t.activeSessions?t.sessionsByDirectory:Oa(s);return s===t.activeSessions&&r===t.archivedSessions&&i===t.sessionsByDirectory&&t.hasLoaded&&t.status===o?t:{activeSessions:s,archivedSessions:r,sessionsByDirectory:i,hasLoaded:!0,status:o}},_n=Jt((t,e)=>({activeSessions:[],archivedSessions:[],sessionsByDirectory:new Map,hasLoaded:!1,status:"idle",applySnapshot:(n,o,s="ready")=>{t(r=>nc(r,n,o,s))},loadSessions:async n=>Ca||(t(o=>o.status==="loading"?o:{status:"loading"}),Ca=(async()=>{const o=e();try{const s=Je.getSdkClient(),[r,i]=await Promise.allSettled([k0(s,{archived:!1,pageSize:Fd}),k0(s,{archived:!0,pageSize:Fd})]),l=tc(o.activeSessions,n),c=r.status==="fulfilled"?r.value:l,d=i.status==="fulfilled"?i.value:o.archivedSessions;return r.status==="rejected"&&console.warn("[GlobalSessions] Failed to load active sessions, preserving existing snapshot with fallback merge:",r.reason),i.status==="rejected"&&console.warn("[GlobalSessions] Failed to load archived sessions, preserving current snapshot:",i.reason),t(u=>nc(u,c,d,"ready")),{activeSessions:c,archivedSessions:d}}catch(s){const r=tc(o.activeSessions,n),i=o.archivedSessions;return console.warn("[GlobalSessions] Failed to load sessions, using fallback snapshot:",s),t(l=>nc(l,r,i,"error")),{activeSessions:r,archivedSessions:i}}finally{Ca=null}})(),Ca),refreshSessionsForDirectories:async(n,o)=>{const s=rS(n);if(s.size===0){const d=e();return{activeSessions:d.activeSessions,archivedSessions:d.archivedSessions}}const r=Je.getSdkClient(),[i,l]=await Promise.all([g6(r,s,!1),g6(r,s,!0)]);i.errors.length>0&&console.warn("[GlobalSessions] Failed to refresh active sessions for some directories:",i.errors[0]),l.errors.length>0&&console.warn("[GlobalSessions] Failed to refresh archived sessions for some directories:",l.errors[0]),t(d=>{let u=p6(d.activeSessions,i.sessions,i.directories);u=tc(u,o),A0(d.activeSessions,u)&&(u=d.activeSessions);let f=p6(d.archivedSessions,l.sessions,l.directories);A0(d.archivedSessions,f)&&(f=d.archivedSessions);const m=u===d.activeSessions?d.sessionsByDirectory:Oa(u);return u===d.activeSessions&&f===d.archivedSessions&&m===d.sessionsByDirectory?d:{activeSessions:u,archivedSessions:f,sessionsByDirectory:m}});const c=e();return{activeSessions:c.activeSessions,archivedSessions:c.archivedSessions}},upsertSession:n=>{t(o=>{const s=o.activeSessions.find(d=>d.id===n.id)??o.archivedSessions.find(d=>d.id===n.id)??null,r=D1(n,s),i=!!r.time?.archived,l=i?o.activeSessions.filter(d=>d.id!==n.id):b6(o.activeSessions,r),c=i?b6(o.archivedSessions,r):o.archivedSessions.filter(d=>d.id!==n.id);return l===o.activeSessions&&c===o.archivedSessions?o:{activeSessions:l,archivedSessions:c,sessionsByDirectory:l===o.activeSessions?o.sessionsByDirectory:Oa(l)}})},removeSessions:n=>{const o=n instanceof Set?n:new Set(n);o.size!==0&&t(s=>{const r=s.activeSessions.filter(l=>!o.has(l.id)),i=s.archivedSessions.filter(l=>!o.has(l.id));return r.length===s.activeSessions.length&&i.length===s.archivedSessions.length?s:{activeSessions:r,archivedSessions:i,sessionsByDirectory:Oa(r)}})},archiveSessions:(n,o=Date.now())=>{const s=n instanceof Set?n:new Set(n);s.size!==0&&t(r=>{const i=[],l=r.activeSessions.filter(d=>s.has(d.id)?(i.push({...d,time:{...d.time,archived:o}}),!1):!0);if(i.length===0)return r;const c=r.archivedSessions.filter(d=>!s.has(d.id));return{activeSessions:l,archivedSessions:[...i,...c],sessionsByDirectory:Oa(l)}})}})),_d=async t=>{const e=_n.getState();return e.hasLoaded&&e.status!=="error"?{activeSessions:e.activeSessions,archivedSessions:e.archivedSessions}:e.loadSessions(t)},iS=async t=>_n.getState().loadSessions(t),kJ=async(t,e)=>_n.getState().refreshSessionsForDirectories(t,e),z4="oc.sessions.folders",O4="oc.sessions.folderCollapse",Pm="/api/session-folders",aS=250,lS="__archived__:",na=Pn();let u2=null,oc=!1,sc=!1,Bd,Dd,Ya=null,Ja=null;const Em=()=>typeof window>"u"?!1:Ht()?!0:window.__VSCODE_CONFIG__!==void 0,cS=(t,e)=>{if(typeof window>"u"||Em())return;u2&&clearTimeout(u2);const n=JSON.parse(JSON.stringify(t)),o=Array.from(e);u2=setTimeout(()=>{u2=null;const s={version:1,foldersMap:n,collapsedFolderIds:o,updatedAt:Date.now()};We(Pm,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).catch(()=>{})},aS)},dS=()=>{try{const t=na.getItem(z4);if(!t)return{};const e=JSON.parse(t);if(!e||typeof e!="object"||Array.isArray(e))return{};const n={};for(const[o,s]of Object.entries(e)){if(!Array.isArray(s))continue;const r=[];for(const i of s){if(!i||typeof i!="object")continue;const l=i,c=typeof l.id=="string"?l.id.trim():"",d=typeof l.name=="string"?l.name.trim():"",u=typeof l.createdAt=="number"?l.createdAt:0;if(!c||!d)continue;const f=Array.isArray(l.sessionIds)?l.sessionIds.filter(h=>typeof h=="string"&&h.trim().length>0):[],m=typeof l.parentId=="string"?l.parentId:null;r.push({id:c,name:d,sessionIds:f,createdAt:u,parentId:m})}r.length>0&&(n[o]=r)}return n}catch{return{}}},uS=()=>{try{const t=na.getItem(O4);if(!t)return new Set;const e=JSON.parse(t);return Array.isArray(e)?new Set(e.filter(n=>typeof n=="string")):new Set}catch{return new Set}},Hm=t=>{Ya=t,clearTimeout(Bd),Bd=setTimeout(()=>{try{na.setItem(z4,JSON.stringify(t)),Ya=null}catch{}},300)},Im=t=>{Ja=t,clearTimeout(Dd),Dd=setTimeout(()=>{try{na.setItem(O4,JSON.stringify(Array.from(t))),Ja=null}catch{}},300)};typeof window<"u"&&window.addEventListener("beforeunload",()=>{if(Ya!==null){clearTimeout(Bd);try{na.setItem(z4,JSON.stringify(Ya))}catch{}Ya=null}if(Ja!==null){clearTimeout(Dd);try{na.setItem(O4,JSON.stringify(Array.from(Ja)))}catch{}Ja=null}});const cs=(t,e)=>{Hm(t),Im(e),cS(t,e)},fS=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`folder_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,Sa=(t,e,n)=>{const o=new Set(e.map(r=>r.id));let s=null;for(const r of t)!o.has(r.id)&&n.has(r.id)&&(s||(s=new Set(n)),s.delete(r.id));return s},mS=(t,e)=>t.startsWith(lS)?e.filter(n=>n.sessionIds.length>0):e,Td=Jt()(Un((t,e)=>({foldersMap:dS(),collapsedFolderIds:uS(),getFoldersForScope:n=>n?e().foldersMap[n]??[]:[],createFolder:(n,o,s)=>{const r=o.trim()||"New folder",i={id:fS(),name:r,sessionIds:[],createdAt:Date.now(),parentId:s??null},l=e().foldersMap,c=l[n]??[],d={...l,[n]:[...c,i]};return t({foldersMap:d}),cs(d,e().collapsedFolderIds),i},renameFolder:(n,o,s)=>{const r=s.trim();if(!r||!n)return;const i=e().foldersMap,l=i[n];if(!l)return;const c=l.map(u=>u.id===o?{...u,name:r}:u),d={...i,[n]:c};t({foldersMap:d}),cs(d,e().collapsedFolderIds)},deleteFolder:(n,o)=>{if(!n)return;const s=e().foldersMap,r=s[n];if(!r)return;const i=new Set([o]);let l=!0;for(;l;){l=!1;for(const m of r)m.parentId&&i.has(m.parentId)&&!i.has(m.id)&&(i.add(m.id),l=!0)}const c=r.filter(m=>!i.has(m.id)),d={...s,[n]:c};t({foldersMap:d}),cs(d,e().collapsedFolderIds);const u=e().collapsedFolderIds;if(Array.from(i).some(m=>u.has(m))){const m=new Set(u);i.forEach(h=>m.delete(h)),t({collapsedFolderIds:m}),cs(d,m)}},addSessionToFolder:(n,o,s)=>{if(!n||!o||!s)return;const r=e().foldersMap,i=r[n];if(!i)return;const l=i.map(u=>{const f=u.sessionIds.filter(m=>m!==s);return u.id===o?{...u,sessionIds:[...f,s]}:f.length!==u.sessionIds.length?{...u,sessionIds:f}:u}),c={...r,[n]:l},d=Sa(i,l,e().collapsedFolderIds);t(d?{foldersMap:c,collapsedFolderIds:d}:{foldersMap:c}),cs(c,d??e().collapsedFolderIds)},addSessionsToFolder:(n,o,s)=>{if(!n||!o||s.length===0)return;const r=e().foldersMap,i=r[n];if(!i)return;const l=new Set(s.filter(f=>typeof f=="string"&&f.length>0));if(l.size===0)return;const c=i.map(f=>{const m=f.sessionIds.filter(h=>!l.has(h));return f.id===o?{...f,sessionIds:[...m,...l]}:m.length!==f.sessionIds.length?{...f,sessionIds:m}:f}),d={...r,[n]:c},u=Sa(i,c,e().collapsedFolderIds);t(u?{foldersMap:d,collapsedFolderIds:u}:{foldersMap:d}),cs(d,u??e().collapsedFolderIds)},removeSessionsFromFolders:(n,o)=>{if(!n||o.length===0)return;const s=e().foldersMap,r=s[n];if(!r)return;const i=new Set(o.filter(f=>typeof f=="string"&&f.length>0));if(i.size===0)return;let l=!1;const c=r.map(f=>{const m=f.sessionIds.filter(h=>!i.has(h));return m.length!==f.sessionIds.length?(l=!0,{...f,sessionIds:m}):f});if(!l)return;const d={...s,[n]:c},u=Sa(r,c,e().collapsedFolderIds);t(u?{foldersMap:d,collapsedFolderIds:u}:{foldersMap:d}),cs(d,u??e().collapsedFolderIds)},removeSessionFromFolder:(n,o)=>{if(!n||!o)return;const s=e().foldersMap,r=s[n];if(!r)return;let i=!1;const l=r.map(u=>{const f=u.sessionIds.filter(m=>m!==o);return f.length!==u.sessionIds.length?(i=!0,{...u,sessionIds:f}):u});if(!i)return;const c={...s,[n]:l},d=Sa(r,l,e().collapsedFolderIds);t(d?{foldersMap:c,collapsedFolderIds:d}:{foldersMap:c}),cs(c,d??e().collapsedFolderIds)},toggleFolderCollapse:n=>{const o=e().collapsedFolderIds,s=new Set(o);s.has(n)?s.delete(n):s.add(n),t({collapsedFolderIds:s}),cs(e().foldersMap,s)},cleanupSessions:(n,o)=>{if(!n)return;const s=e().foldersMap,r=s[n];if(!r||r.length===0)return;let i=!1;const l=r.map(f=>{const m=f.sessionIds.filter(h=>o.has(h));return m.length!==f.sessionIds.length?(i=!0,{...f,sessionIds:m}):f}),c=mS(n,l);if(c.length!==l.length&&(i=!0),!i)return;const d={...s,[n]:c},u=Sa(r,c,e().collapsedFolderIds);t(u?{foldersMap:d,collapsedFolderIds:u}:{foldersMap:d}),cs(d,u??e().collapsedFolderIds)},getSessionFolderId:(n,o)=>{if(!n||!o)return null;const s=e().foldersMap[n];if(!s)return null;for(const r of s)if(r.sessionIds.includes(o))return r.id;return null}}),{name:"session-folders-store"})),hS=async()=>{if(!(oc||sc||typeof window>"u")){if(Em()){oc=!0;return}sc=!0;try{const t=await We(Pm).catch(()=>null);if(!t||!t.ok)return;const e=await t.json().catch(()=>null);if(!e)return;const n=e.foldersMap&&typeof e.foldersMap=="object"?e.foldersMap:{},o=Array.isArray(e.collapsedFolderIds)?new Set(e.collapsedFolderIds.filter(r=>typeof r=="string")):new Set;if(!(Object.keys(n).length>0||o.size>0))return;Td.setState({foldersMap:n,collapsedFolderIds:o}),Hm(n),Im(o)}catch{}finally{sc=!1,oc=!0}}},pS=()=>{typeof window>"u"||hS()};pS();const $i=new Map,y6=t=>{$i.set(t,($i.get(t)??0)+1)},gS=t=>($i.get(t)??0)>0,bS=t=>{const e=$i.get(t)??0;return e<=0?!1:(e===1?$i.delete(t):$i.set(t,e-1),!0)},$4=t=>t.filter(o=>o?.type==="text").map(o=>(o.text||o.content||"").trim()).filter(o=>o.length>0).join(`
4
4
  `).replace(/\n\s*\n+/g,`
@@ -410,7 +410,7 @@ Use @filename to include file contents.`,"settings.commands.page.templateHint.us
410
410
  [Process exited{exitCodeSegment}{signalSegment}]\r
411
411
  `,"terminalView.stream.processExitedWithCode":" with code {exitCode}","terminalView.stream.processExitedWithSignal":" (signal {signal})","terminalView.error.sessionEnded":"Terminal session ended","terminalView.error.connectionFailed":"Connection failed: {message}","terminalView.error.startSessionFailed":"Failed to start terminal session","terminalView.error.restartFailed":"Failed to restart terminal","terminalView.error.sendInputFailed":"Failed to send input","terminalView.empty.noWorkingDirectory":"No working directory available for terminal.","terminalView.empty.selectSession":"Select a session to open the terminal.","terminalView.empty.noWorkingDirectoryForSession":"No working directory available for this session.","terminalView.actions.retry":"Retry","terminalView.actions.hardRestart":"Hard Restart","terminalView.actions.hardRestartTitle":"Force kill and create fresh session","terminalView.quickKeys.escape":"Esc","terminalView.quickKeys.tabAria":"Tab","terminalView.quickKeys.controlLabel":"Ctrl","terminalView.quickKeys.controlModifierAria":"Control modifier","terminalView.quickKeys.commandModifierAria":"Command modifier","terminalView.quickKeys.arrowUpAria":"Arrow up","terminalView.quickKeys.arrowLeftAria":"Arrow left","terminalView.quickKeys.arrowDownAria":"Arrow down","terminalView.quickKeys.arrowRightAria":"Arrow right","terminalView.quickKeys.enterAria":"Enter","terminalView.tabs.closeTabTitle":"Close tab","terminalView.tabs.newTabTitle":"New tab","terminalView.bottomDock.resizeAria":"Resize terminal panel","terminalView.bottomDock.restoreTitle":"Restore terminal panel height","terminalView.bottomDock.restoreAria":"Restore terminal panel height","terminalView.bottomDock.expandTitle":"Expand terminal panel","terminalView.bottomDock.expandAria":"Expand terminal panel","terminalView.bottomDock.closeTitle":"Close terminal panel","terminalView.bottomDock.closeAria":"Close terminal panel","terminalView.viewport.inputAria":"Terminal input","directoryExplorerDialog.title":"Add project directory","directoryExplorerDialog.description":"Choose a folder to add as a project.","directoryExplorerDialog.toggle.showHidden":"Show hidden","directoryExplorerDialog.pathInput.placeholder":"Enter path or select from tree...","directoryExplorerDialog.actions.openingFinder":"Opening...","directoryExplorerDialog.actions.openInFinder":"Open in Finder","directoryExplorerDialog.actions.adding":"Adding...","directoryExplorerDialog.actions.addProject":"Add project","directoryExplorerDialog.actions.addLocalProject":"Add local project","directoryExplorerDialog.actions.cloneRepository":"Clone repository","directoryExplorerDialog.actions.cloneAndAdd":"Clone & add","directoryExplorerDialog.actions.cloning":"Cloning...","directoryExplorerDialog.actions.createAndAdd":"Create & add","directoryExplorerDialog.actions.alreadyAdded":"Already added","directoryExplorerDialog.clone.remoteUrlPlaceholder":"Repository URL (HTTPS or SSH)","directoryExplorerDialog.browse.directories":"Directories","directoryExplorerDialog.browse.loading":"Loading directories...","directoryExplorerDialog.browse.empty":"No matching directories.","directoryExplorerDialog.browse.parentDirectory":"Parent directory","directoryExplorerDialog.browse.addedBadge":"Added","directoryExplorerDialog.browse.quickAdd":"Add","directoryExplorerDialog.footer.navigate":"Navigate","directoryExplorerDialog.footer.select":"Select","directoryExplorerDialog.footer.add":"Add","directoryExplorerDialog.shortcut.enter":"Enter","directoryExplorerDialog.toast.unableToAccessDirectory":"Unable to access directory","directoryExplorerDialog.toast.desktopDeniedAccess":"Desktop denied directory access.","directoryExplorerDialog.toast.failedToOpenDirectory":"Failed to open directory","directoryExplorerDialog.toast.desktopCouldNotGrantAccess":"Desktop could not grant file access.","directoryExplorerDialog.toast.failedToAddProject":"Failed to add project","directoryExplorerDialog.toast.cloneUrlRequired":"Enter a repository URL before cloning.","directoryExplorerDialog.toast.selectValidDirectoryPath":"Please select a valid directory path.","directoryExplorerDialog.toast.failedToSelectDirectory":"Failed to select directory","directoryExplorerDialog.toast.unknownError":"Unknown error occurred.","directoryTree.actions.createNewDirectory":"Create new directory","directoryTree.actions.pinDirectory":"Pin directory","directoryTree.actions.unpinDirectory":"Unpin directory","directoryTree.actions.createDirectory":"Create directory","directoryTree.actions.cancel":"Cancel","directoryTree.actions.selectWorkingDirectoryAria":"Select working directory","directoryTree.state.locatingHomeDirectory":"Locating home directory...","directoryTree.state.loading":"Loading...","directoryTree.state.noDirectoriesFound":"No directories found","directoryTree.section.pinned":"Pinned","directoryTree.section.browse":"Browse","aboutDialog.versionLabel":"Version {version}","aboutDialog.openChamberVersionLabel":"OpenChamber version {version}","aboutDialog.openCodeVersionLabel":"OpenCode version {version}","aboutDialog.actions.copyDiagnostics":"Copy diagnostics","aboutDialog.actions.preparingDiagnostics":"Preparing diagnostics...","aboutDialog.actions.diagnosticsCopied":"Diagnostics copied","aboutDialog.diagnosticsDescription":"Includes OpenChamber state, OpenCode health, directories, and projects.","aboutDialog.footerNote":"Made with love for the community","aboutDialog.toast.copyFailed":"Copy failed","aboutDialog.toast.diagnosticsNotReady":"Diagnostics not ready yet. Wait a second and retry.","aboutDialog.toast.diagnosticsCopied":"Diagnostics copied","helpDialog.title":"Keyboard Shortcuts","helpDialog.description":"Use these keyboard shortcuts to navigate OpenChamber efficiently","helpDialog.section.navigationCommands":"Navigation & Commands","helpDialog.section.sessionManagement":"Session Management","helpDialog.section.panels":"Panels","helpDialog.section.interface":"Interface","helpDialog.item.openCommandPalette":"Open Command Palette","helpDialog.item.showKeyboardShortcuts":"Show Keyboard Shortcuts (this dialog)","helpDialog.item.toggleSessionSidebar":"Toggle Session Sidebar","helpDialog.item.cycleAgent":"Cycle Agent (chat input)","helpDialog.item.openModelSelector":"Open Model Selector","helpDialog.item.navigateModels":"Navigate Models (in picker)","helpDialog.item.adjustThinkingMode":"Adjust Thinking Mode (in picker, when supported)","helpDialog.item.cycleThinkingVariant":"Cycle Thinking Variant (global shortcut)","helpDialog.item.newWindow":"New Window (desktop only)","helpDialog.item.createNewSession":"Create New Session","helpDialog.item.createNewWorktreeDraft":"Create New Worktree Draft","helpDialog.item.focusChatInput":"Focus Chat Input","helpDialog.item.abortActiveRun":"Abort active run (double press)","helpDialog.item.toggleRightSidebar":"Toggle Right Sidebar","helpDialog.item.openRightSidebarGitTab":"Open Right Sidebar Git Tab","helpDialog.item.openRightSidebarFilesTab":"Open Right Sidebar Files Tab","helpDialog.item.cycleRightSidebarTab":"Cycle Right Sidebar Tab","helpDialog.item.toggleTerminalDock":"Toggle Terminal Dock","helpDialog.item.toggleTerminalExpanded":"Toggle Terminal Expanded","helpDialog.item.togglePlanContextPanel":"Toggle Plan Context Panel","helpDialog.item.cycleTheme":"Cycle Theme (Light → Dark → System)","helpDialog.item.switchProject":"Switch Project","helpDialog.item.toggleServicesMenu":"Toggle Services Menu","helpDialog.item.cycleServicesTab":"Cycle Services Tab","helpDialog.item.openSettings":"Open Settings","helpDialog.keyCombiner.or":"or","helpDialog.proTips.title":"Pro Tips:","helpDialog.proTips.commandPalette":"Use Command Palette ({shortcut}) to quickly access all actions","helpDialog.proTips.recentSessions":"The 5 most recent sessions appear in the Command Palette","helpDialog.proTips.themeCycling":"Theme cycling remembers your preference across sessions","header.actions.rightSidebarWithShortcut":"Right sidebar ({shortcut})","header.actions.toggleRightSidebarAria":"Toggle right sidebar","header.actions.openAppMenu":"OpenChamber menu","header.actions.openAppMenuAria":"Open OpenChamber menu","header.actions.openSessionsWithShortcut":"Open sessions ({shortcut})","header.actions.openSessionsAria":"Open sessions","header.actions.closeSessionsAria":"Close sessions","header.actions.newSessionAria":"New session","header.actions.newSessionWithShortcut":"New session ({shortcut})","header.actions.backAria":"Back","header.navigation.mainAria":"Main navigation","header.sessions.title":"Sessions","header.changes.availableAria":"Changes available","session.githubIssuePicker.error.noActiveProject":"No active project","session.githubIssuePicker.error.runtimeUnavailable":"GitHub runtime API unavailable","session.githubIssuePicker.error.notConnected":"GitHub not connected","session.githubIssuePicker.error.repoNotResolvable":"Repo not resolvable","session.githubIssuePicker.error.repoMustBeGithub":"origin remote must be a GitHub URL","session.githubIssuePicker.error.issueNotFound":"Issue not found","session.githubIssuePicker.error.noModelSelected":"No model selected","session.githubIssuePicker.toast.loadMoreFailed":"Failed to load more issues","session.githubIssuePicker.toast.loadIssueDetailsFailed":"Failed to load issue details","session.githubIssuePicker.toast.sendContextFailed":"Failed to send issue context","session.githubIssuePicker.toast.sessionCreated":"Session created from issue","session.githubIssuePicker.toast.startSessionFailed":"Failed to start session","session.githubIssuePicker.title.select":"Link GitHub Issue","session.githubIssuePicker.title.createSession":"New Session From GitHub Issue","session.githubIssuePicker.description.select":"Select an issue to link to this session.","session.githubIssuePicker.description.createSession":"Seeds a new session with hidden issue context (title/body/labels/comments).","session.githubIssuePicker.searchPlaceholder":"Search by title or #123, or paste issue URL","session.githubIssuePicker.empty.noActiveProject":"No active project selected.","session.githubIssuePicker.empty.runtimeUnavailable":"GitHub runtime API unavailable.","session.githubIssuePicker.empty.notConnected":"GitHub not connected. Connect your GitHub account in settings.","session.githubIssuePicker.empty.noIssuesFound":"No issues found","session.githubIssuePicker.empty.noOpenIssuesFound":"No open issues found","session.githubIssuePicker.loading.issues":"Loading issues...","session.githubIssuePicker.loading.more":"Loading...","session.githubIssuePicker.actions.openSettings":"Open settings","session.githubIssuePicker.actions.useIssue":"Use issue #{number}","session.githubIssuePicker.actions.openInGitHubAria":"Open in GitHub","session.githubIssuePicker.actions.loadMore":"Load more","session.githubIssuePicker.actions.sectionTitle":"Actions","session.githubIssuePicker.actions.toggleWorktreeAria":"Toggle worktree","session.githubIssuePicker.actions.createInWorktree":"Create in worktree","session.githubIssuePicker.actions.openRepo":"Open Repo","session.githubIssuePicker.actions.refresh":"Refresh","session.githubPrPicker.error.noActiveProject":"No active project","session.githubPrPicker.error.runtimeUnavailable":"GitHub runtime API unavailable","session.githubPrPicker.error.notConnected":"GitHub not connected","session.githubPrPicker.error.prNotFound":"Pull request not found","session.githubPrPicker.error.repoNotResolvable":"Repo not resolvable","session.githubPrPicker.error.repoMustBeGithub":"origin remote must be a GitHub URL","session.githubPrPicker.toast.loadMoreFailed":"Failed to load more pull requests","session.githubPrPicker.toast.loadDetailsFailed":"Failed to load pull request details","session.githubPrPicker.title":"Link GitHub Pull Request","session.githubPrPicker.description":"Select a pull request to attach review context to this message.","session.githubPrPicker.searchPlaceholder":"Search by title or #123, or paste pull request URL","session.githubPrPicker.includeDiffAria":"Include PR diff in attached context","session.githubPrPicker.includeDiff":"Include PR diff","session.githubPrPicker.empty.noActiveProject":"No active project selected.","session.githubPrPicker.empty.runtimeUnavailable":"GitHub runtime API unavailable.","session.githubPrPicker.empty.notConnected":"GitHub not connected. Connect your GitHub account in settings.","session.githubPrPicker.empty.noPullRequestsFound":"No pull requests found","session.githubPrPicker.empty.noOpenPullRequestsFound":"No open pull requests found","session.githubPrPicker.loading.pullRequests":"Loading pull requests...","session.githubPrPicker.loading.more":"Loading...","session.githubPrPicker.actions.openSettings":"Open settings","session.githubPrPicker.actions.usePullRequest":"Use pull request #{number}","session.githubPrPicker.actions.openInGitHubAria":"Open in GitHub","session.githubPrPicker.actions.loadMore":"Load more","session.newWorktree.title":"New Worktree","session.newWorktree.mode.newBranch":"New Branch","session.newWorktree.mode.existingBranch":"Existing Branch","session.newWorktree.selectBranch":"Select Branch","session.newWorktree.chooseBranch":"Choose a branch...","session.newWorktree.fetchBranches":"Fetch branches","session.newWorktree.searchBranches":"Search branches...","session.newWorktree.loadingBranches":"Loading branches...","session.newWorktree.noBranchesFound":"No branches found","session.newWorktree.matchingBranches":"Matching branches","session.newWorktree.noMatchingBranches":"No matching branches","session.newWorktree.localBranches":"Local branches","session.newWorktree.remoteBranches":"Remote branches","session.newWorktree.otherLocalBranches":"Other local branches","session.newWorktree.otherRemoteBranches":"Other remote branches","session.newWorktree.branchName":"Branch Name","session.newWorktree.branchNamePlaceholder":"feature/my-awesome-feature","session.newWorktree.actions.change":"Change","session.newWorktree.actions.startFromGitHubIssuePr":"Start from GitHub Issue/PR","session.newWorktree.usingPrBranch":"Using PR branch: {branch}","session.newWorktree.fromIssue":"From issue #{number}: {title}","session.newWorktree.worktreeDirectory":"Worktree Directory","session.newWorktree.worktreeDirectoryPlaceholder":"my-worktree-directory","session.newWorktree.resetToMatchBranchName":"Reset to match branch name","session.newWorktree.sourceBranch":"Source Branch","session.newWorktree.selectSourceBranch":"Select Source Branch","session.newWorktree.selectSourceBranchPlaceholder":"Select source branch...","session.newWorktree.newBranchFromSource":"New branch will be created from {source}","session.newWorktree.issueNumber":"Issue #{number}","session.newWorktree.prNumber":"PR #{number}","session.newWorktree.includeDiffBadge":"+diff","session.newWorktree.newSessionTitle":"New session","session.newWorktree.fromSource":"from {source}","session.newWorktree.actions.cancel":"Cancel","session.newWorktree.actions.creating":"Creating...","session.newWorktree.actions.createWorktree":"Create Worktree","session.newWorktree.actions.reset":"Reset","session.newWorktree.error.noModelSelected":"No model selected","session.newWorktree.error.noActiveProject":"No active project","session.newWorktree.error.branchNameRequired":"Branch name is required","session.newWorktree.error.worktreeDirectoryRequired":"Worktree directory is required","session.newWorktree.error.sendGitHubContextFailed":"Failed to send GitHub context","session.newWorktree.error.createWorktreeFailed":"Failed to create worktree","session.newWorktree.toast.sessionFromIssue":"Session created from issue","session.newWorktree.toast.sessionFromPr":"Session created from PR","session.newWorktree.toast.worktreeCreated":"Worktree created","session.newWorktree.toast.worktreeCreatedDescription":"{target} - bootstrapping in background","session.githubIntegration.title":"Select from GitHub","session.githubIntegration.tabs.issues":"Issues","session.githubIntegration.tabs.pullRequests":"Pull Requests","session.githubIntegration.connect.title":"Connect to GitHub","session.githubIntegration.connect.description":"Link issues or pull requests to auto-fill worktree details","session.githubIntegration.connect.action":"Connect GitHub","session.githubIntegration.search.issuesPlaceholder":"Search issues or enter #123...","session.githubIntegration.search.prsPlaceholder":"Search PRs or enter #456...","session.githubIntegration.empty.noIssuesFound":"No issues found","session.githubIntegration.empty.noPullRequestsFound":"No pull requests found","session.githubIntegration.actions.loadMore":"Load more","session.githubIntegration.actions.cancel":"Cancel","session.githubIntegration.actions.select":"Select","session.githubIntegration.selected.issueNumber":"Issue #{number}","session.githubIntegration.selected.prNumber":"PR #{number}","session.githubIntegration.includeDiffAria":"Include PR diff in session context","session.githubIntegration.includeDiff":"Include PR diff","session.githubIntegration.error.notConnected":"GitHub not connected","session.githubIntegration.error.loadDataFailed":"Failed to load data","session.githubIntegration.validation.branchAlreadyCheckedOut":"Branch is already checked out in a worktree","session.githubIntegration.validation.branchAlreadyExists":"Branch already exists locally","session.githubIntegration.validation.failed":"Validation failed","chat.fileAttachment.toast.attachFailed":"Failed to attach file","chat.fileAttachment.toast.someFilesSkipped":`Some files were skipped:
412
412
  {summary}`,"chat.fileAttachment.toast.vscodePickFailed":"Failed to pick files in VS Code","chat.fileAttachment.fileFallback":"file","chat.fileAttachment.skippedFallback":"skipped","chat.fileAttachment.actions.attachAria":"Attach files","chat.fileAttachment.actions.attach":"Attach files","chat.fileAttachment.actions.removeNamed":"Remove {name}","chat.fileAttachment.actions.removeImage":"Remove image","chat.fileAttachment.activeEditor.addFile":"Add file:{name} to context","chat.fileAttachment.activeEditor.pinSelection":"Pin selection to context","chat.fileAttachment.activeEditor.remove":"Remove from context","chat.pendingChanges.fileCountSingle":"{count} file","chat.pendingChanges.fileCountPlural":"{count} files","chat.pendingChanges.changedInWorkspace":"changed in workspace","chat.changedFiles.title":"Changed files","chat.changedFiles.actions.openFileTitle":"Open {path}","chat.emptyState.opencodeUnreachable":"OpenCode is not reachable","chat.emptyState.startNewChat":"Start a new chat","chat.emptyState.draftTitle":"What are we working on?","chat.emptyState.draftTitleWithProject":"What are we working on in {project}?","chat.draftPresets.explore.label":"Explore the codebase","chat.draftPresets.catchup.label":"Catch me up","chat.draftPresets.weigh.label":"Weigh my options","chat.draftPresets.plan.label":"Start feature planning","chat.draftPresets.debug.label":"Debug an issue","chat.draftPresets.review.label":"Review my changes","chat.draftStarters.add":"Add a starter","chat.draftStarters.searchPlaceholder":"Search commands and skills…","chat.draftStarters.empty":"Nothing to add","chat.draftStarters.sectionBuiltIn":"Built-in","chat.draftStarters.sectionCommands":"Commands","chat.draftStarters.sectionSkills":"Skills","chat.draftStarters.remove":"Remove","chat.scrollToBottom.aria":"Scroll to bottom","chat.timeline.relative.justNow":"just now","chat.timeline.relative.minutesAgo":"{count}m ago","chat.timeline.relative.hoursAgo":"{count}h ago","chat.timeline.relative.daysAgo":"{count}d ago","chat.timeline.title":"Conversation Timeline","chat.timeline.description":"Navigate to any point in the conversation or fork a new session","chat.timeline.searchPlaceholder":"Search messages...","chat.timeline.empty.search":"No messages found","chat.timeline.empty.session":"No messages in this session yet","chat.timeline.noTextContent":"[No text content]","chat.timeline.actions.title":"Actions","chat.timeline.actions.revertFromHere":"Revert from here","chat.timeline.actions.forkFromHere":"Fork from here","chat.timeline.actions.previousTurn":"Previous turn","chat.timeline.actions.latest":"Latest","chat.timeline.help.clickMessage":"Click on a message to scroll to it in the conversation","chat.timeline.help.undoToPoint":"Undo to this point (message text will populate input)","chat.timeline.help.createSessionFromHere":"Create a new session starting from here","chat.statusRow.todo.status.inProgress":"In progress","chat.statusRow.todo.status.pending":"Pending","chat.statusRow.todo.status.completed":"Completed","chat.statusRow.todo.status.cancelled":"Cancelled","chat.statusRow.todo.priority.high":"High priority","chat.statusRow.todo.priority.medium":"Medium priority","chat.statusRow.todo.priority.low":"Low priority","chat.statusRow.actions.stopGeneratingAria":"Stop generating","chat.statusRow.tasksTitle":"Tasks","chat.statusRow.summary.activeLeft":"{active} active · {left} left","chat.statusRow.aborted":"Aborted","chat.revertIndicator.redo":"Redo","chat.revertIndicator.redoAria":"Redo — restore reverted messages","chat.revertPopover.title":"Reverted","chat.revertPopover.noTextContent":"No text content","chat.revertPopover.forkFromHere":"Fork from here","chat.revertPopover.forkFromMessage":"Fork from this message","chat.revertPopover.restoreAll":"Restore all","chat.revertPopover.restore":"Restore","chat.revertPopover.revert":"Revert","chat.revertPopover.fork":"Fork","chat.revert.toast.undo":"Reverted to {preview}","chat.revert.toast.redo":"Redone","chat.revert.toast.restored":"Restored all messages","chat.errorBoundary.title":"Chat Error","chat.errorBoundary.description":"The chat interface encountered an error. This might be due to a temporary network issue or corrupted message data.","chat.errorBoundary.sessionLabel":"Session","chat.errorBoundary.detailsSummary":"Error details","chat.errorBoundary.resetAction":"Reset Chat","chat.errorBoundary.persistentHint":"If the problem persists, try refreshing the page.","chat.autocomplete.tabs.commands":"Commands","chat.autocomplete.tabs.agents":"Agents","chat.autocomplete.tabs.files":"Files","chat.autocomplete.keyboardHint":"↑↓ navigate • Enter select • Esc close","chat.commandAutocomplete.command.initDescription":"Create/update AGENTS.md file","chat.commandAutocomplete.command.undoDescription":"Undo the last message","chat.commandAutocomplete.command.redoDescription":"Redo previously undone messages","chat.commandAutocomplete.command.timelineDescription":"Open the conversation timeline","chat.commandAutocomplete.command.compactDescription":"Compress session history using AI to reduce context size","chat.commandAutocomplete.command.summaryDescription":"Non-destructive session summary. Optional topic hint after the command.","chat.commandAutocomplete.command.workspaceReviewDescription":"Review the workspace diff for intent, correctness, and adequacy, graded by severity.","chat.commandAutocomplete.command.featurePlanDescription":"Start a guided, back-and-forth planning session for a new feature.","chat.commandAutocomplete.command.catchUpDescription":"Re-establish context: what you were doing and where to pick up.","chat.commandAutocomplete.command.debugDescription":"Guided root-cause investigation for a bug before proposing a fix.","chat.commandAutocomplete.command.weighDescription":"Weigh 2-3 approaches with trade-offs and a recommendation before you commit.","chat.commandAutocomplete.command.exploreDescription":"Get oriented in this codebase: a high-level tour of the architecture and main parts.","chat.commandAutocomplete.badge.skill":"skill","chat.commandAutocomplete.badge.command":"command","chat.commandAutocomplete.badge.system":"system","chat.commandAutocomplete.empty":"No commands found","chat.agentMentionAutocomplete.badge.system":"system","chat.agentMentionAutocomplete.empty":"No agents found","chat.fileMentionAutocomplete.searchMoreAgents":"Type to search more agents","chat.fileMentionAutocomplete.empty":"No matches found","chat.queuedMessage.attachments":"+{count} file(s)","chat.queuedMessage.empty":"(empty)","chat.queuedMessage.title":"Queued messages","chat.queuedMessage.edit":"edit","chat.queuedMessage.send":"send","chat.queuedMessage.removeAria":"Remove from queue","chat.container.returnToParent.aria":"Return to parent session","chat.container.returnToParent.titleNamed":"Return to: {title}","chat.container.returnToParent.title":"Return to parent session","chat.container.returnToParent.label":"Parent","chat.container.readOnlySubagentPromptBanner":"Subagent sessions cannot be prompted.","chat.unifiedControls.title":"Controls","chat.unifiedControls.model.title":"Model","chat.unifiedControls.model.noRecent":"No recent models","chat.unifiedControls.model.moreAria":"More models","chat.unifiedControls.effort.title":"Effort","chat.unifiedControls.effort.moreAria":"More effort options","chat.questionCard.summaryTab":"Summary","chat.questionCard.noAnswer":"(no answer)","chat.questionCard.inputNeeded":"Input needed","chat.questionCard.fromSubagent":"From subagent","chat.questionCard.questionFallback":"Question {index}","chat.questionCard.selectMultiple":"Select multiple","chat.questionCard.recommended":"recommended","chat.questionCard.other":"Other…","chat.questionCard.yourAnswer":"Your answer","chat.questionCard.submit":"Submit","chat.questionCard.next":"Next","chat.questionCard.dismiss":"Dismiss","chat.questionCard.copyMarkdown":"Copy as Markdown","chat.questionCard.copyJson":"Copy as JSON","chat.questionCard.copiedMarkdown":"Question copied as Markdown","chat.questionCard.copiedJson":"Question copied as JSON","chat.questionCard.copyFailed":"Failed to copy question","chat.questionCard.submitFailed":"Failed to send response","chat.questionCard.dismissFailed":"Failed to dismiss question","chat.questionCard.noLongerPending":"This question is no longer waiting for a response.","chat.questionCard.tryAgain":"Please try again in a moment.","chat.textSelection.toast.noProject":"No project found for this session","chat.textSelection.toast.addToNotesFailed":"Failed to add to notes","chat.textSelection.toast.addToNotesSuccess":"Added selected text to notes","chat.textSelection.toast.addToNotesSummaryFailed":"Could not summarize selection, added selected text to notes","chat.textSelection.actions.addToChat":"Add to chat","chat.textSelection.actions.newSession":"New session","chat.textSelection.actions.copy":"Copy","chat.textSelection.actions.addToNotes":"Add to notes","chat.textSelection.title.addToCurrentChat":"Add to current chat","chat.textSelection.title.newSessionWithSelection":"Create new session with selection","chat.textSelection.title.saveInsightToNotes":"Save selected text to notes","chat.messageBody.actions.revertAria":"Revert to this message","chat.messageBody.actions.revert":"Revert from here","chat.messageBody.actions.forkAria":"Fork from this message","chat.messageBody.actions.fork":"Fork from here","chat.messageBody.actions.copyMessageAria":"Copy message text","chat.messageBody.actions.copyMessage":"Copy message","chat.messageBody.actions.openPreviewAria":"Open preview","chat.messageBody.actions.openPreview":"Open preview","chat.messageBody.actions.copyAnswer":"Copy answer","chat.messageBody.actions.savingImage":"Saving image...","chat.messageBody.actions.saveAsImage":"Save as image","chat.messageBody.actions.saveAsPlan":"Save as plan","chat.messageBody.actions.startNewSession":"Start new session from this answer","chat.messageBody.actions.startNewMultiRun":"Start new multi-run from this answer","chat.messageBody.forkDialog.instructions.label":"Instructions","chat.messageBody.forkDialog.instructions.placeholder":"Add instructions for the new session…","chat.generatedResult.actions.copy":"Copy","chat.generatedResult.actions.copied":"Copied","chat.generatedResult.commit.title":"Generated commit message","chat.generatedResult.commit.highlights":"Highlights","chat.generatedResult.pullRequest.title":"Generated pull request","chat.generatedResult.pullRequest.titleLabel":"Title","chat.generatedResult.pullRequest.bodyLabel":"Body","chat.messageBody.tts.stopSpeaking":"Stop speaking","chat.messageBody.tts.readAloud":"Read aloud","chat.messageBody.tts.readAloudWithProvider":"Read aloud ({provider} voice)","chat.messageBody.toast.noProject":"No project found for this session","chat.messageBody.toast.savePlanFailed":"Failed to save plan","chat.messageBody.toast.planSaved":"Plan saved","chat.messageBody.toast.imageSaved":"Image saved","chat.messageBody.toast.generateImageFailed":"Failed to generate image","chat.chatInput.actions.commands":"Commands","chat.chatInput.actions.attachFiles":"Attach files","chat.chatInput.actions.addAttachment":"Add attachment","chat.chatInput.actions.linkGithubIssue":"Link GitHub Issue","chat.chatInput.actions.linkGithubPr":"Link GitHub PR","chat.chatInput.actions.modelAgentSettings":"Model and agent settings","chat.chatInput.actions.sendMessageAria":"Send message","chat.chatInput.actions.queueMessageAria":"Queue message","chat.chatInput.actions.stopGeneratingAria":"Stop generating","chat.chatInput.focusMode.toggleAria":"Toggle focus mode","chat.chatInput.focusMode.label":"Focus mode","chat.chatInput.permissionAutoAccept.disable":"Disable permission auto-accept","chat.chatInput.permissionAutoAccept.enable":"Enable permission auto-accept","chat.chatInput.permissionAutoAccept.on":"Permission auto-accept: on","chat.chatInput.permissionAutoAccept.off":"Permission auto-accept: off","chat.chatInput.linked.byAuthor":"by {author}","chat.chatInput.linked.issue.openInBrowserAria":"Open issue in browser","chat.chatInput.linked.issue.removeAria":"Remove linked issue","chat.chatInput.linked.pr.number":"PR #{number}","chat.chatInput.linked.pr.openInBrowserAria":"Open pull request in browser","chat.chatInput.linked.pr.removeAria":"Remove linked pull request","chat.chatInput.placeholder.shell":"Enter shell command...","chat.chatInput.placeholder.chat":"@ for files/agents; / for commands and skills; ! for shell; # for snippets","chat.chatInput.placeholder.chatCompact":"Use @ / ! # for helpers","chat.chatInput.placeholder.selectSession":"Select or create a session to start chatting","chat.snippetAutocomplete.action.addNew":"+ Add new snippet","chat.snippetAutocomplete.empty":"No snippets found","chat.snippetAutocomplete.footer":"↑↓ navigate • Enter select • Esc close","snippets.source.global":"global","snippets.source.project":"project","chat.chatInput.toast.compactFailed":"Failed to compact session","chat.chatInput.toast.summaryFailed":"Failed to generate summary","chat.chatInput.toast.reviewFailed":"Failed to review changes","chat.chatInput.toast.planFeatureFailed":"Failed to start feature planning","chat.chatInput.toast.catchUpFailed":"Failed to catch up","chat.chatInput.toast.debugFailed":"Failed to start debugging","chat.chatInput.toast.weighFailed":"Failed to weigh options","chat.chatInput.toast.exploreFailed":"Failed to start the tour","chat.chatInput.toast.attachmentsTooLarge":"Attachments are too large to send. Please try reducing the number or size of images.","chat.chatInput.toast.sendAttachmentsFailed":"Failed to send attachments. Try fewer files or smaller images.","chat.chatInput.toast.messageSendFailed":"Message failed to send. Attachments restored.","chat.chatInput.toast.clipboardAttachFailed":"Failed to attach image from clipboard","chat.chatInput.toast.addedFileMentions":"Added {count} file mention(s)","chat.chatInput.toast.attachFileFailed":"Failed to attach file","chat.chatInput.toast.attachNamedFailed":"Failed to attach {name}","chat.chatInput.toast.someFilesSkipped":`Some files were skipped:
413
- {summary}`,"chat.chatInput.toast.vscodePickFailed":"Failed to pick files in VS Code","chat.chatInput.toast.openSessionFirst":"Open a session first","chat.chatInput.toast.togglePermissionAutoAcceptFailed":"Failed to toggle permission auto-accept","chat.chatInput.reviewComments":"Review comments:","chat.chatInput.reviewCommentsRemove":"Remove review comments","chat.chatInput.devServerLogs":"Dev Server logs:","chat.chatInput.devServerLogsRemove":"Remove Dev Server logs","chat.chatInput.previewAnnotations":"Preview annotations:","chat.chatInput.previewContext":"Preview context:","chat.chatInput.previewContextRemove":"Remove preview context","chat.chatInput.projectRoot":"Project root","chat.chatInput.branch":"Branch","chat.chatInput.worktrees":"Worktrees","chat.chatInput.worktreeNew":"+ New","chat.chatInput.drop.insertMention":"Drop to insert as mention","chat.chatInput.drop.attachFiles":"Drop files here to attach","chat.chatInput.fileFallback":"file","chat.mobileStatus.editProjects.title":"Edit Projects","chat.mobileStatus.editProjects.footer":"Drag items to reorder, or use arrows to move. Tap edit to change details.","chat.mobileStatus.editProjects.empty":"No projects to edit","chat.mobileStatus.projects.empty":"No projects","chat.mobileStatus.projects.addAria":"Add project","chat.mobileStatus.projects.removeTitle":"Remove Project","chat.mobileStatus.projects.removeDescriptionPrefix":"Are you sure you want to remove","chat.mobileStatus.projects.cancel":"Cancel","chat.mobileStatus.projects.remove":"Remove","chat.mobileStatus.new":"New","chat.mobileStatus.noSessionsInProject":"No sessions in this project","chat.mobileStatus.swipeHint":"← Swipe here to open sidebars →","chat.mobileStatus.toast.addProjectFailed":"Failed to add project","chat.mobileStatus.toast.selectValidDirectory":"Please select a valid directory.","chat.mobileStatus.toast.selectDirectoryFailed":"Failed to select directory","chat.toolOutputDialog.image.previousAria":"Previous image","chat.toolOutputDialog.image.nextAria":"Next image","chat.toolOutputDialog.image.closeAria":"Close image preview","chat.toolOutputDialog.mermaid.missingSource":"Missing Mermaid source URL.","chat.toolOutputDialog.mermaid.loadFailed":"Unable to load Mermaid diagram.","chat.toolOutputDialog.mermaid.closeAria":"Close diagram preview","chat.toolOutputDialog.mermaid.loading":"Loading diagram...","chat.toolOutputDialog.mermaid.renderFailed":"Unable to render Mermaid diagram.","chat.toolOutputDialog.mermaid.retry":"Retry","chat.toolOutputDialog.commandCompleted":"Command completed successfully","chat.toolOutputDialog.noOutputProduced":"No output was produced","chat.toolPart.lspErrors":"LSP errors","chat.toolPart.moreErrors":"+{count} more errors","chat.toolPart.error":"Error:","chat.toolPart.awaitingResponse":"Awaiting response...","chat.toolPart.noOutputProduced":"No output produced","chat.toolPart.output":"Output","chat.toolPart.showRawJson":"Show raw JSON","chat.toolPart.showFormattedJson":"Show formatted JSON","chat.toolPart.copyOutput":"Copy output","chat.toolPart.copiedOutput":"Copied output","chat.toolPart.copyOutputFailed":"Failed to copy output","chat.toolPart.openSubtask":"Open {type} subtask","chat.todo.total":"Total","chat.todo.inProgress":"In Progress","chat.todo.pending":"Pending","chat.todo.completed":"Completed","chat.todo.cancelled":"Cancelled","chat.permissionCard.workingDirectory":"Working Directory:","chat.permissionCard.timeout":"Timeout:","chat.permissionCard.request":"Request:","chat.permissionCard.headers":"Headers:","chat.permissionCard.body":"Body:","chat.permissionCard.action":"Action:","chat.permissionCard.details":"Details:","chat.permissionCard.patterns":"Patterns:","chat.permissionToast.sessionFallback":"Session","chat.permissionToast.permissionFallback":"Permission details unavailable","chat.permissionToast.labels.session":"Session:","chat.permissionToast.labels.permission":"Permission:","chat.permissionToast.actions.once":"Once","chat.permissionToast.actions.always":"Always","chat.permissionToast.actions.deny":"Deny","chat.permissionToast.actions.approveOnceAria":"Approve once","chat.permissionToast.actions.approveOnceAriaWithSession":"Approve once for {session}","chat.permissionToast.actions.approveAlwaysAria":"Approve always","chat.permissionToast.actions.approveAlwaysAriaWithSession":"Approve always for {session}","chat.permissionToast.actions.denyAria":"Deny permission","chat.permissionToast.actions.denyAriaWithSession":"Deny permission for {session}","chat.permissionRequest.required":"Permission required:","chat.permissionRequest.actions.once":"Once","chat.permissionRequest.actions.always":"Always","chat.permissionRequest.actions.reject":"Reject","chat.modelControls.provider":"Provider","chat.modelControls.capability.toolCalling":"Tool calling","chat.modelControls.capability.reasoning":"Reasoning","chat.modelControls.modality.text":"Text","chat.modelControls.modality.image":"Image","chat.modelControls.modality.video":"Video","chat.modelControls.modality.audio":"Audio","chat.modelControls.modality.pdf":"PDF","chat.modelControls.capabilities":"Capabilities","chat.modelControls.modalities":"Modalities","chat.modelControls.input":"Input","chat.modelControls.output":"Output","chat.modelControls.limits":"Limits","chat.modelControls.context":"Context","chat.modelControls.metadata":"Metadata","chat.modelControls.knowledge":"Knowledge","chat.modelControls.release":"Release","chat.modelControls.mode":"Mode","chat.modelControls.model":"Model","chat.modelControls.temperature":"Temperature","chat.modelControls.topP":"Top P","chat.modelControls.permissions":"Permissions","chat.modelControls.edit":"Edit","chat.modelControls.bash":"Bash","chat.modelControls.webFetch":"WebFetch","chat.modelControls.customPrompt":"Custom Prompt","chat.modelControls.selectModel":"Select model","chat.modelControls.searchProvidersOrModels":"Search providers or models","chat.modelControls.clearSearch":"Clear search","chat.modelControls.current":"Current","chat.modelControls.thinking":"Thinking","chat.modelControls.default":"Default","chat.modelControls.selectAgent":"Select agent","chat.modelControls.costPerMillion":"Cost ($/1M tokens)","chat.modelControls.metadataUnavailable":"Model metadata unavailable.","chat.modelControls.addNewProvider":"Add new provider","chat.modelControls.noAgentSelected":"No agent selected.","chat.modelControls.resetToDefault":"Reset to default","chat.modelControls.searchModels":"Search models","chat.modelControls.searchAgents":"Search agents","chat.modelControls.noModelsFound":"No models found","chat.modelControls.favorites":"Favorites","chat.modelControls.recent":"Recent","chat.modelControls.addToFavorites":"Add to favorites","chat.modelControls.removeFromFavorites":"Remove from favorites","chat.modelControls.favoriteAria":"Favorite","chat.modelControls.unfavoriteAria":"Unfavorite","chat.modelControls.collapseProvider":"Collapse provider","chat.modelControls.expandProvider":"Expand provider","chat.modelControls.keyboardHint":"↑↓ navigate{thinking} • Enter select • Esc close","chat.modelControls.keyboardHintNavigate":"↑↓ navigate","chat.modelControls.keyboardHintSwitchAgent":"{shortcut} switch agent","chat.modelControls.keyboardHintThinking":"←→ thinking","chat.modelControls.showThinkingModes":"Show thinking modes","chat.modelControls.hideThinkingModes":"Hide thinking modes","chat.modelControls.moreThinkingModes":"More thinking modes","chat.modelControls.noProvidersOrModelsFound":"No providers or models match your search.","chat.modelControls.reorderFavoriteAria":"Reorder favorite","chat.modelControls.reorderFavoriteTitle":"Drag to reorder favorite","chat.modelControls.permissionLabel.custom":"Custom","chat.modelControls.permissionLabel.allow":"Allow","chat.modelControls.permissionLabel.deny":"Deny","chat.modelControls.permissionLabel.ask":"Ask","chat.modelControls.modeValue.primary":"Primary","chat.modelControls.modeValue.subagent":"Subagent","chat.modelControls.modeValue.all":"All","chat.modelControls.modeValue.none":"—","chat.reasoningTrace.thinking":"Thinking","chat.reasoningTrace.justification":"Justification","chat.reasoningTrace.expandAria":"Expand reasoning trace","chat.reasoningTrace.collapseAria":"Collapse reasoning trace","chat.reasoningTrace.thought":"Thought","chat.messageBody.subtask.title":"Delegated task","chat.messageBody.subtask.hidePrompt":"Hide prompt","chat.messageBody.subtask.showPrompt":"Show prompt","chat.messageBody.subtask.openSession":"Open subtask session","chat.messageBody.shellCommand.title":"Shell command","chat.messageBody.shellCommand.hideOutput":"Hide output","chat.messageBody.shellCommand.showOutput":"Show output","chat.messageBody.shellCommand.copied":"Copied","chat.messageBody.shellCommand.copyOutput":"Copy output","commandPalette.title":"Command Palette","commandPalette.description":"Search files, sessions, and commands.","commandPalette.input.placeholder":"Search files, sessions, commands...","commandPalette.empty.noResults":"No results found.","commandPalette.empty.searchingFiles":"Searching files...","commandPalette.item.newSession":"New Session","commandPalette.item.newMiniChat":"New Mini Chat Window","commandPalette.item.newWorktreeDraft":"New Worktree Draft","commandPalette.item.addProject":"Add Project","commandPalette.item.showSessionSwitcher":"Show Session Switcher","commandPalette.item.toggleSidebar":"Toggle Sidebar","commandPalette.item.toggleRightSidebar":"Toggle Right Sidebar","commandPalette.item.showContextUsage":"Show Context Usage","commandPalette.item.toggleTerminal":"Toggle Terminal","commandPalette.item.openSettings":"Open Settings...","commandPalette.session.untitled":"Untitled Session","openCodeStatusDialog.title":"OpenCode Status","openCodeStatusDialog.description":"Inspect current OpenCode status and diagnostics.","openCodeStatusDialog.actions.copy":"Copy","openCodeStatusDialog.empty.noData":"No data.","openCodeStatusDialog.toast.copiedTitle":"Copied","openCodeStatusDialog.toast.copiedDescription":"Status copied to clipboard","openCodeStatusDialog.toast.copyFailed":"Failed to copy status","saveProjectPlanDialog.title":"Save Project Plan","saveProjectPlanDialog.description":"Save this plan into your project as a Markdown file.","saveProjectPlanDialog.field.title":"Title","saveProjectPlanDialog.field.titlePlaceholder":"Plan title","saveProjectPlanDialog.field.contentPreview":"Content preview","saveProjectPlanDialog.actions.cancel":"Cancel","saveProjectPlanDialog.actions.save":"Save","saveProjectPlanDialog.actions.saving":"Saving...","branchPickerDialog.title":"Branch Picker","branchPickerDialog.description.localBranchesForProject":"Local branches for {project}","branchPickerDialog.description.selectProject":"Select a project to view branches","branchPickerDialog.search.placeholder":"Search branches...","branchPickerDialog.search.renameBranchPlaceholder":"Rename branch","branchPickerDialog.state.noProjectSelected":"No project selected","branchPickerDialog.state.loadingBranches":"Loading branches...","branchPickerDialog.state.noMatchingBranches":"No matching branches","branchPickerDialog.state.noBranchesFound":"No branches found","branchPickerDialog.badge.head":"HEAD","branchPickerDialog.badge.worktree":"worktree","branchPickerDialog.actions.createWorktreeAria":"Create worktree from branch","branchPickerDialog.actions.renameAria":"Rename branch","branchPickerDialog.actions.deleteAria":"Delete branch","branchPickerDialog.actions.deleteWorktreeAria":"Remove worktree","branchPickerDialog.actions.confirmRenameAria":"Confirm rename","branchPickerDialog.actions.cancelRenameAria":"Cancel rename","branchPickerDialog.actions.confirmDeleteAria":"Confirm delete branch","branchPickerDialog.actions.cancelDeleteAria":"Cancel delete branch","branchPickerDialog.actions.deletePrompt":"Delete","branchPickerDialog.actions.forceDeletePrompt":"Force Delete","branchPickerDialog.tooltip.createWorktree":"Create worktree","branchPickerDialog.tooltip.worktreeAlreadyExists":"Worktree already exists","branchPickerDialog.tooltip.rename":"Rename branch","branchPickerDialog.tooltip.renameDisabledForRoot":"Cannot rename root branch","branchPickerDialog.tooltip.delete":"Delete branch","branchPickerDialog.tooltip.deleteCurrentBranch":"Cannot delete current branch","branchPickerDialog.tooltip.deleteDisabledForRoot":"Cannot delete root branch","branchPickerDialog.tooltip.deleteWorktree":"Remove worktree","branchPickerDialog.tooltip.deleteWorktreeRootProtected":"Cannot remove root worktree","branchPickerDialog.toast.branchRenamed":"Branch renamed","branchPickerDialog.toast.failedToRenameBranch":"Failed to rename branch","branchPickerDialog.toast.branchDeleted":"Branch deleted","branchPickerDialog.toast.branchNotMerged":"Branch is not fully merged","branchPickerDialog.toast.confirmAgainToForceDelete":"Confirm again to force delete","branchPickerDialog.toast.failedToDeleteBranch":"Failed to delete branch","branchPickerDialog.toast.worktreeCreated":"Worktree created","branchPickerDialog.toast.failedToCreateWorktree":"Failed to create worktree","branchPickerDialog.error.failedToLoad":"Failed to load branches","branchPickerDialog.error.renameRejected":"Rename was rejected","branchPickerDialog.error.renameFailed":"Failed to rename branch","branchPickerDialog.error.deleteRejected":"Delete was rejected","branchPickerDialog.error.deleteFailed":"Failed to delete branch","branchPickerDialog.error.createWorktreeFailed":"Failed to create worktree","projectEditDialog.title":"Edit project","projectEditDialog.field.name":"Name","projectEditDialog.field.namePlaceholder":"Project name","projectEditDialog.field.color":"Color","projectEditDialog.field.icon":"Icon","projectEditDialog.field.preview":"Preview","projectEditDialog.field.iconBackground":"Icon Background","projectEditDialog.field.iconBackgroundAria":"Project icon background color","projectEditDialog.option.none":"None","projectEditDialog.actions.uploadIcon":"Upload Icon","projectEditDialog.actions.uploading":"Uploading...","projectEditDialog.actions.discoverFavicon":"Discover Favicon","projectEditDialog.actions.discovering":"Discovering...","projectEditDialog.actions.removeProjectIcon":"Remove Project Icon","projectEditDialog.actions.removing":"Removing...","projectEditDialog.actions.undoRemove":"Undo Remove","projectEditDialog.actions.clear":"Clear","projectEditDialog.actions.cancel":"Cancel","projectEditDialog.actions.save":"Save","projectEditDialog.toast.failedToUploadIcon":"Failed to upload project icon","projectEditDialog.toast.iconUpdated":"Project icon updated","projectEditDialog.toast.failedToRemoveIcon":"Failed to remove project icon","projectEditDialog.toast.iconRemoved":"Project icon removed","projectEditDialog.toast.failedToDiscoverIcon":"Failed to discover project icon","projectEditDialog.toast.customIconAlreadySet":"Custom icon already set for this project","projectEditDialog.toast.iconDiscovered":"Project icon discovered","agentManager.sidebar.search.placeholder":"Search Agent Groups...","agentManager.sidebar.actions.newAgentGroup":"New Agent Group","agentManager.sidebar.actions.more":"... More ({count})","agentManager.sidebar.actions.showLess":"Show less","agentManager.sidebar.section.agentGroups":"Agent Groups","agentManager.sidebar.state.loading":"Loading...","agentManager.sidebar.state.noGroupsFound":"No groups found","agentManager.sidebar.state.noGroupsYet":"No agent groups yet","agentManager.sidebar.state.createToGetStarted":"Create a new agent group to get started","agentManager.sidebar.item.modelCountSingle":"{count} model","agentManager.sidebar.item.modelCountPlural":"{count} models","agentManager.sidebar.item.groupMenuAria":"Group menu","agentManager.sidebar.item.delete":"Delete","agentManager.sidebar.relativeTime.now":"now","agentManager.sidebar.relativeTime.minutes":"{count}m","agentManager.sidebar.relativeTime.hours":"{count}h","agentManager.sidebar.relativeTime.days":"{count}d","agentManager.sidebar.dialog.deleteGroupTitle":"Delete agent group","agentManager.sidebar.dialog.deleteGroupDescription":'Delete "{group}"? This removes all worktrees and sessions in this group.',"agentManager.sidebar.dialog.cancel":"Cancel","agentManager.sidebar.dialog.delete":"Delete","agentManager.sidebar.dialog.deleting":"Deleting...","agentManager.sidebar.toast.deletingGroup":'Deleting "{group}"...',"agentManager.sidebar.toast.deletedGroup":'Deleted "{group}"',"agentManager.sidebar.toast.failedToDeleteGroup":'Failed to fully delete "{group}"',"agentManager.detail.header.modelCountSingle":"{count} model","agentManager.detail.header.modelCountPlural":"{count} models","agentManager.detail.header.noBranch":"No branch","agentManager.detail.actions.worktreeActionsAria":"Worktree actions","agentManager.detail.actions.removeThisWorktree":"Remove this worktree","agentManager.detail.actions.keepThisRemoveOthers":"Leave this one, remove others","agentManager.detail.actions.copyWorktreePath":"Copy Worktree Path","agentManager.detail.dialog.removeWorktreeTitle":"Remove worktree","agentManager.detail.dialog.removeOtherWorktreesTitle":"Remove other worktrees","agentManager.detail.dialog.removeWorktreeDescription":'Remove "{label}"? This deletes all sessions in that worktree and removes the worktree itself.',"agentManager.detail.dialog.removeOtherWorktreesDescription":'Keep "{label}" and remove the other worktrees in "{group}".',"agentManager.detail.dialog.cancel":"Cancel","agentManager.detail.dialog.remove":"Remove","agentManager.detail.dialog.removeOthers":"Remove others","agentManager.detail.dialog.working":"Working...","agentManager.detail.state.loadingSessionFor":"Loading session for {label}","agentManager.detail.state.sessionId":"Session ID: {id}","agentManager.detail.state.noSessionsInGroup":"No sessions in this group","agentManager.detail.toast.noWorktreePath":"No worktree path available","agentManager.detail.toast.worktreePathCopied":"Worktree path copied","agentManager.detail.toast.failedToCopyPath":"Failed to copy path","agentManager.detail.toast.removingWorktree":"Removing worktree...","agentManager.detail.toast.removingOtherWorktrees":"Removing other worktrees...","agentManager.detail.toast.failedToFullyRemoveWorktree":"Failed to fully remove worktree","agentManager.detail.toast.worktreeRemoved":"Worktree removed","agentManager.detail.toast.otherWorktreesRemoved":"Removed other worktrees","agentManager.empty.groupName.label":"Group Name","agentManager.empty.groupName.placeholder":"e.g. feature-auth, bugfix-login","agentManager.empty.groupName.description":"Used for worktree directory and branch naming","agentManager.empty.baseBranch.label":"Base Branch","agentManager.empty.baseBranch.description":"Creates new branches from {branch}","agentManager.empty.setupCommands.label":"Setup commands","agentManager.empty.setupCommands.configured":"{count} configured","agentManager.empty.setupCommands.description":"Commands run in each new worktree. Use $ROOT_PROJECT_PATH for project root.","agentManager.empty.setupCommands.loading":"Loading...","agentManager.empty.setupCommands.commandPlaceholder":"e.g., bun install","agentManager.empty.setupCommands.removeCommandAria":"Remove command","agentManager.empty.setupCommands.addCommand":"Add command","agentManager.empty.agent.label":"Agent","agentManager.empty.agent.description":"Defaults to your configured default agent","agentManager.empty.models.label":"Models","agentManager.empty.models.addModel":"Add model","agentManager.empty.models.selectedSingle":"{count} model selected","agentManager.empty.models.selectedPlural":"{count} models selected","agentManager.empty.prompt.label":"Prompt","agentManager.empty.prompt.placeholder":"Ask anything...","agentManager.empty.prompt.addAttachmentAria":"Add attachment","agentManager.empty.actions.startAgentGroupAria":"Start Agent Group","agentManager.empty.toast.fileTooLarge":'File "{fileName}" is too large (max 10MB)',"agentManager.empty.toast.failedToAttach":'Failed to attach "{fileName}"',"agentManager.empty.toast.attachedSingle":"Attached {count} file","agentManager.empty.toast.attachedPlural":"Attached {count} files","agentManager.empty.toast.failedToCreateGroup":"Failed to create agent group","openInApp.actions.open":"Open","openInApp.actions.openInAria":"Open in {app}","openInApp.actions.chooseAppAria":"Choose app to open","openInApp.actions.copyPath":"Copy Path","openInApp.actions.refreshApps":"Refresh Apps","openInApp.toast.pathCopied":"Path copied to clipboard","projectActions.actions.addActionAria":"Add action","projectActions.actions.addAction":"Add action","projectActions.actions.addNewAction":"Add new action","projectActions.actions.autoDiscover":"Auto-discover","projectActions.actions.chooseActionAria":"Choose project action","projectActions.actions.openPreview":"Open Preview","projectActions.actions.runNamedAria":"Run {name}","projectActions.actions.stopNamedAria":"Stop {name}","projectActions.label.fallbackAction":"Action","projectActions.toast.openedUrlFromOutput":"Opened URL from action output","projectActions.toast.openedForwardedUrl":"Opened forwarded URL","projectActions.toast.openedActionUrl":"Opened action URL","projectActions.error.noActiveDirectory":"No active directory","projectActions.error.noActiveDirectoryForAction":"No active directory for action","projectActions.error.failedToCreateTerminalSession":"Failed to create terminal session","projectActions.error.invalidCustomUrlFormat":"Invalid custom URL format","projectActions.error.selectedDesktopSshForwardUnavailable":"Selected desktop SSH forward is unavailable","projectActions.error.failedToRunAction":"Failed to run action","mcpDropdown.title":"MCP Servers","mcpDropdown.actions.refreshAria":"Refresh","mcpDropdown.actions.openAria":"MCP servers","mcpDropdown.statusAria":"MCP status","mcpDropdown.status.unknown":"Unknown","mcpDropdown.status.connected":"Connected","mcpDropdown.status.failed":"Failed: {error}","mcpDropdown.status.unknownError":"Unknown error","mcpDropdown.status.needsAuth":"Needs authentication","mcpDropdown.status.needsRegistration":"Needs registration: {error}","mcpDropdown.empty.configureInConfig":"Configure MCP servers in OpenCode config.","sessionAuth.error.rateLimitTitle":"Too many attempts","sessionAuth.error.networkTitle":"Unable to reach server","sessionAuth.error.rateLimitDescriptionSingle":"Please wait {minutes} minute before trying again.","sessionAuth.error.rateLimitDescriptionPlural":"Please wait {minutes} minutes before trying again.","sessionAuth.error.networkDescription":"We could not verify the UI session. Check that the service is running and try again.","sessionAuth.error.retry":"Retry","sessionAuth.error.passkeySetupFailed":"Passkey setup failed.","sessionAuth.error.incorrectPassword":"Incorrect password. Try again.","sessionAuth.error.unexpectedResponse":"Unexpected response from server.","sessionAuth.error.networkRetry":"Network error. Check connection and retry.","sessionAuth.error.passkeySignInCanceled":"Passkey sign-in was canceled.","sessionAuth.error.enterPasswordForPasskey":"Enter your password to add a passkey.","sessionAuth.locked.tunnelTitle":"Tunnel access required","sessionAuth.locked.unlockTitle":"Unlock OpenChamber","sessionAuth.locked.tunnelDescription":"Open this tunnel using the one-time connect link from the desktop app.","sessionAuth.locked.passwordDescription":"This session is password-protected.","sessionAuth.locked.hostSwitcherHint":"Use Local if remote is unreachable.","sessionAuth.actions.cancelPasskey":"Cancel passkey","sessionAuth.actions.usePasskey":"Use passkey","sessionAuth.actions.unlockingAria":"Unlocking","sessionAuth.actions.unlockAria":"Unlock","sessionAuth.actions.trustDevice":"Trust this device","sessionAuth.actions.trustDeviceAria":"Trust this device","sessionAuth.actions.cancelPasskeySetup":"Cancel passkey setup","sessionAuth.actions.addPasskey":"Add passkey","sessionAuth.password.placeholder":"Enter password","sessionAuth.toast.passkeyAdded":"Passkey added","sessionAuth.toast.passkeySetupCanceled":"Passkey setup canceled","desktopHostSwitcher.title":"Instance","desktopHostSwitcher.description":"Switch between Local and remote OpenChamber servers","desktopHostSwitcher.header.current":"Current","desktopHostSwitcher.header.default":"Default","desktopHostSwitcher.header.currentColon":"Current:","desktopHostSwitcher.header.currentDefaultColon":"Current default:","desktopHostSwitcher.status.connected":"Connected","desktopHostSwitcher.status.authRequired":"Auth required","desktopHostSwitcher.status.checking":"Checking","desktopHostSwitcher.status.updateRecommended":"Update recommended","desktopHostSwitcher.status.incompatible":"Incompatible","desktopHostSwitcher.status.wrongService":"Wrong service","desktopHostSwitcher.status.unreachable":"Unreachable","desktopHostSwitcher.status.unknown":"Unknown","desktopHostSwitcher.status.ping":" · {ms}ms ping","desktopHostSwitcher.statusAria":"Instance status","desktopHostSwitcher.sshPhase.ready":"Ready","desktopHostSwitcher.sshPhase.error":"Error","desktopHostSwitcher.sshPhase.reconnecting":"Reconnecting","desktopHostSwitcher.sshPhase.resolvingConfig":"Resolving config","desktopHostSwitcher.sshPhase.checkingAuth":"Checking auth","desktopHostSwitcher.sshPhase.connectingSsh":"Connecting SSH","desktopHostSwitcher.sshPhase.probingRemote":"Probing remote","desktopHostSwitcher.sshPhase.installing":"Installing","desktopHostSwitcher.sshPhase.updating":"Updating","desktopHostSwitcher.sshPhase.detectingServer":"Detecting server","desktopHostSwitcher.sshPhase.startingServer":"Starting server","desktopHostSwitcher.sshPhase.forwardingPorts":"Forwarding ports","desktopHostSwitcher.sshPhase.idle":"Idle","desktopHostSwitcher.ssh.needInstancesHint":"Need SSH instances? Manage them in Settings.","desktopHostSwitcher.ssh.instanceFallback":"SSH instance","desktopHostSwitcher.ssh.connectingTo":"Connecting to {host}","desktopHostSwitcher.actions.refresh":"Refresh","desktopHostSwitcher.actions.refreshInstancesAria":"Refresh instances","desktopHostSwitcher.actions.remoteSsh":"Remote SSH","desktopHostSwitcher.actions.instanceActionsAria":"Instance actions","desktopHostSwitcher.actions.edit":"Edit","desktopHostSwitcher.actions.delete":"Delete","desktopHostSwitcher.actions.connect":"Connect","desktopHostSwitcher.actions.defaultInstanceAria":"Default instance","desktopHostSwitcher.actions.setAsDefaultAria":"Set as default","desktopHostSwitcher.actions.setAsDefault":"Set as default","desktopHostSwitcher.actions.openInNewWindowAria":"Open in new window","desktopHostSwitcher.actions.openInNewWindow":"Open in new window","desktopHostSwitcher.actions.addInstance":"Add instance","desktopHostSwitcher.actions.cancel":"Cancel","desktopHostSwitcher.actions.save":"Save","desktopHostSwitcher.actions.add":"Add","desktopHostSwitcher.actions.switchToLocal":"Switch to Local","desktopHostSwitcher.actions.retry":"Retry","desktopHostSwitcher.actions.switchInstanceAria":"Switch instance","desktopHostSwitcher.actions.switchInstance":"Switch instance","desktopHostSwitcher.actions.switchToAria":"Switch to {instance}","desktopHostSwitcher.field.labelPlaceholder":"Label","desktopHostSwitcher.field.labelOptionalPlaceholder":"Label (optional)","desktopHostSwitcher.field.urlPlaceholder":"https://host:port","desktopHostSwitcher.state.limitedOnPage":"Instance switcher is limited on this page. Use Local to recover.","desktopHostSwitcher.state.loading":"Loading...","desktopHostSwitcher.state.instanceUnreachable":"Instance unreachable","desktopHostSwitcher.edit.title":"Edit instance","desktopHostSwitcher.add.title":"Add instance","desktopHostSwitcher.error.failedToSave":"Failed to save","desktopHostSwitcher.error.failedToLoad":"Failed to load","desktopHostSwitcher.error.invalidUrl":"Invalid URL (must be http/https)","desktopHostSwitcher.error.failedToOpenNewWindow":"Failed to open new window","desktopHostSwitcher.instance.local":"Local","desktopHostSwitcher.instance.fallback":"Instance","desktopHostSwitcher.startup.title":"Default SSH instance unavailable","desktopHostSwitcher.startup.connectingTo":"Connecting to {host}...","desktopHostSwitcher.startup.failed":"Failed to connect the default SSH instance.","desktopHostSwitcher.toast.sshConnected":'SSH instance "{host}" connected',"desktopHostSwitcher.toast.sshFailedToConnect":'SSH instance "{host}" failed to connect',"desktopHostSwitcher.toast.instanceUnreachable":'Instance "{host}" is unreachable',"miniChat.header.newSession":"New session","miniChat.header.session":"Session","miniChat.header.defaultAgent":"Default agent","miniChat.header.noModel":"No model","miniChat.status.busy":"Running","miniChat.status.retry":"Retrying","miniChat.status.idle":"Idle","miniChat.actions.pin":"Pin above other windows","miniChat.actions.unpin":"Unpin window","miniChat.actions.pinAria":"Pin Mini Chat window","miniChat.actions.unpinAria":"Unpin Mini Chat window","miniChat.actions.openMain":"Open in main window","miniChat.actions.openMainAria":"Open session in main window","miniChat.unavailable.title":"Session unavailable","miniChat.unavailable.description":"This session could not be loaded. It may have been deleted, archived, or opened from a different project context.","sessions.sidebar.session.menu.openMiniChatWindow":"Open in Mini Chat Window","header.actions.newMiniChat":"New Mini Chat Window","header.actions.newMiniChatAria":"Open a new Mini Chat window","header.actions.openSessionMiniChat":"Open Session in Mini Chat","header.actions.openSessionMiniChatAria":"Open current session in Mini Chat","header.windowControls.groupAria":"Window controls","header.windowControls.minimize":"Minimize window","header.windowControls.maximize":"Maximize window","header.windowControls.restore":"Restore window","header.windowControls.close":"Close window","errorBoundary.title":"Something went wrong","errorBoundary.description":"The application encountered an unexpected error. This has been logged for debugging.","errorBoundary.state.unknownError":"Unknown error","errorBoundary.state.componentStackLabel":"Component stack:","errorBoundary.actions.errorDetails":"Error details","errorBoundary.actions.tryAgain":"Try again","errorBoundary.actions.copy":"Copy","errorBoundary.actions.copied":"Copied","jsonTreeView.error.emptyJson":"Empty JSON content","jsonTreeView.error.invalidJson":"Invalid JSON","jsonTreeView.error.invalidJsonTitle":"Invalid JSON","jsonTreeView.actions.expandAll":"Expand All","jsonTreeView.actions.collapseAll":"Collapse All","numberInput.actions.decreaseAria":"Decrease value","numberInput.actions.increaseAria":"Increase value","goToLineDialog.field.linePlaceholderShort":"Line","goToLineDialog.field.linePlaceholder":"Line number","goToLineDialog.actions.go":"Go","goToLineDialog.helper.editorUnavailable":"Editor unavailable.","goToLineDialog.helper.currentLineRange":"Current Line: {current}. Type a line number between 1 and {max} to navigate to.","goToLineDialog.helper.goToLine":"Go to line {line}","dialog.common.actions.close":"Close","filesView.toast.relativePathCopied":"Relative path copied","filesView.tree.menu.copyRelativePath":"Copy Relative Path","multiRun.branchSelector.placeholder.selectSourceBranch":"Select source branch...","multiRun.branchSelector.status.loadingBranches":"Loading branches...","multiRun.branchSelector.status.noBranchesFound":"No branches found","multiRun.branchSelector.status.notInGitRepository":"Not in a git repository.","multiRun.branchSelector.groups.localBranches":"Local branches","multiRun.branchSelector.groups.remoteBranches":"Remote branches","multiRun.window.actions.closeAria":"Close multi-run","multiRun.window.description":"OpenChamber Multi-Run window.","voice.status.idle":"Voice Ready","voice.status.listening":"Listening...","voice.status.processing":"Processing...","voice.status.speaking":"Speaking...","voice.status.error":"Voice Error","voice.status.conversationModeActiveAria":"Conversation mode active","voice.action.finishAndTranscribe":"Finish and transcribe voice input","onboarding.common.actions.back":"Back","onboarding.common.copyToClipboard":"Copy to clipboard","onboarding.common.status.copiedToClipboard":"Copied to clipboard","onboarding.chooser.title":"Welcome to OpenChamber","onboarding.chooser.description":"Choose how you want to connect to get started.","onboarding.chooser.tabs.localInstall":"Local Install","onboarding.chooser.tabs.connectRemote":"Connect Remote","onboarding.localSetup.title":"Setting Up OpenCode","onboarding.localSetup.description":"Install OpenCode CLI to continue.","onboarding.localSetup.dialog.selectOpencodeBinary":"Select opencode binary","onboarding.localSetup.errors.cliNotReady":"OpenCode CLI is not ready yet. Please confirm installation is complete and try again.","onboarding.localSetup.errors.detectionFailed":"Detection failed","onboarding.localSetup.windows.title":"Windows setup (WSL recommended)","onboarding.localSetup.windows.stepInstallWsl":"Install WSL (if needed) with","onboarding.localSetup.windows.stepInstallWslSuffix":"in PowerShell.","onboarding.localSetup.windows.stepRunInstallInWsl":"Run the install command below inside your WSL terminal.","onboarding.localSetup.windows.stepSetBinaryPath":"If OpenChamber does not detect OpenCode automatically, set the binary path below.","onboarding.localSetup.intro":"OpenCode is the heart of OpenChamber — install it to get started.","onboarding.localSetup.docs.windows":"OpenCode Windows + WSL docs","onboarding.localSetup.docs.default":"OpenCode docs","onboarding.localSetup.actions.checking":"Checking…","onboarding.localSetup.actions.checkAndContinue":"I've completed installation, check and continue","onboarding.localSetup.actions.checkNow":"Check now","onboarding.localSetup.helper.checkAndContinue":"Click to check if OpenCode CLI is available. If successful, you'll automatically enter the main screen.","onboarding.localSetup.status.watching":"Waiting for OpenCode","onboarding.localSetup.status.autoContinue":"We'll continue automatically once it's detected.","onboarding.localSetup.field.alreadyInstalled":"Already installed? Set the OpenCode CLI path:","onboarding.localSetup.advanced.title":"Set a custom binary path","onboarding.localSetup.troubleshoot.title":"Having trouble?","onboarding.localSetup.actions.browse":"Browse","onboarding.localSetup.actions.apply":"Apply","onboarding.localSetup.helper.saveAndReload":"Saves to OpenChamber settings and reloads OpenCode configuration.","onboarding.localSetup.remotePreference":"Prefer to use a remote server?","onboarding.localSetup.actions.connectRemoteServer":"Connect to Remote Server →","onboarding.localSetup.windows.hintInstallInWsl":"On Windows, install and run OpenCode in WSL for best compatibility.","onboarding.localSetup.windows.hintDetectionFailed":"If detection fails, set a native path (opencode.cmd/opencode.exe), wsl.exe, or wsl:/usr/local/bin/opencode.","onboarding.localSetup.hint.ensurePath":"Already installed? Make sure opencode is in your PATH.","onboarding.localSetup.hint.setEnv":"Or set OPENCODE_BINARY environment variable.","onboarding.localSetup.hint.missingRuntime":'If you see "env: node: No such file or directory" or "env: bun: No such file or directory", install that runtime or ensure it is on PATH.',"onboarding.remoteConnection.title":"Connect to Remote Server","onboarding.remoteConnection.titleRecovery":"Connect to a Different Server","onboarding.remoteConnection.description":"Enter the address of an OpenChamber server to connect to.","onboarding.remoteConnection.field.serverAddress":"Server Address","onboarding.remoteConnection.field.serverAddressPlaceholder":"https://your-server.example.com:4096","onboarding.remoteConnection.field.nameOptional":"Name (optional)","onboarding.remoteConnection.field.namePlaceholder":"My Remote Server","onboarding.remoteConnection.errors.connectionTestFailed":"Connection test failed","onboarding.remoteConnection.errors.failedToSaveConnection":"Failed to save connection","onboarding.remoteConnection.status.connectedSuccessfully":"Connected successfully ({latencyMs}ms)","onboarding.remoteConnection.status.authWarning":"Server requires authentication. You can still connect.","onboarding.remoteConnection.status.connectionFailed":"Connection Failed","onboarding.remoteConnection.status.suggestionsUnreachable":"Suggestions: Check the server address, verify the server is running, or check your network connection.","onboarding.remoteConnection.status.suggestionsWrongService":"Suggestions: Verify the URL points to an OpenChamber server, or contact the server administrator.","onboarding.remoteConnection.actions.testing":"Testing…","onboarding.remoteConnection.actions.testConnection":"Test Connection","onboarding.remoteConnection.actions.connectAndRestart":"Connect & Restart","onboarding.remoteConnection.actions.whatToDo":"What would you like to do?","onboarding.remoteConnection.actions.chooseDifferentServer":"Choose Different Server","onboarding.remoteConnection.actions.useLocalInstead":"Use Local Instead","onboarding.remoteConnection.probe.authMessage":"Server requires authentication. You can still connect, but may need to provide credentials.","onboarding.remoteConnection.probe.updateRecommendedMessage":"This instance is running a different OpenChamber version. You can connect, but update both apps if something does not work.","onboarding.remoteConnection.probe.incompatibleMessage":"Server is running OpenChamber but is not compatible with this app version. Update OpenChamber on the server, then try again.","onboarding.remoteConnection.probe.wrongServiceMessage":"Server responded but is not running OpenChamber. Verify the address points to an OpenChamber server.","onboarding.remoteConnection.probe.unreachableMessage":"Server is unreachable. Check your network connection and verify the server address.","onboarding.desktopRecovery.localUnavailable.title":"Local OpenCode Unavailable","onboarding.desktopRecovery.localUnavailable.description":"OpenCode CLI could not be started or is not installed. Install OpenCode or connect to a remote server instead.","onboarding.desktopRecovery.localUnavailable.retry":"Retry Local","onboarding.desktopRecovery.localUnavailable.useLocal":"Set Up Local","onboarding.desktopRecovery.noDefaultConnection.title":"No Default Connection","onboarding.desktopRecovery.noDefaultConnection.description":"Your saved default connection could not be found. Choose how you want to connect.","onboarding.desktopRecovery.remoteUnreachable.title":"Remote Server Unreachable","onboarding.desktopRecovery.remoteUnreachable.description":'Could not connect to "{host}". Check your network connection and verify the server address.',"onboarding.desktopRecovery.remoteUnreachable.retry":"Retry Connection","onboarding.desktopRecovery.incompatibleServer.title":"Incompatible Server","onboarding.desktopRecovery.incompatibleServer.description":'The server at "{host}" is not running OpenChamber. Verify the address points to an OpenChamber server.',"onboarding.desktopRecovery.remoteIncompatible.title":"Server Update Required","onboarding.desktopRecovery.remoteIncompatible.description":'The OpenChamber server at "{host}" is not compatible with this app version. Update OpenChamber on the server, then try again.',"onboarding.desktopRecovery.common.useLocal":"Use Local","onboarding.desktopRecovery.common.useRemote":"Use Remote","onboarding.desktopRecovery.actions.retrying":"Retrying…","onboarding.desktopRecovery.actions.retryConnection":"Retry Connection","startup.initRecovery.title":"Startup failed","startup.initRecovery.description":"OpenChamber could not finish initialization. Check that the server is running, then retry.","startup.initRecovery.retry":"Retry","startup.initRecovery.retrying":"Retrying…","onboarding.desktopRecovery.placeholders.remoteServer":"the remote server","onboarding.desktopRecovery.placeholders.unknownServer":"unknown","vscodeLayout.title.chat":"Chat","vscodeLayout.title.newSession":"New session","vscodeLayout.title.sessions":"Sessions","vscodeLayout.title.sessionFallback":"Session","vscodeLayout.actions.backToSessionsAria":"Back to sessions","vscodeLayout.actions.newSessionAria":"New session","vscodeLayout.actions.openAgentManagerAria":"Open Agent Manager","vscodeLayout.actions.resizeSessionsSidebarAria":"Resize sessions sidebar","vscodeLayout.actions.settingsAria":"Settings","vscodeLayout.quota.title":"Rate limits","vscodeLayout.quota.mode.used":"Used","vscodeLayout.quota.mode.remaining":"Remaining","vscodeLayout.quota.lastUpdated":"Last updated {time}","vscodeLayout.quota.noRateLimitsAvailable":"No rate limits available.","vscodeLayout.quota.noRateLimitsReported":"No rate limits reported.","vscodeLayout.quota.actions.rateLimitsAria":"Rate limits","vscodeLayout.quota.actions.showUsedAria":"Show used quota","vscodeLayout.quota.actions.showRemainingAria":"Show remaining quota","vscodeLayout.quota.actions.refreshAria":"Refresh rate limits","updateDialog.header.updateAvailable":"Update Available","updateDialog.header.updating":"Updating OpenChamber...","updateDialog.changelog.title":"What's new","updateDialog.status.installingUpdate":"Installing update...","updateDialog.status.serverRestarting":"Server restarting...","updateDialog.status.waitingForServer":"Waiting for server...","updateDialog.status.autoReloadHint":"The page will reload automatically when the update is complete.","updateDialog.fallback.updateViaTerminal":"Or update via terminal:","updateDialog.actions.copyCommand":"Copy command","updateDialog.actions.copied":"Copied!","updateDialog.status.downloadingPayload":"Downloading update payload...","updateDialog.actions.downloadUpdate":"Download Update","updateDialog.status.downloading":"Downloading...","updateDialog.actions.restartToUpdate":"Restart to Update","updateDialog.actions.updateNow":"Update Now","updateDialog.status.updating":"Updating...","updateDialog.error.updateFailed":"Update failed","updateDialog.error.takingLonger":"Update is taking longer than expected. Wait a bit and refresh, or run: openchamber update","opencodeUpdate.toast.available.title":"OpenCode update","opencodeUpdate.toast.available.description":"Version {version} available.","opencodeUpdate.toast.actions.update":"Update","opencodeUpdate.toast.actions.dismiss":"Dismiss","opencodeUpdate.toast.actions.reload":"Reload OpenCode","opencodeUpdate.toast.upgrading.title":"Updating OpenCode...","opencodeUpdate.toast.upgrading.description":"Keep OpenChamber open.","opencodeUpdate.toast.updated.title":"OpenCode updated","opencodeUpdate.toast.updated.description":"Update installed.","opencodeUpdate.toast.updated.descriptionWithVersion":"Version {version} installed.","opencodeUpdate.toast.failed.title":"Could not update OpenCode","opencodeUpdate.toast.failed.description":"The OpenCode upgrade failed.","opencodeUpdate.toast.reload.message":"Restarting OpenCode...","memoryDebugPanel.title":"Debug Panel","memoryDebugPanel.tabs.memory":"Memory","memoryDebugPanel.tabs.streaming":"Streaming","memoryDebugPanel.section.sessionsInMemory":"Sessions in Memory","memoryDebugPanel.section.uiStreamingMetrics":"UI Streaming Metrics","memoryDebugPanel.section.vscodeBridgeMetrics":"VS Code Bridge Metrics","memoryDebugPanel.section.noUiSamples":"No UI streaming samples yet. Start a stream and keep this panel open.","memoryDebugPanel.section.noVscodeSamples":"No VS Code bridge samples yet.","memoryDebugPanel.metric.totalMessages":"Total Messages","memoryDebugPanel.metric.cachedSessions":"Cached Sessions","memoryDebugPanel.metric.viewportWindow":"Viewport Window","memoryDebugPanel.metric.zombieTimeout":"Zombie Timeout","memoryDebugPanel.metric.githubTotalRequests":"GitHub Total Requests","memoryDebugPanel.metric.metrics":"Metrics","memoryDebugPanel.metric.samples":"Samples","memoryDebugPanel.metric.lastUpdate":"Last Update","memoryDebugPanel.metric.uiMetrics":"UI Metrics","memoryDebugPanel.metric.vscodeMetrics":"VS Code Metrics","memoryDebugPanel.metric.messageListRenders":"MsgList Renders","memoryDebugPanel.metric.messageListStreamRenders":"MsgList Stream Renders","memoryDebugPanel.metric.chatMessageRenders":"ChatMessage Renders","memoryDebugPanel.metric.chatMessageStreamRenders":"ChatMessage Stream Renders","memoryDebugPanel.metric.chatMessageStaticDuringStream":"ChatMessage Static During Stream","memoryDebugPanel.metric.chatMessageStaticOutsideActiveTurn":"ChatMessage Static Outside Active Turn","memoryDebugPanel.metric.messagesValue":"{count} messages","memoryDebugPanel.metric.minutesValue":"{count} minutes","memoryDebugPanel.metric.msgsValue":"{count} msgs","memoryDebugPanel.metric.countValue":"count {value}","memoryDebugPanel.metric.avgValue":"avg {value}","memoryDebugPanel.metric.maxValue":"max {value}","memoryDebugPanel.metric.totalValue":"total {value}","memoryDebugPanel.actions.logState":"Log State","memoryDebugPanel.actions.copyJson":"Copy JSON","memoryDebugPanel.tooltip.logCurrentState":"Log current memory state to browser console","memoryDebugPanel.streaming.copy.copied":"Streaming debug JSON copied","memoryDebugPanel.streaming.copy.failed":"Failed to copy JSON","memoryDebugPanel.streaming.copy.hint":"Copy exports both UI and VS Code streaming metrics as JSON","memoryDebugPanel.common.idle":"idle","memoryDebugPanel.common.live":"live","memoryDebugPanel.common.notAvailable":"n/a","memoryDebugPanel.common.untitled":"Untitled","directoryTree.field.newDirectoryPlaceholder":"new_directory","textarea.resizeHandleAria":"Resize textarea","sidebar.resize.leftPanelAria":"Resize left panel","sidebar.resize.rightPanelAria":"Resize right panel","mainLayout.mobile.closeDrawerAria":"Close drawer","sortableTabsStrip.aria.tabs":"Tabs","openChamberLogo.aria.logo":"OpenChamber logo","markdownRenderer.table.actions.copyTitle":"Copy table","markdownRenderer.table.actions.downloadTitle":"Download table","markdownRenderer.table.toast.downloadedAsFormat":"Table downloaded as {format}","markdownRenderer.mermaid.actions.copyTitle":"Copy","markdownRenderer.mermaid.actions.copySourceTitle":"Copy source","markdownRenderer.mermaid.actions.downloadSvgTitle":"Download SVG","markdownRenderer.mermaid.toast.downloadFailed":"Failed to download diagram"},M_=["en","zh-CN","zh-TW","uk","es","pt-BR","ko","pl"],y1="en",A_={en:"common.language.english","zh-CN":"common.language.simplifiedChinese","zh-TW":"common.language.traditionalChinese",uk:"common.language.ukrainian",es:"common.language.spanish","pt-BR":"common.language.brazilianPortuguese",ko:"common.language.korean",pl:"common.language.polish"},Kh="openchamber.i18n.v1";function F_(t){if(!t)return y1;const e=t.toLowerCase().replace(/_/g,"-");return e==="zh-cn"||e==="zh-hans"||e.startsWith("zh-hans-")?"zh-CN":e==="zh-tw"||e==="zh-hant"||e.startsWith("zh-hant-")?"zh-TW":e.startsWith("zh")?"zh-CN":e.startsWith("en")?"en":e==="uk"||e.startsWith("uk-")||e==="ua"||e.startsWith("ua-")?"uk":e==="es"||e.startsWith("es-")?"es":e==="pt"||e==="pt-br"||e.startsWith("pt-br-")?"pt-BR":e==="ko"||e.startsWith("ko-")?"ko":e==="pl"||e.startsWith("pl-")?"pl":y1}function __(){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(Kh);if(!t)return;const e=JSON.parse(t);return typeof e.locale=="string"?F_(e.locale):void 0}catch{return}}function B_(t){if(!(typeof window>"u"))try{window.localStorage.setItem(Kh,JSON.stringify({locale:t}))}catch{return}}function D_(){const t=__();return t||y1}const Gd=new Map([[y1,b1]]);async function T_(t){const e=Gd.get(t);if(e)return e;const n=t==="zh-CN"?await dn(()=>import("./zh-CN-Cv0tBxN1.js"),[]):t==="zh-TW"?await dn(()=>import("./zh-TW-CS7R6Ak3.js"),[]):t==="es"?await dn(()=>import("./es-9Cy-lgBh.js"),[]):t==="pt-BR"?await dn(()=>import("./pt-BR-p6gRuJwx.js"),[]):t==="uk"?await dn(()=>import("./uk-BOvMb8eG.js"),[]):t==="ko"?await dn(()=>import("./ko-BxmPoeb2.js"),[]):t==="pl"?await dn(()=>import("./pl-J7oKZUR2.js"),[]):{dict:b1};return Gd.set(t,n.dict),n.dict}const s1=Jt()((t,e)=>({locale:y1,dictionary:b1,loadingLocale:null,setLocale:n=>{const o=e(),s=Gd.get(n);o.locale===n&&o.loadingLocale!==n&&s||(B_(n),t({locale:n,dictionary:s??o.dictionary,loadingLocale:s?null:n}),!s&&T_(n).then(r=>{e().locale===n&&t({dictionary:r,loadingLocale:null})}).catch(r=>{console.error(`[i18n] failed to load locale ${n}`,r),e().locale===n&&t({dictionary:b1,loadingLocale:null})}))}}));function P_(){s1.getState().setLocale(D_())}function Yh(t,e,n){const o=t[e]??b1[e]??e;return n?o.replace(/\{([^{}]+)\}/g,(s,r)=>{const i=n[r.trim()];return i==null?s:String(i)}):o}const v2=Object.freeze(Object.defineProperty({__proto__:null,formatMessage:Yh,initializeLocale:P_,useI18nStore:s1},Symbol.toStringTag,{value:"Module"})),Jh=g.createContext(null),UJ=t=>{const e=le.c(15),{children:n}=t,o=s1(E_),s=s1(H_),r=s1(I_);let i,l;e[0]!==o?(i=()=>{typeof document>"u"||(document.documentElement.lang=o)},l=[o],e[0]=o,e[1]=i,e[2]=l):(i=e[1],l=e[2]),g.useEffect(i,l);let c;e[3]!==s?(c=(p,b)=>Yh(s,p,b),e[3]=s,e[4]=c):c=e[4];const d=c;let u;e[5]!==d?(u=p=>d(A_[p]),e[5]=d,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==r||e[9]!==d||e[10]!==u?(f={locale:o,locales:M_,setLocale:r,label:u,t:d},e[7]=o,e[8]=r,e[9]=d,e[10]=u,e[11]=f):f=e[11];const m=f;let h;return e[12]!==n||e[13]!==m?(h=a.jsx(Jh.Provider,{value:m,children:n}),e[12]=n,e[13]=m,e[14]=h):h=e[14],h};function E_(t){return t.locale}function H_(t){return t.dictionary}function I_(t){return t.setLocale}function nt(){const t=g.useContext(Jh);if(!t)throw new Error("useI18n must be used within I18nProvider");return t}let r1=0;function j_(t,e){return t&&se.isValidElement(e)?{render:e}:{children:e}}function Rs(t){const e=le.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==n?(o=a.jsx(Ib,{...n}),e[2]=n,e[3]=o):o=e[3],o}function L_(t){const e=le.c(10);let n,o,s;e[0]!==t?({asChild:n,children:o,...s}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s):(n=e[1],o=e[2],s=e[3]);let r;e[4]!==n||e[5]!==o?(r=j_(n,o),e[4]=n,e[5]=o,e[6]=r):r=e[6];const i=r;let l;return e[7]!==s||e[8]!==i?(l=a.jsx(Ob,{"data-slot":"dialog-trigger",...s,...i}),e[7]=s,e[8]=i,e[9]=l):l=e[9],l}function N_(t){const e=le.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==n?(o=a.jsx(Vb,{...n}),e[2]=n,e[3]=o):o=e[3],o}const Qh=se.forwardRef((t,e)=>{const n=le.c(10);let o,s;n[0]!==t?({className:o,...s}=t,n[0]=t,n[1]=o,n[2]=s):(o=n[1],s=n[2]);let r;n[3]===Symbol.for("react.memo_cache_sentinel")?(r=[],n[3]=r):r=n[3],se.useEffect(z_,r);const i=e;let l;n[4]!==o?(l=N("fixed inset-0 z-50 bg-black/50 dark:bg-black/75","transition-opacity duration-150 ease-out","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",o),n[4]=o,n[5]=l):l=n[5];let c;return n[6]!==s||n[7]!==i||n[8]!==l?(c=a.jsx(zb,{ref:i,"data-slot":"dialog-overlay",className:l,...s}),n[6]=s,n[7]=i,n[8]=l,n[9]=c):c=n[9],c});Qh.displayName="DialogOverlay";function Vs(t){const e=le.c(16);let n,o,s,r;e[0]!==t?({className:o,children:n,showCloseButton:r,...s}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r):(n=e[1],o=e[2],s=e[3],r=e[4]);const i=r===void 0?!0:r,{t:l}=nt();let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(Qh,{className:"rounded-none"}),e[5]=c):c=e[5];let d;e[6]!==o?(d=N("relative pointer-events-auto bg-background text-foreground flex flex-col w-full max-w-lg max-h-full gap-4 rounded-xl border p-6 shadow-none overflow-y-auto pwa-dialog-content origin-center","transition-all duration-150 ease-out","data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]","data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]",o),e[6]=o,e[7]=d):d=e[7];let u;e[8]!==i||e[9]!==l?(u=i&&a.jsxs(jb,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[open]:bg-interactive-active data-[open]:text-foreground absolute top-2 right-2 rounded-lg opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none text-muted-foreground hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(z,{name:"close"}),a.jsx("span",{className:"sr-only",children:l("dialog.common.actions.close")})]}),e[8]=i,e[9]=l,e[10]=u):u=e[10];let f;return e[11]!==n||e[12]!==s||e[13]!==d||e[14]!==u?(f=a.jsxs(N_,{children:[c,a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center pointer-events-none p-4",children:a.jsxs(Lb,{"data-slot":"dialog-content","data-state-slot":"dialog",className:d,...s,children:[n,u]})})]}),e[11]=n,e[12]=s,e[13]=d,e[14]=u,e[15]=f):f=e[15],f}function br(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("flex flex-col gap-2 text-center sm:text-left",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx("div",{"data-slot":"dialog-header",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function R_(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("flex flex-col-reverse gap-2 bottom-safe-area sm:flex-row sm:justify-end",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx("div",{"data-slot":"dialog-footer",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function yr(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("typography-markdown leading-none font-semibold text-foreground",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx(Nb,{"data-slot":"dialog-title",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function sa(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("text-muted-foreground typography-ui-label",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx(Rb,{"data-slot":"dialog-description",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function V_(){r1=Math.max(0,r1-1),r1===0&&document.documentElement.classList.remove("oc-dialog-open")}function z_(){return r1=r1+1,document.documentElement.classList.add("oc-dialog-open"),V_}const O_=600,$_=1600,ou=10,Xh=se.createContext(null);class ep extends se.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}}function Kd(t){const e=le.c(10);let n,o,s,r,i;e[0]!==t?({delayDuration:i,skipDelayDuration:r,delay:o,closeDelay:n,...s}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r,e[5]=i):(n=e[1],o=e[2],s=e[3],r=e[4],i=e[5]);const c=o??(i===void 0?0:i),d=n??r;let u;return e[6]!==s||e[7]!==c||e[8]!==d?(u=a.jsx($b,{delay:c,closeDelay:d,...s}),e[6]=s,e[7]=c,e[8]=d,e[9]=u):u=e[9],u}function $t(t){const e=le.c(35);let n,o,s,r;e[0]!==t?({delayDuration:n,open:s,onOpenChange:o,...r}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r):(n=e[1],o=e[2],s=e[3],r=e[4]);const[i,l]=se.useState(!1),c=se.useRef(null),d=se.useRef(null),u=se.useRef(null),f=se.useRef(!1),m=s!==void 0,h=m?s:i;let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null)},e[5]=p):p=e[5];const b=p;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null)},e[6]=y):y=e[6];const v=y;let x;e[7]!==m?(x=q=>{m||l(q)},e[7]=m,e[8]=x):x=e[8];const w=x;let S;e[9]!==m||e[10]!==w?(S=q=>{q.pointerType!=="touch"&&q.pointerType!=="pen"||(b(),v(),u.current={x:q.clientX,y:q.clientY},c.current=window.setTimeout(()=>{m||(f.current=!0,w(!0))},O_))},e[9]=m,e[10]=w,e[11]=S):S=e[11];let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=q=>{const $=u.current;if(!$)return;const V=Math.abs(q.clientX-$.x),W=Math.abs(q.clientY-$.y);(V>ou||W>ou)&&(b(),u.current=null)},e[12]=C):C=e[12];let M;e[13]!==w?(M=()=>{b(),u.current=null,f.current&&(v(),d.current=window.setTimeout(()=>{f.current=!1,w(!1)},$_))},e[13]=w,e[14]=M):M=e[14];let A,k;e[15]===Symbol.for("react.memo_cache_sentinel")?(A=q=>{f.current&&(f.current=!1,q.preventDefault(),q.stopPropagation())},k=q=>{f.current&&q.preventDefault()},e[15]=A,e[16]=k):(A=e[15],k=e[16]);let D;e[17]!==S||e[18]!==M?(D={handlePointerDown:S,handlePointerMove:C,handlePointerEnd:M,handleClickCapture:A,handleContextMenu:k},e[17]=S,e[18]=M,e[19]=D):D=e[19];const _=D;let F,B;e[20]===Symbol.for("react.memo_cache_sentinel")?(F=()=>()=>{b(),v()},B=[v,b],e[20]=F,e[21]=B):(F=e[20],B=e[21]),se.useEffect(F,B);let j;e[22]!==m||e[23]!==o?(j=(q,$)=>{m||l(q),o?.(q,$)},e[22]=m,e[23]=o,e[24]=j):j=e[24];const T=j;let P;e[25]!==T||e[26]!==r||e[27]!==h?(P=a.jsx(Zb,{open:h,onOpenChange:T,...r}),e[25]=T,e[26]=r,e[27]=h,e[28]=P):P=e[28];let I;e[29]!==_||e[30]!==P?(I=a.jsx(Xh.Provider,{value:_,children:P}),e[29]=_,e[30]=P,e[31]=I):I=e[31];const O=I;if(n===void 0)return O;let L;return e[32]!==n||e[33]!==O?(L=a.jsx(Kd,{delayDuration:n,children:O}),e[32]=n,e[33]=O,e[34]=L):L=e[34],L}function Zt(t){const e=le.c(43);let n,o,s,r,i,l,c,d,u;e[0]!==t?({asChild:n,children:o,onPointerDown:l,onPointerMove:c,onPointerUp:d,onPointerCancel:i,onClickCapture:s,onContextMenu:r,...u}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c,e[8]=d,e[9]=u):(n=e[1],o=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=se.useContext(Xh);let m;e[10]!==n||e[11]!==o?(m=n&&se.isValidElement(o)?{render:o}:{children:o},e[10]=n,e[11]=o,e[12]=m):m=e[12];const h=m;let p;e[13]!==f||e[14]!==l?(p=M=>{l?.(M),f?.handlePointerDown(M)},e[13]=f,e[14]=l,e[15]=p):p=e[15];let b;e[16]!==f||e[17]!==c?(b=M=>{c?.(M),f?.handlePointerMove(M)},e[16]=f,e[17]=c,e[18]=b):b=e[18];let y;e[19]!==f||e[20]!==d?(y=M=>{d?.(M),f?.handlePointerEnd()},e[19]=f,e[20]=d,e[21]=y):y=e[21];let v;e[22]!==f||e[23]!==i?(v=M=>{i?.(M),f?.handlePointerEnd()},e[22]=f,e[23]=i,e[24]=v):v=e[24];let x;e[25]!==f||e[26]!==s?(x=M=>{f?.handleClickCapture(M),!M.defaultPrevented&&s?.(M)},e[25]=f,e[26]=s,e[27]=x):x=e[27];let w;e[28]!==f||e[29]!==r?(w=M=>{f?.handleContextMenu(M),!M.defaultPrevented&&r?.(M)},e[28]=f,e[29]=r,e[30]=w):w=e[30];let S;e[31]!==u||e[32]!==h||e[33]!==p||e[34]!==b||e[35]!==y||e[36]!==v||e[37]!==x||e[38]!==w?(S=a.jsx(Ub,{"data-slot":"tooltip-trigger",onPointerDown:p,onPointerMove:b,onPointerUp:y,onPointerCancel:v,onClickCapture:x,onContextMenu:w,...u,...h}),e[31]=u,e[32]=h,e[33]=p,e[34]=b,e[35]=y,e[36]=v,e[37]=x,e[38]=w,e[39]=S):S=e[39];let C;return e[40]!==o||e[41]!==S?(C=a.jsx(ep,{fallback:o,children:S}),e[40]=o,e[41]=S,e[42]=C):C=e[42],C}function Ot(t){const e=le.c(23);let n,o,s,r,i,l,c;e[0]!==t?({className:s,sideOffset:c,side:i,align:n,children:o,style:l,...r}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c):(n=e[1],o=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=N("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(Wb,{className:"fill-muted z-50 size-2"}),e[12]=m):m=e[12];let h;e[13]!==o||e[14]!==r||e[15]!==u||e[16]!==f?(h=a.jsxs(qb,{"data-slot":"tooltip-content",className:u,style:f,...r,children:[o,m]}),e[13]=o,e[14]=r,e[15]=u,e[16]=f,e[17]=h):h=e[17];let p;return e[18]!==n||e[19]!==i||e[20]!==d||e[21]!==h?(p=a.jsx(ep,{children:a.jsx(Gb,{children:a.jsx(Kb,{sideOffset:d,side:i,align:n,className:"z-50",children:h})})}),e[18]=n,e[19]=i,e[20]=d,e[21]=h,e[22]=p):p=e[22],p}const Z_=/^(t|.*(?:token|auth|secret|api).*)$/i,jn=t=>{const e=t.trim();if(!e)return null;try{const n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:e.split("#")[0]||null}catch{return null}},U_=t=>{const e=jn(t);if(!e)return null;try{const n=new URL(e);if((n.pathname.replace(/\/+$/,"")||"/")==="/connect"&&n.searchParams.has("t"))return{persistedUrl:n.origin,redeemUrl:n.toString(),kind:"tunnel-connect-link"}}catch{return null}return{persistedUrl:e,redeemUrl:null,kind:"normal-host"}},uo=t=>{const e=jn(t);if(!e)return t;try{const n=new URL(e);(n.username||n.password)&&(n.username="",n.password="");const o=Array.from(new Set(Array.from(n.searchParams.keys())));for(const s of o)Z_.test(s)&&n.searchParams.set(s,"[REDACTED]");return n.toString()}catch{return e}},Ni=(t,e)=>{const n=jn(t),o=jn(e);if(!n||!o)return!1;try{const s=new URL(n),r=new URL(o);if(s.origin!==r.origin||r.search&&s.search!==r.search)return!1;const i=r.pathname.length>1?r.pathname.replace(/\/+$/,""):r.pathname,l=s.pathname.length>1?s.pathname.replace(/\/+$/,""):s.pathname;return i==="/"?!0:l===i||l.startsWith(`${i}/`)}catch{return!1}},d3=t=>typeof t=="object"&&t!==null,Ro=(t,e)=>{const n=t[e];return typeof n=="string"?n:null},su=(t,e)=>{const n=t[e];return typeof n=="number"&&Number.isFinite(n)?n:null},q_=t=>{if(!d3(t))return null;const e=Ro(t,"id"),n=Ro(t,"label"),o=Ro(t,"url"),s=Ro(t,"apiUrl")||Ro(t,"api_url"),r=Ro(t,"clientToken")||Ro(t,"client_token");return!e||!n||!o?null:{id:e,label:n,url:o,...s?{apiUrl:s}:{},...r?{clientToken:r}:{}}},dr=t=>jn(t.apiUrl||t.url)||t.apiUrl||t.url,H1=()=>qn()?(t,e)=>Wn(t,e):null,u3=async()=>{const t=H1();if(!t)return{hosts:[],defaultHostId:"local",initialHostChoiceCompleted:!1};const e=await t("desktop_hosts_get");if(!d3(e))return{hosts:[],defaultHostId:null,initialHostChoiceCompleted:!1};const n=e.hosts,o=Array.isArray(n)?n.map(q_).filter(l=>!!l):[],s=Ro(e,"defaultHostId")||Ro(e,"default_host_id")||Ro(e,"defaultHostID"),r=e.initialHostChoiceCompleted===!0||e.initial_host_choice_completed===!0,i=Ro(e,"localOrigin")||Ro(e,"local_origin");return{hosts:o,defaultHostId:s,initialHostChoiceCompleted:r,localOrigin:i}},Yd=async t=>{const e=H1();if(!e)return;const n={hosts:t.hosts,defaultHostId:t.defaultHostId,initialHostChoiceCompleted:t.initialHostChoiceCompleted};t.localClientToken!==void 0&&(n.localClientToken=t.localClientToken),await e("desktop_hosts_set",{input:n})},W_=async()=>{const t=H1();if(!t)return"";const e=await t("desktop_local_client_token_get").catch(()=>null);return typeof e=="string"?e.trim():""},_c=async(t,e)=>{const n=H1();if(!n)return{status:"unreachable",latencyMs:0};const o=await n("desktop_host_probe",{url:t,clientToken:e?.clientToken||void 0});if(!d3(o))return{status:"unreachable",latencyMs:0};const s=o.status,r=s==="ok"||s==="auth"||s==="update-recommended"||s==="incompatible"||s==="wrong-service"||s==="unreachable"?s:"unreachable",i=su(o,"latencyMs")??su(o,"latency_ms")??0;return{status:r,latencyMs:i}},G_=async(t,e)=>{const n=H1();n&&await n("desktop_new_window_at_url",{url:t,clientToken:e?.clientToken||void 0})},Vo=t=>typeof t=="object"&&t!==null,Xt=(t,e)=>{const n=t[e];return typeof n=="string"?n:null},wn=(t,e)=>{const n=t[e];return typeof n=="number"&&Number.isFinite(n)?n:null},ts=(t,e)=>{const n=t[e];return typeof n=="boolean"?n:null},K_=t=>Array.isArray(t)?t.filter(e=>typeof e=="string"):[],Cr=()=>qn()?(t,e)=>Wn(t,e):null,ru=t=>{if(!Vo(t))return;const e=ts(t,"enabled")??!1,o=Xt(t,"store")?.toLowerCase()==="settings"?"settings":"never",s=Xt(t,"value");return{enabled:e,store:o,...s?{value:s}:{}}},Y_=t=>t==="remote"||t==="dynamic"?t:"local",J_=t=>{if(!Vo(t))return null;const e=Xt(t,"id");if(!e)return null;const n=ts(t,"enabled")??!0,o=Y_(Xt(t,"type")),s=Xt(t,"localHost")||Xt(t,"local_host")||void 0,r=wn(t,"localPort")??wn(t,"local_port")??void 0,i=Xt(t,"remoteHost")||Xt(t,"remote_host")||void 0,l=wn(t,"remotePort")??wn(t,"remote_port")??void 0;return{id:e,enabled:n,type:o,...s?{localHost:s}:{},...typeof r=="number"?{localPort:r}:{},...i?{remoteHost:i}:{},...typeof l=="number"?{remotePort:l}:{}}},Q_=t=>{if(!Vo(t))return null;const e=Xt(t,"id"),n=Xt(t,"sshCommand")||Xt(t,"ssh_command");if(!e||!n)return null;const o=Xt(t,"nickname"),s=t.sshParsed,r=Vo(s)?{destination:Xt(s,"destination")||"",args:K_(s.args)}:void 0,i=Vo(t.remoteOpenchamber)?t.remoteOpenchamber:Vo(t.remote_openchamber)?t.remote_openchamber:{},l=Vo(t.localForward)?t.localForward:Vo(t.local_forward)?t.local_forward:{},c=Vo(t.auth)?t.auth:{},u=Xt(i,"mode")?.toLowerCase()==="external"?"external":"managed",f=Xt(i,"installMethod")||Xt(i,"install_method"),m=f==="npm"||f==="download_release"||f==="upload_bundle"?f:"bun",h=Xt(l,"bindHost")||Xt(l,"bind_host")||"127.0.0.1",p=h==="localhost"||h==="0.0.0.0"?h:"127.0.0.1",y=(Array.isArray(t.portForwards)?t.portForwards:Array.isArray(t.port_forwards)?t.port_forwards:[]).map(C=>J_(C)).filter(C=>!!C),v=wn(i,"preferredPort")??wn(i,"preferred_port"),x=wn(l,"preferredLocalPort")??wn(l,"preferred_local_port"),w=ru(c.sshPassword||c.ssh_password),S=ru(c.openchamberPassword||c.openchamber_password);return{id:e,...o?{nickname:o}:{},sshCommand:n,...r&&r.destination?{sshParsed:r}:{},connectionTimeoutSec:wn(t,"connectionTimeoutSec")??wn(t,"connection_timeout_sec")??60,remoteOpenchamber:{mode:u,keepRunning:ts(i,"keepRunning")??ts(i,"keep_running")??!0,...v?{preferredPort:v}:{},installMethod:m,uploadBundleOverSsh:ts(i,"uploadBundleOverSsh")??ts(i,"upload_bundle_over_ssh")??!1},localForward:{...x?{preferredLocalPort:x}:{},bindHost:p},auth:{...w?{sshPassword:w}:{},...S?{openchamberPassword:S}:{}},portForwards:y}},X_=t=>{switch(t){case"config_resolved":case"auth_check":case"master_connecting":case"remote_probe":case"installing":case"updating":case"server_detecting":case"server_starting":case"forwarding":case"ready":case"degraded":case"error":return t;default:return"idle"}},tp=t=>{if(!Vo(t))return null;const e=Xt(t,"id");return e?{id:e,phase:X_(Xt(t,"phase")),...Xt(t,"detail")?{detail:Xt(t,"detail")||void 0}:{},...Xt(t,"localUrl")||Xt(t,"local_url")?{localUrl:Xt(t,"localUrl")||Xt(t,"local_url")||void 0}:{},...typeof(wn(t,"localPort")??wn(t,"local_port"))=="number"?{localPort:wn(t,"localPort")??wn(t,"local_port")??void 0}:{},...typeof(wn(t,"remotePort")??wn(t,"remote_port"))=="number"?{remotePort:wn(t,"remotePort")??wn(t,"remote_port")??void 0}:{},startedByUs:ts(t,"startedByUs")??ts(t,"started_by_us")??!1,retryAttempt:wn(t,"retryAttempt")??wn(t,"retry_attempt")??0,requiresUserAction:ts(t,"requiresUserAction")??ts(t,"requires_user_action")??!1,updatedAtMs:wn(t,"updatedAtMs")??wn(t,"updated_at_ms")??Date.now()}:null},eB=t=>{if(!Vo(t))return null;const e=Xt(t,"host"),n=Xt(t,"source"),o=Xt(t,"sshCommand")||Xt(t,"ssh_command");return!e||!n||!o?null:{host:e,source:n,sshCommand:o,pattern:ts(t,"pattern")??!1}},qJ=(t,e)=>({id:t,sshCommand:e,connectionTimeoutSec:60,remoteOpenchamber:{mode:"managed",keepRunning:!0,installMethod:"bun",uploadBundleOverSsh:!1},localForward:{bindHost:"127.0.0.1"},auth:{},portForwards:[]}),tB=async()=>{const t=Cr();if(!t)return{instances:[]};const e=await t("desktop_ssh_instances_get");return Vo(e)?{instances:(Array.isArray(e.instances)?e.instances:Array.isArray(e.desktopSshInstances)?e.desktopSshInstances:[]).map(s=>Q_(s)).filter(s=>!!s)}:{instances:[]}},WJ=async t=>{const e=Cr();e&&await e("desktop_ssh_instances_set",{config:{instances:t.instances}})},GJ=async()=>{const t=Cr();if(!t)return[];const e=await t("desktop_ssh_import_hosts");return Array.isArray(e)?e.map(n=>eB(n)).filter(n=>!!n):[]},iu=async t=>{const e=Cr();e&&await e("desktop_ssh_connect",{id:t})},nB=async t=>{const e=Cr();e&&await e("desktop_ssh_disconnect",{id:t})},f3=async t=>{const e=Cr();if(!e)return[];const n=await e("desktop_ssh_status",{...t?{id:t}:{}});return Array.isArray(n)?n.map(o=>tp(o)).filter(o=>!!o):[]},KJ=async(t,e)=>{const n=Cr();if(!n)return[];const o=await n("desktop_ssh_logs",{id:t,limit:e});return Array.isArray(o)?o.filter(s=>typeof s=="string"):[]},YJ=async t=>{const e=Cr();e&&await e("desktop_ssh_logs_clear",{id:t})},JJ=async t=>{if(!qn())return async()=>{};const n=window.__OPENCHAMBER_DESKTOP__?.listen;if(typeof n!="function")return async()=>{};const o=await n("openchamber:ssh-instance-status",s=>{const r=tp(s?.payload);r&&t(r)});return async()=>{await o()}},gn="local",au=9e4,R0="SSH connection cancelled",oB=t=>t.id===gn?"local":`host:${t.id}`,_a=t=>{const e=jn(t);if(!e)return t.trim();try{const n=new URL(e);return n.pathname.endsWith("/")||(n.pathname=`${n.pathname}/`),n.toString()}catch{return e}},m3=()=>typeof window>"u"?"":window.__OPENCHAMBER_LOCAL_ORIGIN__||window.location.origin,Bc=async()=>zi()?W_().catch(()=>""):"",sB=t=>t==="ok"?"bg-status-success":t==="auth"||t==="update-recommended"?"bg-status-warning":t==="incompatible"||t==="wrong-service"||t==="unreachable"?"bg-status-error":t==="checking"?"bg-status-info":"bg-muted-foreground/40",lu=t=>t==="unreachable"||t==="wrong-service"||t==="incompatible",w2=t=>t==="unreachable"||t==="wrong-service"||t==="incompatible",rB=t=>t==="ok"?"desktopHostSwitcher.status.connected":t==="auth"?"desktopHostSwitcher.status.authRequired":t==="checking"?"desktopHostSwitcher.status.checking":t==="update-recommended"?"desktopHostSwitcher.status.updateRecommended":t==="incompatible"?"desktopHostSwitcher.status.incompatible":t==="wrong-service"?"desktopHostSwitcher.status.wrongService":t==="unreachable"?"desktopHostSwitcher.status.unreachable":"desktopHostSwitcher.status.unknown",iB=t=>t==="checking"?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):t==="ok"?a.jsx(z,{name:"check",className:"h-4 w-4"}):t==="auth"?a.jsx(z,{name:"shield-keyhole",className:"h-4 w-4"}):t==="update-recommended"?a.jsx(z,{name:"shield-keyhole",className:"h-4 w-4"}):t==="incompatible"?a.jsx(z,{name:"cloud-off",className:"h-4 w-4"}):t==="wrong-service"?a.jsx(z,{name:"cloud-off",className:"h-4 w-4"}):t==="unreachable"?a.jsx(z,{name:"cloud-off",className:"h-4 w-4"}):a.jsx(z,{name:"earth",className:"h-4 w-4"}),aB=t=>new Promise(e=>window.setTimeout(e,t)),cu=t=>{switch(t){case"ready":return"desktopHostSwitcher.sshPhase.ready";case"error":return"desktopHostSwitcher.sshPhase.error";case"degraded":return"desktopHostSwitcher.sshPhase.reconnecting";case"config_resolved":return"desktopHostSwitcher.sshPhase.resolvingConfig";case"auth_check":return"desktopHostSwitcher.sshPhase.checkingAuth";case"master_connecting":return"desktopHostSwitcher.sshPhase.connectingSsh";case"remote_probe":return"desktopHostSwitcher.sshPhase.probingRemote";case"installing":return"desktopHostSwitcher.sshPhase.installing";case"updating":return"desktopHostSwitcher.sshPhase.updating";case"server_detecting":return"desktopHostSwitcher.sshPhase.detectingServer";case"server_starting":return"desktopHostSwitcher.sshPhase.startingServer";case"forwarding":return"desktopHostSwitcher.sshPhase.forwardingPorts";default:return"desktopHostSwitcher.sshPhase.idle"}},lB=t=>!t||t==="idle"?null:t==="ready"?"ok":t==="error"?"unreachable":"auth",du=async()=>{const t=await f3().catch(()=>[]),e={};for(const n of t)e[n.id]=n;return e},uu=async(t,e,n,o)=>{const s=Date.now()+e;for(;Date.now()<s;){if(o?.())throw new Error(R0);const i=(await f3(t).catch(()=>[])).find(l=>l.id===t);if(i){if(n(i),i.phase==="ready")return i;if(i.phase==="error")throw new Error(i.detail||"SSH connection failed")}await aB(700)}throw o?.()?new Error(R0):new Error("Timed out waiting for SSH connection")},cB=t=>({id:gn,label:"Local",url:t||m3()}),dB=t=>{const e=typeof window>"u"?"":window.location.href,n=t.find(c=>c.id===gn)?.url||m3(),o=wr(),s=jn(n)||n,r=jn(e)||e;if(o&&Ni(o,n))return{id:gn,label:"Local",url:s};const i=t.find(c=>o?Ni(o,dr(c)):!1);if(i)return{id:i.id,label:i.label,url:jn(dr(i))||dr(i)};if(e&&Ni(e,n))return{id:gn,label:"Local",url:s};const l=t.find(c=>e?Ni(e,c.url):!1);return l?{id:l.id,label:l.label,url:jn(l.url)||l.url}:e.startsWith("openchamber-ui://")?{id:gn,label:"Local",url:s}:{id:"custom",label:uo(r||"Instance"),url:r}};function uB({open:t,onOpenChange:e,embedded:n=!1,onHostSwitched:o}){const{t:s}=nt(),r=ke(U=>U.setSettingsDialogOpen),i=ke(U=>U.setSettingsPage),[l,c]=se.useState([]),[d,u]=se.useState(null),[f,m]=se.useState({}),[h,p]=se.useState({}),[b,y]=se.useState(!1),[v,x]=se.useState(!1),[w,S]=se.useState(!1),[C,M]=se.useState(null),[A,k]=se.useState({}),[D,_]=se.useState({}),[F,B]=se.useState({open:!1,hostId:null,hostLabel:"",phase:"idle",detail:null,error:null}),[j,T]=se.useState(""),[P,I]=se.useState(()=>m3()),[O,L]=se.useState(null),[q,$]=se.useState(""),[V,W]=se.useState(""),[E,X]=se.useState(0),R=se.useRef(0),Q=se.useMemo(()=>{const U=cB(P),ie=l.map(Y=>({...Y,url:jn(Y.url)||Y.url}));return[U,...ie]},[l,P]);se.useEffect(()=>Zf(()=>X(U=>U+1)),[]);const de=se.useMemo(()=>dB(Q),[Q,E]),oe=se.useMemo(()=>{const U=d||gn;return Q.find(ie=>ie.id===U)?.label||s("desktopHostSwitcher.instance.local")},[Q,d,s]),xe=se.useCallback(async(U,ie)=>{if(Et()){S(!0),T("");try{const Y=U.filter(Ce=>Ce.id!==gn);await Yd({hosts:Y,defaultHostId:ie}),c(Y),u(ie)}catch(Y){T(Y instanceof Error?Y.message:s("desktopHostSwitcher.error.failedToSave"))}finally{S(!1)}}},[s]),me=se.useCallback(()=>{i("remote-instances"),r(!0),e(!1)},[e,r,i]),ne=se.useCallback(async()=>{if(Et()){y(!0),T("");try{const[U,ie,Y]=await Promise.all([u3(),tB().catch(()=>({instances:[]})),du()]);U.localOrigin&&I(U.localOrigin);const Ce={};for(const Se of ie.instances)Ce[Se.id]=!0;c(U.hosts||[]),u(U.defaultHostId??null),k(Ce),_(Y)}catch(U){T(U instanceof Error?U.message:s("desktopHostSwitcher.error.failedToLoad")),c([]),u(null),k({}),_({})}finally{y(!1)}}},[s]),ae=se.useCallback(async U=>{if(!Et())return;x(!0);const ie={};for(const Y of U)ie[Y.id]=!0;p(ie);try{const Y=await Bc(),Ce=await Promise.all(U.map(async ye=>{const De=jn(zi()?dr(ye):ye.url);if(!De)return[ye.id,{status:"unreachable",latencyMs:0}];const _e=ye.id===gn?Y:ye.clientToken||"",he=await _c(De,{clientToken:_e||null}).catch(()=>({status:"unreachable",latencyMs:0}));return[ye.id,{status:he.status,latencyMs:he.latencyMs}]})),Se={};for(const[ye,De]of Ce)Se[ye]=De;m(Se)}finally{p({}),x(!1)}},[]);se.useEffect(()=>{if(!t){L(null),$(""),W(""),M(null),B({open:!1,hostId:null,hostLabel:"",phase:"idle",detail:null,error:null}),T("");return}ne()},[t,ne]),se.useEffect(()=>{t&&ae(Q)},[t,Q,ae]),se.useEffect(()=>{if(!t||!Et())return;let U=!1;const ie=async()=>{const Ce=await du();U||_(Ce)};ie();const Y=window.setInterval(()=>{typeof document<"u"&&document.visibilityState!=="visible"||ie()},1500);return()=>{U=!0,window.clearInterval(Y)}},[t]);const Me=se.useCallback(async U=>{const ie=U.id===gn?P:jn(U.url)||"",Y=U.id===gn?P:jn(dr(U))||"";if(!ie)return;if(zi()){if(!Y)return;M(U.id);const ye=U.id===gn?await Bc():U.clientToken||"",De=await _c(Y,{clientToken:ye||null}).catch(()=>({status:"unreachable",latencyMs:0}));if(m(_e=>({..._e,[U.id]:{status:De.status,latencyMs:De.latencyMs}})),lu(De.status)){Ze.error(s("desktopHostSwitcher.toast.instanceUnreachable",{host:uo(U.label)})),M(null);return}ld({apiBaseUrl:Y,clientToken:ye||null,runtimeKey:oB(U)}),o?.(),M(null);return}const Ce=!!A[U.id];if(U.id!==gn&&Ce&&Et()){let ye=D[U.id];const De=await f3(U.id).then(Ae=>Ae.find(fe=>fe.id===U.id)||null).catch(()=>null);De&&(ye=De,_(Ae=>({...Ae,[U.id]:De})));const _e=jn(ye?.localUrl||U.url||"");if(ye?.phase==="ready"&&_e){const Ae=_a(_e);o?.(),window.location.assign(Ae);return}M(U.id);const he=R.current+1;R.current=he,B({open:!0,hostId:U.id,hostLabel:uo(U.label),phase:"master_connecting",detail:null,error:null});try{if(await iu(U.id),he!==R.current)return;const Ae=await uu(U.id,au,je=>{_(ze=>({...ze,[je.id]:je})),B(ze=>({...ze,phase:je.phase,detail:je.detail||null}))},()=>he!==R.current);if(he!==R.current)return;const fe=jn(Ae.localUrl||"")||ie,Te=_a(fe);o?.(),window.location.assign(Te);return}catch(Ae){if(he!==R.current)return;const fe=Ae instanceof Error?Ae.message:String(Ae);if(fe===R0)return;B(Te=>({...Te,error:fe})),Ze.error(s("desktopHostSwitcher.toast.sshFailedToConnect",{host:uo(U.label)}),{description:fe});return}finally{he===R.current&&M(null)}}if(U.id!==gn&&Et()){M(U.id);const ye=await _c(ie,{clientToken:U.clientToken||null}).catch(()=>({status:"unreachable",latencyMs:0}));if(m(De=>({...De,[U.id]:{status:ye.status,latencyMs:ye.latencyMs}})),lu(ye.status)){Ze.error(s("desktopHostSwitcher.toast.instanceUnreachable",{host:uo(U.label)})),M(null);return}}const Se=_a(ie);o?.();try{window.location.assign(Se)}catch{window.location.href=Se}},[P,o,A,D,s]),J=se.useCallback(()=>{L(null),$(""),W("")},[]),be=se.useCallback(U=>{U.stopPropagation()},[]),Z=se.useCallback(async()=>{if(!O)return;if(O===gn){J();return}const U=U_(V);if(!U){T(s("desktopHostSwitcher.error.invalidUrl"));return}const ie=U.persistedUrl,Y=(q||uo(ie)).trim(),Ce=l.map(Se=>Se.id===O?{...Se,label:Y,url:ie}:Se);await xe(Ce,d),J(),U.redeemUrl&&window.location.assign(U.redeemUrl)},[J,l,d,q,V,O,xe,s]),te=se.useCallback(async U=>{await xe(l,U===gn?gn:U)},[l,xe]),ce=se.useCallback(U=>{const ie=U.id===gn?P:dr(U);if(!ie)return;const Y=_a(ie);G_(Y,{clientToken:U.clientToken||null}).catch(Ce=>{Ze.error(s("desktopHostSwitcher.error.failedToOpenNewWindow"),{description:Ce instanceof Error?Ce.message:String(Ce)})})},[P,s]),ue=se.useCallback(async()=>{R.current+=1,M(null),B(ie=>({...ie,open:!1,hostId:null,error:null,detail:null,phase:"idle"}));const U=_a(P);if(zi()){const ie=await Bc();ld({apiBaseUrl:P,clientToken:ie||null,runtimeKey:"local"}),o?.();return}o?.(),window.location.assign(U)},[P,o]),re=se.useCallback(async()=>{const U=F.hostId||C;R.current+=1,M(null),B({open:!1,hostId:null,hostLabel:"",phase:"idle",detail:null,error:null}),!(!U||U===gn||!Et())&&await nB(U).catch(()=>{})},[F.hostId,C]),ge=se.useCallback(()=>{const U=F.hostId;if(!U)return;const ie=Q.find(Y=>Y.id===U);ie&&Me(ie)},[Q,Me,F.hostId]),ee=se.useCallback(async U=>{if(Et()){M(U.id);try{await iu(U.id),(await uu(U.id,au,Y=>{_(Ce=>({...Ce,[Y.id]:Y}))})).phase==="ready"&&Ze.success(s("desktopHostSwitcher.toast.sshConnected",{host:uo(U.label)}))}catch(ie){const Y=ie instanceof Error?ie.message:String(ie);Y!==R0&&Ze.error(s("desktopHostSwitcher.toast.sshFailedToConnect",{host:uo(U.label)}),{description:Y})}finally{M(null)}}},[s]);if(!Et())return null;const G=Et(),pe=a.jsxs(a.Fragment,{children:[n?a.jsx("div",{className:"flex-shrink-0 border-b border-[var(--interactive-border)] px-3 py-2",children:a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsxs("div",{className:"min-w-0 flex items-baseline gap-1.5 typography-ui-label",children:[a.jsx("span",{className:"font-medium text-foreground",children:s("desktopHostSwitcher.header.current")}),a.jsx("span",{className:"max-w-[9rem] truncate text-muted-foreground",children:uo(de.label)}),a.jsx("span",{className:"text-muted-foreground/50",children:"•"}),a.jsx("span",{className:"font-medium text-foreground",children:s("desktopHostSwitcher.header.default")}),a.jsx("span",{className:"max-w-[9rem] truncate text-muted-foreground",children:uo(oe)})]}),a.jsx("button",{type:"button",className:N("inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors","hover:text-foreground hover:bg-interactive-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"),onClick:()=>{ae(Q)},disabled:!G||b||v,"aria-label":s("desktopHostSwitcher.actions.refreshInstancesAria"),children:a.jsx(z,{name:"refresh",className:N("h-4 w-4",v&&"animate-spin")})})]})}):a.jsxs(br,{className:"flex-shrink-0",children:[a.jsxs(yr,{className:"flex items-center gap-2",children:[a.jsx(z,{name:"server",className:"h-5 w-5"}),s("desktopHostSwitcher.title")]}),a.jsx(sa,{children:s("desktopHostSwitcher.description")})]}),!n&&a.jsxs("div",{className:"flex items-center justify-between gap-2 flex-shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx("span",{className:"typography-meta text-muted-foreground",children:s("desktopHostSwitcher.header.currentColon")}),a.jsx("span",{className:"typography-ui-label text-foreground truncate",children:uo(de.label)}),a.jsx("span",{className:"typography-meta text-muted-foreground",children:s("desktopHostSwitcher.header.currentDefaultColon")}),a.jsx("span",{className:"typography-ui-label text-foreground truncate",children:uo(oe)})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsxs(kt,{type:"button",size:"sm",variant:"ghost",onClick:()=>{ae(Q)},disabled:!G||b||v,children:[a.jsx(z,{name:"refresh",className:N("h-4 w-4",v&&"animate-spin")}),s("desktopHostSwitcher.actions.refresh")]})})]}),!G&&a.jsx("div",{className:"flex-shrink-0 rounded-lg border border-border/50 bg-muted/20 p-3",children:a.jsx("div",{className:"typography-meta text-muted-foreground",children:s("desktopHostSwitcher.state.limitedOnPage")})}),a.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:a.jsx("div",{className:"space-y-1",children:b?a.jsx("div",{className:"px-2 py-2 text-muted-foreground text-sm",children:s("desktopHostSwitcher.state.loading")}):Q.map(U=>{const ie=U.id===gn,Y=!!A[U.id],Ce=U.id===de.id,Se=(d||gn)===U.id,ye=f[U.id]||null,De=D[U.id]||null,_e=!Y&&!!h[U.id],he=Y?lB(De?.phase):_e?"checking":ye?.status??null,Ae=O===U.id,fe=ie?P:jn(U.url)||U.url,Te=U.id===gn?s("desktopHostSwitcher.instance.local"):uo(U.label),je=uo(fe);return a.jsxs("div",{className:N("group flex items-center gap-2 px-2.5 py-2 rounded-md overflow-hidden",Ae?"bg-interactive-hover/20":"hover:bg-interactive-hover/30"),children:[a.jsxs("button",{type:"button",className:N("flex items-center gap-2 flex-1 min-w-0 text-left",Ae&&"pointer-events-none opacity-70"),onClick:()=>{Me(U)},disabled:C===U.id,"aria-label":s("desktopHostSwitcher.actions.switchToAria",{instance:Te}),children:[a.jsx("span",{className:N("h-2 w-2 rounded-full flex-shrink-0",sB(he))}),a.jsxs("div",{className:"flex-1 min-w-0 space-y-0.5",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a.jsxs("div",{className:"flex min-w-0 max-w-[45%] items-center gap-1.5",children:[a.jsx("span",{className:"typography-ui-label truncate text-foreground",children:Te}),Y&&a.jsx("span",{className:"typography-micro flex-shrink-0 px-1 rounded leading-none pb-px text-[var(--status-info)] bg-[var(--status-info)]/10",children:"SSH"}),Ce&&a.jsx("span",{className:"typography-micro flex-shrink-0 text-muted-foreground",children:s("desktopHostSwitcher.header.current")})]}),a.jsxs("span",{className:"inline-flex min-w-0 flex-1 items-center gap-1 typography-micro text-muted-foreground",children:[a.jsx("span",{className:"flex-shrink-0",children:iB(he)}),a.jsxs("span",{className:"truncate",children:[s(Y?cu(De?.phase):rB(he)),!Y&&he==="ok"&&typeof ye?.latencyMs=="number"?s("desktopHostSwitcher.status.ping",{ms:Math.max(0,Math.round(ye.latencyMs))}):""]})]})]}),a.jsx("div",{className:"typography-micro text-muted-foreground truncate font-mono",children:je})]})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[Y&&!ie&&(De?.phase==="idle"||!De?.phase?a.jsxs(kt,{type:"button",variant:"outline",size:"sm",className:"h-8 px-2.5",disabled:C===U.id,onClick:ze=>{ze.stopPropagation(),ee(U)},children:[C===U.id?a.jsx(z,{name:"loader-4",className:"h-3.5 w-3.5 animate-spin"}):a.jsx(z,{name:"plug-2",className:"h-3.5 w-3.5"}),s("desktopHostSwitcher.actions.connect")]}):a.jsx("div",{className:"h-8 w-8 opacity-0 pointer-events-none","aria-hidden":"true"})),a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsx("button",{type:"button",className:N("h-8 w-8 rounded-md inline-flex items-center justify-center hover:bg-interactive-hover transition-colors",Se?"text-primary hover:text-primary/80":"text-muted-foreground/60 hover:text-primary/80"),onClick:()=>{te(U.id)},"aria-label":s(Se?"desktopHostSwitcher.actions.defaultInstanceAria":"desktopHostSwitcher.actions.setAsDefaultAria"),disabled:w||!Se&&w2(he),children:Se?a.jsx(z,{name:"star-fill",className:"h-4 w-4"}):a.jsx(z,{name:"star",className:"h-4 w-4"})})}),a.jsx(Ot,{sideOffset:6,children:s(Se?"desktopHostSwitcher.header.default":"desktopHostSwitcher.actions.setAsDefault")})]}),a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsx("button",{type:"button",className:N("h-8 w-8 rounded-md inline-flex items-center justify-center hover:bg-interactive-hover transition-colors",w2(he)?"text-muted-foreground/30 cursor-not-allowed":"text-muted-foreground/60 hover:text-foreground"),onClick:ze=>{ze.stopPropagation(),ce(U)},disabled:w2(he),"aria-label":s("desktopHostSwitcher.actions.openInNewWindowAria"),children:a.jsx(z,{name:"window",className:"h-4 w-4"})})}),a.jsx(Ot,{sideOffset:6,children:w2(he)?s("desktopHostSwitcher.state.instanceUnreachable"):s("desktopHostSwitcher.actions.openInNewWindow")})]})]})]},U.id)})})}),G&&O&&O!==gn&&a.jsxs("div",{className:"flex-shrink-0 rounded-lg border border-border/50 bg-muted/20 p-3",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("div",{className:"typography-ui-label font-medium text-foreground",children:s("desktopHostSwitcher.edit.title")}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(kt,{type:"button",variant:"outline",size:"sm",onClick:J,disabled:w,children:s("desktopHostSwitcher.actions.cancel")}),a.jsxs(kt,{type:"button",size:"sm",onClick:()=>{Z()},disabled:w,children:[w?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):null,s("desktopHostSwitcher.actions.save")]})]})]}),a.jsxs("div",{className:"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",children:[a.jsx(ws,{value:q,onChange:U=>$(U.target.value),onKeyDown:be,placeholder:s("desktopHostSwitcher.field.labelPlaceholder"),disabled:w}),a.jsx(ws,{value:V,onChange:U=>W(U.target.value),onKeyDown:be,placeholder:s("desktopHostSwitcher.field.urlPlaceholder"),disabled:w})]})]}),a.jsx("div",{className:"flex-shrink-0 border-t border-[var(--interactive-border)]",children:a.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-2 py-2 text-left text-muted-foreground hover:text-foreground hover:bg-interactive-hover/30 transition-colors",onClick:me,children:[a.jsx(z,{name:"add",className:"h-4 w-4"}),a.jsx("span",{className:"typography-ui-label",children:s("desktopHostSwitcher.actions.addInstance")})]})}),j&&a.jsx("div",{className:"flex-shrink-0 typography-meta text-status-error",children:j})]}),ve=a.jsx(Rs,{open:F.open,onOpenChange:U=>{if(!U&&C){re();return}B(ie=>({...ie,open:U,...U?{}:{hostId:null,error:null,detail:null,phase:"idle"}}))},children:a.jsxs(Vs,{className:"w-[min(28rem,calc(100vw-2rem))] max-w-none",children:[a.jsxs(br,{children:[a.jsxs(yr,{className:"flex items-center gap-2",children:[a.jsx(z,{name:"loader-4",className:N("h-4 w-4",!F.error&&"animate-spin")}),s("desktopHostSwitcher.ssh.connectingTo",{host:F.hostLabel||s("desktopHostSwitcher.ssh.instanceFallback")})]}),a.jsx(sa,{children:F.error?F.error:F.detail||s(cu(F.phase))})]}),F.error?a.jsxs("div",{className:"flex justify-end gap-2",children:[a.jsx(kt,{type:"button",size:"sm",variant:"outline",onClick:()=>{ue()},children:s("desktopHostSwitcher.actions.switchToLocal")}),a.jsx(kt,{type:"button",size:"sm",onClick:ge,disabled:!F.hostId,children:s("desktopHostSwitcher.actions.retry")})]}):null]})});return n?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"w-full max-h-[70vh] flex flex-col overflow-hidden gap-2",children:pe}),ve]}):a.jsxs(a.Fragment,{children:[a.jsx(Rs,{open:t,onOpenChange:e,children:a.jsx(Vs,{className:"w-[min(42rem,calc(100vw-2rem))] max-w-none max-h-[70vh] flex flex-col overflow-hidden gap-3",children:pe})}),ve]})}function fu(){const t=le.c(11),[e,n]=se.useState(!1),{t:o}=nt();if(!Et())return null;let s,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>n(!0),r=a.jsx(z,{name:"server",className:"h-4 w-4"}),t[0]=s,t[1]=r):(s=t[0],r=t[1]);let i;t[2]!==o?(i=o("desktopHostSwitcher.actions.switchInstance"),t[2]=o,t[3]=i):i=t[3];let l;t[4]!==i?(l=a.jsxs(kt,{type:"button",variant:"ghost",size:"sm","data-oc-host-switcher":!0,className:"w-full justify-center",onClick:s,children:[r,i]}),t[4]=i,t[5]=l):l=t[5];let c;t[6]!==e?(c=a.jsx(uB,{open:e,onOpenChange:n}),t[6]=e,t[7]=c):c=t[7];let d;return t[8]!==l||t[9]!==c?(d=a.jsxs(a.Fragment,{children:[l,c]}),t[8]=l,t[9]=c,t[10]=d):d=t[10],d}const h3=se.createContext(void 0);function Zs(){const t=se.useContext(h3);if(!t)throw new Error("useThemeSystem must be used within a ThemeSystemProvider");return t}function hl(){return se.useContext(h3)}const fB=[.2,.45,.15,.55,.35,.1,.5,.25,.4,.3,.45,.15,.55,.2,.35,.1],mB=[.3,.15,.45,.25,.5,.35,.1,.4,.2,.55,.3,.15,.45,.25,.4,.2],mu=(t,e,n,o,s=4)=>{const r=[];for(let i=0;i<s;i++)for(let l=0;l<s;l++){const c=l/s,d=(l+1)/s,u=i/s,f=(i+1)/s,m=(x,w,S)=>x+(w-x)*S,h=(x,w,S,C,M,A)=>{const k=m(x,w,M),D=m(C,S,M);return m(k,D,A)},p={x:h(t.x,e.x,n.x,o.x,c,u),y:h(t.y,e.y,n.y,o.y,c,u)},b={x:h(t.x,e.x,n.x,o.x,d,u),y:h(t.y,e.y,n.y,o.y,d,u)},y={x:h(t.x,e.x,n.x,o.x,d,f),y:h(t.y,e.y,n.y,o.y,d,f)},v={x:h(t.x,e.x,n.x,o.x,c,f),y:h(t.y,e.y,n.y,o.y,c,f)};r.push({path:`M${p.x} ${p.y} L${b.x} ${b.y} L${y.x} ${y.y} L${v.x} ${v.y} Z`,row:i,col:l})}return r},np=({className:t="",width:e=70,height:n=70,isAnimated:o=!1})=>{const{t:s}=nt(),r=hl();let i=!0;r?i=r.currentTheme.metadata.variant!=="light":typeof window<"u"&&(i=window.matchMedia("(prefers-color-scheme: dark)").matches);const l=se.useMemo(()=>{if(r)return r.currentTheme.colors.surface.foreground;if(typeof window<"u"){const F=getComputedStyle(document.documentElement).getPropertyValue("--splash-stroke").trim();if(F)return F}return i?"white":"black"},[r,i]),c=se.useMemo(()=>typeof window>"u"||typeof CSS>"u"||typeof CSS.supports!="function"?!1:CSS.supports("color","color-mix(in srgb, white 50%, transparent)"),[]),d=se.useMemo(()=>{if(r)return c?`color-mix(in srgb, ${l} 15%, transparent)`:i?"rgba(255,255,255,0.15)":"rgba(0,0,0,0.15)";if(typeof window<"u"){const F=getComputedStyle(document.documentElement).getPropertyValue("--splash-face-fill").trim();if(F)return F}return i?"rgba(255,255,255,0.15)":"rgba(0,0,0,0.15)"},[r,c,l,i]),u=se.useMemo(()=>{if(r)return c?`color-mix(in srgb, ${l} 35%, transparent)`:i?"rgba(255,255,255,0.35)":"rgba(0,0,0,0.4)";if(typeof window<"u"){const F=getComputedStyle(document.documentElement).getPropertyValue("--splash-cell-fill").trim();if(F)return F}return i?"rgba(255,255,255,0.35)":"rgba(0,0,0,0.4)"},[r,c,l,i]),f=l,m=48,h=.866,p=.5,b=50,y={x:50,y:b-m},v={x:50-m*h,y:b-m*p},x={x:50+m*h,y:b-m*p},w={x:50,y:b},S={x:50-m*h,y:b+m*p},C={x:50+m*h,y:b+m*p},M={x:50,y:b+m},k=`matrix(0.866, 0.5, -0.866, 0.5, 50, ${(y.y+v.y+w.y+x.y)/4})`,D=mu(v,w,M,S),_=mu(w,x,C,M);return a.jsxs("svg",{width:e,height:n,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,role:"img","aria-label":s("openChamberLogo.aria.logo"),children:[o?a.jsx("style",{children:"@keyframes oc-logo-glow{0%,100%{filter:drop-shadow(0 0 0 transparent)}50%{filter:drop-shadow(0 0 4px var(--oc-glow-color))}}.oc-logo-glow{animation:oc-logo-glow 1.8s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.oc-logo-glow{animation:none}}"}):null,a.jsx("path",{d:`M${w.x} ${w.y} L${v.x} ${v.y} L${S.x} ${S.y} L${M.x} ${M.y} Z`,fill:d,stroke:l,strokeWidth:"2",strokeLinejoin:"round"}),D.map((F,B)=>a.jsx("path",{d:F.path,fill:u,opacity:fB[F.row*4+(3-F.col)]??.35},`left-${B}`)),a.jsx("path",{d:`M${w.x} ${w.y} L${x.x} ${x.y} L${C.x} ${C.y} L${M.x} ${M.y} Z`,fill:d,stroke:l,strokeWidth:"2",strokeLinejoin:"round"}),_.map((F,B)=>a.jsx("path",{d:F.path,fill:u,opacity:mB[F.row*4+F.col]??.35},`right-${B}`)),a.jsx("path",{d:`M${y.x} ${y.y} L${v.x} ${v.y} L${w.x} ${w.y} L${x.x} ${x.y} Z`,fill:"none",stroke:l,strokeWidth:"2",strokeLinejoin:"round"}),a.jsx("g",{opacity:1,className:o?"oc-logo-glow":void 0,style:o?{"--oc-glow-color":l}:void 0,children:a.jsxs("g",{transform:`${k} scale(0.75)`,children:[a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 -20 L16 -20 L16 20 L-16 20 Z M-8 -12 L-8 12 L8 12 L8 -12 Z",fill:f}),a.jsx("path",{d:"M-8 -4 L8 -4 L8 12 L-8 12 Z",fill:f,fillOpacity:"0.4"})]})})]})},hB="/auth/passkey/authenticate/options",pB="/auth/passkey/authenticate/verify",gB="/auth/passkey/register/options",bB="/auth/passkey/register/verify",op="/api/passkeys",yB="/auth/passkey/status",vB="/api/auth/reset",$a={enabled:!1,hasPasskeys:!1,passkeyCount:0,rpID:null},v1=async(t,e)=>We(t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e===void 0?void 0:JSON.stringify(e)}),Gr=async(t,e)=>{try{const n=await t.json();if(n&&typeof n.error=="string"&&n.error.trim())return n.error}catch{}return e},Dc=t=>t instanceof Qb&&t.code==="ERROR_CEREMONY_ABORTED",wB=()=>{Jb.cancelCeremony()},sp=()=>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."},xB=async()=>{const t=sp();if(!t.supported)throw new Error(t.reason);const e=typeof navigator.userAgent=="string"&&navigator.userAgent.trim()?navigator.userAgent:"This device",n=await v1(gB,{label:e});if(!n.ok)throw new Error(await Gr(n,"Could not start passkey setup."));const{requestId:o,optionsJSON:s}=await n.json(),r=await Yb({optionsJSON:s}),i=await v1(bB,{requestId:o,response:r});if(!i.ok)throw new Error(await Gr(i,"Could not finish passkey setup."));return i.json().catch(()=>null)},CB=async(t,e={})=>{const n=sp();if(!n.supported)throw new Error(n.reason);const o=await v1(hB);if(!o.ok)throw new Error(await Gr(o,"Passkey sign-in is not available right now."));const{requestId:s,optionsJSON:r}=await o.json(),i=await Xb({optionsJSON:r}),l=await v1(pB,{requestId:s,response:i,trustDevice:t,issueClientToken:e.issueClientToken===!0,clientLabel:e.clientLabel,clientKind:e.clientKind,dedupeKey:e.dedupeKey});if(!l.ok)throw new Error(await Gr(l,"Passkey sign-in failed."));return l.json().catch(()=>null)},SB=async()=>{const t=await We(yB,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)return $a;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}},QJ=async()=>{const t=await We(op,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)throw new Error(await Gr(t,"Could not load passkeys."));const e=await t.json().catch(()=>null);return Array.isArray(e?.passkeys)?e.passkeys:[]},XJ=async t=>{const e=await We(`${op}/${encodeURIComponent(t)}`,{method:"DELETE",credentials:"include",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(await Gr(e,"Could not remove passkey."));return e.json().catch(()=>null)},eQ=async()=>{const t=await v1(vB);if(!t.ok)throw new Error(await Gr(t,"Could not clear saved authentication."));return t.json().catch(()=>null)},rp="/auth/session",ip="openchamber.uiAuth.trustDevice",kB="desktop-local",MB="desktop-local",AB=()=>{if(typeof window>"u")return"";const t=window.__OPENCHAMBER_LOCAL_ORIGIN__;return typeof t=="string"?t.trim():""},Jd=(t,e)=>{const n=jn(t),o=jn(e);if(!n||!o)return!1;try{return new URL(n).origin===new URL(o).origin}catch{return!1}},r0=()=>Et(),ap=()=>{if(!Et())return!1;const t=wr(),e=AB();return!!(e&&Jd(e,t))},p3=()=>ap()?{clientKind:kB,dedupeKey:MB}:{},FB=async()=>await We(rp,{method:"GET",credentials:"include",headers:{Accept:"application/json"}}),_B=()=>typeof window>"u"?!1:window.localStorage.getItem(ip)==="true",BB=async(t,e)=>{const n=r0();return await We(rp,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({password:t,trustDevice:e,issueClientToken:n,clientLabel:"OpenChamber Desktop",...p3()})})},DB=async()=>{if(!Et())return"";const t=await We("/api/client-auth/clients",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({label:"OpenChamber Desktop",...p3()})}).catch(()=>null);if(!t?.ok)return"";const e=await t.json().catch(()=>null);return typeof e?.token=="string"?e.token.trim():""},hu=()=>Et()&&!ap(),pu=async(t,e)=>{if(!Et()||typeof window>"u")return"";const n=await Wn("desktop_remote_password_login",{url:wr(),password:t,trustDevice:e}).catch(()=>null);if(!n||typeof n!="object")return"";const o=n.token;return typeof o=="string"?o.trim():""},TB=async(t,e)=>{if(!Et()||!e)return;const n=await u3().catch(()=>null);if(!n)return;if(n.localOrigin&&Jd(n.localOrigin,t)){await Yd({hosts:n.hosts,defaultHostId:n.defaultHostId,initialHostChoiceCompleted:n.initialHostChoiceCompleted,localClientToken:e}).catch(()=>{});return}let o=!1;const s=n.hosts.map(r=>!Jd(dr(r),t)||r.clientToken===e?r:(o=!0,{...r,clientToken:e}));o&&await Yd({hosts:s,defaultHostId:n.defaultHostId,initialHostChoiceCompleted:n.initialHostChoiceCompleted}).catch(()=>{})},Tc=async t=>{if(!t)return;const e=wr();await TB(e,t),ld({apiBaseUrl:e,clientToken:t,runtimeKey:ei()})},lp=t=>{const e=le.c(7),{children:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={height:"var(--oc-wco-titlebar-height, 0px)",right:"var(--oc-wco-right-inset, 0px)"},e[0]=o):o=e[0];const s=o;let r,i;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={fontFamily:'"Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif'},i=a.jsx("div",{className:"app-region-drag fixed left-0 top-0 z-20",style:s,"aria-hidden":!0}),e[1]=r,e[2]=i):(r=e[1],i=e[2]);let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-55",style:{background:"radial-gradient(120% 140% at 50% -20%, var(--surface-overlay) 0%, transparent 68%)"}}),e[3]=l):l=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{backgroundColor:"var(--surface-subtle)",opacity:.22}}),e[4]=c):c=e[4];let d;return e[5]!==n?(d=a.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background text-foreground",style:r,children:[i,l,c,a.jsx("div",{className:"app-region-no-drag relative z-10 flex w-full justify-center px-4 py-12 sm:px-6",children:n})]}),e[5]=n,e[6]=d):d=e[6],d},PB=()=>{const t=le.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:a.jsx(np,{width:120,height:120})}),t[0]=e):e=t[0],e},gu=t=>{const e=le.c(23),{onRetry:n,errorType:o,retryAfter:s,children:r}=t,i=o===void 0?"network":o,{t:l}=nt(),c=i==="rate-limit",d=s?Math.ceil(s/60):1;let u;e[0]!==c||e[1]!==l?(u=l(c?"sessionAuth.error.rateLimitTitle":"sessionAuth.error.networkTitle"),e[0]=c,e[1]=l,e[2]=u):u=e[2];let f;e[3]!==u?(f=a.jsx("h1",{className:"typography-ui-header font-semibold text-destructive",children:u}),e[3]=u,e[4]=f):f=e[4];let m;e[5]!==c||e[6]!==d||e[7]!==l?(m=c?d>1?l("sessionAuth.error.rateLimitDescriptionPlural",{minutes:d}):l("sessionAuth.error.rateLimitDescriptionSingle",{minutes:d}):l("sessionAuth.error.networkDescription"),e[5]=c,e[6]=d,e[7]=l,e[8]=m):m=e[8];let h;e[9]!==m?(h=a.jsx("p",{className:"typography-meta text-muted-foreground max-w-xs",children:m}),e[9]=m,e[10]=h):h=e[10];let p;e[11]!==f||e[12]!==h?(p=a.jsxs("div",{className:"space-y-2",children:[f,h]}),e[11]=f,e[12]=h,e[13]=p):p=e[13];let b;e[14]!==l?(b=l("sessionAuth.error.retry"),e[14]=l,e[15]=b):b=e[15];let y;e[16]!==n||e[17]!==b?(y=a.jsx(kt,{type:"button",onClick:n,className:"w-full max-w-xs",children:b}),e[16]=n,e[17]=b,e[18]=y):y=e[18];let v;return e[19]!==r||e[20]!==p||e[21]!==y?(v=a.jsx(lp,{children:a.jsxs("div",{className:"flex flex-col items-center gap-6 text-center",children:[p,y,r]})}),e[19]=r,e[20]=p,e[21]=y,e[22]=v):v=e[22],v},tQ=({children:t})=>{const{t:e}=nt(),n=g.useMemo(()=>Ht(),[]),o=n,s=g.useMemo(()=>Et()&&!n,[n]),[r,i]=g.useState(()=>o?"authenticated":"pending"),[l,c]=g.useState(""),[d,u]=g.useState(!1),[f,m]=g.useState(""),[h,p]=g.useState(void 0),[b,y]=g.useState(!1),[v,x]=g.useState($a),[w,S]=g.useState(!1),[C,M]=g.useState(!1),[A,k]=g.useState(()=>_B()),[D,_]=g.useState(null),F=g.useRef(null),B=g.useRef(o);g.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(ip,A?"true":"false")},[A]);const j=g.useCallback(async()=>{if(o)return $a;try{const E=await SB();return x(E),E}catch{return x($a),$a}},[o]);g.useEffect(()=>{let E=!1;if(!o)return(async()=>{try{if(!window.isSecureContext||!ey()){E||S(!1);return}E||S(!0)}catch{E||S(!1)}})(),()=>{E=!0}},[o]);const T=g.useCallback(async()=>{if(o){i("authenticated");return}i(E=>E==="authenticated"?E:"pending");try{const[E,X]=await Promise.all([FB(),j()]),R=await E.text();if(E.ok){i("authenticated"),y(!1),m(""),p(void 0);return}if(E.status===401){let Q={};try{Q=JSON.parse(R)}catch{Q={}}y(Q.tunnelLocked===!0),x(X),i("locked"),p(void 0);return}if(E.status===429){let Q={};try{Q=JSON.parse(R)}catch{Q={}}p(Q.retryAfter),y(!1),i("rate-limited");return}i("error"),y(!1)}catch(E){if(console.warn("Failed to check session status:",E),hu()){i("locked"),p(void 0),y(!1);return}i("error"),y(!1)}},[j,o]);g.useEffect(()=>{o||T()},[T,o]),g.useEffect(()=>{if(!o)return Zf(()=>{c(""),m(""),p(void 0),y(!1),i("pending"),T()})},[T,o]),g.useEffect(()=>{!o&&r==="locked"&&(B.current=!1)},[o,r]),g.useEffect(()=>{r==="locked"&&F.current&&(F.current.focus(),F.current.select())},[r]),g.useEffect(()=>{o||r==="authenticated"&&!B.current&&(B.current=!0,(async()=>(await px(),await yx(),await S_()))())},[o,r]);const P=async E=>{E.preventDefault(),await L(!1)},I=g.useCallback(async()=>{_("register"),M(!0);try{await xB()}finally{_(null),M(!1)}await j()},[j]),O=g.useCallback(()=>{wB(),_(null),M(!1)},[]),L=g.useCallback(async E=>{if(!b&&!(!l||d)){C&&O(),u(!0),m("");try{const X=await BB(l,A);if(X.ok){const R=await X.json().catch(()=>null),de=r0()?typeof R?.clientToken=="string"&&R.clientToken.trim()?R.clientToken.trim():await pu(l,A)||await DB():"";if(c(""),y(!1),de&&await Tc(de),E&&w)try{await I(),Ze.success(e("sessionAuth.toast.passkeyAdded")),i("authenticated");return}catch(oe){if(Dc(oe))Ze.message(e("sessionAuth.toast.passkeySetupCanceled"));else{const xe=oe instanceof Error?oe.message:e("sessionAuth.error.passkeySetupFailed");Ze.error(xe)}i("authenticated");return}i("authenticated");return}if(X.status===401){m(e("sessionAuth.error.incorrectPassword")),y(!1),i("locked");return}if(X.status===429){const R=await X.json().catch(()=>({}));p(R.retryAfter),y(!1),i("rate-limited");return}m(e("sessionAuth.error.unexpectedResponse")),y(!1),i("error")}catch(X){console.warn("Failed to submit UI password:",X);const R=hu()?await pu(l,A):"";if(R){c(""),y(!1),await Tc(R),i("authenticated");return}m(e("sessionAuth.error.networkRetry")),y(!1),i("error")}finally{u(!1)}}},[O,C,d,b,l,I,w,e,A]),q=g.useCallback(async()=>{if(!(d||!w)){if(C){O();return}M(!0),_("auth"),m("");try{const E=await CB(A,{issueClientToken:r0(),clientLabel:"OpenChamber Desktop",...p3()}),X=r0()&&typeof E?.clientToken=="string"&&E.clientToken.trim()?E.clientToken.trim():"";X&&await Tc(X),c(""),i("authenticated")}catch(E){if(Dc(E))m("");else{const X=E instanceof Error?E.message:e("sessionAuth.error.passkeySignInCanceled");m(X)}}finally{_(null),M(!1)}}},[O,C,d,w,e,A]),$=g.useCallback(async()=>{if(!(d||b||!w)){if(C){O();return}if(r!=="authenticated"){if(!l){m(e("sessionAuth.error.enterPasswordForPasskey"));return}await L(!0);return}m("");try{await I(),Ze.success(e("sessionAuth.toast.passkeyAdded"))}catch(E){if(Dc(E)){Ze.message(e("sessionAuth.toast.passkeySetupCanceled"));return}const X=E instanceof Error?E.message:e("sessionAuth.error.passkeySetupFailed");Ze.error(X)}}},[O,L,C,d,b,l,I,r,w,e]),V=w&&v.enabled,W=V&&v.hasPasskeys;return r==="pending"?a.jsx(PB,{}):r==="error"?a.jsx(gu,{onRetry:()=>{T()},errorType:"network",children:s&&a.jsxs("div",{className:"w-full max-w-xs",children:[a.jsx(fu,{}),a.jsx("p",{className:"mt-1 text-center typography-micro text-muted-foreground",children:e("sessionAuth.locked.hostSwitcherHint")})]})}):r==="rate-limited"?a.jsx(gu,{onRetry:()=>{T()},errorType:"rate-limit",retryAfter:h}):r==="locked"?a.jsx(lp,{children:a.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-xs",children:[a.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[a.jsx("h1",{className:"text-xl font-semibold text-foreground",children:e(b?"sessionAuth.locked.tunnelTitle":"sessionAuth.locked.unlockTitle")}),a.jsx("p",{className:"typography-meta text-muted-foreground",children:e(b?"sessionAuth.locked.tunnelDescription":"sessionAuth.locked.passwordDescription")})]}),!b&&a.jsxs("form",{onSubmit:P,className:"w-full space-y-2",children:[W&&a.jsxs(kt,{type:"button",variant:"outline",className:"w-full",onClick:()=>{q()},disabled:d||C&&D!=="auth",children:[C?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):a.jsx(z,{name:"lock-unlock",className:"h-4 w-4"}),a.jsx("span",{children:e(C&&D==="auth"?"sessionAuth.actions.cancelPasskey":"sessionAuth.actions.usePasskey")})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(z,{name:"lock",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/60"}),a.jsx(ws,{id:"openchamber-ui-password",ref:F,type:"password",autoComplete:"current-password",placeholder:e("sessionAuth.password.placeholder"),value:l,onChange:E=>{c(E.target.value),f&&m("")},className:"pl-10","aria-invalid":!!f||void 0,"aria-describedby":f?"oc-ui-auth-error":void 0,disabled:d})]}),a.jsx(kt,{type:"submit",size:"icon",disabled:!l||d,"aria-label":e(d?"sessionAuth.actions.unlockingAria":"sessionAuth.actions.unlockAria"),children:d?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):a.jsx(z,{name:"lock-unlock",className:"h-4 w-4"})})]}),V?a.jsxs("div",{className:"flex items-center justify-between pt-1",children:[a.jsxs("label",{className:"flex items-center gap-2 text-center typography-micro text-muted-foreground",children:[a.jsx(N0,{checked:A,onChange:k,disabled:d,ariaLabel:e("sessionAuth.actions.trustDeviceAria"),className:"size-4",iconClassName:"size-4"}),a.jsx("span",{children:e("sessionAuth.actions.trustDevice")})]}),a.jsx(kt,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground",onClick:()=>{$()},disabled:d,children:e(C&&D==="register"?"sessionAuth.actions.cancelPasskeySetup":"sessionAuth.actions.addPasskey")})]}):a.jsxs("label",{className:"flex items-center justify-center gap-2 pt-1 text-center typography-micro text-muted-foreground",children:[a.jsx(N0,{checked:A,onChange:k,disabled:d,ariaLabel:e("sessionAuth.actions.trustDeviceAria"),className:"size-4",iconClassName:"size-4"}),a.jsx("span",{children:e("sessionAuth.actions.trustDevice")})]}),f&&a.jsx("p",{id:"oc-ui-auth-error",className:"typography-meta text-destructive",children:f})]}),s&&a.jsxs("div",{className:"w-full",children:[a.jsx(fu,{}),a.jsx("p",{className:"mt-1 text-center typography-micro text-muted-foreground",children:e("sessionAuth.locked.hostSwitcherHint")})]})]})}):a.jsx(a.Fragment,{children:t})},EB=t=>/^#[0-9a-fA-F]{6}$/.test(t),HB=t=>/^#[0-9a-fA-F]{8}$/.test(t),IB=(t,e)=>/^[0-9a-fA-F]{2}$/.test(e)?EB(t)?`${t}${e}`:HB(t)?`${t.slice(0,7)}${e}`:t:t,co=(t,e)=>typeof t=="string"&&t.trim().length>0?t:e,jB=t=>{const e=t.colors.syntax.base,n=t.colors.syntax.tokens??{},o=(s,r)=>co(n[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:o("className",o("class",e.function))}},{name:"interfaces",scope:["entity.name.type.interface","entity.name.type"],settings:{foreground:o("interface",e.type)}},{name:"structs",scope:["entity.name.type.struct"],settings:{foreground:o("struct",e.function)}},{name:"enums",scope:["entity.name.type.enum"],settings:{foreground:o("enum",e.function)}},{name:"keys",scope:["meta.object-literal.key","support.type.property-name"],settings:{foreground:o("key",e.function)}},{name:"methods",scope:["entity.name.function.method","meta.function.method"],settings:{foreground:o("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:o("variableOther",o("method",t.colors.status.success))}},{name:"globalVariables",scope:["variable.other.global","variable.language.this"],settings:{foreground:o("variableGlobal",e.number)}},{name:"localVariables",scope:["variable.other.local"],settings:{foreground:o("variableLocal",t.colors.surface.elevated)}},{name:"parameters",scope:["variable.parameter","meta.parameter"],settings:{foreground:o("parameter",e.foreground)}},{name:"properties",scope:["variable.other.property","meta.property"],settings:{foreground:o("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:o("stringEscape",e.foreground)}},{name:"keywords",scope:["keyword"],settings:{foreground:e.keyword}},{name:"keywordsControl",scope:["keyword.control.import","keyword.control.from","keyword.import"],settings:{foreground:o("keywordImport",e.operator)}},{name:"storageModifiers",scope:["storage.modifier","keyword.modifier","storage.type"],settings:{foreground:o("storageModifier",e.keyword)}},{name:"comments",scope:["comment","punctuation.definition.comment"],settings:{foreground:e.comment}},{name:"docComments",scope:["comment.documentation","comment.line.documentation"],settings:{foreground:o("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:o("boolean",e.type)}},{name:"operators",scope:["keyword.operator"],settings:{foreground:e.operator}},{name:"macros",scope:["entity.name.function.preprocessor","meta.preprocessor"],settings:{foreground:o("macro",e.keyword)}},{name:"preprocessor",scope:["meta.preprocessor"],settings:{foreground:o("preprocessor",o("label",e.number))}},{name:"urls",scope:["markup.underline.link"],settings:{foreground:o("url",t.colors.status.info)}},{name:"tags",scope:["entity.name.tag"],settings:{foreground:o("tag",e.keyword)}},{name:"jsxTags",scope:["support.class.component"],settings:{foreground:o("jsxTag",o("label",e.number))}},{name:"attributes",scope:["entity.other.attribute-name","meta.attribute"],settings:{foreground:o("tagAttribute",e.type)}},{name:"types",scope:["support.type"],settings:{foreground:e.type}},{name:"constants",scope:["variable.other.constant","variable.readonly"],settings:{foreground:o("constant",e.foreground)}},{name:"labels",scope:["entity.name.label","punctuation.definition.label"],settings:{foreground:o("label",o("variableGlobal",e.number))}},{name:"namespaces",scope:["entity.name.namespace","storage.modifier.namespace","markup.bold.markdown"],settings:{foreground:o("namespace",e.type)}},{name:"modules",scope:["entity.name.module","storage.modifier.module"],settings:{foreground:o("module",e.operator)}},{name:"typeParameters",scope:["variable.type.parameter","variable.parameter.type"],settings:{foreground:o("typeParameter",e.function)}},{name:"exceptions",scope:["keyword.control.exception","keyword.control.trycatch"],settings:{foreground:o("exception",o("label",e.number))}},{name:"decorators",scope:["meta.decorator","punctuation.decorator","entity.name.function.decorator"],settings:{foreground:o("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:o("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:o("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:o("label",o("variableGlobal",e.number))}},{name:"red",scope:[],settings:{foreground:e.operator}},{name:"orange",scope:[],settings:{foreground:e.function}}]},LB=t=>{const e=t.colors.surface,n=t.colors.interactive,o=t.colors.status,s=t.colors.syntax.base,r=t.colors.syntax.highlights??{},i=co(r.diffAddedBackground,o.successBackground),l=co(r.diffRemovedBackground,o.errorBackground);return{"editor.background":e.background,"editor.foreground":e.foreground,"editor.hoverHighlightBackground":co(n.hover,e.subtle),"editor.lineHighlightBackground":e.muted,"editor.selectionBackground":n.selection,"editor.selectionHighlightBackground":n.selection,"editor.findMatchBackground":s.type,"editor.findMatchHighlightBackground":IB(s.type,"cc"),"editor.findRangeHighlightBackground":e.muted,"editor.inactiveSelectionBackground":e.elevated,"editor.lineHighlightBorder":e.elevated,"editor.rangeHighlightBackground":co(n.active,n.borderHover),"notifications.background":e.elevated,"editorInlayHint.typeBackground":e.subtle,"editorInlayHint.typeForeground":e.foreground,"editorWhitespace.foreground":n.borderHover,"editorIndentGuide.background1":e.subtle,"editorHoverWidget.background":e.elevated,"editorLineNumber.activeForeground":co(r.lineNumberActive,e.foreground),"editorLineNumber.foreground":co(r.lineNumber,e.mutedForeground),"editorGutter.background":e.background,"editorGutter.modifiedBackground":o.info,"editorGutter.addedBackground":o.success,"editorGutter.deletedBackground":o.error,"editorBracketMatch.background":e.elevated,"editorBracketMatch.border":e.subtle,"editorError.foreground":o.error,"editorWarning.foreground":o.warning,"editorInfo.foreground":o.info,"diffEditor.insertedTextBackground":i,"diffEditor.removedTextBackground":l,"editorGroupHeader.tabsBackground":e.background,"editorGroup.border":n.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":n.border,"tab.activeModifiedBorder":s.type,"tab.inactiveModifiedBorder":o.info,"tab.unfocusedActiveModifiedBorder":s.type,"tab.unfocusedInactiveModifiedBorder":o.info,"editorWidget.background":e.muted,"editorWidget.border":n.border,"editorSuggestWidget.background":e.background,"editorSuggestWidget.border":n.border,"editorSuggestWidget.foreground":e.foreground,"editorSuggestWidget.highlightForeground":e.mutedForeground,"editorSuggestWidget.selectedBackground":e.subtle,"peekView.border":n.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":o.success,"merge.currentContentBackground":co(r.diffAdded,o.success),"merge.incomingHeaderBackground":o.info,"merge.incomingContentBackground":co(r.diffModified,o.info),"merge.border":n.border,"merge.commonContentBackground":e.subtle,"merge.commonHeaderBackground":e.muted,"panel.background":e.background,"panel.border":n.border,"panelTitle.activeBorder":n.borderHover,"panelTitle.activeForeground":e.foreground,"panelTitle.inactiveForeground":e.mutedForeground,"statusBar.background":e.background,"statusBar.foreground":e.foreground,"statusBar.border":n.border,"statusBar.debuggingBackground":o.error,"statusBar.debuggingForeground":o.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":n.border,"menu.foreground":e.foreground,"menu.background":e.background,"menu.selectionForeground":e.foreground,"menu.selectionBackground":e.subtle,"menu.border":n.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":co(r.diffRemoved,o.error),"terminal.ansiGreen":co(r.diffAdded,o.success),"terminal.ansiYellow":o.warning,"terminal.ansiBlue":co(r.diffModified,o.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":n.border,"sideBar.background":e.background,"sideBar.foreground":e.foreground,"sideBar.border":n.border,"sideBarTitle.foreground":e.foreground,"sideBarSectionHeader.background":e.muted,"sideBarSectionHeader.foreground":e.foreground,"sideBarSectionHeader.border":n.border,"sideBar.activeBackground":e.subtle,"sideBar.activeForeground":e.foreground,"sideBar.hoverBackground":e.muted,"sideBar.hoverForeground":e.foreground,"list.warningForeground":o.warning,"list.errorForeground":o.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":n.border,"input.placeholderForeground":e.mutedForeground,"inputOption.activeBorder":n.border,"inputOption.activeBackground":e.elevated,"inputOption.activeForeground":e.foreground,"inputValidation.infoBackground":o.infoBackground,"inputValidation.infoBorder":o.infoBorder,"inputValidation.warningBackground":o.warningBackground,"inputValidation.warningBorder":o.warningBorder,"inputValidation.errorBackground":o.errorBackground,"inputValidation.errorBorder":o.errorBorder,"dropdown.background":e.muted,"dropdown.foreground":e.foreground,"dropdown.border":n.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":co(t.colors.primary.foreground,e.background),"badge.foreground":co(t.colors.primary.foreground,e.background),"activityBarBadge.foreground":co(t.colors.primary.foreground,e.background)}};function NB(t){return{name:t.metadata.name,type:t.metadata.variant,colors:LB(t),tokenColors:jB(t)}}const RB=t=>/^#[0-9a-fA-F]{8}$/.test(t),bu=t=>RB(t)?t.slice(0,7):t;function VB(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 yu=new Map,vu=new Set,zB=(t,e)=>{const n=t.colors?.["editor.background"],o=t.colors?.["editor.foreground"],s=n?bu(n):void 0,r=o?bu(o):void 0;if(!s||!r)throw new Error(`Theme "${e}" is missing editor.background/editor.foreground`);const i=t.tokenColors??[];return VB({...t,name:e,fg:r,bg:s,settings:i},e)},OB=t=>NB(t),$B=t=>{const e=yu.get(t.metadata.id);if(e)return e;const n=OB(t),o=zB(n,t.metadata.id);return yu.set(t.metadata.id,o),o},V0=t=>{const e=t.metadata.id;if(vu.has(e))return;const n=$B(t);ty(e,async()=>n),vu.add(e)},ZB="#8957e5",UB="#8250df",qB=t=>{const e=t.colors.syntax?.tokens??{},n=[e.className,e.enum,e.variableGlobal,t.colors.syntax?.base?.keyword].filter(o=>typeof o=="string"&&o.trim().length>0);return n.length>0?n[0]:t.metadata.variant==="dark"?ZB:UB},I1=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:qB(t),closed:t.colors.status.error}}},WB={id:"aura-dark",name:"Aura",description:"Aura",version:"1.0.0",variant:"dark",tags:["dark","palette"]},GB={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"}}},KB={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"}},YB={metadata:WB,colors:GB,config:KB},JB={id:"aura-light",name:"Aura",description:"Aura",version:"1.0.0",variant:"light",tags:["light","palette"]},QB={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"}}},XB={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"}},eD={metadata:JB,colors:QB,config:XB},tD={id:"ayu-dark",name:"Ayu",description:"Ayu",version:"1.0.0",variant:"dark",tags:["dark","palette"]},nD={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"}}},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"}},sD={metadata:tD,colors:nD,config:oD},rD={id:"ayu-light",name:"Ayu",description:"Ayu",version:"1.0.0",variant:"light",tags:["light","palette"]},iD={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"}}},aD={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"}},lD={metadata:rD,colors:iD,config:aD},cD={id:"carbonfox-dark",name:"Carbonfox",description:"Carbonfox",version:"1.0.0",variant:"dark",tags:["dark","palette"]},dD={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"}}},uD={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"}},fD={metadata:cD,colors:dD,config:uD},mD={id:"carbonfox-light",name:"Carbonfox",description:"Carbonfox",version:"1.0.0",variant:"light",tags:["light","palette"]},hD={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"}}},pD={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"}},gD={metadata:mD,colors:hD,config:pD},bD={id:"catppuccin-dark",name:"Catppuccin",description:"Catppuccin",version:"1.0.0",variant:"dark",tags:["dark","palette"]},yD={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"}}},vD={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"}},wD={metadata:bD,colors:yD,config:vD},xD={id:"catppuccin-light",name:"Catppuccin",description:"Catppuccin",version:"1.0.0",variant:"light",tags:["light","palette"]},CD={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"}}},SD={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"}},kD={metadata:xD,colors:CD,config:SD},MD={id:"dracula-dark",name:"Dracula",description:"Dracula",version:"1.0.0",variant:"dark",tags:["dark","palette"]},AD={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"}}},FD={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"}},_D={metadata:MD,colors:AD,config:FD},BD={id:"dracula-light",name:"Dracula",description:"Dracula",version:"1.0.0",variant:"light",tags:["light","palette"]},DD={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"}}},TD={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"}},PD={metadata:BD,colors:DD,config:TD},ED={id:"gruvbox-dark",name:"Gruvbox",description:"Gruvbox",version:"1.0.0",variant:"dark",tags:["dark","palette"]},HD={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"}}},ID={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"}},jD={metadata:ED,colors:HD,config:ID},LD={id:"gruvbox-light",name:"Gruvbox",description:"Gruvbox",version:"1.0.0",variant:"light",tags:["light","palette"]},ND={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"}}},RD={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"}},VD={metadata:LD,colors:ND,config:RD},zD={id:"jetbrains-dark",name:"JetBrains",description:"JetBrains IDE-inspired colors for OpenChamber - dark variant",author:"Artem Evsevev, adapted for OpenChamber",version:"1.0.0",variant:"dark",tags:["dark","jetbrains","ide","blue"]},OD={primary:{base:"#6796f5",hover:"#70AEFF",active:"#5594FA",foreground:"#1E1F22",muted:"#6796f580",emphasis:"#70AEFF"},surface:{background:"#1E1F22",foreground:"#DFE1E5",muted:"#26282B",mutedForeground:"#9fa0a2",elevated:"#2B2D30",elevatedForeground:"#DFE1E5",overlay:"#00000080",subtle:"#2c2d32"},interactive:{border:"#474a51",borderHover:"#4B5059",borderFocus:"#6796f5",selection:"#43454A",selectionForeground:"#DFE1E5",focus:"#6796f5",focusRing:"#6796f550",cursor:"#CED0D6",hover:"#3C3E41",active:"#494A4D"},status:{error:"#FA6675",errorForeground:"#1E1F22",errorBackground:"#402929",errorBorder:"#FA6675",warning:"#F2C55C",warningForeground:"#1E1F22",warningBackground:"#665014",warningBorder:"#F2C55C",success:"#57965D",successForeground:"#1E1F22",successBackground:"#253627",successBorder:"#57965D",info:"#3592C4",infoForeground:"#1E1F22",infoBackground:"#243846",infoBorder:"#3592C4"},pr:{open:"#5FAD65",draft:"#868A91",blocked:"#F2C55C",merged:"#A571E6",closed:"#DB5C5C"},syntax:{base:{background:"#1E1F22",foreground:"#BCBEC4",comment:"#7A7E85",keyword:"#CF8E6D",string:"#6AAB73",number:"#2AACB8",function:"#6AA2D7",variable:"#BCBEC4",type:"#A6BB77",operator:"#BCBEC4"},tokens:{commentDoc:"#5F826B",stringEscape:"#CF8E6D",keywordImport:"#CF8E6D",storageModifier:"#CF8E6D",functionCall:"#6AA2D7",method:"#6AA2D7",functionBuiltin:"#D5A563",variableProperty:"#C77DBB",variableOther:"#BCBEC4",variableGlobal:"#E59EAE",variableLocal:"#BCBEC4",parameter:"#3CACAC",constant:"#C77DBB",class:"#57AAF7",className:"#57AAF7",interface:"#8D91DC",struct:"#A6BB77",enum:"#A6BB77",typeParameter:"#3CACAC",namespace:"#BCBEC4",module:"#8D91DC",tag:"#D5B778",jsxTag:"#D5B778",tagAttribute:"#B3AE60",tagAttributeValue:"#6AAB73",boolean:"#CF8E6D",decorator:"#B3AE60",label:"#D5A563",punctuation:"#BCBEC4",macro:"#D5A563",preprocessor:"#D5A563",regex:"#6AAB73",url:"#57AAF7",key:"#C77DBB",exception:"#E59EAE"},highlights:{diffAdded:"#549159",diffAddedBackground:"#294436",diffRemoved:"#F75464",diffRemovedBackground:"#45302B",diffModified:"#70AEFF",diffModifiedBackground:"#243C63",lineNumber:"#4B5059",lineNumberActive:"#A1A3AB"}},markdown:{heading1:"#FFFFFF",heading2:"#DFE1E5",heading3:"#CED0D6",heading4:"#BCBEC4",link:"#56A8F5",linkHover:"#6796f5",inlineCode:"#6AAB73",inlineCodeBackground:"#26282B",blockquote:"#7A7E85",blockquoteBorder:"#393B41",listMarker:"#B3AE6099"},chat:{userMessage:"#DFE1E5",userMessageBackground:"#3a5b9d76",assistantMessage:"#DFE1E5",assistantMessageBackground:"#1E1F22",timestamp:"#7A7E85",divider:"#393B41"},tools:{background:"#26282B50",border:"#393B41",headerHover:"#3C3E4150",icon:"#B0B1B3",title:"#DFE1E5",description:"#B0B1B3",edit:{added:"#549159",addedBackground:"#29443640",removed:"#F75464",removedBackground:"#45302B40",lineNumber:"#4B5059"}}},$D={fonts:{sans:'"JetBrains Mono", "IBM Plex Mono", monospace',mono:'"JetBrains Mono", "IBM Plex Mono", monospace',heading:'"JetBrains Mono", "IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},ZD={metadata:zD,colors:OD,config:$D},UD={id:"jetbrains-light",name:"JetBrains",description:"JetBrains IDE-inspired colors for OpenChamber - light variant",author:"Artem Evsevev, adapted for OpenChamber",version:"1.0.0",variant:"light",tags:["light","jetbrains","ide","blue"]},qD={primary:{base:"#195ce3",hover:"#2D61F0",active:"#0055FF",foreground:"#FFFFFF",muted:"#3573F080",emphasis:"#006DCC"},surface:{background:"#FFF",foreground:"#000000",muted:"#F7F8FA",mutedForeground:"#404040",elevated:"#FFFFFF",elevatedForeground:"#000000",overlay:"#00000025",subtle:"#ecf0f8"},interactive:{border:"#cfd3de",borderHover:"#AEB3C2",borderFocus:"#0055FF",selection:"#DFE1E5",selectionForeground:"#000000",focus:"#0055FF",focusRing:"#0055FF40",cursor:"#000000",hover:"#E6E6E8",active:"#DBDCDE"},status:{error:"#CE0606",errorForeground:"#FFFFFF",errorBackground:"#FFE8E8",errorBorder:"#CF5B56",warning:"#F49810",warningForeground:"#000000",warningBackground:"#FFF8DC",warningBorder:"#F49810",success:"#077D18",successForeground:"#FFFFFF",successBackground:"#E9F5E6",successBorder:"#55A76A",info:"#389FD6",infoForeground:"#000000",infoBackground:"#E7F4FB",infoBorder:"#389FD6"},pr:{open:"#369650",draft:"#808080",blocked:"#F49810",merged:"#834DF0",closed:"#E55765"},syntax:{base:{background:"#FFFFFF",foreground:"#080808",comment:"#8C8C8C",keyword:"#0033B3",string:"#067D17",number:"#1750EB",function:"#00627A",variable:"#000000",type:"#A04908",operator:"#080808"},tokens:{commentDoc:"#8C8C8C",stringEscape:"#0037A6",keywordImport:"#0033B3",storageModifier:"#0033B3",functionCall:"#00627A",method:"#00627A",functionBuiltin:"#C27203",variableProperty:"#871094",variableOther:"#000000",variableGlobal:"#1C5DFE",variableLocal:"#000000",parameter:"#007E8A",constant:"#871094",class:"#00627A",className:"#00627A",interface:"#835DDA",struct:"#A04908",enum:"#A04908",typeParameter:"#007E8A",namespace:"#000000",module:"#835DDA",tag:"#0033B3",jsxTag:"#0033B3",tagAttribute:"#9E880D",tagAttributeValue:"#067D17",boolean:"#0033B3",decorator:"#9E880D",label:"#C27203",punctuation:"#080808",macro:"#C27203",preprocessor:"#C27203",regex:"#067D17",url:"#00627A",key:"#871094",exception:"#1C5DFE"},highlights:{diffAdded:"#077D18",diffAddedBackground:"#BEE6BE",diffRemoved:"#FF0000",diffRemovedBackground:"#FFD5CC",diffModified:"#0133B3",diffModifiedBackground:"#DDE8FF",lineNumber:"#AEB3C2",lineNumberActive:"#767A8A"}},markdown:{heading1:"#000000",heading2:"#161617",heading3:"#404040",heading4:"#404040",link:"#006DCC",linkHover:"#3573F0",inlineCode:"#067D17",inlineCodeBackground:"#F5F7F9",blockquote:"#8C8C8C",blockquoteBorder:"#C9CCD6",listMarker:"#9E880D99"},chat:{userMessage:"#000000",userMessageBackground:"#E8F1FF",assistantMessage:"#000000",assistantMessageBackground:"#F7F8FA",timestamp:"#767A8A",divider:"#C9CCD6"},tools:{background:"#F5F7F950",border:"#AEB3C280",headerHover:"#E6E6E8",icon:"#404040",title:"#000000",description:"#404040",edit:{added:"#077D18",addedBackground:"#BEE6BE50",removed:"#FF0000",removedBackground:"#FFD5CC50",lineNumber:"#AEB3C2"}}},WD={fonts:{sans:'"JetBrains Mono", "IBM Plex Mono", monospace',mono:'"JetBrains Mono", "IBM Plex Mono", monospace',heading:'"JetBrains Mono", "IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},GD={metadata:UD,colors:qD,config:WD},KD={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"]},YD={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"}}},JD={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"}},QD={metadata:KD,colors:YD,config:JD},XD={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"]},eT={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"}}},tT={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"}},nT={metadata:XD,colors:eT,config:tT},oT={id:"monokai-dark",name:"Monokai",description:"Monokai",version:"1.0.0",variant:"dark",tags:["dark","palette"]},sT={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"}}},rT={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"}},iT={metadata:oT,colors:sT,config:rT},aT={id:"monokai-light",name:"Monokai",description:"Monokai",version:"1.0.0",variant:"light",tags:["light","palette"]},lT={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"}}},cT={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"}},dT={metadata:aT,colors:lT,config:cT},uT={id:"nightowl-dark",name:"Night Owl",description:"Night Owl",version:"1.0.0",variant:"dark",tags:["dark","palette"]},fT={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"}}},mT={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"}},hT={metadata:uT,colors:fT,config:mT},pT={id:"nightowl-light",name:"Night Owl",description:"Night Owl",version:"1.0.0",variant:"light",tags:["light","palette"]},gT={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"}}},bT={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"}},yT={metadata:pT,colors:gT,config:bT},vT={id:"nord-dark",name:"Nord",description:"Nord",version:"1.0.0",variant:"dark",tags:["dark","palette"]},wT={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"}}},xT={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"}},CT={metadata:vT,colors:wT,config:xT},ST={id:"nord-light",name:"Nord",description:"Nord",version:"1.0.0",variant:"light",tags:["light","palette"]},kT={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"}}},MT={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"}},AT={metadata:ST,colors:kT,config:MT},FT={id:"openchamber-dark",name:"Fields of the Shire",description:"Fields of the Shire theme - dark variant",author:"OpenChamber",version:"1.0.0",variant:"dark",tags:["dark","warm","earthy","brand"]},_T={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"}}},BT={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"}},cp={metadata:FT,colors:_T,config:BT},DT={id:"openchamber-light",name:"Fields of the Shire",description:"Fields of the Shire theme - light variant",author:"OpenChamber",version:"1.0.0",variant:"light",tags:["light","warm","earthy","brand"]},TT={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"}}},PT={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"}},dp={metadata:DT,colors:TT,config:PT},ET={id:"onedarkpro-dark",name:"One Dark Pro",description:"One Dark Pro",version:"1.0.0",variant:"dark",tags:["dark","palette"]},HT={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"}}},IT={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"}},jT={metadata:ET,colors:HT,config:IT},LT={id:"onedarkpro-light",name:"One Dark Pro",description:"One Dark Pro",version:"1.0.0",variant:"light",tags:["light","palette"]},NT={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"}}},RT={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"}},VT={metadata:LT,colors:NT,config:RT},zT={id:"solarized-dark",name:"Solarized",description:"Solarized",version:"1.0.0",variant:"dark",tags:["dark","palette"]},OT={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"}}},$T={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"}},ZT={metadata:zT,colors:OT,config:$T},UT={id:"solarized-light",name:"Solarized",description:"Solarized",version:"1.0.0",variant:"light",tags:["light","palette"]},qT={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"}}},WT={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"}},GT={metadata:UT,colors:qT,config:WT},KT={id:"tokyonight-dark",name:"Tokyonight",description:"Tokyonight",version:"1.0.0",variant:"dark",tags:["dark","palette"]},YT={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"}}},JT={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"}},QT={metadata:KT,colors:YT,config:JT},XT={id:"tokyonight-light",name:"Tokyonight",description:"Tokyonight",version:"1.0.0",variant:"light",tags:["light","palette"]},eP={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"}}},tP={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"}},nP={metadata:XT,colors:eP,config:tP},oP={id:"vesper-dark",name:"Vesper",description:"Vesper",version:"1.0.0",variant:"dark",tags:["dark","palette"]},sP={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"}}},rP={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"}},iP={metadata:oP,colors:sP,config:rP},aP={id:"vesper-light",name:"Vesper",description:"Vesper",version:"1.0.0",variant:"light",tags:["light","palette"]},lP={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:"#9e9e9e",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"}}},cP={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"}},dP={metadata:aP,colors:lP,config:cP},uP={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"]},fP={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"}}},mP={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"}},hP={metadata:uP,colors:fP,config:mP},pP={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"]},gP={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"}}},bP={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"}},yP={metadata:pP,colors:gP,config:bP},vP={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"]},wP={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"}}},xP={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"}},CP={metadata:vP,colors:wP,config:xP},SP={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"]},kP={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"}}},MP={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"}},AP={metadata:SP,colors:kP,config:MP},FP={id:"vitesse-dark-dark",name:"Vitesse Dark",description:"Converted from VS Code theme",version:"1.0.0",variant:"dark",tags:["dark","converted","vscode"]},_P={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"}}},BP={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"}},DP={metadata:FP,colors:_P,config:BP},TP={id:"vitesse-light-light",name:"Vitesse Light",description:"Converted from VS Code theme",version:"1.0.0",variant:"light",tags:["light","converted","vscode"]},PP={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:"#635454b8",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"}}},EP={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"}},HP={metadata:TP,colors:PP,config:EP},IP=[cp,dp,YB,eD,sD,lD,fD,gD,wD,kD,_D,PD,jD,VD,ZD,GD,QD,nT,iT,dT,hT,yT,CT,AT,jT,VT,ZT,GT,QT,nP,iP,dP,hP,yP,CP,AP,DP,HP].map(t=>I1(t)),jP={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"]},LP={primary:{base:"#BC5215",hover:"#F9AE77",active:"#DA702C",foreground:"#fffdf4",muted:"#BC521580",emphasis:"#F9AE77"},surface:{background:"#fffdf4",foreground:"#100F0F",muted:"#f6f5ee",mutedForeground:"#686663",elevated:"#fbfaf2",elevatedForeground:"#100F0F",overlay:"#100F0F20",subtle:"#f7f4ec"},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:"#fffdf4",errorBackground:"#D14D4120",errorBorder:"#D14D4150",warning:"#BC5215",warningForeground:"#fffdf4",warningBackground:"#DA702C20",warningBorder:"#DA702C50",success:"#66800B",successForeground:"#fffdf4",successBackground:"#879A3920",successBorder:"#879A3950",info:"#205EA6",infoForeground:"#fffdf4",infoBackground:"#4385BE20",infoBorder:"#4385BE50"},pr:{open:"#66800B",draft:"#6F6E69",blocked:"#BC5215",merged:"#5E409D",closed:"#AF3029"},syntax:{base:{background:"#f6f5ee",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:"#f6f5ee",blockquote:"#6F6E69",blockquoteBorder:"#DAD8CE",listMarker:"#AD830199"},chat:{userMessage:"#100F0F",userMessageBackground:"#f7f4ec",assistantMessage:"#100F0F",assistantMessageBackground:"#fffdf4",timestamp:"#6F6E69",divider:"#DAD8CE"},tools:{background:"#f6f5ee50",border:"#b4b2a980",headerHover:"#DAD8CE",icon:"#6F6E69",title:"#100F0F",description:"#6F6E69",edit:{added:"#66800B",addedBackground:"#66800B25",removed:"#AF3029",removedBackground:"#AF302925",lineNumber:"#CECDC3"}}},NP={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"}},RP={metadata:jP,colors:LP,config:NP},VP={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"]},zP={primary:{base:"#DA702C",hover:"#DA702C",active:"#F9AE77",foreground:"#171515",muted:"#DA702C80",emphasis:"#F9AE77"},surface:{background:"#171515",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:"#171515",errorBackground:"#AF302920",errorBorder:"#AF302950",warning:"#DA702C",warningForeground:"#171515",warningBackground:"#BC521520",warningBorder:"#BC521550",success:"#A0AF54",successForeground:"#171515",successBackground:"#66800B20",successBorder:"#66800B50",info:"#4385BE",infoForeground:"#171515",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:"#171515",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"}}},OP={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"}},$P={metadata:VP,colors:zP,config:OP},up=I1(RP),ZP=I1($P),UP=I1(dp),qP=I1(cp),fp="flexoki-light",mp="flexoki-dark",z0=[UP,qP,up,ZP,...IP.filter(t=>t.metadata.id!=="openchamber-light"&&t.metadata.id!=="openchamber-dark")];function Qd(t){const e=t==="app-light"?"flexoki-light":t==="app-dark"?"flexoki-dark":t;return z0.find(n=>n.metadata.id===e)}function w1(t){const e=t?"dark":"light",o=Qd(t?mp:fp);return o&&o.metadata.variant===e?o:z0.find(s=>s.metadata.variant===e)??z0[0]??up}const nQ=t=>{const e=le.c(10),{children:n}=t,o=ke(WP),s=ke(GP),r=ke(KP),i=ke(YP);let l;e[0]!==i||e[1]!==s?(l=()=>{s(),i()},e[0]=i,e[1]=s,e[2]=l):l=e[2];let c;e[3]!==i||e[4]!==s||e[5]!==o||e[6]!==r?(c=[o,s,r,i],e[3]=i,e[4]=s,e[5]=o,e[6]=r,e[7]=c):c=e[7],g.useLayoutEffect(l,c);let d;return e[8]!==n?(d=a.jsx(a.Fragment,{children:n}),e[8]=n,e[9]=d):d=e[9],d};function WP(t){return t.fontSize}function GP(t){return t.applyTypography}function KP(t){return t.padding}function YP(t){return t.applyPadding}const pl=async(t,e)=>{if(!qn())throw new Error("Desktop runtime is not available");return Wn(t,e)},oQ=async()=>{if(Et())try{await pl("desktop_start_window_drag")}catch{}},JP=async t=>{if(Et())try{await pl("desktop_set_window_title",{title:t})}catch{}},QP=async(t,e)=>{if(Et())try{await pl("desktop_set_window_theme",{themeMode:t,themeVariant:e})}catch{}},sQ=async()=>{if(!Et())return null;try{const t=await pl("desktop_get_app_version");return typeof t=="string"&&t.trim().length>0?t:null}catch{return null}},Pc=t=>{if(!t||typeof t!="string")return null;const e=t.trim();if(!e.startsWith("#"))return null;let n=e.slice(1);if((n.length===3||n.length===4)&&(n=n.split("").map(l=>l+l).join("")),n.length===8&&(n=n.slice(0,6)),n.length!==6)return null;const o=Number.parseInt(n,16);if(Number.isNaN(o))return null;const s=o>>16&255,r=o>>8&255,i=o&255;return`${s} ${r} ${i}`};class XP{inheritanceMap=new Map;constructor(){this.initializeInheritanceMap()}generate(e){const n=[];return n.push(...this.generateTailwindVariables(e)),n.push(...this.generatePrimaryColors(e.colors.primary)),n.push(...this.generateSurfaceColors(e.colors.surface)),n.push(...this.generateInteractiveColors(e.colors.interactive)),n.push(...this.generateStatusColors(e.colors.status)),n.push(...this.generatePullRequestColors(e)),n.push(...this.generateSyntaxColors(e.colors.syntax)),n.push(...this.generateComponentColors(e.colors,e)),n.push(...this.generateTypographyVariables()),e.config&&n.push(...this.generateConfigVariables(e.config)),n.join(`
413
+ {summary}`,"chat.chatInput.toast.vscodePickFailed":"Failed to pick files in VS Code","chat.chatInput.toast.openSessionFirst":"Open a session first","chat.chatInput.toast.togglePermissionAutoAcceptFailed":"Failed to toggle permission auto-accept","chat.chatInput.reviewComments":"Review comments:","chat.chatInput.reviewCommentsRemove":"Remove review comments","chat.chatInput.devServerLogs":"Dev Server logs:","chat.chatInput.devServerLogsRemove":"Remove Dev Server logs","chat.chatInput.previewAnnotations":"Preview annotations:","chat.chatInput.previewContext":"Preview context:","chat.chatInput.previewContextRemove":"Remove preview context","chat.chatInput.projectRoot":"Project root","chat.chatInput.branch":"Branch","chat.chatInput.worktrees":"Worktrees","chat.chatInput.worktreeNew":"+ New","chat.chatInput.drop.insertMention":"Drop to insert as mention","chat.chatInput.drop.attachFiles":"Drop files here to attach","chat.chatInput.fileFallback":"file","chat.mobileStatus.editProjects.title":"Edit Projects","chat.mobileStatus.editProjects.footer":"Drag items to reorder, or use arrows to move. Tap edit to change details.","chat.mobileStatus.editProjects.empty":"No projects to edit","chat.mobileStatus.projects.empty":"No projects","chat.mobileStatus.projects.addAria":"Add project","chat.mobileStatus.projects.removeTitle":"Remove Project","chat.mobileStatus.projects.removeDescriptionPrefix":"Are you sure you want to remove","chat.mobileStatus.projects.cancel":"Cancel","chat.mobileStatus.projects.remove":"Remove","chat.mobileStatus.new":"New","chat.mobileStatus.noSessionsInProject":"No sessions in this project","chat.mobileStatus.swipeHint":"← Swipe here to open sidebars →","chat.mobileStatus.toast.addProjectFailed":"Failed to add project","chat.mobileStatus.toast.selectValidDirectory":"Please select a valid directory.","chat.mobileStatus.toast.selectDirectoryFailed":"Failed to select directory","chat.toolOutputDialog.image.previousAria":"Previous image","chat.toolOutputDialog.image.nextAria":"Next image","chat.toolOutputDialog.image.closeAria":"Close image preview","chat.toolOutputDialog.mermaid.missingSource":"Missing Mermaid source URL.","chat.toolOutputDialog.mermaid.loadFailed":"Unable to load Mermaid diagram.","chat.toolOutputDialog.mermaid.closeAria":"Close diagram preview","chat.toolOutputDialog.mermaid.loading":"Loading diagram...","chat.toolOutputDialog.mermaid.renderFailed":"Unable to render Mermaid diagram.","chat.toolOutputDialog.mermaid.retry":"Retry","chat.toolOutputDialog.commandCompleted":"Command completed successfully","chat.toolOutputDialog.noOutputProduced":"No output was produced","chat.toolPart.lspErrors":"LSP errors","chat.toolPart.moreErrors":"+{count} more errors","chat.toolPart.error":"Error:","chat.toolPart.awaitingResponse":"Awaiting response...","chat.toolPart.noOutputProduced":"No output produced","chat.toolPart.output":"Output","chat.toolPart.showRawJson":"Show raw JSON","chat.toolPart.showFormattedJson":"Show formatted JSON","chat.toolPart.copyOutput":"Copy output","chat.toolPart.copiedOutput":"Copied output","chat.toolPart.copyOutputFailed":"Failed to copy output","chat.toolPart.openSubtask":"Open {type} subtask","chat.todo.total":"Total","chat.todo.inProgress":"In Progress","chat.todo.pending":"Pending","chat.todo.completed":"Completed","chat.todo.cancelled":"Cancelled","chat.permissionCard.workingDirectory":"Working Directory:","chat.permissionCard.timeout":"Timeout:","chat.permissionCard.request":"Request:","chat.permissionCard.headers":"Headers:","chat.permissionCard.body":"Body:","chat.permissionCard.action":"Action:","chat.permissionCard.details":"Details:","chat.permissionCard.patterns":"Patterns:","chat.permissionToast.sessionFallback":"Session","chat.permissionToast.permissionFallback":"Permission details unavailable","chat.permissionToast.labels.session":"Session:","chat.permissionToast.labels.permission":"Permission:","chat.permissionToast.actions.once":"Once","chat.permissionToast.actions.always":"Always","chat.permissionToast.actions.deny":"Deny","chat.permissionToast.actions.approveOnceAria":"Approve once","chat.permissionToast.actions.approveOnceAriaWithSession":"Approve once for {session}","chat.permissionToast.actions.approveAlwaysAria":"Approve always","chat.permissionToast.actions.approveAlwaysAriaWithSession":"Approve always for {session}","chat.permissionToast.actions.denyAria":"Deny permission","chat.permissionToast.actions.denyAriaWithSession":"Deny permission for {session}","chat.permissionRequest.required":"Permission required:","chat.permissionRequest.actions.once":"Once","chat.permissionRequest.actions.always":"Always","chat.permissionRequest.actions.reject":"Reject","chat.modelControls.provider":"Provider","chat.modelControls.capability.toolCalling":"Tool calling","chat.modelControls.capability.reasoning":"Reasoning","chat.modelControls.modality.text":"Text","chat.modelControls.modality.image":"Image","chat.modelControls.modality.video":"Video","chat.modelControls.modality.audio":"Audio","chat.modelControls.modality.pdf":"PDF","chat.modelControls.capabilities":"Capabilities","chat.modelControls.modalities":"Modalities","chat.modelControls.input":"Input","chat.modelControls.output":"Output","chat.modelControls.limits":"Limits","chat.modelControls.context":"Context","chat.modelControls.metadata":"Metadata","chat.modelControls.knowledge":"Knowledge","chat.modelControls.release":"Release","chat.modelControls.mode":"Mode","chat.modelControls.model":"Model","chat.modelControls.temperature":"Temperature","chat.modelControls.topP":"Top P","chat.modelControls.permissions":"Permissions","chat.modelControls.edit":"Edit","chat.modelControls.bash":"Bash","chat.modelControls.webFetch":"WebFetch","chat.modelControls.customPrompt":"Custom Prompt","chat.modelControls.selectModel":"Select model","chat.modelControls.searchProvidersOrModels":"Search providers or models","chat.modelControls.clearSearch":"Clear search","chat.modelControls.current":"Current","chat.modelControls.thinking":"Thinking","chat.modelControls.default":"Default","chat.modelControls.selectAgent":"Select agent","chat.modelControls.costPerMillion":"Cost ($/1M tokens)","chat.modelControls.metadataUnavailable":"Model metadata unavailable.","chat.modelControls.addNewProvider":"Add new provider","chat.modelControls.noAgentSelected":"No agent selected.","chat.modelControls.resetToDefault":"Reset to default","chat.modelControls.searchModels":"Search models","chat.modelControls.searchAgents":"Search agents","chat.modelControls.noModelsFound":"No models found","chat.modelControls.favorites":"Favorites","chat.modelControls.recent":"Recent","chat.modelControls.addToFavorites":"Add to favorites","chat.modelControls.removeFromFavorites":"Remove from favorites","chat.modelControls.favoriteAria":"Favorite","chat.modelControls.unfavoriteAria":"Unfavorite","chat.modelControls.collapseProvider":"Collapse provider","chat.modelControls.expandProvider":"Expand provider","chat.modelControls.keyboardHint":"↑↓ navigate{thinking} • Enter select • Esc close","chat.modelControls.keyboardHintNavigate":"↑↓ navigate","chat.modelControls.keyboardHintSwitchAgent":"{shortcut} switch agent","chat.modelControls.keyboardHintThinking":"←→ thinking","chat.modelControls.showThinkingModes":"Show thinking modes","chat.modelControls.hideThinkingModes":"Hide thinking modes","chat.modelControls.moreThinkingModes":"More thinking modes","chat.modelControls.noProvidersOrModelsFound":"No providers or models match your search.","chat.modelControls.reorderFavoriteAria":"Reorder favorite","chat.modelControls.reorderFavoriteTitle":"Drag to reorder favorite","chat.modelControls.permissionLabel.custom":"Custom","chat.modelControls.permissionLabel.allow":"Allow","chat.modelControls.permissionLabel.deny":"Deny","chat.modelControls.permissionLabel.ask":"Ask","chat.modelControls.modeValue.primary":"Primary","chat.modelControls.modeValue.subagent":"Subagent","chat.modelControls.modeValue.all":"All","chat.modelControls.modeValue.none":"—","chat.reasoningTrace.thinking":"Thinking","chat.reasoningTrace.justification":"Justification","chat.reasoningTrace.expandAria":"Expand reasoning trace","chat.reasoningTrace.collapseAria":"Collapse reasoning trace","chat.reasoningTrace.thought":"Thought","chat.messageBody.subtask.title":"Delegated task","chat.messageBody.subtask.hidePrompt":"Hide prompt","chat.messageBody.subtask.showPrompt":"Show prompt","chat.messageBody.subtask.openSession":"Open subtask session","chat.messageBody.shellCommand.title":"Shell command","chat.messageBody.shellCommand.hideOutput":"Hide output","chat.messageBody.shellCommand.showOutput":"Show output","chat.messageBody.shellCommand.copied":"Copied","chat.messageBody.shellCommand.copyOutput":"Copy output","commandPalette.title":"Command Palette","commandPalette.description":"Search files, sessions, and commands.","commandPalette.input.placeholder":"Search files, sessions, commands...","commandPalette.empty.noResults":"No results found.","commandPalette.empty.searchingFiles":"Searching files...","commandPalette.item.newSession":"New Session","commandPalette.item.newMiniChat":"New Mini Chat Window","commandPalette.item.newWorktreeDraft":"New Worktree Draft","commandPalette.item.addProject":"Add Project","commandPalette.item.showSessionSwitcher":"Show Session Switcher","commandPalette.item.toggleSidebar":"Toggle Sidebar","commandPalette.item.toggleRightSidebar":"Toggle Right Sidebar","commandPalette.item.showContextUsage":"Show Context Usage","commandPalette.item.toggleTerminal":"Toggle Terminal","commandPalette.item.openSettings":"Open Settings...","commandPalette.session.untitled":"Untitled Session","openCodeStatusDialog.title":"OpenCode Status","openCodeStatusDialog.description":"Inspect current OpenCode status and diagnostics.","openCodeStatusDialog.actions.copy":"Copy","openCodeStatusDialog.empty.noData":"No data.","openCodeStatusDialog.toast.copiedTitle":"Copied","openCodeStatusDialog.toast.copiedDescription":"Status copied to clipboard","openCodeStatusDialog.toast.copyFailed":"Failed to copy status","saveProjectPlanDialog.title":"Save Project Plan","saveProjectPlanDialog.description":"Save this plan into your project as a Markdown file.","saveProjectPlanDialog.field.title":"Title","saveProjectPlanDialog.field.titlePlaceholder":"Plan title","saveProjectPlanDialog.field.contentPreview":"Content preview","saveProjectPlanDialog.actions.cancel":"Cancel","saveProjectPlanDialog.actions.save":"Save","saveProjectPlanDialog.actions.saving":"Saving...","branchPickerDialog.title":"Branch Picker","branchPickerDialog.description.localBranchesForProject":"Local branches for {project}","branchPickerDialog.description.selectProject":"Select a project to view branches","branchPickerDialog.search.placeholder":"Search branches...","branchPickerDialog.search.renameBranchPlaceholder":"Rename branch","branchPickerDialog.state.noProjectSelected":"No project selected","branchPickerDialog.state.loadingBranches":"Loading branches...","branchPickerDialog.state.noMatchingBranches":"No matching branches","branchPickerDialog.state.noBranchesFound":"No branches found","branchPickerDialog.badge.head":"HEAD","branchPickerDialog.badge.worktree":"worktree","branchPickerDialog.actions.createWorktreeAria":"Create worktree from branch","branchPickerDialog.actions.renameAria":"Rename branch","branchPickerDialog.actions.deleteAria":"Delete branch","branchPickerDialog.actions.deleteWorktreeAria":"Remove worktree","branchPickerDialog.actions.confirmRenameAria":"Confirm rename","branchPickerDialog.actions.cancelRenameAria":"Cancel rename","branchPickerDialog.actions.confirmDeleteAria":"Confirm delete branch","branchPickerDialog.actions.cancelDeleteAria":"Cancel delete branch","branchPickerDialog.actions.deletePrompt":"Delete","branchPickerDialog.actions.forceDeletePrompt":"Force Delete","branchPickerDialog.tooltip.createWorktree":"Create worktree","branchPickerDialog.tooltip.worktreeAlreadyExists":"Worktree already exists","branchPickerDialog.tooltip.rename":"Rename branch","branchPickerDialog.tooltip.renameDisabledForRoot":"Cannot rename root branch","branchPickerDialog.tooltip.delete":"Delete branch","branchPickerDialog.tooltip.deleteCurrentBranch":"Cannot delete current branch","branchPickerDialog.tooltip.deleteDisabledForRoot":"Cannot delete root branch","branchPickerDialog.tooltip.deleteWorktree":"Remove worktree","branchPickerDialog.tooltip.deleteWorktreeRootProtected":"Cannot remove root worktree","branchPickerDialog.toast.branchRenamed":"Branch renamed","branchPickerDialog.toast.failedToRenameBranch":"Failed to rename branch","branchPickerDialog.toast.branchDeleted":"Branch deleted","branchPickerDialog.toast.branchNotMerged":"Branch is not fully merged","branchPickerDialog.toast.confirmAgainToForceDelete":"Confirm again to force delete","branchPickerDialog.toast.failedToDeleteBranch":"Failed to delete branch","branchPickerDialog.toast.worktreeCreated":"Worktree created","branchPickerDialog.toast.failedToCreateWorktree":"Failed to create worktree","branchPickerDialog.error.failedToLoad":"Failed to load branches","branchPickerDialog.error.renameRejected":"Rename was rejected","branchPickerDialog.error.renameFailed":"Failed to rename branch","branchPickerDialog.error.deleteRejected":"Delete was rejected","branchPickerDialog.error.deleteFailed":"Failed to delete branch","branchPickerDialog.error.createWorktreeFailed":"Failed to create worktree","projectEditDialog.title":"Edit project","projectEditDialog.field.name":"Name","projectEditDialog.field.namePlaceholder":"Project name","projectEditDialog.field.color":"Color","projectEditDialog.field.icon":"Icon","projectEditDialog.field.preview":"Preview","projectEditDialog.field.iconBackground":"Icon Background","projectEditDialog.field.iconBackgroundAria":"Project icon background color","projectEditDialog.option.none":"None","projectEditDialog.actions.uploadIcon":"Upload Icon","projectEditDialog.actions.uploading":"Uploading...","projectEditDialog.actions.discoverFavicon":"Discover Favicon","projectEditDialog.actions.discovering":"Discovering...","projectEditDialog.actions.removeProjectIcon":"Remove Project Icon","projectEditDialog.actions.removing":"Removing...","projectEditDialog.actions.undoRemove":"Undo Remove","projectEditDialog.actions.clear":"Clear","projectEditDialog.actions.cancel":"Cancel","projectEditDialog.actions.save":"Save","projectEditDialog.toast.failedToUploadIcon":"Failed to upload project icon","projectEditDialog.toast.iconUpdated":"Project icon updated","projectEditDialog.toast.failedToRemoveIcon":"Failed to remove project icon","projectEditDialog.toast.iconRemoved":"Project icon removed","projectEditDialog.toast.failedToDiscoverIcon":"Failed to discover project icon","projectEditDialog.toast.customIconAlreadySet":"Custom icon already set for this project","projectEditDialog.toast.iconDiscovered":"Project icon discovered","agentManager.sidebar.search.placeholder":"Search Agent Groups...","agentManager.sidebar.actions.newAgentGroup":"New Agent Group","agentManager.sidebar.actions.more":"... More ({count})","agentManager.sidebar.actions.showLess":"Show less","agentManager.sidebar.section.agentGroups":"Agent Groups","agentManager.sidebar.state.loading":"Loading...","agentManager.sidebar.state.noGroupsFound":"No groups found","agentManager.sidebar.state.noGroupsYet":"No agent groups yet","agentManager.sidebar.state.createToGetStarted":"Create a new agent group to get started","agentManager.sidebar.item.modelCountSingle":"{count} model","agentManager.sidebar.item.modelCountPlural":"{count} models","agentManager.sidebar.item.groupMenuAria":"Group menu","agentManager.sidebar.item.delete":"Delete","agentManager.sidebar.relativeTime.now":"now","agentManager.sidebar.relativeTime.minutes":"{count}m","agentManager.sidebar.relativeTime.hours":"{count}h","agentManager.sidebar.relativeTime.days":"{count}d","agentManager.sidebar.dialog.deleteGroupTitle":"Delete agent group","agentManager.sidebar.dialog.deleteGroupDescription":'Delete "{group}"? This removes all worktrees and sessions in this group.',"agentManager.sidebar.dialog.cancel":"Cancel","agentManager.sidebar.dialog.delete":"Delete","agentManager.sidebar.dialog.deleting":"Deleting...","agentManager.sidebar.toast.deletingGroup":'Deleting "{group}"...',"agentManager.sidebar.toast.deletedGroup":'Deleted "{group}"',"agentManager.sidebar.toast.failedToDeleteGroup":'Failed to fully delete "{group}"',"agentManager.detail.header.modelCountSingle":"{count} model","agentManager.detail.header.modelCountPlural":"{count} models","agentManager.detail.header.noBranch":"No branch","agentManager.detail.actions.worktreeActionsAria":"Worktree actions","agentManager.detail.actions.removeThisWorktree":"Remove this worktree","agentManager.detail.actions.keepThisRemoveOthers":"Leave this one, remove others","agentManager.detail.actions.copyWorktreePath":"Copy Worktree Path","agentManager.detail.dialog.removeWorktreeTitle":"Remove worktree","agentManager.detail.dialog.removeOtherWorktreesTitle":"Remove other worktrees","agentManager.detail.dialog.removeWorktreeDescription":'Remove "{label}"? This deletes all sessions in that worktree and removes the worktree itself.',"agentManager.detail.dialog.removeOtherWorktreesDescription":'Keep "{label}" and remove the other worktrees in "{group}".',"agentManager.detail.dialog.cancel":"Cancel","agentManager.detail.dialog.remove":"Remove","agentManager.detail.dialog.removeOthers":"Remove others","agentManager.detail.dialog.working":"Working...","agentManager.detail.state.loadingSessionFor":"Loading session for {label}","agentManager.detail.state.sessionId":"Session ID: {id}","agentManager.detail.state.noSessionsInGroup":"No sessions in this group","agentManager.detail.toast.noWorktreePath":"No worktree path available","agentManager.detail.toast.worktreePathCopied":"Worktree path copied","agentManager.detail.toast.failedToCopyPath":"Failed to copy path","agentManager.detail.toast.removingWorktree":"Removing worktree...","agentManager.detail.toast.removingOtherWorktrees":"Removing other worktrees...","agentManager.detail.toast.failedToFullyRemoveWorktree":"Failed to fully remove worktree","agentManager.detail.toast.worktreeRemoved":"Worktree removed","agentManager.detail.toast.otherWorktreesRemoved":"Removed other worktrees","agentManager.empty.groupName.label":"Group Name","agentManager.empty.groupName.placeholder":"e.g. feature-auth, bugfix-login","agentManager.empty.groupName.description":"Used for worktree directory and branch naming","agentManager.empty.baseBranch.label":"Base Branch","agentManager.empty.baseBranch.description":"Creates new branches from {branch}","agentManager.empty.setupCommands.label":"Setup commands","agentManager.empty.setupCommands.configured":"{count} configured","agentManager.empty.setupCommands.description":"Commands run in each new worktree. Use $ROOT_PROJECT_PATH for project root.","agentManager.empty.setupCommands.loading":"Loading...","agentManager.empty.setupCommands.commandPlaceholder":"e.g., bun install","agentManager.empty.setupCommands.removeCommandAria":"Remove command","agentManager.empty.setupCommands.addCommand":"Add command","agentManager.empty.agent.label":"Agent","agentManager.empty.agent.description":"Defaults to your configured default agent","agentManager.empty.models.label":"Models","agentManager.empty.models.addModel":"Add model","agentManager.empty.models.selectedSingle":"{count} model selected","agentManager.empty.models.selectedPlural":"{count} models selected","agentManager.empty.prompt.label":"Prompt","agentManager.empty.prompt.placeholder":"Ask anything...","agentManager.empty.prompt.addAttachmentAria":"Add attachment","agentManager.empty.actions.startAgentGroupAria":"Start Agent Group","agentManager.empty.toast.fileTooLarge":'File "{fileName}" is too large (max 10MB)',"agentManager.empty.toast.failedToAttach":'Failed to attach "{fileName}"',"agentManager.empty.toast.attachedSingle":"Attached {count} file","agentManager.empty.toast.attachedPlural":"Attached {count} files","agentManager.empty.toast.failedToCreateGroup":"Failed to create agent group","openInApp.actions.open":"Open","openInApp.actions.openInAria":"Open in {app}","openInApp.actions.chooseAppAria":"Choose app to open","openInApp.actions.copyPath":"Copy Path","openInApp.actions.refreshApps":"Refresh Apps","openInApp.toast.pathCopied":"Path copied to clipboard","projectActions.actions.addActionAria":"Add action","projectActions.actions.addAction":"Add action","projectActions.actions.addNewAction":"Add new action","projectActions.actions.autoDiscover":"Auto-discover","projectActions.actions.chooseActionAria":"Choose project action","projectActions.actions.openPreview":"Open Preview","projectActions.actions.runNamedAria":"Run {name}","projectActions.actions.stopNamedAria":"Stop {name}","projectActions.label.fallbackAction":"Action","projectActions.toast.openedUrlFromOutput":"Opened URL from action output","projectActions.toast.openedForwardedUrl":"Opened forwarded URL","projectActions.toast.openedActionUrl":"Opened action URL","projectActions.error.noActiveDirectory":"No active directory","projectActions.error.noActiveDirectoryForAction":"No active directory for action","projectActions.error.failedToCreateTerminalSession":"Failed to create terminal session","projectActions.error.invalidCustomUrlFormat":"Invalid custom URL format","projectActions.error.selectedDesktopSshForwardUnavailable":"Selected desktop SSH forward is unavailable","projectActions.error.failedToRunAction":"Failed to run action","mcpDropdown.title":"MCP Servers","mcpDropdown.actions.refreshAria":"Refresh","mcpDropdown.actions.openAria":"MCP servers","mcpDropdown.statusAria":"MCP status","mcpDropdown.status.unknown":"Unknown","mcpDropdown.status.connected":"Connected","mcpDropdown.status.failed":"Failed: {error}","mcpDropdown.status.unknownError":"Unknown error","mcpDropdown.status.needsAuth":"Needs authentication","mcpDropdown.status.needsRegistration":"Needs registration: {error}","mcpDropdown.empty.configureInConfig":"Configure MCP servers in OpenCode config.","sessionAuth.error.rateLimitTitle":"Too many attempts","sessionAuth.error.networkTitle":"Unable to reach server","sessionAuth.error.rateLimitDescriptionSingle":"Please wait {minutes} minute before trying again.","sessionAuth.error.rateLimitDescriptionPlural":"Please wait {minutes} minutes before trying again.","sessionAuth.error.networkDescription":"We could not verify the UI session. Check that the service is running and try again.","sessionAuth.error.retry":"Retry","sessionAuth.error.passkeySetupFailed":"Passkey setup failed.","sessionAuth.error.incorrectPassword":"Incorrect password. Try again.","sessionAuth.error.unexpectedResponse":"Unexpected response from server.","sessionAuth.error.networkRetry":"Network error. Check connection and retry.","sessionAuth.error.passkeySignInCanceled":"Passkey sign-in was canceled.","sessionAuth.error.enterPasswordForPasskey":"Enter your password to add a passkey.","sessionAuth.locked.tunnelTitle":"Tunnel access required","sessionAuth.locked.unlockTitle":"Unlock OpenChamber","sessionAuth.locked.tunnelDescription":"Open this tunnel using the one-time connect link from the desktop app.","sessionAuth.locked.passwordDescription":"This session is password-protected.","sessionAuth.locked.hostSwitcherHint":"Use Local if remote is unreachable.","sessionAuth.actions.cancelPasskey":"Cancel passkey","sessionAuth.actions.usePasskey":"Use passkey","sessionAuth.actions.unlockingAria":"Unlocking","sessionAuth.actions.unlockAria":"Unlock","sessionAuth.actions.trustDevice":"Trust this device","sessionAuth.actions.trustDeviceAria":"Trust this device","sessionAuth.actions.cancelPasskeySetup":"Cancel passkey setup","sessionAuth.actions.addPasskey":"Add passkey","sessionAuth.password.placeholder":"Enter password","sessionAuth.toast.passkeyAdded":"Passkey added","sessionAuth.toast.passkeySetupCanceled":"Passkey setup canceled","desktopHostSwitcher.title":"Instance","desktopHostSwitcher.description":"Switch between Local and remote OpenChamber servers","desktopHostSwitcher.header.current":"Current","desktopHostSwitcher.header.default":"Default","desktopHostSwitcher.header.currentColon":"Current:","desktopHostSwitcher.header.currentDefaultColon":"Current default:","desktopHostSwitcher.status.connected":"Connected","desktopHostSwitcher.status.authRequired":"Auth required","desktopHostSwitcher.status.checking":"Checking","desktopHostSwitcher.status.updateRecommended":"Update recommended","desktopHostSwitcher.status.incompatible":"Incompatible","desktopHostSwitcher.status.wrongService":"Wrong service","desktopHostSwitcher.status.unreachable":"Unreachable","desktopHostSwitcher.status.unknown":"Unknown","desktopHostSwitcher.status.ping":" · {ms}ms ping","desktopHostSwitcher.statusAria":"Instance status","desktopHostSwitcher.sshPhase.ready":"Ready","desktopHostSwitcher.sshPhase.error":"Error","desktopHostSwitcher.sshPhase.reconnecting":"Reconnecting","desktopHostSwitcher.sshPhase.resolvingConfig":"Resolving config","desktopHostSwitcher.sshPhase.checkingAuth":"Checking auth","desktopHostSwitcher.sshPhase.connectingSsh":"Connecting SSH","desktopHostSwitcher.sshPhase.probingRemote":"Probing remote","desktopHostSwitcher.sshPhase.installing":"Installing","desktopHostSwitcher.sshPhase.updating":"Updating","desktopHostSwitcher.sshPhase.detectingServer":"Detecting server","desktopHostSwitcher.sshPhase.startingServer":"Starting server","desktopHostSwitcher.sshPhase.forwardingPorts":"Forwarding ports","desktopHostSwitcher.sshPhase.idle":"Idle","desktopHostSwitcher.ssh.needInstancesHint":"Need SSH instances? Manage them in Settings.","desktopHostSwitcher.ssh.instanceFallback":"SSH instance","desktopHostSwitcher.ssh.connectingTo":"Connecting to {host}","desktopHostSwitcher.actions.refresh":"Refresh","desktopHostSwitcher.actions.refreshInstancesAria":"Refresh instances","desktopHostSwitcher.actions.remoteSsh":"Remote SSH","desktopHostSwitcher.actions.instanceActionsAria":"Instance actions","desktopHostSwitcher.actions.edit":"Edit","desktopHostSwitcher.actions.delete":"Delete","desktopHostSwitcher.actions.connect":"Connect","desktopHostSwitcher.actions.defaultInstanceAria":"Default instance","desktopHostSwitcher.actions.setAsDefaultAria":"Set as default","desktopHostSwitcher.actions.setAsDefault":"Set as default","desktopHostSwitcher.actions.openInNewWindowAria":"Open in new window","desktopHostSwitcher.actions.openInNewWindow":"Open in new window","desktopHostSwitcher.actions.addInstance":"Add instance","desktopHostSwitcher.actions.cancel":"Cancel","desktopHostSwitcher.actions.save":"Save","desktopHostSwitcher.actions.add":"Add","desktopHostSwitcher.actions.switchToLocal":"Switch to Local","desktopHostSwitcher.actions.retry":"Retry","desktopHostSwitcher.actions.switchInstanceAria":"Switch instance","desktopHostSwitcher.actions.switchInstance":"Switch instance","desktopHostSwitcher.actions.switchToAria":"Switch to {instance}","desktopHostSwitcher.field.labelPlaceholder":"Label","desktopHostSwitcher.field.labelOptionalPlaceholder":"Label (optional)","desktopHostSwitcher.field.urlPlaceholder":"https://host:port","desktopHostSwitcher.state.limitedOnPage":"Instance switcher is limited on this page. Use Local to recover.","desktopHostSwitcher.state.loading":"Loading...","desktopHostSwitcher.state.instanceUnreachable":"Instance unreachable","desktopHostSwitcher.edit.title":"Edit instance","desktopHostSwitcher.add.title":"Add instance","desktopHostSwitcher.error.failedToSave":"Failed to save","desktopHostSwitcher.error.failedToLoad":"Failed to load","desktopHostSwitcher.error.invalidUrl":"Invalid URL (must be http/https)","desktopHostSwitcher.error.failedToOpenNewWindow":"Failed to open new window","desktopHostSwitcher.instance.local":"Local","desktopHostSwitcher.instance.fallback":"Instance","desktopHostSwitcher.startup.title":"Default SSH instance unavailable","desktopHostSwitcher.startup.connectingTo":"Connecting to {host}...","desktopHostSwitcher.startup.failed":"Failed to connect the default SSH instance.","desktopHostSwitcher.toast.sshConnected":'SSH instance "{host}" connected',"desktopHostSwitcher.toast.sshFailedToConnect":'SSH instance "{host}" failed to connect',"desktopHostSwitcher.toast.instanceUnreachable":'Instance "{host}" is unreachable',"miniChat.header.newSession":"New session","miniChat.header.session":"Session","miniChat.header.defaultAgent":"Default agent","miniChat.header.noModel":"No model","miniChat.status.busy":"Running","miniChat.status.retry":"Retrying","miniChat.status.idle":"Idle","miniChat.actions.pin":"Pin above other windows","miniChat.actions.unpin":"Unpin window","miniChat.actions.pinAria":"Pin Mini Chat window","miniChat.actions.unpinAria":"Unpin Mini Chat window","miniChat.actions.openMain":"Open in main window","miniChat.actions.openMainAria":"Open session in main window","miniChat.unavailable.title":"Session unavailable","miniChat.unavailable.description":"This session could not be loaded. It may have been deleted, archived, or opened from a different project context.","sessions.sidebar.session.menu.openMiniChatWindow":"Open in Mini Chat Window","header.actions.newMiniChat":"New Mini Chat Window","header.actions.newMiniChatAria":"Open a new Mini Chat window","header.actions.openSessionMiniChat":"Open Session in Mini Chat","header.actions.openSessionMiniChatAria":"Open current session in Mini Chat","header.windowControls.groupAria":"Window controls","header.windowControls.minimize":"Minimize window","header.windowControls.maximize":"Maximize window","header.windowControls.restore":"Restore window","header.windowControls.close":"Close window","errorBoundary.title":"Something went wrong","errorBoundary.description":"The application encountered an unexpected error. This has been logged for debugging.","errorBoundary.state.unknownError":"Unknown error","errorBoundary.state.componentStackLabel":"Component stack:","errorBoundary.actions.errorDetails":"Error details","errorBoundary.actions.tryAgain":"Try again","errorBoundary.actions.copy":"Copy","errorBoundary.actions.copied":"Copied","jsonTreeView.error.emptyJson":"Empty JSON content","jsonTreeView.error.invalidJson":"Invalid JSON","jsonTreeView.error.invalidJsonTitle":"Invalid JSON","jsonTreeView.actions.expandAll":"Expand All","jsonTreeView.actions.collapseAll":"Collapse All","numberInput.actions.decreaseAria":"Decrease value","numberInput.actions.increaseAria":"Increase value","goToLineDialog.field.linePlaceholderShort":"Line","goToLineDialog.field.linePlaceholder":"Line number","goToLineDialog.actions.go":"Go","goToLineDialog.helper.editorUnavailable":"Editor unavailable.","goToLineDialog.helper.currentLineRange":"Current Line: {current}. Type a line number between 1 and {max} to navigate to.","goToLineDialog.helper.goToLine":"Go to line {line}","dialog.common.actions.close":"Close","filesView.toast.relativePathCopied":"Relative path copied","filesView.tree.menu.copyRelativePath":"Copy Relative Path","multiRun.branchSelector.placeholder.selectSourceBranch":"Select source branch...","multiRun.branchSelector.status.loadingBranches":"Loading branches...","multiRun.branchSelector.status.noBranchesFound":"No branches found","multiRun.branchSelector.status.notInGitRepository":"Not in a git repository.","multiRun.branchSelector.groups.localBranches":"Local branches","multiRun.branchSelector.groups.remoteBranches":"Remote branches","multiRun.window.actions.closeAria":"Close multi-run","multiRun.window.description":"OpenChamber Multi-Run window.","voice.status.idle":"Voice Ready","voice.status.listening":"Listening...","voice.status.processing":"Processing...","voice.status.speaking":"Speaking...","voice.status.error":"Voice Error","voice.status.conversationModeActiveAria":"Conversation mode active","voice.action.finishAndTranscribe":"Finish and transcribe voice input","onboarding.common.actions.back":"Back","onboarding.common.copyToClipboard":"Copy to clipboard","onboarding.common.status.copiedToClipboard":"Copied to clipboard","onboarding.chooser.title":"Welcome to OpenChamber","onboarding.chooser.description":"Choose how you want to connect to get started.","onboarding.chooser.tabs.localInstall":"Local Install","onboarding.chooser.tabs.connectRemote":"Connect Remote","onboarding.localSetup.title":"Setting Up OpenCode","onboarding.localSetup.description":"Install OpenCode CLI to continue.","onboarding.localSetup.dialog.selectOpencodeBinary":"Select opencode binary","onboarding.localSetup.errors.cliNotReady":"OpenCode CLI is not ready yet. Please confirm installation is complete and try again.","onboarding.localSetup.errors.detectionFailed":"Detection failed","onboarding.localSetup.windows.title":"Windows setup","onboarding.localSetup.windows.stepInstallWsl":"Install OpenCode with the command below.","onboarding.localSetup.windows.stepInstallWslSuffix":"","onboarding.localSetup.windows.stepRunInstallInWsl":"Run the install command below in a Windows terminal.","onboarding.localSetup.windows.stepSetBinaryPath":"If OpenChamber does not detect OpenCode automatically, set the binary path below.","onboarding.localSetup.intro":"OpenCode is the heart of OpenChamber — install it to get started.","onboarding.localSetup.docs.windows":"OpenCode docs","onboarding.localSetup.docs.default":"OpenCode docs","onboarding.localSetup.actions.checking":"Checking…","onboarding.localSetup.actions.checkAndContinue":"I've completed installation, check and continue","onboarding.localSetup.actions.checkNow":"Check now","onboarding.localSetup.helper.checkAndContinue":"Click to check if OpenCode CLI is available. If successful, you'll automatically enter the main screen.","onboarding.localSetup.status.watching":"Waiting for OpenCode","onboarding.localSetup.status.autoContinue":"We'll continue automatically once it's detected.","onboarding.localSetup.field.alreadyInstalled":"Already installed? Set the OpenCode CLI path:","onboarding.localSetup.advanced.title":"Set a custom binary path","onboarding.localSetup.troubleshoot.title":"Having trouble?","onboarding.localSetup.actions.browse":"Browse","onboarding.localSetup.actions.apply":"Apply","onboarding.localSetup.helper.saveAndReload":"Saves to OpenChamber settings and reloads OpenCode configuration.","onboarding.localSetup.remotePreference":"Prefer to use a remote server?","onboarding.localSetup.actions.connectRemoteServer":"Connect to Remote Server →","onboarding.localSetup.windows.hintInstallInWsl":"On Windows, install and run OpenCode natively.","onboarding.localSetup.windows.hintDetectionFailed":"If detection fails, set a native path such as opencode.cmd or opencode.exe.","onboarding.localSetup.hint.ensurePath":"Already installed? Make sure opencode is in your PATH.","onboarding.localSetup.hint.setEnv":"Or set OPENCODE_BINARY environment variable.","onboarding.localSetup.hint.missingRuntime":'If you see "env: node: No such file or directory" or "env: bun: No such file or directory", install that runtime or ensure it is on PATH.',"onboarding.remoteConnection.title":"Connect to Remote Server","onboarding.remoteConnection.titleRecovery":"Connect to a Different Server","onboarding.remoteConnection.description":"Enter the address of an OpenChamber server to connect to.","onboarding.remoteConnection.field.serverAddress":"Server Address","onboarding.remoteConnection.field.serverAddressPlaceholder":"https://your-server.example.com:4096","onboarding.remoteConnection.field.nameOptional":"Name (optional)","onboarding.remoteConnection.field.namePlaceholder":"My Remote Server","onboarding.remoteConnection.errors.connectionTestFailed":"Connection test failed","onboarding.remoteConnection.errors.failedToSaveConnection":"Failed to save connection","onboarding.remoteConnection.status.connectedSuccessfully":"Connected successfully ({latencyMs}ms)","onboarding.remoteConnection.status.authWarning":"Server requires authentication. You can still connect.","onboarding.remoteConnection.status.connectionFailed":"Connection Failed","onboarding.remoteConnection.status.suggestionsUnreachable":"Suggestions: Check the server address, verify the server is running, or check your network connection.","onboarding.remoteConnection.status.suggestionsWrongService":"Suggestions: Verify the URL points to an OpenChamber server, or contact the server administrator.","onboarding.remoteConnection.actions.testing":"Testing…","onboarding.remoteConnection.actions.testConnection":"Test Connection","onboarding.remoteConnection.actions.connectAndRestart":"Connect & Restart","onboarding.remoteConnection.actions.whatToDo":"What would you like to do?","onboarding.remoteConnection.actions.chooseDifferentServer":"Choose Different Server","onboarding.remoteConnection.actions.useLocalInstead":"Use Local Instead","onboarding.remoteConnection.probe.authMessage":"Server requires authentication. You can still connect, but may need to provide credentials.","onboarding.remoteConnection.probe.updateRecommendedMessage":"This instance is running a different OpenChamber version. You can connect, but update both apps if something does not work.","onboarding.remoteConnection.probe.incompatibleMessage":"Server is running OpenChamber but is not compatible with this app version. Update OpenChamber on the server, then try again.","onboarding.remoteConnection.probe.wrongServiceMessage":"Server responded but is not running OpenChamber. Verify the address points to an OpenChamber server.","onboarding.remoteConnection.probe.unreachableMessage":"Server is unreachable. Check your network connection and verify the server address.","onboarding.desktopRecovery.localUnavailable.title":"Local OpenCode Unavailable","onboarding.desktopRecovery.localUnavailable.description":"OpenCode CLI could not be started or is not installed. Install OpenCode or connect to a remote server instead.","onboarding.desktopRecovery.localUnavailable.retry":"Retry Local","onboarding.desktopRecovery.localUnavailable.useLocal":"Set Up Local","onboarding.desktopRecovery.noDefaultConnection.title":"No Default Connection","onboarding.desktopRecovery.noDefaultConnection.description":"Your saved default connection could not be found. Choose how you want to connect.","onboarding.desktopRecovery.remoteUnreachable.title":"Remote Server Unreachable","onboarding.desktopRecovery.remoteUnreachable.description":'Could not connect to "{host}". Check your network connection and verify the server address.',"onboarding.desktopRecovery.remoteUnreachable.retry":"Retry Connection","onboarding.desktopRecovery.incompatibleServer.title":"Incompatible Server","onboarding.desktopRecovery.incompatibleServer.description":'The server at "{host}" is not running OpenChamber. Verify the address points to an OpenChamber server.',"onboarding.desktopRecovery.remoteIncompatible.title":"Server Update Required","onboarding.desktopRecovery.remoteIncompatible.description":'The OpenChamber server at "{host}" is not compatible with this app version. Update OpenChamber on the server, then try again.',"onboarding.desktopRecovery.common.useLocal":"Use Local","onboarding.desktopRecovery.common.useRemote":"Use Remote","onboarding.desktopRecovery.actions.retrying":"Retrying…","onboarding.desktopRecovery.actions.retryConnection":"Retry Connection","startup.initRecovery.title":"Startup failed","startup.initRecovery.description":"OpenChamber could not finish initialization. Check that the server is running, then retry.","startup.initRecovery.retry":"Retry","startup.initRecovery.retrying":"Retrying…","onboarding.desktopRecovery.placeholders.remoteServer":"the remote server","onboarding.desktopRecovery.placeholders.unknownServer":"unknown","vscodeLayout.title.chat":"Chat","vscodeLayout.title.newSession":"New session","vscodeLayout.title.sessions":"Sessions","vscodeLayout.title.sessionFallback":"Session","vscodeLayout.actions.backToSessionsAria":"Back to sessions","vscodeLayout.actions.newSessionAria":"New session","vscodeLayout.actions.openAgentManagerAria":"Open Agent Manager","vscodeLayout.actions.resizeSessionsSidebarAria":"Resize sessions sidebar","vscodeLayout.actions.settingsAria":"Settings","vscodeLayout.quota.title":"Rate limits","vscodeLayout.quota.mode.used":"Used","vscodeLayout.quota.mode.remaining":"Remaining","vscodeLayout.quota.lastUpdated":"Last updated {time}","vscodeLayout.quota.noRateLimitsAvailable":"No rate limits available.","vscodeLayout.quota.noRateLimitsReported":"No rate limits reported.","vscodeLayout.quota.actions.rateLimitsAria":"Rate limits","vscodeLayout.quota.actions.showUsedAria":"Show used quota","vscodeLayout.quota.actions.showRemainingAria":"Show remaining quota","vscodeLayout.quota.actions.refreshAria":"Refresh rate limits","updateDialog.header.updateAvailable":"Update Available","updateDialog.header.updating":"Updating OpenChamber...","updateDialog.changelog.title":"What's new","updateDialog.status.installingUpdate":"Installing update...","updateDialog.status.serverRestarting":"Server restarting...","updateDialog.status.waitingForServer":"Waiting for server...","updateDialog.status.autoReloadHint":"The page will reload automatically when the update is complete.","updateDialog.fallback.updateViaTerminal":"Or update via terminal:","updateDialog.actions.copyCommand":"Copy command","updateDialog.actions.copied":"Copied!","updateDialog.status.downloadingPayload":"Downloading update payload...","updateDialog.actions.downloadUpdate":"Download Update","updateDialog.status.downloading":"Downloading...","updateDialog.actions.restartToUpdate":"Restart to Update","updateDialog.actions.updateNow":"Update Now","updateDialog.status.updating":"Updating...","updateDialog.error.updateFailed":"Update failed","updateDialog.error.takingLonger":"Update is taking longer than expected. Wait a bit and refresh, or run: openchamber update","opencodeUpdate.toast.available.title":"OpenCode update","opencodeUpdate.toast.available.description":"Version {version} available.","opencodeUpdate.toast.actions.update":"Update","opencodeUpdate.toast.actions.dismiss":"Dismiss","opencodeUpdate.toast.actions.reload":"Reload OpenCode","opencodeUpdate.toast.upgrading.title":"Updating OpenCode...","opencodeUpdate.toast.upgrading.description":"Keep OpenChamber open.","opencodeUpdate.toast.updated.title":"OpenCode updated","opencodeUpdate.toast.updated.description":"Update installed.","opencodeUpdate.toast.updated.descriptionWithVersion":"Version {version} installed.","opencodeUpdate.toast.failed.title":"Could not update OpenCode","opencodeUpdate.toast.failed.description":"The OpenCode upgrade failed.","opencodeUpdate.toast.reload.message":"Restarting OpenCode...","memoryDebugPanel.title":"Debug Panel","memoryDebugPanel.tabs.memory":"Memory","memoryDebugPanel.tabs.streaming":"Streaming","memoryDebugPanel.section.sessionsInMemory":"Sessions in Memory","memoryDebugPanel.section.uiStreamingMetrics":"UI Streaming Metrics","memoryDebugPanel.section.vscodeBridgeMetrics":"VS Code Bridge Metrics","memoryDebugPanel.section.noUiSamples":"No UI streaming samples yet. Start a stream and keep this panel open.","memoryDebugPanel.section.noVscodeSamples":"No VS Code bridge samples yet.","memoryDebugPanel.metric.totalMessages":"Total Messages","memoryDebugPanel.metric.cachedSessions":"Cached Sessions","memoryDebugPanel.metric.viewportWindow":"Viewport Window","memoryDebugPanel.metric.zombieTimeout":"Zombie Timeout","memoryDebugPanel.metric.githubTotalRequests":"GitHub Total Requests","memoryDebugPanel.metric.metrics":"Metrics","memoryDebugPanel.metric.samples":"Samples","memoryDebugPanel.metric.lastUpdate":"Last Update","memoryDebugPanel.metric.uiMetrics":"UI Metrics","memoryDebugPanel.metric.vscodeMetrics":"VS Code Metrics","memoryDebugPanel.metric.messageListRenders":"MsgList Renders","memoryDebugPanel.metric.messageListStreamRenders":"MsgList Stream Renders","memoryDebugPanel.metric.chatMessageRenders":"ChatMessage Renders","memoryDebugPanel.metric.chatMessageStreamRenders":"ChatMessage Stream Renders","memoryDebugPanel.metric.chatMessageStaticDuringStream":"ChatMessage Static During Stream","memoryDebugPanel.metric.chatMessageStaticOutsideActiveTurn":"ChatMessage Static Outside Active Turn","memoryDebugPanel.metric.messagesValue":"{count} messages","memoryDebugPanel.metric.minutesValue":"{count} minutes","memoryDebugPanel.metric.msgsValue":"{count} msgs","memoryDebugPanel.metric.countValue":"count {value}","memoryDebugPanel.metric.avgValue":"avg {value}","memoryDebugPanel.metric.maxValue":"max {value}","memoryDebugPanel.metric.totalValue":"total {value}","memoryDebugPanel.actions.logState":"Log State","memoryDebugPanel.actions.copyJson":"Copy JSON","memoryDebugPanel.tooltip.logCurrentState":"Log current memory state to browser console","memoryDebugPanel.streaming.copy.copied":"Streaming debug JSON copied","memoryDebugPanel.streaming.copy.failed":"Failed to copy JSON","memoryDebugPanel.streaming.copy.hint":"Copy exports both UI and VS Code streaming metrics as JSON","memoryDebugPanel.common.idle":"idle","memoryDebugPanel.common.live":"live","memoryDebugPanel.common.notAvailable":"n/a","memoryDebugPanel.common.untitled":"Untitled","directoryTree.field.newDirectoryPlaceholder":"new_directory","textarea.resizeHandleAria":"Resize textarea","sidebar.resize.leftPanelAria":"Resize left panel","sidebar.resize.rightPanelAria":"Resize right panel","mainLayout.mobile.closeDrawerAria":"Close drawer","sortableTabsStrip.aria.tabs":"Tabs","openChamberLogo.aria.logo":"OpenChamber logo","markdownRenderer.table.actions.copyTitle":"Copy table","markdownRenderer.table.actions.downloadTitle":"Download table","markdownRenderer.table.toast.downloadedAsFormat":"Table downloaded as {format}","markdownRenderer.mermaid.actions.copyTitle":"Copy","markdownRenderer.mermaid.actions.copySourceTitle":"Copy source","markdownRenderer.mermaid.actions.downloadSvgTitle":"Download SVG","markdownRenderer.mermaid.toast.downloadFailed":"Failed to download diagram"},M_=["en","zh-CN","zh-TW","uk","es","pt-BR","ko","pl"],y1="en",A_={en:"common.language.english","zh-CN":"common.language.simplifiedChinese","zh-TW":"common.language.traditionalChinese",uk:"common.language.ukrainian",es:"common.language.spanish","pt-BR":"common.language.brazilianPortuguese",ko:"common.language.korean",pl:"common.language.polish"},Kh="openchamber.i18n.v1";function F_(t){if(!t)return y1;const e=t.toLowerCase().replace(/_/g,"-");return e==="zh-cn"||e==="zh-hans"||e.startsWith("zh-hans-")?"zh-CN":e==="zh-tw"||e==="zh-hant"||e.startsWith("zh-hant-")?"zh-TW":e.startsWith("zh")?"zh-CN":e.startsWith("en")?"en":e==="uk"||e.startsWith("uk-")||e==="ua"||e.startsWith("ua-")?"uk":e==="es"||e.startsWith("es-")?"es":e==="pt"||e==="pt-br"||e.startsWith("pt-br-")?"pt-BR":e==="ko"||e.startsWith("ko-")?"ko":e==="pl"||e.startsWith("pl-")?"pl":y1}function __(){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(Kh);if(!t)return;const e=JSON.parse(t);return typeof e.locale=="string"?F_(e.locale):void 0}catch{return}}function B_(t){if(!(typeof window>"u"))try{window.localStorage.setItem(Kh,JSON.stringify({locale:t}))}catch{return}}function D_(){const t=__();return t||y1}const Gd=new Map([[y1,b1]]);async function T_(t){const e=Gd.get(t);if(e)return e;const n=t==="zh-CN"?await dn(()=>import("./zh-CN-B7IfGwyh.js"),[]):t==="zh-TW"?await dn(()=>import("./zh-TW-DiO_1_-_.js"),[]):t==="es"?await dn(()=>import("./es-rCA6AcBs.js"),[]):t==="pt-BR"?await dn(()=>import("./pt-BR-xndordtt.js"),[]):t==="uk"?await dn(()=>import("./uk-C52rE_cP.js"),[]):t==="ko"?await dn(()=>import("./ko-CTiirGAp.js"),[]):t==="pl"?await dn(()=>import("./pl-CwJAYYhT.js"),[]):{dict:b1};return Gd.set(t,n.dict),n.dict}const s1=Jt()((t,e)=>({locale:y1,dictionary:b1,loadingLocale:null,setLocale:n=>{const o=e(),s=Gd.get(n);o.locale===n&&o.loadingLocale!==n&&s||(B_(n),t({locale:n,dictionary:s??o.dictionary,loadingLocale:s?null:n}),!s&&T_(n).then(r=>{e().locale===n&&t({dictionary:r,loadingLocale:null})}).catch(r=>{console.error(`[i18n] failed to load locale ${n}`,r),e().locale===n&&t({dictionary:b1,loadingLocale:null})}))}}));function P_(){s1.getState().setLocale(D_())}function Yh(t,e,n){const o=t[e]??b1[e]??e;return n?o.replace(/\{([^{}]+)\}/g,(s,r)=>{const i=n[r.trim()];return i==null?s:String(i)}):o}const v2=Object.freeze(Object.defineProperty({__proto__:null,formatMessage:Yh,initializeLocale:P_,useI18nStore:s1},Symbol.toStringTag,{value:"Module"})),Jh=g.createContext(null),UJ=t=>{const e=le.c(15),{children:n}=t,o=s1(E_),s=s1(H_),r=s1(I_);let i,l;e[0]!==o?(i=()=>{typeof document>"u"||(document.documentElement.lang=o)},l=[o],e[0]=o,e[1]=i,e[2]=l):(i=e[1],l=e[2]),g.useEffect(i,l);let c;e[3]!==s?(c=(p,b)=>Yh(s,p,b),e[3]=s,e[4]=c):c=e[4];const d=c;let u;e[5]!==d?(u=p=>d(A_[p]),e[5]=d,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==r||e[9]!==d||e[10]!==u?(f={locale:o,locales:M_,setLocale:r,label:u,t:d},e[7]=o,e[8]=r,e[9]=d,e[10]=u,e[11]=f):f=e[11];const m=f;let h;return e[12]!==n||e[13]!==m?(h=a.jsx(Jh.Provider,{value:m,children:n}),e[12]=n,e[13]=m,e[14]=h):h=e[14],h};function E_(t){return t.locale}function H_(t){return t.dictionary}function I_(t){return t.setLocale}function nt(){const t=g.useContext(Jh);if(!t)throw new Error("useI18n must be used within I18nProvider");return t}let r1=0;function j_(t,e){return t&&se.isValidElement(e)?{render:e}:{children:e}}function Rs(t){const e=le.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==n?(o=a.jsx(Ib,{...n}),e[2]=n,e[3]=o):o=e[3],o}function L_(t){const e=le.c(10);let n,o,s;e[0]!==t?({asChild:n,children:o,...s}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s):(n=e[1],o=e[2],s=e[3]);let r;e[4]!==n||e[5]!==o?(r=j_(n,o),e[4]=n,e[5]=o,e[6]=r):r=e[6];const i=r;let l;return e[7]!==s||e[8]!==i?(l=a.jsx(Ob,{"data-slot":"dialog-trigger",...s,...i}),e[7]=s,e[8]=i,e[9]=l):l=e[9],l}function N_(t){const e=le.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==n?(o=a.jsx(Vb,{...n}),e[2]=n,e[3]=o):o=e[3],o}const Qh=se.forwardRef((t,e)=>{const n=le.c(10);let o,s;n[0]!==t?({className:o,...s}=t,n[0]=t,n[1]=o,n[2]=s):(o=n[1],s=n[2]);let r;n[3]===Symbol.for("react.memo_cache_sentinel")?(r=[],n[3]=r):r=n[3],se.useEffect(z_,r);const i=e;let l;n[4]!==o?(l=N("fixed inset-0 z-50 bg-black/50 dark:bg-black/75","transition-opacity duration-150 ease-out","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",o),n[4]=o,n[5]=l):l=n[5];let c;return n[6]!==s||n[7]!==i||n[8]!==l?(c=a.jsx(zb,{ref:i,"data-slot":"dialog-overlay",className:l,...s}),n[6]=s,n[7]=i,n[8]=l,n[9]=c):c=n[9],c});Qh.displayName="DialogOverlay";function Vs(t){const e=le.c(16);let n,o,s,r;e[0]!==t?({className:o,children:n,showCloseButton:r,...s}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r):(n=e[1],o=e[2],s=e[3],r=e[4]);const i=r===void 0?!0:r,{t:l}=nt();let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(Qh,{className:"rounded-none"}),e[5]=c):c=e[5];let d;e[6]!==o?(d=N("relative pointer-events-auto bg-background text-foreground flex flex-col w-full max-w-lg max-h-full gap-4 rounded-xl border p-6 shadow-none overflow-y-auto pwa-dialog-content origin-center","transition-all duration-150 ease-out","data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]","data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]",o),e[6]=o,e[7]=d):d=e[7];let u;e[8]!==i||e[9]!==l?(u=i&&a.jsxs(jb,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[open]:bg-interactive-active data-[open]:text-foreground absolute top-2 right-2 rounded-lg opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none text-muted-foreground hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(z,{name:"close"}),a.jsx("span",{className:"sr-only",children:l("dialog.common.actions.close")})]}),e[8]=i,e[9]=l,e[10]=u):u=e[10];let f;return e[11]!==n||e[12]!==s||e[13]!==d||e[14]!==u?(f=a.jsxs(N_,{children:[c,a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center pointer-events-none p-4",children:a.jsxs(Lb,{"data-slot":"dialog-content","data-state-slot":"dialog",className:d,...s,children:[n,u]})})]}),e[11]=n,e[12]=s,e[13]=d,e[14]=u,e[15]=f):f=e[15],f}function br(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("flex flex-col gap-2 text-center sm:text-left",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx("div",{"data-slot":"dialog-header",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function R_(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("flex flex-col-reverse gap-2 bottom-safe-area sm:flex-row sm:justify-end",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx("div",{"data-slot":"dialog-footer",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function yr(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("typography-markdown leading-none font-semibold text-foreground",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx(Nb,{"data-slot":"dialog-title",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function sa(t){const e=le.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let s;e[3]!==n?(s=N("text-muted-foreground typography-ui-label",n),e[3]=n,e[4]=s):s=e[4];let r;return e[5]!==o||e[6]!==s?(r=a.jsx(Rb,{"data-slot":"dialog-description",className:s,...o}),e[5]=o,e[6]=s,e[7]=r):r=e[7],r}function V_(){r1=Math.max(0,r1-1),r1===0&&document.documentElement.classList.remove("oc-dialog-open")}function z_(){return r1=r1+1,document.documentElement.classList.add("oc-dialog-open"),V_}const O_=600,$_=1600,ou=10,Xh=se.createContext(null);class ep extends se.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}}function Kd(t){const e=le.c(10);let n,o,s,r,i;e[0]!==t?({delayDuration:i,skipDelayDuration:r,delay:o,closeDelay:n,...s}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r,e[5]=i):(n=e[1],o=e[2],s=e[3],r=e[4],i=e[5]);const c=o??(i===void 0?0:i),d=n??r;let u;return e[6]!==s||e[7]!==c||e[8]!==d?(u=a.jsx($b,{delay:c,closeDelay:d,...s}),e[6]=s,e[7]=c,e[8]=d,e[9]=u):u=e[9],u}function $t(t){const e=le.c(35);let n,o,s,r;e[0]!==t?({delayDuration:n,open:s,onOpenChange:o,...r}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r):(n=e[1],o=e[2],s=e[3],r=e[4]);const[i,l]=se.useState(!1),c=se.useRef(null),d=se.useRef(null),u=se.useRef(null),f=se.useRef(!1),m=s!==void 0,h=m?s:i;let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null)},e[5]=p):p=e[5];const b=p;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null)},e[6]=y):y=e[6];const v=y;let x;e[7]!==m?(x=q=>{m||l(q)},e[7]=m,e[8]=x):x=e[8];const w=x;let S;e[9]!==m||e[10]!==w?(S=q=>{q.pointerType!=="touch"&&q.pointerType!=="pen"||(b(),v(),u.current={x:q.clientX,y:q.clientY},c.current=window.setTimeout(()=>{m||(f.current=!0,w(!0))},O_))},e[9]=m,e[10]=w,e[11]=S):S=e[11];let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=q=>{const $=u.current;if(!$)return;const V=Math.abs(q.clientX-$.x),W=Math.abs(q.clientY-$.y);(V>ou||W>ou)&&(b(),u.current=null)},e[12]=C):C=e[12];let M;e[13]!==w?(M=()=>{b(),u.current=null,f.current&&(v(),d.current=window.setTimeout(()=>{f.current=!1,w(!1)},$_))},e[13]=w,e[14]=M):M=e[14];let A,k;e[15]===Symbol.for("react.memo_cache_sentinel")?(A=q=>{f.current&&(f.current=!1,q.preventDefault(),q.stopPropagation())},k=q=>{f.current&&q.preventDefault()},e[15]=A,e[16]=k):(A=e[15],k=e[16]);let D;e[17]!==S||e[18]!==M?(D={handlePointerDown:S,handlePointerMove:C,handlePointerEnd:M,handleClickCapture:A,handleContextMenu:k},e[17]=S,e[18]=M,e[19]=D):D=e[19];const _=D;let F,B;e[20]===Symbol.for("react.memo_cache_sentinel")?(F=()=>()=>{b(),v()},B=[v,b],e[20]=F,e[21]=B):(F=e[20],B=e[21]),se.useEffect(F,B);let j;e[22]!==m||e[23]!==o?(j=(q,$)=>{m||l(q),o?.(q,$)},e[22]=m,e[23]=o,e[24]=j):j=e[24];const T=j;let P;e[25]!==T||e[26]!==r||e[27]!==h?(P=a.jsx(Zb,{open:h,onOpenChange:T,...r}),e[25]=T,e[26]=r,e[27]=h,e[28]=P):P=e[28];let I;e[29]!==_||e[30]!==P?(I=a.jsx(Xh.Provider,{value:_,children:P}),e[29]=_,e[30]=P,e[31]=I):I=e[31];const O=I;if(n===void 0)return O;let L;return e[32]!==n||e[33]!==O?(L=a.jsx(Kd,{delayDuration:n,children:O}),e[32]=n,e[33]=O,e[34]=L):L=e[34],L}function Zt(t){const e=le.c(43);let n,o,s,r,i,l,c,d,u;e[0]!==t?({asChild:n,children:o,onPointerDown:l,onPointerMove:c,onPointerUp:d,onPointerCancel:i,onClickCapture:s,onContextMenu:r,...u}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c,e[8]=d,e[9]=u):(n=e[1],o=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=se.useContext(Xh);let m;e[10]!==n||e[11]!==o?(m=n&&se.isValidElement(o)?{render:o}:{children:o},e[10]=n,e[11]=o,e[12]=m):m=e[12];const h=m;let p;e[13]!==f||e[14]!==l?(p=M=>{l?.(M),f?.handlePointerDown(M)},e[13]=f,e[14]=l,e[15]=p):p=e[15];let b;e[16]!==f||e[17]!==c?(b=M=>{c?.(M),f?.handlePointerMove(M)},e[16]=f,e[17]=c,e[18]=b):b=e[18];let y;e[19]!==f||e[20]!==d?(y=M=>{d?.(M),f?.handlePointerEnd()},e[19]=f,e[20]=d,e[21]=y):y=e[21];let v;e[22]!==f||e[23]!==i?(v=M=>{i?.(M),f?.handlePointerEnd()},e[22]=f,e[23]=i,e[24]=v):v=e[24];let x;e[25]!==f||e[26]!==s?(x=M=>{f?.handleClickCapture(M),!M.defaultPrevented&&s?.(M)},e[25]=f,e[26]=s,e[27]=x):x=e[27];let w;e[28]!==f||e[29]!==r?(w=M=>{f?.handleContextMenu(M),!M.defaultPrevented&&r?.(M)},e[28]=f,e[29]=r,e[30]=w):w=e[30];let S;e[31]!==u||e[32]!==h||e[33]!==p||e[34]!==b||e[35]!==y||e[36]!==v||e[37]!==x||e[38]!==w?(S=a.jsx(Ub,{"data-slot":"tooltip-trigger",onPointerDown:p,onPointerMove:b,onPointerUp:y,onPointerCancel:v,onClickCapture:x,onContextMenu:w,...u,...h}),e[31]=u,e[32]=h,e[33]=p,e[34]=b,e[35]=y,e[36]=v,e[37]=x,e[38]=w,e[39]=S):S=e[39];let C;return e[40]!==o||e[41]!==S?(C=a.jsx(ep,{fallback:o,children:S}),e[40]=o,e[41]=S,e[42]=C):C=e[42],C}function Ot(t){const e=le.c(23);let n,o,s,r,i,l,c;e[0]!==t?({className:s,sideOffset:c,side:i,align:n,children:o,style:l,...r}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=r,e[5]=i,e[6]=l,e[7]=c):(n=e[1],o=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=N("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(Wb,{className:"fill-muted z-50 size-2"}),e[12]=m):m=e[12];let h;e[13]!==o||e[14]!==r||e[15]!==u||e[16]!==f?(h=a.jsxs(qb,{"data-slot":"tooltip-content",className:u,style:f,...r,children:[o,m]}),e[13]=o,e[14]=r,e[15]=u,e[16]=f,e[17]=h):h=e[17];let p;return e[18]!==n||e[19]!==i||e[20]!==d||e[21]!==h?(p=a.jsx(ep,{children:a.jsx(Gb,{children:a.jsx(Kb,{sideOffset:d,side:i,align:n,className:"z-50",children:h})})}),e[18]=n,e[19]=i,e[20]=d,e[21]=h,e[22]=p):p=e[22],p}const Z_=/^(t|.*(?:token|auth|secret|api).*)$/i,jn=t=>{const e=t.trim();if(!e)return null;try{const n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:e.split("#")[0]||null}catch{return null}},U_=t=>{const e=jn(t);if(!e)return null;try{const n=new URL(e);if((n.pathname.replace(/\/+$/,"")||"/")==="/connect"&&n.searchParams.has("t"))return{persistedUrl:n.origin,redeemUrl:n.toString(),kind:"tunnel-connect-link"}}catch{return null}return{persistedUrl:e,redeemUrl:null,kind:"normal-host"}},uo=t=>{const e=jn(t);if(!e)return t;try{const n=new URL(e);(n.username||n.password)&&(n.username="",n.password="");const o=Array.from(new Set(Array.from(n.searchParams.keys())));for(const s of o)Z_.test(s)&&n.searchParams.set(s,"[REDACTED]");return n.toString()}catch{return e}},Ni=(t,e)=>{const n=jn(t),o=jn(e);if(!n||!o)return!1;try{const s=new URL(n),r=new URL(o);if(s.origin!==r.origin||r.search&&s.search!==r.search)return!1;const i=r.pathname.length>1?r.pathname.replace(/\/+$/,""):r.pathname,l=s.pathname.length>1?s.pathname.replace(/\/+$/,""):s.pathname;return i==="/"?!0:l===i||l.startsWith(`${i}/`)}catch{return!1}},d3=t=>typeof t=="object"&&t!==null,Ro=(t,e)=>{const n=t[e];return typeof n=="string"?n:null},su=(t,e)=>{const n=t[e];return typeof n=="number"&&Number.isFinite(n)?n:null},q_=t=>{if(!d3(t))return null;const e=Ro(t,"id"),n=Ro(t,"label"),o=Ro(t,"url"),s=Ro(t,"apiUrl")||Ro(t,"api_url"),r=Ro(t,"clientToken")||Ro(t,"client_token");return!e||!n||!o?null:{id:e,label:n,url:o,...s?{apiUrl:s}:{},...r?{clientToken:r}:{}}},dr=t=>jn(t.apiUrl||t.url)||t.apiUrl||t.url,H1=()=>qn()?(t,e)=>Wn(t,e):null,u3=async()=>{const t=H1();if(!t)return{hosts:[],defaultHostId:"local",initialHostChoiceCompleted:!1};const e=await t("desktop_hosts_get");if(!d3(e))return{hosts:[],defaultHostId:null,initialHostChoiceCompleted:!1};const n=e.hosts,o=Array.isArray(n)?n.map(q_).filter(l=>!!l):[],s=Ro(e,"defaultHostId")||Ro(e,"default_host_id")||Ro(e,"defaultHostID"),r=e.initialHostChoiceCompleted===!0||e.initial_host_choice_completed===!0,i=Ro(e,"localOrigin")||Ro(e,"local_origin");return{hosts:o,defaultHostId:s,initialHostChoiceCompleted:r,localOrigin:i}},Yd=async t=>{const e=H1();if(!e)return;const n={hosts:t.hosts,defaultHostId:t.defaultHostId,initialHostChoiceCompleted:t.initialHostChoiceCompleted};t.localClientToken!==void 0&&(n.localClientToken=t.localClientToken),await e("desktop_hosts_set",{input:n})},W_=async()=>{const t=H1();if(!t)return"";const e=await t("desktop_local_client_token_get").catch(()=>null);return typeof e=="string"?e.trim():""},_c=async(t,e)=>{const n=H1();if(!n)return{status:"unreachable",latencyMs:0};const o=await n("desktop_host_probe",{url:t,clientToken:e?.clientToken||void 0});if(!d3(o))return{status:"unreachable",latencyMs:0};const s=o.status,r=s==="ok"||s==="auth"||s==="update-recommended"||s==="incompatible"||s==="wrong-service"||s==="unreachable"?s:"unreachable",i=su(o,"latencyMs")??su(o,"latency_ms")??0;return{status:r,latencyMs:i}},G_=async(t,e)=>{const n=H1();n&&await n("desktop_new_window_at_url",{url:t,clientToken:e?.clientToken||void 0})},Vo=t=>typeof t=="object"&&t!==null,Xt=(t,e)=>{const n=t[e];return typeof n=="string"?n:null},wn=(t,e)=>{const n=t[e];return typeof n=="number"&&Number.isFinite(n)?n:null},ts=(t,e)=>{const n=t[e];return typeof n=="boolean"?n:null},K_=t=>Array.isArray(t)?t.filter(e=>typeof e=="string"):[],Cr=()=>qn()?(t,e)=>Wn(t,e):null,ru=t=>{if(!Vo(t))return;const e=ts(t,"enabled")??!1,o=Xt(t,"store")?.toLowerCase()==="settings"?"settings":"never",s=Xt(t,"value");return{enabled:e,store:o,...s?{value:s}:{}}},Y_=t=>t==="remote"||t==="dynamic"?t:"local",J_=t=>{if(!Vo(t))return null;const e=Xt(t,"id");if(!e)return null;const n=ts(t,"enabled")??!0,o=Y_(Xt(t,"type")),s=Xt(t,"localHost")||Xt(t,"local_host")||void 0,r=wn(t,"localPort")??wn(t,"local_port")??void 0,i=Xt(t,"remoteHost")||Xt(t,"remote_host")||void 0,l=wn(t,"remotePort")??wn(t,"remote_port")??void 0;return{id:e,enabled:n,type:o,...s?{localHost:s}:{},...typeof r=="number"?{localPort:r}:{},...i?{remoteHost:i}:{},...typeof l=="number"?{remotePort:l}:{}}},Q_=t=>{if(!Vo(t))return null;const e=Xt(t,"id"),n=Xt(t,"sshCommand")||Xt(t,"ssh_command");if(!e||!n)return null;const o=Xt(t,"nickname"),s=t.sshParsed,r=Vo(s)?{destination:Xt(s,"destination")||"",args:K_(s.args)}:void 0,i=Vo(t.remoteOpenchamber)?t.remoteOpenchamber:Vo(t.remote_openchamber)?t.remote_openchamber:{},l=Vo(t.localForward)?t.localForward:Vo(t.local_forward)?t.local_forward:{},c=Vo(t.auth)?t.auth:{},u=Xt(i,"mode")?.toLowerCase()==="external"?"external":"managed",f=Xt(i,"installMethod")||Xt(i,"install_method"),m=f==="npm"||f==="download_release"||f==="upload_bundle"?f:"bun",h=Xt(l,"bindHost")||Xt(l,"bind_host")||"127.0.0.1",p=h==="localhost"||h==="0.0.0.0"?h:"127.0.0.1",y=(Array.isArray(t.portForwards)?t.portForwards:Array.isArray(t.port_forwards)?t.port_forwards:[]).map(C=>J_(C)).filter(C=>!!C),v=wn(i,"preferredPort")??wn(i,"preferred_port"),x=wn(l,"preferredLocalPort")??wn(l,"preferred_local_port"),w=ru(c.sshPassword||c.ssh_password),S=ru(c.openchamberPassword||c.openchamber_password);return{id:e,...o?{nickname:o}:{},sshCommand:n,...r&&r.destination?{sshParsed:r}:{},connectionTimeoutSec:wn(t,"connectionTimeoutSec")??wn(t,"connection_timeout_sec")??60,remoteOpenchamber:{mode:u,keepRunning:ts(i,"keepRunning")??ts(i,"keep_running")??!0,...v?{preferredPort:v}:{},installMethod:m,uploadBundleOverSsh:ts(i,"uploadBundleOverSsh")??ts(i,"upload_bundle_over_ssh")??!1},localForward:{...x?{preferredLocalPort:x}:{},bindHost:p},auth:{...w?{sshPassword:w}:{},...S?{openchamberPassword:S}:{}},portForwards:y}},X_=t=>{switch(t){case"config_resolved":case"auth_check":case"master_connecting":case"remote_probe":case"installing":case"updating":case"server_detecting":case"server_starting":case"forwarding":case"ready":case"degraded":case"error":return t;default:return"idle"}},tp=t=>{if(!Vo(t))return null;const e=Xt(t,"id");return e?{id:e,phase:X_(Xt(t,"phase")),...Xt(t,"detail")?{detail:Xt(t,"detail")||void 0}:{},...Xt(t,"localUrl")||Xt(t,"local_url")?{localUrl:Xt(t,"localUrl")||Xt(t,"local_url")||void 0}:{},...typeof(wn(t,"localPort")??wn(t,"local_port"))=="number"?{localPort:wn(t,"localPort")??wn(t,"local_port")??void 0}:{},...typeof(wn(t,"remotePort")??wn(t,"remote_port"))=="number"?{remotePort:wn(t,"remotePort")??wn(t,"remote_port")??void 0}:{},startedByUs:ts(t,"startedByUs")??ts(t,"started_by_us")??!1,retryAttempt:wn(t,"retryAttempt")??wn(t,"retry_attempt")??0,requiresUserAction:ts(t,"requiresUserAction")??ts(t,"requires_user_action")??!1,updatedAtMs:wn(t,"updatedAtMs")??wn(t,"updated_at_ms")??Date.now()}:null},eB=t=>{if(!Vo(t))return null;const e=Xt(t,"host"),n=Xt(t,"source"),o=Xt(t,"sshCommand")||Xt(t,"ssh_command");return!e||!n||!o?null:{host:e,source:n,sshCommand:o,pattern:ts(t,"pattern")??!1}},qJ=(t,e)=>({id:t,sshCommand:e,connectionTimeoutSec:60,remoteOpenchamber:{mode:"managed",keepRunning:!0,installMethod:"bun",uploadBundleOverSsh:!1},localForward:{bindHost:"127.0.0.1"},auth:{},portForwards:[]}),tB=async()=>{const t=Cr();if(!t)return{instances:[]};const e=await t("desktop_ssh_instances_get");return Vo(e)?{instances:(Array.isArray(e.instances)?e.instances:Array.isArray(e.desktopSshInstances)?e.desktopSshInstances:[]).map(s=>Q_(s)).filter(s=>!!s)}:{instances:[]}},WJ=async t=>{const e=Cr();e&&await e("desktop_ssh_instances_set",{config:{instances:t.instances}})},GJ=async()=>{const t=Cr();if(!t)return[];const e=await t("desktop_ssh_import_hosts");return Array.isArray(e)?e.map(n=>eB(n)).filter(n=>!!n):[]},iu=async t=>{const e=Cr();e&&await e("desktop_ssh_connect",{id:t})},nB=async t=>{const e=Cr();e&&await e("desktop_ssh_disconnect",{id:t})},f3=async t=>{const e=Cr();if(!e)return[];const n=await e("desktop_ssh_status",{...t?{id:t}:{}});return Array.isArray(n)?n.map(o=>tp(o)).filter(o=>!!o):[]},KJ=async(t,e)=>{const n=Cr();if(!n)return[];const o=await n("desktop_ssh_logs",{id:t,limit:e});return Array.isArray(o)?o.filter(s=>typeof s=="string"):[]},YJ=async t=>{const e=Cr();e&&await e("desktop_ssh_logs_clear",{id:t})},JJ=async t=>{if(!qn())return async()=>{};const n=window.__OPENCHAMBER_DESKTOP__?.listen;if(typeof n!="function")return async()=>{};const o=await n("openchamber:ssh-instance-status",s=>{const r=tp(s?.payload);r&&t(r)});return async()=>{await o()}},gn="local",au=9e4,R0="SSH connection cancelled",oB=t=>t.id===gn?"local":`host:${t.id}`,_a=t=>{const e=jn(t);if(!e)return t.trim();try{const n=new URL(e);return n.pathname.endsWith("/")||(n.pathname=`${n.pathname}/`),n.toString()}catch{return e}},m3=()=>typeof window>"u"?"":window.__OPENCHAMBER_LOCAL_ORIGIN__||window.location.origin,Bc=async()=>zi()?W_().catch(()=>""):"",sB=t=>t==="ok"?"bg-status-success":t==="auth"||t==="update-recommended"?"bg-status-warning":t==="incompatible"||t==="wrong-service"||t==="unreachable"?"bg-status-error":t==="checking"?"bg-status-info":"bg-muted-foreground/40",lu=t=>t==="unreachable"||t==="wrong-service"||t==="incompatible",w2=t=>t==="unreachable"||t==="wrong-service"||t==="incompatible",rB=t=>t==="ok"?"desktopHostSwitcher.status.connected":t==="auth"?"desktopHostSwitcher.status.authRequired":t==="checking"?"desktopHostSwitcher.status.checking":t==="update-recommended"?"desktopHostSwitcher.status.updateRecommended":t==="incompatible"?"desktopHostSwitcher.status.incompatible":t==="wrong-service"?"desktopHostSwitcher.status.wrongService":t==="unreachable"?"desktopHostSwitcher.status.unreachable":"desktopHostSwitcher.status.unknown",iB=t=>t==="checking"?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):t==="ok"?a.jsx(z,{name:"check",className:"h-4 w-4"}):t==="auth"?a.jsx(z,{name:"shield-keyhole",className:"h-4 w-4"}):t==="update-recommended"?a.jsx(z,{name:"shield-keyhole",className:"h-4 w-4"}):t==="incompatible"?a.jsx(z,{name:"cloud-off",className:"h-4 w-4"}):t==="wrong-service"?a.jsx(z,{name:"cloud-off",className:"h-4 w-4"}):t==="unreachable"?a.jsx(z,{name:"cloud-off",className:"h-4 w-4"}):a.jsx(z,{name:"earth",className:"h-4 w-4"}),aB=t=>new Promise(e=>window.setTimeout(e,t)),cu=t=>{switch(t){case"ready":return"desktopHostSwitcher.sshPhase.ready";case"error":return"desktopHostSwitcher.sshPhase.error";case"degraded":return"desktopHostSwitcher.sshPhase.reconnecting";case"config_resolved":return"desktopHostSwitcher.sshPhase.resolvingConfig";case"auth_check":return"desktopHostSwitcher.sshPhase.checkingAuth";case"master_connecting":return"desktopHostSwitcher.sshPhase.connectingSsh";case"remote_probe":return"desktopHostSwitcher.sshPhase.probingRemote";case"installing":return"desktopHostSwitcher.sshPhase.installing";case"updating":return"desktopHostSwitcher.sshPhase.updating";case"server_detecting":return"desktopHostSwitcher.sshPhase.detectingServer";case"server_starting":return"desktopHostSwitcher.sshPhase.startingServer";case"forwarding":return"desktopHostSwitcher.sshPhase.forwardingPorts";default:return"desktopHostSwitcher.sshPhase.idle"}},lB=t=>!t||t==="idle"?null:t==="ready"?"ok":t==="error"?"unreachable":"auth",du=async()=>{const t=await f3().catch(()=>[]),e={};for(const n of t)e[n.id]=n;return e},uu=async(t,e,n,o)=>{const s=Date.now()+e;for(;Date.now()<s;){if(o?.())throw new Error(R0);const i=(await f3(t).catch(()=>[])).find(l=>l.id===t);if(i){if(n(i),i.phase==="ready")return i;if(i.phase==="error")throw new Error(i.detail||"SSH connection failed")}await aB(700)}throw o?.()?new Error(R0):new Error("Timed out waiting for SSH connection")},cB=t=>({id:gn,label:"Local",url:t||m3()}),dB=t=>{const e=typeof window>"u"?"":window.location.href,n=t.find(c=>c.id===gn)?.url||m3(),o=wr(),s=jn(n)||n,r=jn(e)||e;if(o&&Ni(o,n))return{id:gn,label:"Local",url:s};const i=t.find(c=>o?Ni(o,dr(c)):!1);if(i)return{id:i.id,label:i.label,url:jn(dr(i))||dr(i)};if(e&&Ni(e,n))return{id:gn,label:"Local",url:s};const l=t.find(c=>e?Ni(e,c.url):!1);return l?{id:l.id,label:l.label,url:jn(l.url)||l.url}:e.startsWith("openchamber-ui://")?{id:gn,label:"Local",url:s}:{id:"custom",label:uo(r||"Instance"),url:r}};function uB({open:t,onOpenChange:e,embedded:n=!1,onHostSwitched:o}){const{t:s}=nt(),r=ke(U=>U.setSettingsDialogOpen),i=ke(U=>U.setSettingsPage),[l,c]=se.useState([]),[d,u]=se.useState(null),[f,m]=se.useState({}),[h,p]=se.useState({}),[b,y]=se.useState(!1),[v,x]=se.useState(!1),[w,S]=se.useState(!1),[C,M]=se.useState(null),[A,k]=se.useState({}),[D,_]=se.useState({}),[F,B]=se.useState({open:!1,hostId:null,hostLabel:"",phase:"idle",detail:null,error:null}),[j,T]=se.useState(""),[P,I]=se.useState(()=>m3()),[O,L]=se.useState(null),[q,$]=se.useState(""),[V,W]=se.useState(""),[E,X]=se.useState(0),R=se.useRef(0),Q=se.useMemo(()=>{const U=cB(P),ie=l.map(Y=>({...Y,url:jn(Y.url)||Y.url}));return[U,...ie]},[l,P]);se.useEffect(()=>Zf(()=>X(U=>U+1)),[]);const de=se.useMemo(()=>dB(Q),[Q,E]),oe=se.useMemo(()=>{const U=d||gn;return Q.find(ie=>ie.id===U)?.label||s("desktopHostSwitcher.instance.local")},[Q,d,s]),xe=se.useCallback(async(U,ie)=>{if(Et()){S(!0),T("");try{const Y=U.filter(Ce=>Ce.id!==gn);await Yd({hosts:Y,defaultHostId:ie}),c(Y),u(ie)}catch(Y){T(Y instanceof Error?Y.message:s("desktopHostSwitcher.error.failedToSave"))}finally{S(!1)}}},[s]),me=se.useCallback(()=>{i("remote-instances"),r(!0),e(!1)},[e,r,i]),ne=se.useCallback(async()=>{if(Et()){y(!0),T("");try{const[U,ie,Y]=await Promise.all([u3(),tB().catch(()=>({instances:[]})),du()]);U.localOrigin&&I(U.localOrigin);const Ce={};for(const Se of ie.instances)Ce[Se.id]=!0;c(U.hosts||[]),u(U.defaultHostId??null),k(Ce),_(Y)}catch(U){T(U instanceof Error?U.message:s("desktopHostSwitcher.error.failedToLoad")),c([]),u(null),k({}),_({})}finally{y(!1)}}},[s]),ae=se.useCallback(async U=>{if(!Et())return;x(!0);const ie={};for(const Y of U)ie[Y.id]=!0;p(ie);try{const Y=await Bc(),Ce=await Promise.all(U.map(async ye=>{const De=jn(zi()?dr(ye):ye.url);if(!De)return[ye.id,{status:"unreachable",latencyMs:0}];const _e=ye.id===gn?Y:ye.clientToken||"",he=await _c(De,{clientToken:_e||null}).catch(()=>({status:"unreachable",latencyMs:0}));return[ye.id,{status:he.status,latencyMs:he.latencyMs}]})),Se={};for(const[ye,De]of Ce)Se[ye]=De;m(Se)}finally{p({}),x(!1)}},[]);se.useEffect(()=>{if(!t){L(null),$(""),W(""),M(null),B({open:!1,hostId:null,hostLabel:"",phase:"idle",detail:null,error:null}),T("");return}ne()},[t,ne]),se.useEffect(()=>{t&&ae(Q)},[t,Q,ae]),se.useEffect(()=>{if(!t||!Et())return;let U=!1;const ie=async()=>{const Ce=await du();U||_(Ce)};ie();const Y=window.setInterval(()=>{typeof document<"u"&&document.visibilityState!=="visible"||ie()},1500);return()=>{U=!0,window.clearInterval(Y)}},[t]);const Me=se.useCallback(async U=>{const ie=U.id===gn?P:jn(U.url)||"",Y=U.id===gn?P:jn(dr(U))||"";if(!ie)return;if(zi()){if(!Y)return;M(U.id);const ye=U.id===gn?await Bc():U.clientToken||"",De=await _c(Y,{clientToken:ye||null}).catch(()=>({status:"unreachable",latencyMs:0}));if(m(_e=>({..._e,[U.id]:{status:De.status,latencyMs:De.latencyMs}})),lu(De.status)){Ze.error(s("desktopHostSwitcher.toast.instanceUnreachable",{host:uo(U.label)})),M(null);return}ld({apiBaseUrl:Y,clientToken:ye||null,runtimeKey:oB(U)}),o?.(),M(null);return}const Ce=!!A[U.id];if(U.id!==gn&&Ce&&Et()){let ye=D[U.id];const De=await f3(U.id).then(Ae=>Ae.find(fe=>fe.id===U.id)||null).catch(()=>null);De&&(ye=De,_(Ae=>({...Ae,[U.id]:De})));const _e=jn(ye?.localUrl||U.url||"");if(ye?.phase==="ready"&&_e){const Ae=_a(_e);o?.(),window.location.assign(Ae);return}M(U.id);const he=R.current+1;R.current=he,B({open:!0,hostId:U.id,hostLabel:uo(U.label),phase:"master_connecting",detail:null,error:null});try{if(await iu(U.id),he!==R.current)return;const Ae=await uu(U.id,au,je=>{_(ze=>({...ze,[je.id]:je})),B(ze=>({...ze,phase:je.phase,detail:je.detail||null}))},()=>he!==R.current);if(he!==R.current)return;const fe=jn(Ae.localUrl||"")||ie,Te=_a(fe);o?.(),window.location.assign(Te);return}catch(Ae){if(he!==R.current)return;const fe=Ae instanceof Error?Ae.message:String(Ae);if(fe===R0)return;B(Te=>({...Te,error:fe})),Ze.error(s("desktopHostSwitcher.toast.sshFailedToConnect",{host:uo(U.label)}),{description:fe});return}finally{he===R.current&&M(null)}}if(U.id!==gn&&Et()){M(U.id);const ye=await _c(ie,{clientToken:U.clientToken||null}).catch(()=>({status:"unreachable",latencyMs:0}));if(m(De=>({...De,[U.id]:{status:ye.status,latencyMs:ye.latencyMs}})),lu(ye.status)){Ze.error(s("desktopHostSwitcher.toast.instanceUnreachable",{host:uo(U.label)})),M(null);return}}const Se=_a(ie);o?.();try{window.location.assign(Se)}catch{window.location.href=Se}},[P,o,A,D,s]),J=se.useCallback(()=>{L(null),$(""),W("")},[]),be=se.useCallback(U=>{U.stopPropagation()},[]),Z=se.useCallback(async()=>{if(!O)return;if(O===gn){J();return}const U=U_(V);if(!U){T(s("desktopHostSwitcher.error.invalidUrl"));return}const ie=U.persistedUrl,Y=(q||uo(ie)).trim(),Ce=l.map(Se=>Se.id===O?{...Se,label:Y,url:ie}:Se);await xe(Ce,d),J(),U.redeemUrl&&window.location.assign(U.redeemUrl)},[J,l,d,q,V,O,xe,s]),te=se.useCallback(async U=>{await xe(l,U===gn?gn:U)},[l,xe]),ce=se.useCallback(U=>{const ie=U.id===gn?P:dr(U);if(!ie)return;const Y=_a(ie);G_(Y,{clientToken:U.clientToken||null}).catch(Ce=>{Ze.error(s("desktopHostSwitcher.error.failedToOpenNewWindow"),{description:Ce instanceof Error?Ce.message:String(Ce)})})},[P,s]),ue=se.useCallback(async()=>{R.current+=1,M(null),B(ie=>({...ie,open:!1,hostId:null,error:null,detail:null,phase:"idle"}));const U=_a(P);if(zi()){const ie=await Bc();ld({apiBaseUrl:P,clientToken:ie||null,runtimeKey:"local"}),o?.();return}o?.(),window.location.assign(U)},[P,o]),re=se.useCallback(async()=>{const U=F.hostId||C;R.current+=1,M(null),B({open:!1,hostId:null,hostLabel:"",phase:"idle",detail:null,error:null}),!(!U||U===gn||!Et())&&await nB(U).catch(()=>{})},[F.hostId,C]),ge=se.useCallback(()=>{const U=F.hostId;if(!U)return;const ie=Q.find(Y=>Y.id===U);ie&&Me(ie)},[Q,Me,F.hostId]),ee=se.useCallback(async U=>{if(Et()){M(U.id);try{await iu(U.id),(await uu(U.id,au,Y=>{_(Ce=>({...Ce,[Y.id]:Y}))})).phase==="ready"&&Ze.success(s("desktopHostSwitcher.toast.sshConnected",{host:uo(U.label)}))}catch(ie){const Y=ie instanceof Error?ie.message:String(ie);Y!==R0&&Ze.error(s("desktopHostSwitcher.toast.sshFailedToConnect",{host:uo(U.label)}),{description:Y})}finally{M(null)}}},[s]);if(!Et())return null;const G=Et(),pe=a.jsxs(a.Fragment,{children:[n?a.jsx("div",{className:"flex-shrink-0 border-b border-[var(--interactive-border)] px-3 py-2",children:a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsxs("div",{className:"min-w-0 flex items-baseline gap-1.5 typography-ui-label",children:[a.jsx("span",{className:"font-medium text-foreground",children:s("desktopHostSwitcher.header.current")}),a.jsx("span",{className:"max-w-[9rem] truncate text-muted-foreground",children:uo(de.label)}),a.jsx("span",{className:"text-muted-foreground/50",children:"•"}),a.jsx("span",{className:"font-medium text-foreground",children:s("desktopHostSwitcher.header.default")}),a.jsx("span",{className:"max-w-[9rem] truncate text-muted-foreground",children:uo(oe)})]}),a.jsx("button",{type:"button",className:N("inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors","hover:text-foreground hover:bg-interactive-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"),onClick:()=>{ae(Q)},disabled:!G||b||v,"aria-label":s("desktopHostSwitcher.actions.refreshInstancesAria"),children:a.jsx(z,{name:"refresh",className:N("h-4 w-4",v&&"animate-spin")})})]})}):a.jsxs(br,{className:"flex-shrink-0",children:[a.jsxs(yr,{className:"flex items-center gap-2",children:[a.jsx(z,{name:"server",className:"h-5 w-5"}),s("desktopHostSwitcher.title")]}),a.jsx(sa,{children:s("desktopHostSwitcher.description")})]}),!n&&a.jsxs("div",{className:"flex items-center justify-between gap-2 flex-shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx("span",{className:"typography-meta text-muted-foreground",children:s("desktopHostSwitcher.header.currentColon")}),a.jsx("span",{className:"typography-ui-label text-foreground truncate",children:uo(de.label)}),a.jsx("span",{className:"typography-meta text-muted-foreground",children:s("desktopHostSwitcher.header.currentDefaultColon")}),a.jsx("span",{className:"typography-ui-label text-foreground truncate",children:uo(oe)})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsxs(kt,{type:"button",size:"sm",variant:"ghost",onClick:()=>{ae(Q)},disabled:!G||b||v,children:[a.jsx(z,{name:"refresh",className:N("h-4 w-4",v&&"animate-spin")}),s("desktopHostSwitcher.actions.refresh")]})})]}),!G&&a.jsx("div",{className:"flex-shrink-0 rounded-lg border border-border/50 bg-muted/20 p-3",children:a.jsx("div",{className:"typography-meta text-muted-foreground",children:s("desktopHostSwitcher.state.limitedOnPage")})}),a.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:a.jsx("div",{className:"space-y-1",children:b?a.jsx("div",{className:"px-2 py-2 text-muted-foreground text-sm",children:s("desktopHostSwitcher.state.loading")}):Q.map(U=>{const ie=U.id===gn,Y=!!A[U.id],Ce=U.id===de.id,Se=(d||gn)===U.id,ye=f[U.id]||null,De=D[U.id]||null,_e=!Y&&!!h[U.id],he=Y?lB(De?.phase):_e?"checking":ye?.status??null,Ae=O===U.id,fe=ie?P:jn(U.url)||U.url,Te=U.id===gn?s("desktopHostSwitcher.instance.local"):uo(U.label),je=uo(fe);return a.jsxs("div",{className:N("group flex items-center gap-2 px-2.5 py-2 rounded-md overflow-hidden",Ae?"bg-interactive-hover/20":"hover:bg-interactive-hover/30"),children:[a.jsxs("button",{type:"button",className:N("flex items-center gap-2 flex-1 min-w-0 text-left",Ae&&"pointer-events-none opacity-70"),onClick:()=>{Me(U)},disabled:C===U.id,"aria-label":s("desktopHostSwitcher.actions.switchToAria",{instance:Te}),children:[a.jsx("span",{className:N("h-2 w-2 rounded-full flex-shrink-0",sB(he))}),a.jsxs("div",{className:"flex-1 min-w-0 space-y-0.5",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a.jsxs("div",{className:"flex min-w-0 max-w-[45%] items-center gap-1.5",children:[a.jsx("span",{className:"typography-ui-label truncate text-foreground",children:Te}),Y&&a.jsx("span",{className:"typography-micro flex-shrink-0 px-1 rounded leading-none pb-px text-[var(--status-info)] bg-[var(--status-info)]/10",children:"SSH"}),Ce&&a.jsx("span",{className:"typography-micro flex-shrink-0 text-muted-foreground",children:s("desktopHostSwitcher.header.current")})]}),a.jsxs("span",{className:"inline-flex min-w-0 flex-1 items-center gap-1 typography-micro text-muted-foreground",children:[a.jsx("span",{className:"flex-shrink-0",children:iB(he)}),a.jsxs("span",{className:"truncate",children:[s(Y?cu(De?.phase):rB(he)),!Y&&he==="ok"&&typeof ye?.latencyMs=="number"?s("desktopHostSwitcher.status.ping",{ms:Math.max(0,Math.round(ye.latencyMs))}):""]})]})]}),a.jsx("div",{className:"typography-micro text-muted-foreground truncate font-mono",children:je})]})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[Y&&!ie&&(De?.phase==="idle"||!De?.phase?a.jsxs(kt,{type:"button",variant:"outline",size:"sm",className:"h-8 px-2.5",disabled:C===U.id,onClick:ze=>{ze.stopPropagation(),ee(U)},children:[C===U.id?a.jsx(z,{name:"loader-4",className:"h-3.5 w-3.5 animate-spin"}):a.jsx(z,{name:"plug-2",className:"h-3.5 w-3.5"}),s("desktopHostSwitcher.actions.connect")]}):a.jsx("div",{className:"h-8 w-8 opacity-0 pointer-events-none","aria-hidden":"true"})),a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsx("button",{type:"button",className:N("h-8 w-8 rounded-md inline-flex items-center justify-center hover:bg-interactive-hover transition-colors",Se?"text-primary hover:text-primary/80":"text-muted-foreground/60 hover:text-primary/80"),onClick:()=>{te(U.id)},"aria-label":s(Se?"desktopHostSwitcher.actions.defaultInstanceAria":"desktopHostSwitcher.actions.setAsDefaultAria"),disabled:w||!Se&&w2(he),children:Se?a.jsx(z,{name:"star-fill",className:"h-4 w-4"}):a.jsx(z,{name:"star",className:"h-4 w-4"})})}),a.jsx(Ot,{sideOffset:6,children:s(Se?"desktopHostSwitcher.header.default":"desktopHostSwitcher.actions.setAsDefault")})]}),a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsx("button",{type:"button",className:N("h-8 w-8 rounded-md inline-flex items-center justify-center hover:bg-interactive-hover transition-colors",w2(he)?"text-muted-foreground/30 cursor-not-allowed":"text-muted-foreground/60 hover:text-foreground"),onClick:ze=>{ze.stopPropagation(),ce(U)},disabled:w2(he),"aria-label":s("desktopHostSwitcher.actions.openInNewWindowAria"),children:a.jsx(z,{name:"window",className:"h-4 w-4"})})}),a.jsx(Ot,{sideOffset:6,children:w2(he)?s("desktopHostSwitcher.state.instanceUnreachable"):s("desktopHostSwitcher.actions.openInNewWindow")})]})]})]},U.id)})})}),G&&O&&O!==gn&&a.jsxs("div",{className:"flex-shrink-0 rounded-lg border border-border/50 bg-muted/20 p-3",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("div",{className:"typography-ui-label font-medium text-foreground",children:s("desktopHostSwitcher.edit.title")}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(kt,{type:"button",variant:"outline",size:"sm",onClick:J,disabled:w,children:s("desktopHostSwitcher.actions.cancel")}),a.jsxs(kt,{type:"button",size:"sm",onClick:()=>{Z()},disabled:w,children:[w?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):null,s("desktopHostSwitcher.actions.save")]})]})]}),a.jsxs("div",{className:"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",children:[a.jsx(ws,{value:q,onChange:U=>$(U.target.value),onKeyDown:be,placeholder:s("desktopHostSwitcher.field.labelPlaceholder"),disabled:w}),a.jsx(ws,{value:V,onChange:U=>W(U.target.value),onKeyDown:be,placeholder:s("desktopHostSwitcher.field.urlPlaceholder"),disabled:w})]})]}),a.jsx("div",{className:"flex-shrink-0 border-t border-[var(--interactive-border)]",children:a.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-2 py-2 text-left text-muted-foreground hover:text-foreground hover:bg-interactive-hover/30 transition-colors",onClick:me,children:[a.jsx(z,{name:"add",className:"h-4 w-4"}),a.jsx("span",{className:"typography-ui-label",children:s("desktopHostSwitcher.actions.addInstance")})]})}),j&&a.jsx("div",{className:"flex-shrink-0 typography-meta text-status-error",children:j})]}),ve=a.jsx(Rs,{open:F.open,onOpenChange:U=>{if(!U&&C){re();return}B(ie=>({...ie,open:U,...U?{}:{hostId:null,error:null,detail:null,phase:"idle"}}))},children:a.jsxs(Vs,{className:"w-[min(28rem,calc(100vw-2rem))] max-w-none",children:[a.jsxs(br,{children:[a.jsxs(yr,{className:"flex items-center gap-2",children:[a.jsx(z,{name:"loader-4",className:N("h-4 w-4",!F.error&&"animate-spin")}),s("desktopHostSwitcher.ssh.connectingTo",{host:F.hostLabel||s("desktopHostSwitcher.ssh.instanceFallback")})]}),a.jsx(sa,{children:F.error?F.error:F.detail||s(cu(F.phase))})]}),F.error?a.jsxs("div",{className:"flex justify-end gap-2",children:[a.jsx(kt,{type:"button",size:"sm",variant:"outline",onClick:()=>{ue()},children:s("desktopHostSwitcher.actions.switchToLocal")}),a.jsx(kt,{type:"button",size:"sm",onClick:ge,disabled:!F.hostId,children:s("desktopHostSwitcher.actions.retry")})]}):null]})});return n?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"w-full max-h-[70vh] flex flex-col overflow-hidden gap-2",children:pe}),ve]}):a.jsxs(a.Fragment,{children:[a.jsx(Rs,{open:t,onOpenChange:e,children:a.jsx(Vs,{className:"w-[min(42rem,calc(100vw-2rem))] max-w-none max-h-[70vh] flex flex-col overflow-hidden gap-3",children:pe})}),ve]})}function fu(){const t=le.c(11),[e,n]=se.useState(!1),{t:o}=nt();if(!Et())return null;let s,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>n(!0),r=a.jsx(z,{name:"server",className:"h-4 w-4"}),t[0]=s,t[1]=r):(s=t[0],r=t[1]);let i;t[2]!==o?(i=o("desktopHostSwitcher.actions.switchInstance"),t[2]=o,t[3]=i):i=t[3];let l;t[4]!==i?(l=a.jsxs(kt,{type:"button",variant:"ghost",size:"sm","data-oc-host-switcher":!0,className:"w-full justify-center",onClick:s,children:[r,i]}),t[4]=i,t[5]=l):l=t[5];let c;t[6]!==e?(c=a.jsx(uB,{open:e,onOpenChange:n}),t[6]=e,t[7]=c):c=t[7];let d;return t[8]!==l||t[9]!==c?(d=a.jsxs(a.Fragment,{children:[l,c]}),t[8]=l,t[9]=c,t[10]=d):d=t[10],d}const h3=se.createContext(void 0);function Zs(){const t=se.useContext(h3);if(!t)throw new Error("useThemeSystem must be used within a ThemeSystemProvider");return t}function hl(){return se.useContext(h3)}const fB=[.2,.45,.15,.55,.35,.1,.5,.25,.4,.3,.45,.15,.55,.2,.35,.1],mB=[.3,.15,.45,.25,.5,.35,.1,.4,.2,.55,.3,.15,.45,.25,.4,.2],mu=(t,e,n,o,s=4)=>{const r=[];for(let i=0;i<s;i++)for(let l=0;l<s;l++){const c=l/s,d=(l+1)/s,u=i/s,f=(i+1)/s,m=(x,w,S)=>x+(w-x)*S,h=(x,w,S,C,M,A)=>{const k=m(x,w,M),D=m(C,S,M);return m(k,D,A)},p={x:h(t.x,e.x,n.x,o.x,c,u),y:h(t.y,e.y,n.y,o.y,c,u)},b={x:h(t.x,e.x,n.x,o.x,d,u),y:h(t.y,e.y,n.y,o.y,d,u)},y={x:h(t.x,e.x,n.x,o.x,d,f),y:h(t.y,e.y,n.y,o.y,d,f)},v={x:h(t.x,e.x,n.x,o.x,c,f),y:h(t.y,e.y,n.y,o.y,c,f)};r.push({path:`M${p.x} ${p.y} L${b.x} ${b.y} L${y.x} ${y.y} L${v.x} ${v.y} Z`,row:i,col:l})}return r},np=({className:t="",width:e=70,height:n=70,isAnimated:o=!1})=>{const{t:s}=nt(),r=hl();let i=!0;r?i=r.currentTheme.metadata.variant!=="light":typeof window<"u"&&(i=window.matchMedia("(prefers-color-scheme: dark)").matches);const l=se.useMemo(()=>{if(r)return r.currentTheme.colors.surface.foreground;if(typeof window<"u"){const F=getComputedStyle(document.documentElement).getPropertyValue("--splash-stroke").trim();if(F)return F}return i?"white":"black"},[r,i]),c=se.useMemo(()=>typeof window>"u"||typeof CSS>"u"||typeof CSS.supports!="function"?!1:CSS.supports("color","color-mix(in srgb, white 50%, transparent)"),[]),d=se.useMemo(()=>{if(r)return c?`color-mix(in srgb, ${l} 15%, transparent)`:i?"rgba(255,255,255,0.15)":"rgba(0,0,0,0.15)";if(typeof window<"u"){const F=getComputedStyle(document.documentElement).getPropertyValue("--splash-face-fill").trim();if(F)return F}return i?"rgba(255,255,255,0.15)":"rgba(0,0,0,0.15)"},[r,c,l,i]),u=se.useMemo(()=>{if(r)return c?`color-mix(in srgb, ${l} 35%, transparent)`:i?"rgba(255,255,255,0.35)":"rgba(0,0,0,0.4)";if(typeof window<"u"){const F=getComputedStyle(document.documentElement).getPropertyValue("--splash-cell-fill").trim();if(F)return F}return i?"rgba(255,255,255,0.35)":"rgba(0,0,0,0.4)"},[r,c,l,i]),f=l,m=48,h=.866,p=.5,b=50,y={x:50,y:b-m},v={x:50-m*h,y:b-m*p},x={x:50+m*h,y:b-m*p},w={x:50,y:b},S={x:50-m*h,y:b+m*p},C={x:50+m*h,y:b+m*p},M={x:50,y:b+m},k=`matrix(0.866, 0.5, -0.866, 0.5, 50, ${(y.y+v.y+w.y+x.y)/4})`,D=mu(v,w,M,S),_=mu(w,x,C,M);return a.jsxs("svg",{width:e,height:n,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,role:"img","aria-label":s("openChamberLogo.aria.logo"),children:[o?a.jsx("style",{children:"@keyframes oc-logo-glow{0%,100%{filter:drop-shadow(0 0 0 transparent)}50%{filter:drop-shadow(0 0 4px var(--oc-glow-color))}}.oc-logo-glow{animation:oc-logo-glow 1.8s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.oc-logo-glow{animation:none}}"}):null,a.jsx("path",{d:`M${w.x} ${w.y} L${v.x} ${v.y} L${S.x} ${S.y} L${M.x} ${M.y} Z`,fill:d,stroke:l,strokeWidth:"2",strokeLinejoin:"round"}),D.map((F,B)=>a.jsx("path",{d:F.path,fill:u,opacity:fB[F.row*4+(3-F.col)]??.35},`left-${B}`)),a.jsx("path",{d:`M${w.x} ${w.y} L${x.x} ${x.y} L${C.x} ${C.y} L${M.x} ${M.y} Z`,fill:d,stroke:l,strokeWidth:"2",strokeLinejoin:"round"}),_.map((F,B)=>a.jsx("path",{d:F.path,fill:u,opacity:mB[F.row*4+F.col]??.35},`right-${B}`)),a.jsx("path",{d:`M${y.x} ${y.y} L${v.x} ${v.y} L${w.x} ${w.y} L${x.x} ${x.y} Z`,fill:"none",stroke:l,strokeWidth:"2",strokeLinejoin:"round"}),a.jsx("g",{opacity:1,className:o?"oc-logo-glow":void 0,style:o?{"--oc-glow-color":l}:void 0,children:a.jsxs("g",{transform:`${k} scale(0.75)`,children:[a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 -20 L16 -20 L16 20 L-16 20 Z M-8 -12 L-8 12 L8 12 L8 -12 Z",fill:f}),a.jsx("path",{d:"M-8 -4 L8 -4 L8 12 L-8 12 Z",fill:f,fillOpacity:"0.4"})]})})]})},hB="/auth/passkey/authenticate/options",pB="/auth/passkey/authenticate/verify",gB="/auth/passkey/register/options",bB="/auth/passkey/register/verify",op="/api/passkeys",yB="/auth/passkey/status",vB="/api/auth/reset",$a={enabled:!1,hasPasskeys:!1,passkeyCount:0,rpID:null},v1=async(t,e)=>We(t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e===void 0?void 0:JSON.stringify(e)}),Gr=async(t,e)=>{try{const n=await t.json();if(n&&typeof n.error=="string"&&n.error.trim())return n.error}catch{}return e},Dc=t=>t instanceof Qb&&t.code==="ERROR_CEREMONY_ABORTED",wB=()=>{Jb.cancelCeremony()},sp=()=>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."},xB=async()=>{const t=sp();if(!t.supported)throw new Error(t.reason);const e=typeof navigator.userAgent=="string"&&navigator.userAgent.trim()?navigator.userAgent:"This device",n=await v1(gB,{label:e});if(!n.ok)throw new Error(await Gr(n,"Could not start passkey setup."));const{requestId:o,optionsJSON:s}=await n.json(),r=await Yb({optionsJSON:s}),i=await v1(bB,{requestId:o,response:r});if(!i.ok)throw new Error(await Gr(i,"Could not finish passkey setup."));return i.json().catch(()=>null)},CB=async(t,e={})=>{const n=sp();if(!n.supported)throw new Error(n.reason);const o=await v1(hB);if(!o.ok)throw new Error(await Gr(o,"Passkey sign-in is not available right now."));const{requestId:s,optionsJSON:r}=await o.json(),i=await Xb({optionsJSON:r}),l=await v1(pB,{requestId:s,response:i,trustDevice:t,issueClientToken:e.issueClientToken===!0,clientLabel:e.clientLabel,clientKind:e.clientKind,dedupeKey:e.dedupeKey});if(!l.ok)throw new Error(await Gr(l,"Passkey sign-in failed."));return l.json().catch(()=>null)},SB=async()=>{const t=await We(yB,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)return $a;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}},QJ=async()=>{const t=await We(op,{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok)throw new Error(await Gr(t,"Could not load passkeys."));const e=await t.json().catch(()=>null);return Array.isArray(e?.passkeys)?e.passkeys:[]},XJ=async t=>{const e=await We(`${op}/${encodeURIComponent(t)}`,{method:"DELETE",credentials:"include",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(await Gr(e,"Could not remove passkey."));return e.json().catch(()=>null)},eQ=async()=>{const t=await v1(vB);if(!t.ok)throw new Error(await Gr(t,"Could not clear saved authentication."));return t.json().catch(()=>null)},rp="/auth/session",ip="openchamber.uiAuth.trustDevice",kB="desktop-local",MB="desktop-local",AB=()=>{if(typeof window>"u")return"";const t=window.__OPENCHAMBER_LOCAL_ORIGIN__;return typeof t=="string"?t.trim():""},Jd=(t,e)=>{const n=jn(t),o=jn(e);if(!n||!o)return!1;try{return new URL(n).origin===new URL(o).origin}catch{return!1}},r0=()=>Et(),ap=()=>{if(!Et())return!1;const t=wr(),e=AB();return!!(e&&Jd(e,t))},p3=()=>ap()?{clientKind:kB,dedupeKey:MB}:{},FB=async()=>await We(rp,{method:"GET",credentials:"include",headers:{Accept:"application/json"}}),_B=()=>typeof window>"u"?!1:window.localStorage.getItem(ip)==="true",BB=async(t,e)=>{const n=r0();return await We(rp,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({password:t,trustDevice:e,issueClientToken:n,clientLabel:"OpenChamber Desktop",...p3()})})},DB=async()=>{if(!Et())return"";const t=await We("/api/client-auth/clients",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({label:"OpenChamber Desktop",...p3()})}).catch(()=>null);if(!t?.ok)return"";const e=await t.json().catch(()=>null);return typeof e?.token=="string"?e.token.trim():""},hu=()=>Et()&&!ap(),pu=async(t,e)=>{if(!Et()||typeof window>"u")return"";const n=await Wn("desktop_remote_password_login",{url:wr(),password:t,trustDevice:e}).catch(()=>null);if(!n||typeof n!="object")return"";const o=n.token;return typeof o=="string"?o.trim():""},TB=async(t,e)=>{if(!Et()||!e)return;const n=await u3().catch(()=>null);if(!n)return;if(n.localOrigin&&Jd(n.localOrigin,t)){await Yd({hosts:n.hosts,defaultHostId:n.defaultHostId,initialHostChoiceCompleted:n.initialHostChoiceCompleted,localClientToken:e}).catch(()=>{});return}let o=!1;const s=n.hosts.map(r=>!Jd(dr(r),t)||r.clientToken===e?r:(o=!0,{...r,clientToken:e}));o&&await Yd({hosts:s,defaultHostId:n.defaultHostId,initialHostChoiceCompleted:n.initialHostChoiceCompleted}).catch(()=>{})},Tc=async t=>{if(!t)return;const e=wr();await TB(e,t),ld({apiBaseUrl:e,clientToken:t,runtimeKey:ei()})},lp=t=>{const e=le.c(7),{children:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={height:"var(--oc-wco-titlebar-height, 0px)",right:"var(--oc-wco-right-inset, 0px)"},e[0]=o):o=e[0];const s=o;let r,i;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={fontFamily:'"Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif'},i=a.jsx("div",{className:"app-region-drag fixed left-0 top-0 z-20",style:s,"aria-hidden":!0}),e[1]=r,e[2]=i):(r=e[1],i=e[2]);let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-55",style:{background:"radial-gradient(120% 140% at 50% -20%, var(--surface-overlay) 0%, transparent 68%)"}}),e[3]=l):l=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{backgroundColor:"var(--surface-subtle)",opacity:.22}}),e[4]=c):c=e[4];let d;return e[5]!==n?(d=a.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background text-foreground",style:r,children:[i,l,c,a.jsx("div",{className:"app-region-no-drag relative z-10 flex w-full justify-center px-4 py-12 sm:px-6",children:n})]}),e[5]=n,e[6]=d):d=e[6],d},PB=()=>{const t=le.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:a.jsx(np,{width:120,height:120})}),t[0]=e):e=t[0],e},gu=t=>{const e=le.c(23),{onRetry:n,errorType:o,retryAfter:s,children:r}=t,i=o===void 0?"network":o,{t:l}=nt(),c=i==="rate-limit",d=s?Math.ceil(s/60):1;let u;e[0]!==c||e[1]!==l?(u=l(c?"sessionAuth.error.rateLimitTitle":"sessionAuth.error.networkTitle"),e[0]=c,e[1]=l,e[2]=u):u=e[2];let f;e[3]!==u?(f=a.jsx("h1",{className:"typography-ui-header font-semibold text-destructive",children:u}),e[3]=u,e[4]=f):f=e[4];let m;e[5]!==c||e[6]!==d||e[7]!==l?(m=c?d>1?l("sessionAuth.error.rateLimitDescriptionPlural",{minutes:d}):l("sessionAuth.error.rateLimitDescriptionSingle",{minutes:d}):l("sessionAuth.error.networkDescription"),e[5]=c,e[6]=d,e[7]=l,e[8]=m):m=e[8];let h;e[9]!==m?(h=a.jsx("p",{className:"typography-meta text-muted-foreground max-w-xs",children:m}),e[9]=m,e[10]=h):h=e[10];let p;e[11]!==f||e[12]!==h?(p=a.jsxs("div",{className:"space-y-2",children:[f,h]}),e[11]=f,e[12]=h,e[13]=p):p=e[13];let b;e[14]!==l?(b=l("sessionAuth.error.retry"),e[14]=l,e[15]=b):b=e[15];let y;e[16]!==n||e[17]!==b?(y=a.jsx(kt,{type:"button",onClick:n,className:"w-full max-w-xs",children:b}),e[16]=n,e[17]=b,e[18]=y):y=e[18];let v;return e[19]!==r||e[20]!==p||e[21]!==y?(v=a.jsx(lp,{children:a.jsxs("div",{className:"flex flex-col items-center gap-6 text-center",children:[p,y,r]})}),e[19]=r,e[20]=p,e[21]=y,e[22]=v):v=e[22],v},tQ=({children:t})=>{const{t:e}=nt(),n=g.useMemo(()=>Ht(),[]),o=n,s=g.useMemo(()=>Et()&&!n,[n]),[r,i]=g.useState(()=>o?"authenticated":"pending"),[l,c]=g.useState(""),[d,u]=g.useState(!1),[f,m]=g.useState(""),[h,p]=g.useState(void 0),[b,y]=g.useState(!1),[v,x]=g.useState($a),[w,S]=g.useState(!1),[C,M]=g.useState(!1),[A,k]=g.useState(()=>_B()),[D,_]=g.useState(null),F=g.useRef(null),B=g.useRef(o);g.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(ip,A?"true":"false")},[A]);const j=g.useCallback(async()=>{if(o)return $a;try{const E=await SB();return x(E),E}catch{return x($a),$a}},[o]);g.useEffect(()=>{let E=!1;if(!o)return(async()=>{try{if(!window.isSecureContext||!ey()){E||S(!1);return}E||S(!0)}catch{E||S(!1)}})(),()=>{E=!0}},[o]);const T=g.useCallback(async()=>{if(o){i("authenticated");return}i(E=>E==="authenticated"?E:"pending");try{const[E,X]=await Promise.all([FB(),j()]),R=await E.text();if(E.ok){i("authenticated"),y(!1),m(""),p(void 0);return}if(E.status===401){let Q={};try{Q=JSON.parse(R)}catch{Q={}}y(Q.tunnelLocked===!0),x(X),i("locked"),p(void 0);return}if(E.status===429){let Q={};try{Q=JSON.parse(R)}catch{Q={}}p(Q.retryAfter),y(!1),i("rate-limited");return}i("error"),y(!1)}catch(E){if(console.warn("Failed to check session status:",E),hu()){i("locked"),p(void 0),y(!1);return}i("error"),y(!1)}},[j,o]);g.useEffect(()=>{o||T()},[T,o]),g.useEffect(()=>{if(!o)return Zf(()=>{c(""),m(""),p(void 0),y(!1),i("pending"),T()})},[T,o]),g.useEffect(()=>{!o&&r==="locked"&&(B.current=!1)},[o,r]),g.useEffect(()=>{r==="locked"&&F.current&&(F.current.focus(),F.current.select())},[r]),g.useEffect(()=>{o||r==="authenticated"&&!B.current&&(B.current=!0,(async()=>(await px(),await yx(),await S_()))())},[o,r]);const P=async E=>{E.preventDefault(),await L(!1)},I=g.useCallback(async()=>{_("register"),M(!0);try{await xB()}finally{_(null),M(!1)}await j()},[j]),O=g.useCallback(()=>{wB(),_(null),M(!1)},[]),L=g.useCallback(async E=>{if(!b&&!(!l||d)){C&&O(),u(!0),m("");try{const X=await BB(l,A);if(X.ok){const R=await X.json().catch(()=>null),de=r0()?typeof R?.clientToken=="string"&&R.clientToken.trim()?R.clientToken.trim():await pu(l,A)||await DB():"";if(c(""),y(!1),de&&await Tc(de),E&&w)try{await I(),Ze.success(e("sessionAuth.toast.passkeyAdded")),i("authenticated");return}catch(oe){if(Dc(oe))Ze.message(e("sessionAuth.toast.passkeySetupCanceled"));else{const xe=oe instanceof Error?oe.message:e("sessionAuth.error.passkeySetupFailed");Ze.error(xe)}i("authenticated");return}i("authenticated");return}if(X.status===401){m(e("sessionAuth.error.incorrectPassword")),y(!1),i("locked");return}if(X.status===429){const R=await X.json().catch(()=>({}));p(R.retryAfter),y(!1),i("rate-limited");return}m(e("sessionAuth.error.unexpectedResponse")),y(!1),i("error")}catch(X){console.warn("Failed to submit UI password:",X);const R=hu()?await pu(l,A):"";if(R){c(""),y(!1),await Tc(R),i("authenticated");return}m(e("sessionAuth.error.networkRetry")),y(!1),i("error")}finally{u(!1)}}},[O,C,d,b,l,I,w,e,A]),q=g.useCallback(async()=>{if(!(d||!w)){if(C){O();return}M(!0),_("auth"),m("");try{const E=await CB(A,{issueClientToken:r0(),clientLabel:"OpenChamber Desktop",...p3()}),X=r0()&&typeof E?.clientToken=="string"&&E.clientToken.trim()?E.clientToken.trim():"";X&&await Tc(X),c(""),i("authenticated")}catch(E){if(Dc(E))m("");else{const X=E instanceof Error?E.message:e("sessionAuth.error.passkeySignInCanceled");m(X)}}finally{_(null),M(!1)}}},[O,C,d,w,e,A]),$=g.useCallback(async()=>{if(!(d||b||!w)){if(C){O();return}if(r!=="authenticated"){if(!l){m(e("sessionAuth.error.enterPasswordForPasskey"));return}await L(!0);return}m("");try{await I(),Ze.success(e("sessionAuth.toast.passkeyAdded"))}catch(E){if(Dc(E)){Ze.message(e("sessionAuth.toast.passkeySetupCanceled"));return}const X=E instanceof Error?E.message:e("sessionAuth.error.passkeySetupFailed");Ze.error(X)}}},[O,L,C,d,b,l,I,r,w,e]),V=w&&v.enabled,W=V&&v.hasPasskeys;return r==="pending"?a.jsx(PB,{}):r==="error"?a.jsx(gu,{onRetry:()=>{T()},errorType:"network",children:s&&a.jsxs("div",{className:"w-full max-w-xs",children:[a.jsx(fu,{}),a.jsx("p",{className:"mt-1 text-center typography-micro text-muted-foreground",children:e("sessionAuth.locked.hostSwitcherHint")})]})}):r==="rate-limited"?a.jsx(gu,{onRetry:()=>{T()},errorType:"rate-limit",retryAfter:h}):r==="locked"?a.jsx(lp,{children:a.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-xs",children:[a.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[a.jsx("h1",{className:"text-xl font-semibold text-foreground",children:e(b?"sessionAuth.locked.tunnelTitle":"sessionAuth.locked.unlockTitle")}),a.jsx("p",{className:"typography-meta text-muted-foreground",children:e(b?"sessionAuth.locked.tunnelDescription":"sessionAuth.locked.passwordDescription")})]}),!b&&a.jsxs("form",{onSubmit:P,className:"w-full space-y-2",children:[W&&a.jsxs(kt,{type:"button",variant:"outline",className:"w-full",onClick:()=>{q()},disabled:d||C&&D!=="auth",children:[C?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):a.jsx(z,{name:"lock-unlock",className:"h-4 w-4"}),a.jsx("span",{children:e(C&&D==="auth"?"sessionAuth.actions.cancelPasskey":"sessionAuth.actions.usePasskey")})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(z,{name:"lock",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/60"}),a.jsx(ws,{id:"openchamber-ui-password",ref:F,type:"password",autoComplete:"current-password",placeholder:e("sessionAuth.password.placeholder"),value:l,onChange:E=>{c(E.target.value),f&&m("")},className:"pl-10","aria-invalid":!!f||void 0,"aria-describedby":f?"oc-ui-auth-error":void 0,disabled:d})]}),a.jsx(kt,{type:"submit",size:"icon",disabled:!l||d,"aria-label":e(d?"sessionAuth.actions.unlockingAria":"sessionAuth.actions.unlockAria"),children:d?a.jsx(z,{name:"loader-4",className:"h-4 w-4 animate-spin"}):a.jsx(z,{name:"lock-unlock",className:"h-4 w-4"})})]}),V?a.jsxs("div",{className:"flex items-center justify-between pt-1",children:[a.jsxs("label",{className:"flex items-center gap-2 text-center typography-micro text-muted-foreground",children:[a.jsx(N0,{checked:A,onChange:k,disabled:d,ariaLabel:e("sessionAuth.actions.trustDeviceAria"),className:"size-4",iconClassName:"size-4"}),a.jsx("span",{children:e("sessionAuth.actions.trustDevice")})]}),a.jsx(kt,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground",onClick:()=>{$()},disabled:d,children:e(C&&D==="register"?"sessionAuth.actions.cancelPasskeySetup":"sessionAuth.actions.addPasskey")})]}):a.jsxs("label",{className:"flex items-center justify-center gap-2 pt-1 text-center typography-micro text-muted-foreground",children:[a.jsx(N0,{checked:A,onChange:k,disabled:d,ariaLabel:e("sessionAuth.actions.trustDeviceAria"),className:"size-4",iconClassName:"size-4"}),a.jsx("span",{children:e("sessionAuth.actions.trustDevice")})]}),f&&a.jsx("p",{id:"oc-ui-auth-error",className:"typography-meta text-destructive",children:f})]}),s&&a.jsxs("div",{className:"w-full",children:[a.jsx(fu,{}),a.jsx("p",{className:"mt-1 text-center typography-micro text-muted-foreground",children:e("sessionAuth.locked.hostSwitcherHint")})]})]})}):a.jsx(a.Fragment,{children:t})},EB=t=>/^#[0-9a-fA-F]{6}$/.test(t),HB=t=>/^#[0-9a-fA-F]{8}$/.test(t),IB=(t,e)=>/^[0-9a-fA-F]{2}$/.test(e)?EB(t)?`${t}${e}`:HB(t)?`${t.slice(0,7)}${e}`:t:t,co=(t,e)=>typeof t=="string"&&t.trim().length>0?t:e,jB=t=>{const e=t.colors.syntax.base,n=t.colors.syntax.tokens??{},o=(s,r)=>co(n[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:o("className",o("class",e.function))}},{name:"interfaces",scope:["entity.name.type.interface","entity.name.type"],settings:{foreground:o("interface",e.type)}},{name:"structs",scope:["entity.name.type.struct"],settings:{foreground:o("struct",e.function)}},{name:"enums",scope:["entity.name.type.enum"],settings:{foreground:o("enum",e.function)}},{name:"keys",scope:["meta.object-literal.key","support.type.property-name"],settings:{foreground:o("key",e.function)}},{name:"methods",scope:["entity.name.function.method","meta.function.method"],settings:{foreground:o("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:o("variableOther",o("method",t.colors.status.success))}},{name:"globalVariables",scope:["variable.other.global","variable.language.this"],settings:{foreground:o("variableGlobal",e.number)}},{name:"localVariables",scope:["variable.other.local"],settings:{foreground:o("variableLocal",t.colors.surface.elevated)}},{name:"parameters",scope:["variable.parameter","meta.parameter"],settings:{foreground:o("parameter",e.foreground)}},{name:"properties",scope:["variable.other.property","meta.property"],settings:{foreground:o("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:o("stringEscape",e.foreground)}},{name:"keywords",scope:["keyword"],settings:{foreground:e.keyword}},{name:"keywordsControl",scope:["keyword.control.import","keyword.control.from","keyword.import"],settings:{foreground:o("keywordImport",e.operator)}},{name:"storageModifiers",scope:["storage.modifier","keyword.modifier","storage.type"],settings:{foreground:o("storageModifier",e.keyword)}},{name:"comments",scope:["comment","punctuation.definition.comment"],settings:{foreground:e.comment}},{name:"docComments",scope:["comment.documentation","comment.line.documentation"],settings:{foreground:o("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:o("boolean",e.type)}},{name:"operators",scope:["keyword.operator"],settings:{foreground:e.operator}},{name:"macros",scope:["entity.name.function.preprocessor","meta.preprocessor"],settings:{foreground:o("macro",e.keyword)}},{name:"preprocessor",scope:["meta.preprocessor"],settings:{foreground:o("preprocessor",o("label",e.number))}},{name:"urls",scope:["markup.underline.link"],settings:{foreground:o("url",t.colors.status.info)}},{name:"tags",scope:["entity.name.tag"],settings:{foreground:o("tag",e.keyword)}},{name:"jsxTags",scope:["support.class.component"],settings:{foreground:o("jsxTag",o("label",e.number))}},{name:"attributes",scope:["entity.other.attribute-name","meta.attribute"],settings:{foreground:o("tagAttribute",e.type)}},{name:"types",scope:["support.type"],settings:{foreground:e.type}},{name:"constants",scope:["variable.other.constant","variable.readonly"],settings:{foreground:o("constant",e.foreground)}},{name:"labels",scope:["entity.name.label","punctuation.definition.label"],settings:{foreground:o("label",o("variableGlobal",e.number))}},{name:"namespaces",scope:["entity.name.namespace","storage.modifier.namespace","markup.bold.markdown"],settings:{foreground:o("namespace",e.type)}},{name:"modules",scope:["entity.name.module","storage.modifier.module"],settings:{foreground:o("module",e.operator)}},{name:"typeParameters",scope:["variable.type.parameter","variable.parameter.type"],settings:{foreground:o("typeParameter",e.function)}},{name:"exceptions",scope:["keyword.control.exception","keyword.control.trycatch"],settings:{foreground:o("exception",o("label",e.number))}},{name:"decorators",scope:["meta.decorator","punctuation.decorator","entity.name.function.decorator"],settings:{foreground:o("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:o("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:o("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:o("label",o("variableGlobal",e.number))}},{name:"red",scope:[],settings:{foreground:e.operator}},{name:"orange",scope:[],settings:{foreground:e.function}}]},LB=t=>{const e=t.colors.surface,n=t.colors.interactive,o=t.colors.status,s=t.colors.syntax.base,r=t.colors.syntax.highlights??{},i=co(r.diffAddedBackground,o.successBackground),l=co(r.diffRemovedBackground,o.errorBackground);return{"editor.background":e.background,"editor.foreground":e.foreground,"editor.hoverHighlightBackground":co(n.hover,e.subtle),"editor.lineHighlightBackground":e.muted,"editor.selectionBackground":n.selection,"editor.selectionHighlightBackground":n.selection,"editor.findMatchBackground":s.type,"editor.findMatchHighlightBackground":IB(s.type,"cc"),"editor.findRangeHighlightBackground":e.muted,"editor.inactiveSelectionBackground":e.elevated,"editor.lineHighlightBorder":e.elevated,"editor.rangeHighlightBackground":co(n.active,n.borderHover),"notifications.background":e.elevated,"editorInlayHint.typeBackground":e.subtle,"editorInlayHint.typeForeground":e.foreground,"editorWhitespace.foreground":n.borderHover,"editorIndentGuide.background1":e.subtle,"editorHoverWidget.background":e.elevated,"editorLineNumber.activeForeground":co(r.lineNumberActive,e.foreground),"editorLineNumber.foreground":co(r.lineNumber,e.mutedForeground),"editorGutter.background":e.background,"editorGutter.modifiedBackground":o.info,"editorGutter.addedBackground":o.success,"editorGutter.deletedBackground":o.error,"editorBracketMatch.background":e.elevated,"editorBracketMatch.border":e.subtle,"editorError.foreground":o.error,"editorWarning.foreground":o.warning,"editorInfo.foreground":o.info,"diffEditor.insertedTextBackground":i,"diffEditor.removedTextBackground":l,"editorGroupHeader.tabsBackground":e.background,"editorGroup.border":n.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":n.border,"tab.activeModifiedBorder":s.type,"tab.inactiveModifiedBorder":o.info,"tab.unfocusedActiveModifiedBorder":s.type,"tab.unfocusedInactiveModifiedBorder":o.info,"editorWidget.background":e.muted,"editorWidget.border":n.border,"editorSuggestWidget.background":e.background,"editorSuggestWidget.border":n.border,"editorSuggestWidget.foreground":e.foreground,"editorSuggestWidget.highlightForeground":e.mutedForeground,"editorSuggestWidget.selectedBackground":e.subtle,"peekView.border":n.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":o.success,"merge.currentContentBackground":co(r.diffAdded,o.success),"merge.incomingHeaderBackground":o.info,"merge.incomingContentBackground":co(r.diffModified,o.info),"merge.border":n.border,"merge.commonContentBackground":e.subtle,"merge.commonHeaderBackground":e.muted,"panel.background":e.background,"panel.border":n.border,"panelTitle.activeBorder":n.borderHover,"panelTitle.activeForeground":e.foreground,"panelTitle.inactiveForeground":e.mutedForeground,"statusBar.background":e.background,"statusBar.foreground":e.foreground,"statusBar.border":n.border,"statusBar.debuggingBackground":o.error,"statusBar.debuggingForeground":o.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":n.border,"menu.foreground":e.foreground,"menu.background":e.background,"menu.selectionForeground":e.foreground,"menu.selectionBackground":e.subtle,"menu.border":n.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":co(r.diffRemoved,o.error),"terminal.ansiGreen":co(r.diffAdded,o.success),"terminal.ansiYellow":o.warning,"terminal.ansiBlue":co(r.diffModified,o.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":n.border,"sideBar.background":e.background,"sideBar.foreground":e.foreground,"sideBar.border":n.border,"sideBarTitle.foreground":e.foreground,"sideBarSectionHeader.background":e.muted,"sideBarSectionHeader.foreground":e.foreground,"sideBarSectionHeader.border":n.border,"sideBar.activeBackground":e.subtle,"sideBar.activeForeground":e.foreground,"sideBar.hoverBackground":e.muted,"sideBar.hoverForeground":e.foreground,"list.warningForeground":o.warning,"list.errorForeground":o.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":n.border,"input.placeholderForeground":e.mutedForeground,"inputOption.activeBorder":n.border,"inputOption.activeBackground":e.elevated,"inputOption.activeForeground":e.foreground,"inputValidation.infoBackground":o.infoBackground,"inputValidation.infoBorder":o.infoBorder,"inputValidation.warningBackground":o.warningBackground,"inputValidation.warningBorder":o.warningBorder,"inputValidation.errorBackground":o.errorBackground,"inputValidation.errorBorder":o.errorBorder,"dropdown.background":e.muted,"dropdown.foreground":e.foreground,"dropdown.border":n.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":co(t.colors.primary.foreground,e.background),"badge.foreground":co(t.colors.primary.foreground,e.background),"activityBarBadge.foreground":co(t.colors.primary.foreground,e.background)}};function NB(t){return{name:t.metadata.name,type:t.metadata.variant,colors:LB(t),tokenColors:jB(t)}}const RB=t=>/^#[0-9a-fA-F]{8}$/.test(t),bu=t=>RB(t)?t.slice(0,7):t;function VB(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 yu=new Map,vu=new Set,zB=(t,e)=>{const n=t.colors?.["editor.background"],o=t.colors?.["editor.foreground"],s=n?bu(n):void 0,r=o?bu(o):void 0;if(!s||!r)throw new Error(`Theme "${e}" is missing editor.background/editor.foreground`);const i=t.tokenColors??[];return VB({...t,name:e,fg:r,bg:s,settings:i},e)},OB=t=>NB(t),$B=t=>{const e=yu.get(t.metadata.id);if(e)return e;const n=OB(t),o=zB(n,t.metadata.id);return yu.set(t.metadata.id,o),o},V0=t=>{const e=t.metadata.id;if(vu.has(e))return;const n=$B(t);ty(e,async()=>n),vu.add(e)},ZB="#8957e5",UB="#8250df",qB=t=>{const e=t.colors.syntax?.tokens??{},n=[e.className,e.enum,e.variableGlobal,t.colors.syntax?.base?.keyword].filter(o=>typeof o=="string"&&o.trim().length>0);return n.length>0?n[0]:t.metadata.variant==="dark"?ZB:UB},I1=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:qB(t),closed:t.colors.status.error}}},WB={id:"aura-dark",name:"Aura",description:"Aura",version:"1.0.0",variant:"dark",tags:["dark","palette"]},GB={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"}}},KB={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"}},YB={metadata:WB,colors:GB,config:KB},JB={id:"aura-light",name:"Aura",description:"Aura",version:"1.0.0",variant:"light",tags:["light","palette"]},QB={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"}}},XB={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"}},eD={metadata:JB,colors:QB,config:XB},tD={id:"ayu-dark",name:"Ayu",description:"Ayu",version:"1.0.0",variant:"dark",tags:["dark","palette"]},nD={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"}}},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"}},sD={metadata:tD,colors:nD,config:oD},rD={id:"ayu-light",name:"Ayu",description:"Ayu",version:"1.0.0",variant:"light",tags:["light","palette"]},iD={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"}}},aD={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"}},lD={metadata:rD,colors:iD,config:aD},cD={id:"carbonfox-dark",name:"Carbonfox",description:"Carbonfox",version:"1.0.0",variant:"dark",tags:["dark","palette"]},dD={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"}}},uD={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"}},fD={metadata:cD,colors:dD,config:uD},mD={id:"carbonfox-light",name:"Carbonfox",description:"Carbonfox",version:"1.0.0",variant:"light",tags:["light","palette"]},hD={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"}}},pD={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"}},gD={metadata:mD,colors:hD,config:pD},bD={id:"catppuccin-dark",name:"Catppuccin",description:"Catppuccin",version:"1.0.0",variant:"dark",tags:["dark","palette"]},yD={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"}}},vD={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"}},wD={metadata:bD,colors:yD,config:vD},xD={id:"catppuccin-light",name:"Catppuccin",description:"Catppuccin",version:"1.0.0",variant:"light",tags:["light","palette"]},CD={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"}}},SD={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"}},kD={metadata:xD,colors:CD,config:SD},MD={id:"dracula-dark",name:"Dracula",description:"Dracula",version:"1.0.0",variant:"dark",tags:["dark","palette"]},AD={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"}}},FD={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"}},_D={metadata:MD,colors:AD,config:FD},BD={id:"dracula-light",name:"Dracula",description:"Dracula",version:"1.0.0",variant:"light",tags:["light","palette"]},DD={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"}}},TD={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"}},PD={metadata:BD,colors:DD,config:TD},ED={id:"gruvbox-dark",name:"Gruvbox",description:"Gruvbox",version:"1.0.0",variant:"dark",tags:["dark","palette"]},HD={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"}}},ID={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"}},jD={metadata:ED,colors:HD,config:ID},LD={id:"gruvbox-light",name:"Gruvbox",description:"Gruvbox",version:"1.0.0",variant:"light",tags:["light","palette"]},ND={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"}}},RD={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"}},VD={metadata:LD,colors:ND,config:RD},zD={id:"jetbrains-dark",name:"JetBrains",description:"JetBrains IDE-inspired colors for OpenChamber - dark variant",author:"Artem Evsevev, adapted for OpenChamber",version:"1.0.0",variant:"dark",tags:["dark","jetbrains","ide","blue"]},OD={primary:{base:"#6796f5",hover:"#70AEFF",active:"#5594FA",foreground:"#1E1F22",muted:"#6796f580",emphasis:"#70AEFF"},surface:{background:"#1E1F22",foreground:"#DFE1E5",muted:"#26282B",mutedForeground:"#9fa0a2",elevated:"#2B2D30",elevatedForeground:"#DFE1E5",overlay:"#00000080",subtle:"#2c2d32"},interactive:{border:"#474a51",borderHover:"#4B5059",borderFocus:"#6796f5",selection:"#43454A",selectionForeground:"#DFE1E5",focus:"#6796f5",focusRing:"#6796f550",cursor:"#CED0D6",hover:"#3C3E41",active:"#494A4D"},status:{error:"#FA6675",errorForeground:"#1E1F22",errorBackground:"#402929",errorBorder:"#FA6675",warning:"#F2C55C",warningForeground:"#1E1F22",warningBackground:"#665014",warningBorder:"#F2C55C",success:"#57965D",successForeground:"#1E1F22",successBackground:"#253627",successBorder:"#57965D",info:"#3592C4",infoForeground:"#1E1F22",infoBackground:"#243846",infoBorder:"#3592C4"},pr:{open:"#5FAD65",draft:"#868A91",blocked:"#F2C55C",merged:"#A571E6",closed:"#DB5C5C"},syntax:{base:{background:"#1E1F22",foreground:"#BCBEC4",comment:"#7A7E85",keyword:"#CF8E6D",string:"#6AAB73",number:"#2AACB8",function:"#6AA2D7",variable:"#BCBEC4",type:"#A6BB77",operator:"#BCBEC4"},tokens:{commentDoc:"#5F826B",stringEscape:"#CF8E6D",keywordImport:"#CF8E6D",storageModifier:"#CF8E6D",functionCall:"#6AA2D7",method:"#6AA2D7",functionBuiltin:"#D5A563",variableProperty:"#C77DBB",variableOther:"#BCBEC4",variableGlobal:"#E59EAE",variableLocal:"#BCBEC4",parameter:"#3CACAC",constant:"#C77DBB",class:"#57AAF7",className:"#57AAF7",interface:"#8D91DC",struct:"#A6BB77",enum:"#A6BB77",typeParameter:"#3CACAC",namespace:"#BCBEC4",module:"#8D91DC",tag:"#D5B778",jsxTag:"#D5B778",tagAttribute:"#B3AE60",tagAttributeValue:"#6AAB73",boolean:"#CF8E6D",decorator:"#B3AE60",label:"#D5A563",punctuation:"#BCBEC4",macro:"#D5A563",preprocessor:"#D5A563",regex:"#6AAB73",url:"#57AAF7",key:"#C77DBB",exception:"#E59EAE"},highlights:{diffAdded:"#549159",diffAddedBackground:"#294436",diffRemoved:"#F75464",diffRemovedBackground:"#45302B",diffModified:"#70AEFF",diffModifiedBackground:"#243C63",lineNumber:"#4B5059",lineNumberActive:"#A1A3AB"}},markdown:{heading1:"#FFFFFF",heading2:"#DFE1E5",heading3:"#CED0D6",heading4:"#BCBEC4",link:"#56A8F5",linkHover:"#6796f5",inlineCode:"#6AAB73",inlineCodeBackground:"#26282B",blockquote:"#7A7E85",blockquoteBorder:"#393B41",listMarker:"#B3AE6099"},chat:{userMessage:"#DFE1E5",userMessageBackground:"#3a5b9d76",assistantMessage:"#DFE1E5",assistantMessageBackground:"#1E1F22",timestamp:"#7A7E85",divider:"#393B41"},tools:{background:"#26282B50",border:"#393B41",headerHover:"#3C3E4150",icon:"#B0B1B3",title:"#DFE1E5",description:"#B0B1B3",edit:{added:"#549159",addedBackground:"#29443640",removed:"#F75464",removedBackground:"#45302B40",lineNumber:"#4B5059"}}},$D={fonts:{sans:'"JetBrains Mono", "IBM Plex Mono", monospace',mono:'"JetBrains Mono", "IBM Plex Mono", monospace',heading:'"JetBrains Mono", "IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},ZD={metadata:zD,colors:OD,config:$D},UD={id:"jetbrains-light",name:"JetBrains",description:"JetBrains IDE-inspired colors for OpenChamber - light variant",author:"Artem Evsevev, adapted for OpenChamber",version:"1.0.0",variant:"light",tags:["light","jetbrains","ide","blue"]},qD={primary:{base:"#195ce3",hover:"#2D61F0",active:"#0055FF",foreground:"#FFFFFF",muted:"#3573F080",emphasis:"#006DCC"},surface:{background:"#FFF",foreground:"#000000",muted:"#F7F8FA",mutedForeground:"#404040",elevated:"#FFFFFF",elevatedForeground:"#000000",overlay:"#00000025",subtle:"#ecf0f8"},interactive:{border:"#cfd3de",borderHover:"#AEB3C2",borderFocus:"#0055FF",selection:"#DFE1E5",selectionForeground:"#000000",focus:"#0055FF",focusRing:"#0055FF40",cursor:"#000000",hover:"#E6E6E8",active:"#DBDCDE"},status:{error:"#CE0606",errorForeground:"#FFFFFF",errorBackground:"#FFE8E8",errorBorder:"#CF5B56",warning:"#F49810",warningForeground:"#000000",warningBackground:"#FFF8DC",warningBorder:"#F49810",success:"#077D18",successForeground:"#FFFFFF",successBackground:"#E9F5E6",successBorder:"#55A76A",info:"#389FD6",infoForeground:"#000000",infoBackground:"#E7F4FB",infoBorder:"#389FD6"},pr:{open:"#369650",draft:"#808080",blocked:"#F49810",merged:"#834DF0",closed:"#E55765"},syntax:{base:{background:"#FFFFFF",foreground:"#080808",comment:"#8C8C8C",keyword:"#0033B3",string:"#067D17",number:"#1750EB",function:"#00627A",variable:"#000000",type:"#A04908",operator:"#080808"},tokens:{commentDoc:"#8C8C8C",stringEscape:"#0037A6",keywordImport:"#0033B3",storageModifier:"#0033B3",functionCall:"#00627A",method:"#00627A",functionBuiltin:"#C27203",variableProperty:"#871094",variableOther:"#000000",variableGlobal:"#1C5DFE",variableLocal:"#000000",parameter:"#007E8A",constant:"#871094",class:"#00627A",className:"#00627A",interface:"#835DDA",struct:"#A04908",enum:"#A04908",typeParameter:"#007E8A",namespace:"#000000",module:"#835DDA",tag:"#0033B3",jsxTag:"#0033B3",tagAttribute:"#9E880D",tagAttributeValue:"#067D17",boolean:"#0033B3",decorator:"#9E880D",label:"#C27203",punctuation:"#080808",macro:"#C27203",preprocessor:"#C27203",regex:"#067D17",url:"#00627A",key:"#871094",exception:"#1C5DFE"},highlights:{diffAdded:"#077D18",diffAddedBackground:"#BEE6BE",diffRemoved:"#FF0000",diffRemovedBackground:"#FFD5CC",diffModified:"#0133B3",diffModifiedBackground:"#DDE8FF",lineNumber:"#AEB3C2",lineNumberActive:"#767A8A"}},markdown:{heading1:"#000000",heading2:"#161617",heading3:"#404040",heading4:"#404040",link:"#006DCC",linkHover:"#3573F0",inlineCode:"#067D17",inlineCodeBackground:"#F5F7F9",blockquote:"#8C8C8C",blockquoteBorder:"#C9CCD6",listMarker:"#9E880D99"},chat:{userMessage:"#000000",userMessageBackground:"#E8F1FF",assistantMessage:"#000000",assistantMessageBackground:"#F7F8FA",timestamp:"#767A8A",divider:"#C9CCD6"},tools:{background:"#F5F7F950",border:"#AEB3C280",headerHover:"#E6E6E8",icon:"#404040",title:"#000000",description:"#404040",edit:{added:"#077D18",addedBackground:"#BEE6BE50",removed:"#FF0000",removedBackground:"#FFD5CC50",lineNumber:"#AEB3C2"}}},WD={fonts:{sans:'"JetBrains Mono", "IBM Plex Mono", monospace',mono:'"JetBrains Mono", "IBM Plex Mono", monospace',heading:'"JetBrains Mono", "IBM Plex Mono", monospace'},transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},GD={metadata:UD,colors:qD,config:WD},KD={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"]},YD={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"}}},JD={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"}},QD={metadata:KD,colors:YD,config:JD},XD={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"]},eT={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"}}},tT={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"}},nT={metadata:XD,colors:eT,config:tT},oT={id:"monokai-dark",name:"Monokai",description:"Monokai",version:"1.0.0",variant:"dark",tags:["dark","palette"]},sT={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"}}},rT={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"}},iT={metadata:oT,colors:sT,config:rT},aT={id:"monokai-light",name:"Monokai",description:"Monokai",version:"1.0.0",variant:"light",tags:["light","palette"]},lT={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"}}},cT={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"}},dT={metadata:aT,colors:lT,config:cT},uT={id:"nightowl-dark",name:"Night Owl",description:"Night Owl",version:"1.0.0",variant:"dark",tags:["dark","palette"]},fT={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"}}},mT={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"}},hT={metadata:uT,colors:fT,config:mT},pT={id:"nightowl-light",name:"Night Owl",description:"Night Owl",version:"1.0.0",variant:"light",tags:["light","palette"]},gT={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"}}},bT={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"}},yT={metadata:pT,colors:gT,config:bT},vT={id:"nord-dark",name:"Nord",description:"Nord",version:"1.0.0",variant:"dark",tags:["dark","palette"]},wT={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"}}},xT={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"}},CT={metadata:vT,colors:wT,config:xT},ST={id:"nord-light",name:"Nord",description:"Nord",version:"1.0.0",variant:"light",tags:["light","palette"]},kT={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"}}},MT={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"}},AT={metadata:ST,colors:kT,config:MT},FT={id:"openchamber-dark",name:"Fields of the Shire",description:"Fields of the Shire theme - dark variant",author:"OpenChamber",version:"1.0.0",variant:"dark",tags:["dark","warm","earthy","brand"]},_T={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"}}},BT={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"}},cp={metadata:FT,colors:_T,config:BT},DT={id:"openchamber-light",name:"Fields of the Shire",description:"Fields of the Shire theme - light variant",author:"OpenChamber",version:"1.0.0",variant:"light",tags:["light","warm","earthy","brand"]},TT={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"}}},PT={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"}},dp={metadata:DT,colors:TT,config:PT},ET={id:"onedarkpro-dark",name:"One Dark Pro",description:"One Dark Pro",version:"1.0.0",variant:"dark",tags:["dark","palette"]},HT={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"}}},IT={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"}},jT={metadata:ET,colors:HT,config:IT},LT={id:"onedarkpro-light",name:"One Dark Pro",description:"One Dark Pro",version:"1.0.0",variant:"light",tags:["light","palette"]},NT={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"}}},RT={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"}},VT={metadata:LT,colors:NT,config:RT},zT={id:"solarized-dark",name:"Solarized",description:"Solarized",version:"1.0.0",variant:"dark",tags:["dark","palette"]},OT={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"}}},$T={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"}},ZT={metadata:zT,colors:OT,config:$T},UT={id:"solarized-light",name:"Solarized",description:"Solarized",version:"1.0.0",variant:"light",tags:["light","palette"]},qT={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"}}},WT={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"}},GT={metadata:UT,colors:qT,config:WT},KT={id:"tokyonight-dark",name:"Tokyonight",description:"Tokyonight",version:"1.0.0",variant:"dark",tags:["dark","palette"]},YT={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"}}},JT={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"}},QT={metadata:KT,colors:YT,config:JT},XT={id:"tokyonight-light",name:"Tokyonight",description:"Tokyonight",version:"1.0.0",variant:"light",tags:["light","palette"]},eP={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"}}},tP={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"}},nP={metadata:XT,colors:eP,config:tP},oP={id:"vesper-dark",name:"Vesper",description:"Vesper",version:"1.0.0",variant:"dark",tags:["dark","palette"]},sP={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"}}},rP={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"}},iP={metadata:oP,colors:sP,config:rP},aP={id:"vesper-light",name:"Vesper",description:"Vesper",version:"1.0.0",variant:"light",tags:["light","palette"]},lP={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:"#9e9e9e",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"}}},cP={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"}},dP={metadata:aP,colors:lP,config:cP},uP={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"]},fP={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"}}},mP={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"}},hP={metadata:uP,colors:fP,config:mP},pP={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"]},gP={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"}}},bP={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"}},yP={metadata:pP,colors:gP,config:bP},vP={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"]},wP={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"}}},xP={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"}},CP={metadata:vP,colors:wP,config:xP},SP={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"]},kP={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"}}},MP={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"}},AP={metadata:SP,colors:kP,config:MP},FP={id:"vitesse-dark-dark",name:"Vitesse Dark",description:"Converted from VS Code theme",version:"1.0.0",variant:"dark",tags:["dark","converted","vscode"]},_P={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"}}},BP={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"}},DP={metadata:FP,colors:_P,config:BP},TP={id:"vitesse-light-light",name:"Vitesse Light",description:"Converted from VS Code theme",version:"1.0.0",variant:"light",tags:["light","converted","vscode"]},PP={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:"#635454b8",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"}}},EP={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"}},HP={metadata:TP,colors:PP,config:EP},IP=[cp,dp,YB,eD,sD,lD,fD,gD,wD,kD,_D,PD,jD,VD,ZD,GD,QD,nT,iT,dT,hT,yT,CT,AT,jT,VT,ZT,GT,QT,nP,iP,dP,hP,yP,CP,AP,DP,HP].map(t=>I1(t)),jP={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"]},LP={primary:{base:"#BC5215",hover:"#F9AE77",active:"#DA702C",foreground:"#fffdf4",muted:"#BC521580",emphasis:"#F9AE77"},surface:{background:"#fffdf4",foreground:"#100F0F",muted:"#f6f5ee",mutedForeground:"#686663",elevated:"#fbfaf2",elevatedForeground:"#100F0F",overlay:"#100F0F20",subtle:"#f7f4ec"},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:"#fffdf4",errorBackground:"#D14D4120",errorBorder:"#D14D4150",warning:"#BC5215",warningForeground:"#fffdf4",warningBackground:"#DA702C20",warningBorder:"#DA702C50",success:"#66800B",successForeground:"#fffdf4",successBackground:"#879A3920",successBorder:"#879A3950",info:"#205EA6",infoForeground:"#fffdf4",infoBackground:"#4385BE20",infoBorder:"#4385BE50"},pr:{open:"#66800B",draft:"#6F6E69",blocked:"#BC5215",merged:"#5E409D",closed:"#AF3029"},syntax:{base:{background:"#f6f5ee",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:"#f6f5ee",blockquote:"#6F6E69",blockquoteBorder:"#DAD8CE",listMarker:"#AD830199"},chat:{userMessage:"#100F0F",userMessageBackground:"#f7f4ec",assistantMessage:"#100F0F",assistantMessageBackground:"#fffdf4",timestamp:"#6F6E69",divider:"#DAD8CE"},tools:{background:"#f6f5ee50",border:"#b4b2a980",headerHover:"#DAD8CE",icon:"#6F6E69",title:"#100F0F",description:"#6F6E69",edit:{added:"#66800B",addedBackground:"#66800B25",removed:"#AF3029",removedBackground:"#AF302925",lineNumber:"#CECDC3"}}},NP={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"}},RP={metadata:jP,colors:LP,config:NP},VP={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"]},zP={primary:{base:"#DA702C",hover:"#DA702C",active:"#F9AE77",foreground:"#171515",muted:"#DA702C80",emphasis:"#F9AE77"},surface:{background:"#171515",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:"#171515",errorBackground:"#AF302920",errorBorder:"#AF302950",warning:"#DA702C",warningForeground:"#171515",warningBackground:"#BC521520",warningBorder:"#BC521550",success:"#A0AF54",successForeground:"#171515",successBackground:"#66800B20",successBorder:"#66800B50",info:"#4385BE",infoForeground:"#171515",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:"#171515",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"}}},OP={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"}},$P={metadata:VP,colors:zP,config:OP},up=I1(RP),ZP=I1($P),UP=I1(dp),qP=I1(cp),fp="flexoki-light",mp="flexoki-dark",z0=[UP,qP,up,ZP,...IP.filter(t=>t.metadata.id!=="openchamber-light"&&t.metadata.id!=="openchamber-dark")];function Qd(t){const e=t==="app-light"?"flexoki-light":t==="app-dark"?"flexoki-dark":t;return z0.find(n=>n.metadata.id===e)}function w1(t){const e=t?"dark":"light",o=Qd(t?mp:fp);return o&&o.metadata.variant===e?o:z0.find(s=>s.metadata.variant===e)??z0[0]??up}const nQ=t=>{const e=le.c(10),{children:n}=t,o=ke(WP),s=ke(GP),r=ke(KP),i=ke(YP);let l;e[0]!==i||e[1]!==s?(l=()=>{s(),i()},e[0]=i,e[1]=s,e[2]=l):l=e[2];let c;e[3]!==i||e[4]!==s||e[5]!==o||e[6]!==r?(c=[o,s,r,i],e[3]=i,e[4]=s,e[5]=o,e[6]=r,e[7]=c):c=e[7],g.useLayoutEffect(l,c);let d;return e[8]!==n?(d=a.jsx(a.Fragment,{children:n}),e[8]=n,e[9]=d):d=e[9],d};function WP(t){return t.fontSize}function GP(t){return t.applyTypography}function KP(t){return t.padding}function YP(t){return t.applyPadding}const pl=async(t,e)=>{if(!qn())throw new Error("Desktop runtime is not available");return Wn(t,e)},oQ=async()=>{if(Et())try{await pl("desktop_start_window_drag")}catch{}},JP=async t=>{if(Et())try{await pl("desktop_set_window_title",{title:t})}catch{}},QP=async(t,e)=>{if(Et())try{await pl("desktop_set_window_theme",{themeMode:t,themeVariant:e})}catch{}},sQ=async()=>{if(!Et())return null;try{const t=await pl("desktop_get_app_version");return typeof t=="string"&&t.trim().length>0?t:null}catch{return null}},Pc=t=>{if(!t||typeof t!="string")return null;const e=t.trim();if(!e.startsWith("#"))return null;let n=e.slice(1);if((n.length===3||n.length===4)&&(n=n.split("").map(l=>l+l).join("")),n.length===8&&(n=n.slice(0,6)),n.length!==6)return null;const o=Number.parseInt(n,16);if(Number.isNaN(o))return null;const s=o>>16&255,r=o>>8&255,i=o&255;return`${s} ${r} ${i}`};class XP{inheritanceMap=new Map;constructor(){this.initializeInheritanceMap()}generate(e){const n=[];return n.push(...this.generateTailwindVariables(e)),n.push(...this.generatePrimaryColors(e.colors.primary)),n.push(...this.generateSurfaceColors(e.colors.surface)),n.push(...this.generateInteractiveColors(e.colors.interactive)),n.push(...this.generateStatusColors(e.colors.status)),n.push(...this.generatePullRequestColors(e)),n.push(...this.generateSyntaxColors(e.colors.syntax)),n.push(...this.generateComponentColors(e.colors,e)),n.push(...this.generateTypographyVariables()),e.config&&n.push(...this.generateConfigVariables(e.config)),n.join(`
414
414
  `)}generateTailwindVariables(e){const n=[];n.push(` --background: ${e.colors.surface.background} !important;`),n.push(` --foreground: ${e.colors.surface.foreground} !important;`),n.push(` --muted: ${e.colors.surface.muted} !important;`),n.push(` --muted-foreground: ${e.colors.surface.mutedForeground} !important;`),n.push(` --card: ${e.colors.surface.elevated} !important;`),n.push(` --card-foreground: ${e.colors.surface.elevatedForeground} !important;`),n.push(` --popover: ${e.colors.surface.elevated} !important;`),n.push(` --popover-foreground: ${e.colors.surface.elevatedForeground} !important;`),n.push(` --border: ${e.colors.interactive.border} !important;`),n.push(` --input: ${e.colors.interactive.border} !important;`),n.push(` --primary: ${e.colors.primary.base} !important;`),n.push(` --primary-foreground: ${e.colors.primary.foreground} !important;`),n.push(` --secondary: ${e.colors.surface.muted} !important;`),n.push(` --secondary-foreground: ${e.colors.surface.mutedForeground} !important;`),n.push(` --accent: ${e.colors.surface.subtle} !important;`),n.push(` --accent-foreground: ${e.colors.surface.foreground} !important;`),n.push(` --destructive: ${e.colors.status.error} !important;`),n.push(` --destructive-foreground: ${e.colors.status.errorForeground} !important;`),n.push(` --ring: ${e.colors.interactive.focusRing} !important;`);const o=Pc(e.colors.surface.muted),s=Pc(e.colors.surface.subtle),r=Pc(e.colors.interactive.border);n.push(` --sidebar-base: ${e.colors.surface.muted} !important;`),o&&n.push(` --sidebar-base-rgb: ${o} !important;`),n.push(" --sidebar: var(--sidebar-base) !important;"),n.push(` --sidebar-foreground: ${e.colors.surface.mutedForeground} !important;`),n.push(` --sidebar-primary: ${e.colors.primary.base} !important;`),n.push(` --sidebar-primary-foreground: ${e.colors.primary.foreground} !important;`),n.push(` --sidebar-accent-base: ${e.colors.surface.subtle} !important;`),s&&n.push(` --sidebar-accent-base-rgb: ${s} !important;`),n.push(" --sidebar-accent: var(--sidebar-accent-base) !important;"),n.push(` --sidebar-accent-foreground: ${e.colors.surface.foreground} !important;`),n.push(` --sidebar-border: ${e.colors.interactive.border} !important;`),r&&n.push(` --sidebar-border-rgb: ${r} !important;`),n.push(` --sidebar-ring: ${e.colors.interactive.focusRing} !important;`);const i=e.metadata.variant==="dark",l=i?.15:.5,c=i?.1:.3;if(o)n.push(` --sidebar-overlay-strong: rgb(${o} / ${l}) !important;`),n.push(` --sidebar-overlay-soft: rgb(${o} / ${c}) !important;`);else{const d=e.colors.surface.muted;n.push(` --sidebar-overlay-strong: ${this.opacity(d,l)} !important;`),n.push(` --sidebar-overlay-soft: ${this.opacity(d,c)} !important;`)}return e.colors.charts?.series&&Array.isArray(e.colors.charts.series)&&e.colors.charts.series.forEach((d,u)=>{n.push(` --chart-${u+1}: ${d};`)}),e.colors.loading?(n.push(` --loading-spinner: ${e.colors.loading.spinner||e.colors.primary.base};`),n.push(` --loading-spinner-track: ${e.colors.loading.spinnerTrack||e.colors.surface.muted};`)):(n.push(` --loading-spinner: ${e.colors.primary.base};`),n.push(` --loading-spinner-track: ${e.colors.surface.muted};`)),n}apply(e){const n=this.generate(e),o=document.createElement("style");o.id="opencode-theme-variables";let s="";e.metadata.variant==="dark"?(s=`:root {
415
415
  ${n}
416
416
  }
@@ -6978,7 +6978,7 @@ ${s}`:d}if(e==="task"){const o=n("prompt");if(o)return o;const s=n("description"
6978
6978
  `,Nc="oc-file-type-icon-sprite-root",iH=()=>{if(typeof document>"u"||document.getElementById(Nc))return;const t=()=>{if(document.getElementById(Nc))return;const e=document.createElement("div");e.id=Nc,e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width="0",e.style.height="0",e.style.overflow="hidden",e.innerHTML=rH,document.body.appendChild(e)};if(document.body){t();return}document.addEventListener("DOMContentLoaded",t,{once:!0})};iH();const Lu={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"},Nu={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"},Ru={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"},O0="document",aH=(t,e)=>{if(!t)return e==="light"?`${O0}_light`:O0;if(e==="light"){const n=t.endsWith("_light")?t:`${t}_light`;return b3.has(n)?n:t}return t},lH=t=>typeof t=="string"&&t.trim().length>0,cH=(t,e)=>{const o=t.replace(/\\/g,"/").split("/").pop()?.toLowerCase()||"";if(Lu[o])return Lu[o];if(o.startsWith(".env"))return"settings";const s=da(t);if(s&&Nu[s])return Nu[s];const r=lH(e)?e.toLowerCase():o.includes(".")&&o.split(".").pop()?.toLowerCase()||"";return r&&Ru[r]?Ru[r]:r&&b3.has(r)?r:O0},dH=(t,e)=>{const n=cH(t,e?.extension),o=b3.has(n)?n:O0;return`#${aH(o,e?.themeVariant||"dark")}`},Uo=t=>{const e=le.c(11),{filePath:n,extension:o,className:s}=t,i=hl()?.currentTheme.metadata.variant==="light"?"light":"dark";let l;e[0]!==o||e[1]!==n||e[2]!==i?(l=dH(n,{extension:o,themeVariant:i}),e[0]=o,e[1]=n,e[2]=i,e[3]=l):l=e[3];const c=l;let d;e[4]!==s?(d=N("block 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},Ti={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},vp={isMobile:!1,isTablet:!1,isDesktop:!0,deviceType:"desktop",screenWidth:1024,breakpoint:"lg",hasTouchInput:!1,hasTouchOnlyPointer:!1},uH=t=>{if(typeof navigator>"u")return{isExplicitTablet:!1};const e=navigator.userAgent||"",n=navigator.platform||"",o=/iPad/i.test(e)||(/Macintosh|MacIntel/i.test(e)||/MacIntel/i.test(n))&&t>1,s=/Android/i.test(e)&&!/Mobile/i.test(e),r=/Tablet/i.test(e);return{isExplicitTablet:o||s||r}},fH=(t,e,n)=>{if(typeof window>"u")return;const o=document.documentElement,s=e==="mobile",r=e==="tablet";o.classList.remove("device-mobile","device-tablet","device-desktop"),o.classList.add(e==="mobile"?"device-mobile":e==="tablet"?"device-tablet":"device-desktop"),t?(o.classList.add("desktop-runtime"),o.style.setProperty("--is-mobile","0"),o.style.setProperty("--device-type","desktop"),o.style.setProperty("--font-scale","1"),o.style.setProperty("--has-coarse-pointer","0"),o.style.setProperty("--has-touch-input","0"),o.classList.remove("mobile-pointer")):(o.classList.remove("desktop-runtime"),o.style.setProperty("--is-mobile",s?"1":"0"),o.style.setProperty("--device-type",e),o.style.setProperty("--font-scale",s?"0.9":r?"0.95":"1"),o.style.setProperty("--has-coarse-pointer",n?"1":"0"),o.style.setProperty("--has-touch-input",n?"1":"0"),n?o.classList.add("mobile-pointer"):o.classList.remove("mobile-pointer"))};function y3(){const t=window.innerWidth,e=typeof window.matchMedia=="function",n=e?window.matchMedia("(pointer: coarse)"):null,o=e?window.matchMedia("(hover: none)"):null,s=n?.matches??!1,r=o?.matches??!1,i=typeof navigator<"u"?navigator.maxTouchPoints??0:0,l=Et(),{isExplicitTablet:c}=uH(i),d=s||r||i>0,u=s||r,f=t>Ti.md&&t<=Ti.lg,m=t<=Ti.md;let h=d&&m,p=d&&!h&&(f||c),b=!d||!p&&t>Ti.lg,y="desktop";l?(h=!1,p=!1,b=!0,y="desktop"):h?y="mobile":p?y="tablet":(b=!0,y="desktop"),fH(l,y,d);let v="xs";for(const[x,w]of Object.entries(Ti))t>=w&&(v=x);return{isMobile:h,isTablet:p,isDesktop:b,deviceType:y,screenWidth:t,breakpoint:v,hasTouchInput:d,hasTouchOnlyPointer:u}}const mH=(t,e)=>t.isMobile===e.isMobile&&t.isTablet===e.isTablet&&t.isDesktop===e.isDesktop&&t.deviceType===e.deviceType&&t.screenWidth===e.screenWidth&&t.breakpoint===e.breakpoint&&t.hasTouchInput===e.hasTouchInput&&t.hasTouchOnlyPointer===e.hasTouchOnlyPointer,i0=new Set;let ur=null,Ui,Ha=null;const hH=()=>typeof window>"u"?vp:(ur||(ur=y3()),ur),pH=()=>{for(const t of i0)t()},gH=()=>{Ui=void 0;const t=y3();ur&&mH(ur,t)||(ur=t,pH())},A2=()=>{typeof window>"u"||Ui!==void 0||(Ui=window.requestAnimationFrame(gH))},Vu=(t,e)=>t?typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):typeof t.addListener=="function"?(t.addListener(e),()=>t.removeListener(e)):()=>{}:()=>{},bH=()=>{if(typeof window>"u")return()=>{};ur=y3(),window.addEventListener("resize",A2);const t=typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null,e=typeof window.matchMedia=="function"?window.matchMedia("(hover: none)"):null,n=Vu(t,A2),o=Vu(e,A2);return()=>{window.removeEventListener("resize",A2),n(),o(),Ui!==void 0&&(window.cancelAnimationFrame(Ui),Ui=void 0)}},yH=t=>typeof window>"u"?()=>{}:(i0.add(t),Ha||(Ha=bH()),()=>{i0.delete(t),i0.size===0&&Ha&&(Ha(),Ha=null,ur=null)});function hQ(){if(typeof window>"u"||typeof window<"u"&&Et())return!1;const t=document.documentElement,e=t.style.getPropertyValue("--is-mobile")||getComputedStyle(t).getPropertyValue("--is-mobile");return e==="1"||e==="true"}const vH=()=>typeof window>"u"?!1:!!(navigator.standalone===!0||window.matchMedia?.("(display-mode: standalone)")?.matches||window.matchMedia?.("(display-mode: fullscreen)")?.matches),wp=()=>{if(typeof window>"u"||Et())return!1;const t=typeof navigator<"u"?navigator.maxTouchPoints??0:0;return vH()&&t>0&&window.innerWidth>Ti.md};function pQ(){const t=le.c(2),[e,n]=g.useState(wH);let o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{if(typeof window>"u")return;const r=()=>n(wp()),i=window.matchMedia?.("(display-mode: standalone)"),l=window.matchMedia?.("(display-mode: fullscreen)");r(),window.addEventListener("resize",r),window.addEventListener("focus",r);const c=u=>{u&&(typeof u.addEventListener=="function"?u.addEventListener("change",r):typeof u.addListener=="function"&&u.addListener(r))},d=u=>{u&&(typeof u.removeEventListener=="function"?u.removeEventListener("change",r):typeof u.removeListener=="function"&&u.removeListener(r))};return c(i),c(l),()=>{window.removeEventListener("resize",r),window.removeEventListener("focus",r),d(i),d(l)}},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),g.useEffect(o,s),e}function wH(){return wp()}function rs(){return g.useSyncExternalStore(yH,hH,xH)}function xH(){return vp}const CH=se.memo(()=>{const{t}=nt(),e=se.useRef(null),n=Nt(f=>f.addAttachedFile),o=ke(f=>f.isMobile),s=oi(),r=s.runtime.isVSCode,i=o?"h-9 w-9":"h-7 w-7",l=o?"h-5 w-5":"h-[18px] w-[18px]",c=async f=>{for(let m=0;m<f.length;m++){const h=f[m];try{await n(h)}catch(p){console.error("File attach failed",p),Ze.error(p instanceof Error?p.message:t("chat.fileAttachment.toast.attachFailed"))}}},d=async f=>{const m=f.target.files;m&&(await c(m),e.current&&(e.current.value=""))},u=async()=>{try{const f=await s.vscode?.pickFiles?.(),m=Array.isArray(f?.files)?f.files:[],h=Array.isArray(f?.skipped)?f.skipped:[];if(h.length>0){const b=h.map(y=>`${y?.name||t("chat.fileAttachment.fileFallback")}: ${y?.reason||t("chat.fileAttachment.skippedFallback")}`).join(`
6979
6979
  `);Ze.error(t("chat.fileAttachment.toast.someFilesSkipped",{summary:b}))}const p=m.map(b=>{if(!b?.dataUrl)return null;try{const[y,v]=b.dataUrl.split(","),x=b.mimeType||y?.match(/data:(.*);base64/)?.[1]||"application/octet-stream";if(!v)return null;const w=atob(v),S=new Uint8Array(w.length);for(let M=0;M<w.length;M++)S[M]=w.charCodeAt(M);const C=new Blob([S],{type:x});return new File([C],b.name||t("chat.fileAttachment.fileFallback"),{type:x})}catch(y){return console.error("Failed to decode VS Code picked file",y),null}}).filter(Boolean);p.length>0&&await c(p)}catch(f){console.error("VS Code file pick failed",f),Ze.error(f instanceof Error?f.message:t("chat.fileAttachment.toast.vscodePickFailed"))}};return a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:e,type:"file",multiple:!0,className:"hidden",onChange:d}),a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsx("button",{type:"button",onClick:r?u:()=>e.current?.click(),className:N("flex items-center justify-center rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","hover:bg-muted text-muted-foreground",i),"aria-label":t("chat.fileAttachment.actions.attachAria"),children:a.jsx(z,{name:"attachment-2",className:l})})}),a.jsx(Ot,{side:"top",children:a.jsx("p",{children:t("chat.fileAttachment.actions.attach")})})]})]})});CH.displayName="FileAttachmentButton";const v3=se.memo(t=>{const e=le.c(59),{file:n,onRemove:o,onShowPopup:s,gallery:r,index:i}=t,l=i===void 0?0:i,{t:c}=nt(),{isMobile:d,isTablet:u}=rs(),f=d||u,h=n.source!=="server"&&n.mimeType.startsWith("image/")&&typeof n.dataUrl=="string"&&n.dataUrl.startsWith("data:image/")?n.dataUrl:n.serverPath||"",p=AH,b=FH;let y;e[0]!==n.filename?(y=p(n.filename),e[0]=n.filename,e[1]=y):y=e[1];const v=y;let x;e[2]!==n.filename?(x=b(n.filename),e[2]=n.filename,e[3]=x):x=e[3];const w=x;let S;e[4]!==v||e[5]!==n.mimeType||e[6]!==n.size||e[7]!==r||e[8]!==h||e[9]!==l||e[10]!==s?(S=()=>{!s||!h||s({open:!0,title:v||"Image",content:"",metadata:{tool:"image-preview",filename:v,mime:n.mimeType,size:n.size},image:{url:h,mimeType:n.mimeType,filename:v,size:n.size,gallery:r,index:l}})},e[4]=v,e[5]=n.mimeType,e[6]=n.size,e[7]=r,e[8]=h,e[9]=l,e[10]=s,e[11]=S):S=e[11];const C=S;if(!h){let L;e[12]!==w||e[13]!==n.filename?(L=a.jsx(Uo,{filePath:n.filename,extension:w,className:"h-4 w-4"}),e[12]=w,e[13]=n.filename,e[14]=L):L=e[14];let q;e[15]!==v?(q=a.jsx("span",{className:"text-foreground truncate max-w-[200px]",children:v}),e[15]=v,e[16]=q):q=e[16];let $;e[17]!==o?($=R=>{R.stopPropagation(),o()},e[17]=o,e[18]=$):$=e[18];let V;e[19]!==v||e[20]!==c?(V=c("chat.fileAttachment.actions.removeNamed",{name:v}),e[19]=v,e[20]=c,e[21]=V):V=e[21];let W;e[22]===Symbol.for("react.memo_cache_sentinel")?(W=a.jsx(z,{name:"close",className:"h-4 w-4 text-muted-foreground"}),e[22]=W):W=e[22];let E;e[23]!==$||e[24]!==V?(E=a.jsx("span",{onClick:$,className:"flex items-center justify-center h-5 w-5 flex-shrink-0 hover:bg-[var(--interactive-hover)] rounded-full transition-colors cursor-pointer","aria-label":V,children:W}),e[23]=$,e[24]=V,e[25]=E):E=e[25];let X;return e[26]!==E||e[27]!==L||e[28]!==q?(X=a.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-sm hover:opacity-80 transition-opacity text-left h-5",children:[L,q,E]}),e[26]=E,e[27]=L,e[28]=q,e[29]=X):X=e[29],X}const M=s?"button":void 0,A=s?0:void 0;let k;e[30]!==C||e[31]!==s?(k=L=>{s&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C())},e[30]=C,e[31]=s,e[32]=k):k=e[32];let D;e[33]!==v||e[34]!==h?(D=a.jsx("img",{src:h,alt:v,className:"h-full w-full object-cover",loading:"lazy"}),e[33]=v,e[34]=h,e[35]=D):D=e[35];let _;e[36]!==o?(_=L=>{L.stopPropagation(),o()},e[36]=o,e[37]=_):_=e[37];const F=f?"opacity-100":"opacity-0 group-hover:opacity-100";let B;e[38]!==F?(B=N("absolute top-0.5 right-0.5 h-4 w-4 rounded-full bg-background/80 text-foreground hover:text-destructive flex items-center justify-center transition-opacity focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",F),e[38]=F,e[39]=B):B=e[39];let j;e[40]!==c?(j=c("chat.fileAttachment.actions.removeImage"),e[40]=c,e[41]=j):j=e[41];let T;e[42]!==v||e[43]!==c?(T=c("chat.fileAttachment.actions.removeNamed",{name:v}),e[42]=v,e[43]=c,e[44]=T):T=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=a.jsx(z,{name:"close",className:"h-2.5 w-2.5"}),e[45]=P):P=e[45];let I;e[46]!==B||e[47]!==j||e[48]!==T||e[49]!==_?(I=a.jsx("button",{onClick:_,className:B,title:j,"aria-label":T,children:P}),e[46]=B,e[47]=j,e[48]=T,e[49]=_,e[50]=I):I=e[50];let O;return e[51]!==v||e[52]!==C||e[53]!==I||e[54]!==M||e[55]!==A||e[56]!==k||e[57]!==D?(O=a.jsxs("div",{role:M,tabIndex:A,onClick:C,onKeyDown:k,className:"relative h-10 w-10 rounded-lg border border-border/40 bg-muted/10 overflow-hidden flex-shrink-0 group cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary","aria-label":v,children:[D,I]}),e[51]=v,e[52]=C,e[53]=I,e[54]=M,e[55]=A,e[56]=k,e[57]=D,e[58]=O):O=e[58],O});v3.displayName="ImagePreview";const xp=t=>{const e=s=>{const r=s.split(".");return r.length>1?r[r.length-1].toLowerCase():""},n=s=>!Number.isFinite(s)||s<=0?"":s<1024?s+" B":s<1048576?(s/1024).toFixed(1)+" KB":(s/1048576).toFixed(1)+" MB";return{displayName:(s=>{const i=s.replace(/\\/g,"/").split("/");return i[i.length-1]||s})(t.filename),fileSize:n(t.size),extension:e(t.filename)}},Cp=se.memo(t=>{const e=le.c(21),{file:n,onRemove:o}=t,{t:s}=nt(),{displayName:r,fileSize:i,extension:l}=xp(n);let c;e[0]!==l||e[1]!==n.filename?(c=a.jsx(Uo,{filePath:n.filename,extension:l,className:"h-4 w-4"}),e[0]=l,e[1]=n.filename,e[2]=c):c=e[2];let d;e[3]!==i?(d=i&&a.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",i,")"]}),e[3]=i,e[4]=d):d=e[4];let u;e[5]!==r||e[6]!==d?(u=a.jsxs("span",{className:"text-foreground truncate max-w-[200px]",children:[r,d]}),e[5]=r,e[6]=d,e[7]=u):u=e[7];let f;e[8]!==o?(f=y=>{y.stopPropagation(),o()},e[8]=o,e[9]=f):f=e[9];let m;e[10]!==r||e[11]!==s?(m=s("chat.fileAttachment.actions.removeNamed",{name:r}),e[10]=r,e[11]=s,e[12]=m):m=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(z,{name:"close",className:"h-4 w-4 text-muted-foreground"}),e[13]=h):h=e[13];let p;e[14]!==f||e[15]!==m?(p=a.jsx("span",{"data-remove-button":!0,onClick:f,className:"flex items-center justify-center h-5 w-5 flex-shrink-0 hover:bg-[var(--interactive-hover)] rounded-full transition-colors cursor-pointer","aria-label":m,children:h}),e[14]=f,e[15]=m,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==u||e[19]!==p?(b=a.jsxs("button",{type:"button",onClick:_H,className:"flex items-center gap-1.5 text-sm hover:opacity-80 transition-opacity text-left h-5",children:[c,u,p]}),e[17]=c,e[18]=u,e[19]=p,e[20]=b):b=e[20],b});Cp.displayName="FileChip";const Sp=se.memo(t=>{const e=le.c(25),{file:n,onRemove:o}=t,{t:s}=nt(),{displayName:r,extension:i}=xp(n),l=/:\d+(?:-\d+)?$/.test(r);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={borderColor:"var(--syntax-punctuation)"},e[0]=c):c=e[0];const d=n.vscodePath;let u;e[1]!==o?(u=S=>{S.stopPropagation(),o()},e[1]=o,e[2]=u):u=e[2];let f;e[3]!==s?(f=s("chat.fileAttachment.activeEditor.remove"),e[3]=s,e[4]=f):f=e[4];let m;e[5]!==s?(m=s("chat.fileAttachment.activeEditor.remove"),e[5]=s,e[6]=m):m=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(z,{name:"close",className:"h-4 w-4 text-muted-foreground"}),e[7]=h):h=e[7];let p;e[8]!==u||e[9]!==f||e[10]!==m?(p=a.jsx("span",{"data-remove-button":!0,onClick:u,className:"flex items-center justify-center h-5 w-5 flex-shrink-0 hover:bg-[var(--interactive-hover)] rounded-full transition-colors cursor-pointer","aria-label":f,title:m,children:h}),e[8]=u,e[9]=f,e[10]=m,e[11]=p):p=e[11];let b;e[12]!==i||e[13]!==n.filename?(b=a.jsx(Uo,{filePath:n.filename,extension:i,className:"h-4 w-4"}),e[12]=i,e[13]=n.filename,e[14]=b):b=e[14];const y=l?"whitespace-nowrap":"truncate max-w-[200px]";let v;e[15]!==y?(v=N("text-foreground",y),e[15]=y,e[16]=v):v=e[16];let x;e[17]!==r||e[18]!==v?(x=a.jsx("span",{className:v,children:r}),e[17]=r,e[18]=v,e[19]=x):x=e[19];let w;return e[20]!==n.vscodePath||e[21]!==x||e[22]!==p||e[23]!==b?(w=a.jsxs("button",{type:"button",onClick:BH,className:"inline-flex items-center gap-1 text-xs pr-1 rounded-sm border border-solid bg-transparent text-foreground not-italic hover:opacity-90 transition-colors text-left",style:c,title:d,children:[p,b,x]}),e[20]=n.vscodePath,e[21]=x,e[22]=p,e[23]=b,e[24]=w):w=e[24],w});Sp.displayName="VSCodeFileChip";const kp=se.memo(t=>{const e=le.c(13),{onShowPopup:n}=t,o=Nt(DH),s=Nt(TH);let r,i,l,c;if(e[0]!==o||e[1]!==n||e[2]!==s){c=Symbol.for("react.early_return_sentinel");e:{const u=o.filter(PH);if(u.length===0){c=null;break e}const f=u.filter(EH),m=u.filter(HH),h=f.map(IH).filter(jH);r="flex items-center gap-2 flex-wrap",i=f.map((b,y)=>a.jsx(v3,{file:b,onRemove:()=>s(b.id),onShowPopup:n,gallery:h,index:y},b.id));let p;e[7]!==s?(p=b=>a.jsx(Sp,{file:b,onRemove:()=>s(b.id)},b.id),e[7]=s,e[8]=p):p=e[8],l=m.map(p)}e[0]=o,e[1]=n,e[2]=s,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];if(c!==Symbol.for("react.early_return_sentinel"))return c;let d;return e[9]!==r||e[10]!==i||e[11]!==l?(d=a.jsxs("div",{className:r,children:[i,l]}),e[9]=r,e[10]=i,e[11]=l,e[12]=d):d=e[12],d});kp.displayName="AttachedVSCodeFileChips";const Mp=se.memo(t=>{const e=le.c(11),{onShowPopup:n}=t,o=Nt(LH),s=Nt(NH);let r,i,l,c;if(e[0]!==o||e[1]!==n||e[2]!==s){c=Symbol.for("react.early_return_sentinel");e:{const u=o.filter(RH);if(u.length===0){c=null;break e}const f=u.filter(VH),m=u.filter(zH),h=f.map(OH).filter($H);r="pb-4 w-full px-1 space-y-3",i=f.length>0&&a.jsx("div",{className:"flex items-center gap-1.5 flex-wrap",children:f.map((p,b)=>a.jsx(v3,{file:p,onRemove:()=>s(p.id),onShowPopup:n,gallery:h,index:b},p.id))}),l=m.length>0&&a.jsx("div",{className:"flex items-center gap-x-3 gap-y-1 flex-wrap",children:m.map(p=>a.jsx(Cp,{file:p,onRemove:()=>s(p.id)},p.id))})}e[0]=o,e[1]=n,e[2]=s,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];if(c!==Symbol.for("react.early_return_sentinel"))return c;let d;return e[7]!==r||e[8]!==i||e[9]!==l?(d=a.jsxs("div",{className:r,children:[i,l]}),e[7]=r,e[8]=i,e[9]=l,e[10]=d):d=e[10],d});Mp.displayName="AttachedFilesList";const Ap=se.memo(()=>{const t=le.c(41),{t:e}=nt(),n=Nt(ZH),o=Nt(UH),s=Nt(qH),r=Nt(WH);if(!oi().runtime.isVSCode||!n)return null;const{filePath:l,fileName:c,relativePath:d,selection:u,fileSize:f}=n;let m;if(t[0]!==o||t[1]!==l){let T;t[3]!==l?(T=P=>P.source==="vscode"&&P.vscodeSource==="file"&&(P.vscodePath||"")===l,t[3]=l,t[4]=T):T=t[4],m=o.some(T),t[0]=o,t[1]=l,t[2]=m}else m=t[2];const h=m;let p="";u&&(p=u.startLine===u.endLine?`${u.startLine}`:`${u.startLine}-${u.endLine}`);const b=u?`${c}:${p}`:"";let y;t[5]!==o||t[6]!==l||t[7]!==b?(y=!!b&&o.some(T=>T.source==="vscode"&&T.vscodeSource==="selection"&&T.filename===b&&T.vscodePath===l),t[5]=o,t[6]=l,t[7]=b,t[8]=y):y=t[8];const v=y;if(h&&(!u||v))return null;let x;t[9]!==c?(x=c.split(".").pop()||"",t[9]=c,t[10]=x):x=t[10];const w=x,S=c;let C;t[11]!==s||t[12]!==c||t[13]!==l||t[14]!==f?(C=()=>{s(l,c,f)},t[11]=s,t[12]=c,t[13]=l,t[14]=f,t[15]=C):C=t[15];const M=C;let A;t[16]!==r||t[17]!==l||t[18]!==u||t[19]!==b?(A=async()=>{if(!u)return;const T=new Blob([u.text],{type:"text/plain"}),P=new File([T],b,{type:"text/plain"});await r(l,P)},t[16]=r,t[17]=l,t[18]=u,t[19]=b,t[20]=A):A=t[20];const k=A,D=!!u&&!v,_=!D&&!h;if(!D&&!_)return null;let F;t[21]!==S||t[22]!==w||t[23]!==c||t[24]!==k||t[25]!==d||t[26]!==p||t[27]!==D||t[28]!==e?(F=D&&a.jsxs("div",{className:"inline-flex items-center gap-1 text-xs pr-1 rounded-sm italic text-muted-foreground border border-dashed bg-transparent",style:{borderColor:"var(--syntax-punctuation)"},title:d,children:[a.jsx("button",{type:"button",title:e("chat.fileAttachment.activeEditor.pinSelection"),"aria-label":e("chat.fileAttachment.activeEditor.pinSelection"),onClick:()=>{k()},className:"flex items-center justify-center h-5 w-5 flex-shrink-0 hover:bg-[var(--interactive-hover)] rounded-full transition-colors cursor-pointer",children:a.jsx(z,{name:"pushpin-2",className:"h-4 w-4"})}),a.jsx(Uo,{filePath:c,extension:w,className:"h-4 w-4 flex-shrink-0"}),a.jsx("span",{className:"text-xs whitespace-nowrap",children:`${S}:${p}`})]}),t[21]=S,t[22]=w,t[23]=c,t[24]=k,t[25]=d,t[26]=p,t[27]=D,t[28]=e,t[29]=F):F=t[29];let B;t[30]!==S||t[31]!==w||t[32]!==c||t[33]!==M||t[34]!==d||t[35]!==_||t[36]!==e?(B=_&&a.jsxs("div",{className:"inline-flex items-center gap-1 text-xs pr-1 rounded-sm italic text-muted-foreground border border-dashed bg-transparent",style:{borderColor:"var(--syntax-punctuation)"},title:d,children:[a.jsx("button",{type:"button",title:e("chat.fileAttachment.activeEditor.addFile",{name:S}),"aria-label":e("chat.fileAttachment.activeEditor.addFile",{name:S}),onClick:M,className:"flex items-center justify-center h-5 w-5 flex-shrink-0 hover:bg-[var(--interactive-hover)] rounded-full transition-colors cursor-pointer",children:a.jsx(z,{name:"add",className:"h-4 w-4"})}),a.jsx(Uo,{filePath:c,extension:w,className:"h-4 w-4 flex-shrink-0"}),a.jsx("span",{className:"text-xs truncate max-w-[220px]",children:S})]}),t[30]=S,t[31]=w,t[32]=c,t[33]=M,t[34]=d,t[35]=_,t[36]=e,t[37]=B):B=t[37];let j;return t[38]!==F||t[39]!==B?(j=a.jsxs("div",{className:"inline-flex items-center",children:[F,B]}),t[38]=F,t[39]=B,t[40]=j):j=t[40],j});Ap.displayName="ActiveEditorFileSuggestion";const SH="application/vnd.github.issue-link",kH="application/vnd.github.pull-request-link",Rc=t=>t.mime===SH?"issue":t.mime===kH?"pr":null,w3=se.memo(({files:t,onShowPopup:e,compact:n=!1})=>{const o=t.filter(f=>f.type==="file"&&(f.mime||f.url)),s=f=>{if(!f)return"Unnamed file";const h=f.replace(/\\/g,"/").split("/");return h[h.length-1]||f},r=g.useCallback(f=>Rc(f)!==null&&typeof f.filename=="string"&&f.filename.trim().length>0?f.filename.trim():s(f.filename||f.url),[]),i=f=>!f||!Number.isFinite(f)||f<=0?"":f<1024?`${f} B`:f<1024*1024?`${(f/1024).toFixed(1)} KB`:`${(f/(1024*1024)).toFixed(1)} MB`,l=o.filter(f=>f.mime?.startsWith("image/")&&f.url),c=o.filter(f=>!f.mime?.startsWith("image/")),d=g.useMemo(()=>l.flatMap(f=>{if(!f.url)return[];const m=r(f)||"Image";return[{url:f.url,mimeType:f.mime,filename:m,size:f.size}]}),[l,r]),u=g.useCallback(f=>{if(!e)return;const m=d[f];if(!m?.url)return;const h=m.filename||"Image";e({open:!0,title:h,content:"",metadata:{tool:"image-preview",filename:h,mime:m.mimeType,size:m.size},image:{url:m.url,mimeType:m.mimeType,filename:h,size:m.size,gallery:d,index:f}})},[d,e]);return o.length===0?null:n?a.jsxs("div",{className:"space-y-1.5 mt-1.5",children:[c.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1.5",children:c.map((f,m)=>{const h=r(f),p=h.split(".").pop()||"",b=i(f.size),y=Rc(f);return a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:y&&f.url?a.jsxs("button",{type:"button",onClick:()=>{ju(f.url||"")},className:"inline-flex items-center bg-muted/30 border border-border/30 typography-meta gap-1 px-2 py-0.5 rounded-lg text-foreground hover:text-primary transition-colors",children:[y==="pr"?a.jsx(z,{name:"git-pull-request",className:"text-muted-foreground h-3.5 w-3.5"}):a.jsx(z,{name:"github",className:"text-muted-foreground h-3.5 w-3.5"}),a.jsx("div",{className:"overflow-hidden max-w-[220px]",children:a.jsx("span",{className:"truncate block",title:h,children:h})})]}):a.jsxs("div",{className:"inline-flex items-center bg-muted/30 border border-border/30 typography-meta gap-1 px-2 py-0.5 rounded-lg",children:[f.mime?.includes("pdf")?a.jsx(z,{name:"file-pdf",className:"text-muted-foreground h-3.5 w-3.5"}):a.jsx(Uo,{filePath:h,extension:p,className:"text-muted-foreground h-3.5 w-3.5"}),a.jsx("div",{className:"overflow-hidden max-w-[140px]",children:a.jsx("span",{className:"truncate block",title:h,children:h})})]})}),a.jsx(Ot,{children:a.jsxs("p",{children:[h,b?` (${b})`:""]})})]},`file-${f.url||f.filename||m}`)})}),l.length>0&&a.jsx("div",{className:"overflow-x-auto -mx-1 px-1 py-0.5 scrollbar-thin",children:a.jsx("div",{className:"flex snap-x snap-mandatory gap-2",children:l.map((f,m)=>{const h=r(f)||"Image";return a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsxs("button",{type:"button",onClick:()=>u(m),className:"relative flex-none border border-border/40 bg-muted/10 overflow-hidden snap-start h-12 w-12 sm:h-14 sm:w-14 md:h-16 md:w-16 rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-primary","aria-label":h,children:[f.url?a.jsx("img",{src:f.url,alt:h,className:"h-full w-full object-cover",loading:"lazy",onError:p=>{const b=p.target;b.style.visibility="hidden"}}):a.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted/30 text-muted-foreground",children:a.jsx(z,{name:"file-image",className:"h-6 w-6"})}),a.jsx("span",{className:"sr-only",children:h})]})}),a.jsx(Ot,{side:"top",sideOffset:6,className:"typography-meta px-2 py-1",children:h})]},`img-${f.url||f.filename||m}`)})})})]}):a.jsx("div",{className:N("grid gap-2",n?"grid-cols-1":"grid-cols-1 sm:grid-cols-2"),children:o.map((f,m)=>{const h=r(f),p=f.mime?.startsWith("image/"),b=i(f.size),y=Rc(f);return p&&f.url?a.jsxs("div",{className:"relative aspect-video rounded-lg border border-border/40 bg-muted/10 overflow-hidden group",children:[a.jsx("img",{src:f.url,alt:h,className:"h-full w-full object-cover",loading:"lazy"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity"}),a.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-2 text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[a.jsx("p",{className:"text-xs font-medium truncate",children:h}),b&&a.jsx("p",{className:"text-xs opacity-80",children:b})]})]},f.url||`${h}-${m}`):y&&f.url?a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsxs("button",{type:"button",onClick:()=>{ju(f.url||"")},className:N("flex items-center gap-2 p-2 rounded-lg border border-border/40 bg-muted/10 hover:bg-muted/20 transition-colors text-left",n?"text-xs":"text-sm"),children:[a.jsx("div",{className:"flex-shrink-0",children:y==="pr"?a.jsx(z,{name:"git-pull-request",className:N("text-muted-foreground",n?"h-3.5 w-3.5":"h-4 w-4")}):a.jsx(z,{name:"github",className:N("text-muted-foreground",n?"h-3.5 w-3.5":"h-4 w-4")})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium truncate",children:h}),b&&a.jsx("p",{className:"text-xs text-muted-foreground",children:b})]})]})}),a.jsx(Ot,{children:a.jsxs("p",{children:[h,b?` (${b})`:""]})})]},f.url||`${h}-${m}`):a.jsxs($t,{children:[a.jsx(Zt,{asChild:!0,children:a.jsxs("button",{type:"button",onClick:()=>{e&&f.url&&e({open:!0,title:h,content:"",image:{url:f.url,mimeType:f.mime,filename:h}})},className:N("flex items-center gap-2 p-2 rounded-lg border border-border/40 bg-muted/10 hover:bg-muted/20 transition-colors text-left",n?"text-xs":"text-sm"),children:[a.jsx("div",{className:"flex-shrink-0",children:f.mime?.startsWith("image/")?a.jsx(z,{name:"file-image",className:N("text-muted-foreground",n?"h-3.5 w-3.5":"h-4 w-4")}):f.mime?.includes("pdf")?a.jsx(z,{name:"file-pdf",className:N("text-muted-foreground",n?"h-3.5 w-3.5":"h-4 w-4")}):a.jsx(z,{name:"file",className:N("text-muted-foreground",n?"h-3.5 w-3.5":"h-4 w-4")})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium truncate",children:h}),b&&a.jsx("p",{className:"text-xs text-muted-foreground",children:b})]})]})}),a.jsx(Ot,{children:a.jsxs("p",{children:[h,b?` (${b})`:""]})})]},f.url||`${h}-${m}`)})})});w3.displayName="MessageFilesDisplay";const MH=se.memo(t=>{const e=le.c(16),{urls:n,caption:o,onShowPopup:s}=t;if(n.length===0)return null;let r;e[0]!==n.length?(r=()=>n.length===1?"grid-cols-1":n.length===2||n.length<=4?"grid-cols-2":"grid-cols-3",e[0]=n.length,e[1]=r):r=e[1];const i=r;let l;e[2]!==i?(l=N("grid gap-2",i()),e[2]=i,e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==s||e[6]!==n?(c=n.map((m,h)=>a.jsxs("button",{type:"button",onClick:()=>s?.({open:!0,title:o||`Image ${h+1} of ${n.length}`,content:"",image:{url:m,gallery:n.map(GH),index:h}}),className:"relative aspect-square rounded-lg border border-border/40 bg-muted/10 overflow-hidden group",children:[a.jsx("img",{src:m,alt:o||`Image ${h+1}`,className:"h-full w-full object-cover transition-transform group-hover:scale-105",loading:"lazy"}),a.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors"})]},m)),e[4]=o,e[5]=s,e[6]=n,e[7]=c):c=e[7];let d;e[8]!==l||e[9]!==c?(d=a.jsx("div",{className:l,children:c}),e[8]=l,e[9]=c,e[10]=d):d=e[10];let u;e[11]!==o?(u=o&&a.jsx("p",{className:"text-sm text-muted-foreground italic",children:o}),e[11]=o,e[12]=u):u=e[12];let f;return e[13]!==d||e[14]!==u?(f=a.jsxs("div",{className:"space-y-2",children:[d,u]}),e[13]=d,e[14]=u,e[15]=f):f=e[15],f});MH.displayName="ImageGallery";function AH(t){const n=t.replace(/\\/g,"/").split("/");return n[n.length-1]||t}function FH(t){const e=t.split(".");return e.length>1?e[e.length-1].toLowerCase():""}function _H(t){t.target.closest("[data-remove-button]")}function BH(t){t.target.closest("[data-remove-button]")}function DH(t){return t.attachedFiles}function TH(t){return t.removeAttachedFile}function PH(t){return t.source==="vscode"}function EH(t){return t.mimeType.startsWith("image/")}function HH(t){return!t.mimeType.startsWith("image/")}function IH(t){return{url:t.dataUrl||t.serverPath||"",mimeType:t.mimeType,filename:t.filename,size:t.size}}function jH(t){return t.url}function LH(t){return t.attachedFiles}function NH(t){return t.removeAttachedFile}function RH(t){return t.source!=="server"&&t.source!=="vscode"}function VH(t){return t.mimeType.startsWith("image/")}function zH(t){return!t.mimeType.startsWith("image/")}function OH(t){return{url:t.dataUrl||t.serverPath||"",mimeType:t.mimeType,filename:t.filename,size:t.size}}function $H(t){return t.url}function ZH(t){return t.activeEditorFile}function UH(t){return t.attachedFiles}function qH(t){return t.addVSCodeFileAttachment}function WH(t){return t.addVSCodeSelectionAttachment}function GH(t){return{url:t}}const zu="openchamber:chunk-import-reload",KH=250,YH=3e4,JH=[/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 Fp(t){if(t instanceof Error)return`${t.name}
6980
6980
  ${t.message}
6981
- ${t.stack??""}`;if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function Ou(t){const e=Fp(t);return JH.some(n=>n.test(e))}function QH(t){return`1.12.2:${Fp(t).slice(0,500)}`}function XH(t){if(typeof window>"u")return;const e=Date.now(),n=QH(t);let o=null;try{const r=window.sessionStorage.getItem(zu);if(r)try{o=JSON.parse(r)}catch{o=null}}catch{return}const s=typeof o?.timestamp=="number"?o.timestamp:0;if(!(o?.signature===n&&e-s<YH)){try{window.sessionStorage.setItem(zu,JSON.stringify({signature:n,timestamp:e}))}catch{return}window.setTimeout(()=>{window.location.reload()},0)}}async function eI(t,e={}){const n=e.retries??1;let o;for(let s=0;s<=n;s+=1)try{return await t()}catch(r){if(o=r,!Ou(r)||s>=n)break;await new Promise(i=>setTimeout(i,KH*(s+1)))}throw Ou(o)&&XH(o),o}const x3=t=>se.lazy(()=>eI(t)),tI=x3(()=>dn(()=>import("./MarkdownRendererImpl-2INOOMmV.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.MarkdownRenderer}))),nI=x3(()=>dn(()=>import("./MarkdownRendererImpl-2INOOMmV.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.SimpleMarkdownRenderer}))),_p=a.jsx("div",{className:"break-words w-full min-w-0"}),Bp=t=>{const e=le.c(2);let n;return e[0]!==t?(n=a.jsx(g.Suspense,{fallback:_p,children:a.jsx(tI,{...t})}),e[0]=t,e[1]=n):n=e[1],n},si=t=>{const e=le.c(2);let n;return e[0]!==t?(n=a.jsx(g.Suspense,{fallback:_p,children:a.jsx(nI,{...t})}),e[0]=t,e[1]=n):n=e[1],n},oI=t=>{let e=t.replace(/^<file>\s*\n?/,"").replace(/\n?<\/file>\s*$/,"");return e=e.replace(/^\s*\d{5}\|\s?/gm,""),e.trim()},sI=t=>t?t.includes("<diagnostics")||t.includes("<file_diagnostics>")||t.includes("LSP errors detected")||t.includes("This file has errors"):!1,rI=t=>t?t.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,"").replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,"").replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,"").replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,"").trim():"",Xd=(t,e)=>!t||typeof t!="object"?String(t):sH(t,e||""),F2=t=>{if(typeof t=="string"){const e=t.trim();return e.length>0?e:void 0}if(t&&typeof t=="object"){const e=t.patch;if(typeof e=="string"){const n=e.trim();return n.length>0?n:void 0}}},iI=t=>{if(!t||typeof t!="object")return;const e=F2(t.patch)??F2(t.diff);if(e)return e;const n=Array.isArray(t.files)?t.files:[];for(const o of n){if(!o||typeof o!="object")continue;const s=F2(o.patch)??F2(o.diff);if(s)return s}},Dp=t=>{if(!t||typeof t!="string")return{data:null,isJson:!1};const e=t.trim();if(!e.startsWith("{")&&!e.startsWith("["))return{data:null,isJson:!1};if(!e.endsWith("}")&&!e.endsWith("]"))return{data:null,isJson:!1};if(e.length<2)return{data:null,isJson:!1};try{const n=JSON.parse(e);return n!==null&&typeof n=="object"?{data:n,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},Tp=(t,e,n)=>{let o=oI(t);if((e==="edit"||e==="multiedit"||e==="write"||e==="apply_patch")&&sI(o)&&(o=rI(o)),(e==="edit"||e==="multiedit"||e==="apply_patch")&&o.trim().length===0){const s=iI(n);if(s)return s}return o},aI=t=>{const n=t.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??"unknown",i=(t.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??t).replace(/\r\n/g,`
6981
+ ${t.stack??""}`;if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function Ou(t){const e=Fp(t);return JH.some(n=>n.test(e))}function QH(t){return`1.12.3:${Fp(t).slice(0,500)}`}function XH(t){if(typeof window>"u")return;const e=Date.now(),n=QH(t);let o=null;try{const r=window.sessionStorage.getItem(zu);if(r)try{o=JSON.parse(r)}catch{o=null}}catch{return}const s=typeof o?.timestamp=="number"?o.timestamp:0;if(!(o?.signature===n&&e-s<YH)){try{window.sessionStorage.setItem(zu,JSON.stringify({signature:n,timestamp:e}))}catch{return}window.setTimeout(()=>{window.location.reload()},0)}}async function eI(t,e={}){const n=e.retries??1;let o;for(let s=0;s<=n;s+=1)try{return await t()}catch(r){if(o=r,!Ou(r)||s>=n)break;await new Promise(i=>setTimeout(i,KH*(s+1)))}throw Ou(o)&&XH(o),o}const x3=t=>se.lazy(()=>eI(t)),tI=x3(()=>dn(()=>import("./MarkdownRendererImpl-C2snGm6y.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.MarkdownRenderer}))),nI=x3(()=>dn(()=>import("./MarkdownRendererImpl-C2snGm6y.js"),__vite__mapDeps([2,0,1,3,4])).then(t=>({default:t.SimpleMarkdownRenderer}))),_p=a.jsx("div",{className:"break-words w-full min-w-0"}),Bp=t=>{const e=le.c(2);let n;return e[0]!==t?(n=a.jsx(g.Suspense,{fallback:_p,children:a.jsx(tI,{...t})}),e[0]=t,e[1]=n):n=e[1],n},si=t=>{const e=le.c(2);let n;return e[0]!==t?(n=a.jsx(g.Suspense,{fallback:_p,children:a.jsx(nI,{...t})}),e[0]=t,e[1]=n):n=e[1],n},oI=t=>{let e=t.replace(/^<file>\s*\n?/,"").replace(/\n?<\/file>\s*$/,"");return e=e.replace(/^\s*\d{5}\|\s?/gm,""),e.trim()},sI=t=>t?t.includes("<diagnostics")||t.includes("<file_diagnostics>")||t.includes("LSP errors detected")||t.includes("This file has errors"):!1,rI=t=>t?t.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,"").replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,"").replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,"").replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,"").trim():"",Xd=(t,e)=>!t||typeof t!="object"?String(t):sH(t,e||""),F2=t=>{if(typeof t=="string"){const e=t.trim();return e.length>0?e:void 0}if(t&&typeof t=="object"){const e=t.patch;if(typeof e=="string"){const n=e.trim();return n.length>0?n:void 0}}},iI=t=>{if(!t||typeof t!="object")return;const e=F2(t.patch)??F2(t.diff);if(e)return e;const n=Array.isArray(t.files)?t.files:[];for(const o of n){if(!o||typeof o!="object")continue;const s=F2(o.patch)??F2(o.diff);if(s)return s}},Dp=t=>{if(!t||typeof t!="string")return{data:null,isJson:!1};const e=t.trim();if(!e.startsWith("{")&&!e.startsWith("["))return{data:null,isJson:!1};if(!e.endsWith("}")&&!e.endsWith("]"))return{data:null,isJson:!1};if(e.length<2)return{data:null,isJson:!1};try{const n=JSON.parse(e);return n!==null&&typeof n=="object"?{data:n,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},Tp=(t,e,n)=>{let o=oI(t);if((e==="edit"||e==="multiedit"||e==="write"||e==="apply_patch")&&sI(o)&&(o=rI(o)),(e==="edit"||e==="multiedit"||e==="apply_patch")&&o.trim().length===0){const s=iI(n);if(s)return s}return o},aI=t=>{const n=t.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??"unknown",i=(t.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??t).replace(/\r\n/g,`
6982
6982
  `).split(`
6983
6983
  `),l=u=>/\(\s*File has more lines\..*offset.*\)/i.test(u.trim()),d=i.map(u=>{const f=u.trim(),m=f.startsWith("(")&&f.endsWith(")")||l(f);if(n!=="directory"){const h=u.match(/^(\d+):\s?(.*)$/);if(h){const p=h[2],b=p.trim(),y=b.startsWith("(")&&b.endsWith(")")||l(b);return{lineNumber:y?null:Number(h[1]),text:p,isInfo:y}}}return{lineNumber:null,text:u,isInfo:m}}).filter((u,f,m)=>{if(u.text.trim().length>0)return!0;const h=m[f-1],p=m[f+1],b=!!(h?.isInfo||p?.isInfo),y=u.lineNumber!==null;return!(b&&y)});return{type:n,lines:d}},lI=(t,e)=>{try{const n=t.trim().split(`
6984
6984
  `).filter(Boolean);if(n.length===0)return null;const o=[];return n.forEach(s=>{const r=s.match(/^(\s*)(.+)$/);if(r){const[,i,l]=r,c=Math.floor(i.length/2),d=!l.endsWith("/");o.push({name:l.replace(/\/$/,""),depth:c,isFile:d})}}),a.jsx("div",{className:N("w-full min-w-0 font-mono space-y-0.5",e?.unstyled?null:"p-3 bg-muted/20 rounded-xl border border-border/30"),style:Ps.tool.popup,children:o.map((s,r)=>a.jsx("div",{className:"min-w-0",style:{paddingLeft:`${s.depth*20}px`},children:s.isFile?a.jsx("span",{className:"text-foreground/90 block truncate",children:s.name}):a.jsxs("span",{className:"font-semibold text-foreground block truncate",children:[s.name,"/"]})},r))})}catch{return null}},cI={backgroundColor:"var(--status-info)",opacity:.6},dI=(t,e,n)=>{try{const o=t.trim().split(`
@@ -7110,5 +7110,5 @@ ${this.state.error.stack}`:"",s=this.state.errorInfo?.componentStack?`
7110
7110
 
7111
7111
  ${e.componentStackLabel}${this.state.errorInfo.componentStack}`:"",r=`${n}${o}${s}`;(await Zo(r)).ok&&(this.setState({copied:!0}),window.setTimeout(()=>{this.setState(l=>l.copied?{copied:!1}:null)},1500))};render(){const{strings:e}=this.props;return this.state.hasError?this.props.fallback?this.props.fallback:a.jsx("div",{className:"p-4 flex items-center justify-center min-h-screen",children:a.jsxs(cK,{className:"w-full max-w-md",children:[a.jsx(dK,{className:"text-center",children:a.jsxs(uK,{className:"flex items-center justify-center gap-2 text-destructive",children:[a.jsx(z,{name:"error-warning",className:"h-5 w-5"}),e.title]})}),a.jsxs(fK,{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-muted-foreground text-center",children:e.description}),this.state.error&&a.jsxs("details",{className:"text-xs font-mono bg-muted p-3 rounded",children:[a.jsx("summary",{className:"cursor-pointer hover:bg-interactive-hover/80",children:e.detailsSummary}),a.jsxs("pre",{className:"mt-2 max-h-48 overflow-auto",children:[this.state.error.toString(),this.state.errorInfo?.componentStack?`
7112
7112
 
7113
- ${e.componentStackLabel}${this.state.errorInfo.componentStack}`:""]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(kt,{onClick:this.handleReset,variant:"outline",className:"flex-1",children:[a.jsx(z,{name:"restart",className:"h-4 w-4 mr-2"}),e.tryAgain]}),a.jsx(kt,{onClick:this.handleCopy,variant:"outline",className:"flex-1",children:this.state.copied?e.copied:e.copy})]})]})]})}):this.props.children}}const dX=t=>{const e=le.c(29),{children:n,fallback:o}=t,{t:s}=nt();let r;e[0]!==s?(r=s("errorBoundary.state.unknownError"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==s?(i=s("errorBoundary.title"),e[2]=s,e[3]=i):i=e[3];let l;e[4]!==s?(l=s("errorBoundary.description"),e[4]=s,e[5]=l):l=e[5];let c;e[6]!==s?(c=s("errorBoundary.actions.errorDetails"),e[6]=s,e[7]=c):c=e[7];let d;e[8]!==s?(d=s("errorBoundary.state.componentStackLabel"),e[8]=s,e[9]=d):d=e[9];let u;e[10]!==s?(u=s("errorBoundary.actions.tryAgain"),e[10]=s,e[11]=u):u=e[11];let f;e[12]!==s?(f=s("errorBoundary.actions.copied"),e[12]=s,e[13]=f):f=e[13];let m;e[14]!==s?(m=s("errorBoundary.actions.copy"),e[14]=s,e[15]=m):m=e[15];let h;e[16]!==r||e[17]!==i||e[18]!==l||e[19]!==c||e[20]!==d||e[21]!==u||e[22]!==f||e[23]!==m?(h={unknownError:r,title:i,description:l,detailsSummary:c,componentStackLabel:d,tryAgain:u,copied:f,copy:m},e[16]=r,e[17]=i,e[18]=l,e[19]=c,e[20]=d,e[21]=u,e[22]=f,e[23]=m,e[24]=h):h=e[24];const p=h;let b;return e[25]!==n||e[26]!==o||e[27]!==p?(b=a.jsx(mK,{fallback:o,strings:p,children:n}),e[25]=n,e[26]=o,e[27]=p,e[28]=b):b=e[28],b},hK=["standalone","minimal-ui","fullscreen","window-controls-overlay"],vf="openchamber.pwaRecentSessions",pK=t=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(`(display-mode: ${t})`).matches,uX=()=>typeof window>"u"?"browser":typeof document<"u"&&document.referrer.startsWith("android-app://")?"twa":window.navigator.standalone?"standalone":hK.find(n=>pK(n))??"browser",gK=1440*60*1e3,Xg=5,wf=1440*60*1e3,nd=t=>t.time?.updated??t.time?.created??0,xf=({sessions:t,currentSessionId:e,cutoffDays:n,keepRecent:o=Xg,now:s=Date.now()})=>{if(!Array.isArray(t)||n<=0)return[];const r=s-n*gK,i=[...t].sort((c,d)=>nd(d)-nd(c)),l=new Set(i.slice(0,o).map(c=>c.id));return i.filter(c=>{if(!c?.id||l.has(c.id)||c.id===e||c.share)return!1;const d=nd(c);return d?d<r:!1}).map(c=>c.id)},bK=t=>{const e=typeof t=="object"?t:void 0,n=e?.autoRun!==!1,o=typeof t=="boolean"?t:e?.enabled??!0,s=He(x=>x.currentSessionId),r=He(x=>x.isLoading),i=_n(x=>x.activeSessions),l=_n(x=>x.hasLoaded),c=ke(x=>x.autoDeleteEnabled),d=ke(x=>x.autoDeleteAfterDays),u=ke(x=>x.sessionRetentionAction),f=ke(x=>x.autoDeleteLastRunAt),m=ke(x=>x.setAutoDeleteLastRunAt),[h,p]=g.useState(!1),b=g.useRef(!1);g.useEffect(()=>{_d(hr())},[]);const y=g.useMemo(()=>d<=0?[]:xf({sessions:i,currentSessionId:s,cutoffDays:d}),[d,s,i]),v=g.useCallback(async({force:x=!1}={})=>{if(b.current)return{completedIds:[],failedIds:[],action:u,skippedReason:"running"};if((!c||d<=0)&&!x)return{completedIds:[],failedIds:[],action:u,skippedReason:"disabled"};if(r)return{completedIds:[],failedIds:[],action:u,skippedReason:"loading"};const w=Date.now();if(!x&&f&&w-f<wf)return{completedIds:[],failedIds:[],action:u,skippedReason:"cooldown"};const{activeSessions:S}=await _d(hr());if(S.length===0)return{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};const C=xf({sessions:S,currentSessionId:s,cutoffDays:d,now:w});if(C.length===0)return m(w),{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};b.current=!0,p(!0);try{const M=new Map(S.map(D=>[D.id,D])),A=[],k=[];for(const D of C){const _=M.get(D),F=_?B1(_):null;if(!F){k.push(D);continue}try{u==="archive"?await Je.updateSession(D,{time:{archived:Date.now()}},F):await Je.deleteSession(D,F),A.push(D)}catch{k.push(D)}}return u==="archive"?_n.getState().archiveSessions(A):_n.getState().removeSessions(A),{completedIds:A,failedIds:k,action:u}}finally{b.current=!1,p(!1),m(Date.now())}},[d,c,f,s,r,u,m]);return g.useEffect(()=>{if(!o||!n||!c||d<=0||r||!l||i.length===0)return;const x=Date.now();f&&x-f<wf||v()},[d,c,f,n,o,l,i.length,r,v]),{candidates:y,isRunning:h,runCleanup:v,keepRecentCount:Xg,action:u}},yK=40,vK=20*1024*1024,Ns=new Map;let J0=0;function wK(t){return t.length*2}function eb(t,e){const n=Ns.get(t);n!==void 0&&(J0-=n),Ns.delete(t),Ns.set(t,e),J0+=e}function tb(t,e){const n=Ns.get(t);n===void 0&&e===void 0||eb(t,n??0)}function nb(t){const e=Ns.get(t);e!==void 0&&(Ns.delete(t),J0-=e)}function xK(t,e){const n=t??new Set;for(;Ns.size>yK||J0>vK;){const o=Ns.keys().next().value;if(!o)return;if(n.has(o)){if(tb(o),Ns.size<=n.size)return;continue}nb(o),e(o)}}function CK(t,e){eb(t,e)}function SK(t){nb(t)}function kK(t,e){tb(t,e)}function MK(t){const e=new Map,n=f=>{e.delete(f),SK(f)},o=f=>{const m=f.endsWith("/")?f:`${f}/`;for(const h of e.keys())(h===f||h.startsWith(m))&&n(h)},s=(f,m)=>m.isFile?f.mtimeMs!==void 0&&m.mtimeMs!==void 0?f.mtimeMs===m.mtimeMs&&f.size===m.size:f.size===m.size:!1,r=(f,m,h)=>{const p=wK(m.content);return e.set(f,{...m,size:h?.isFile?h.size:void 0,mtimeMs:h?.isFile?h.mtimeMs:void 0}),CK(f,p),xK(new Set,y=>{e.delete(y)}),m},i=async(f,m)=>{const h=await t.statFile?.(f,m).catch(()=>null),p=await t.readFile(f,m),b=await t.statFile?.(f,m).catch(()=>null);if(h&&b&&h.isFile&&b.isFile){if(h.size===b.size&&h.mtimeMs===b.mtimeMs)return r(f,p,b);const y=await t.statFile?.(f,m).catch(()=>null),v=await t.readFile(f,m),x=await t.statFile?.(f,m).catch(()=>null);return y&&x&&y.isFile&&x.isFile&&y.size===x.size&&y.mtimeMs===x.mtimeMs,r(f,v,x)}return r(f,p,b??h)},l=t.readFile?async(f,m)=>{if(m?.allowOutsideWorkspace)return i(f,m);const h=e.get(f);if(h){if(t.statFile){const p=await t.statFile(f).catch(()=>(n(f),null));if(!p||!s(h,p))return n(f),i(f)}return kK(f),{content:h.content,path:h.path}}return i(f)}:void 0,c=t.writeFile?async(f,m)=>(n(f),t.writeFile(f,m)):void 0,d=t.delete?async f=>(o(f),t.delete(f)):void 0,u=t.rename?async(f,m)=>(o(f),o(m),t.rename(f,m)):void 0;return{...t,readFile:l,writeFile:c,delete:d,rename:u}}function fX(t){const e=le.c(8),{apis:n,children:o}=t;let s;e[0]!==n.files?(s=MK(n.files),e[0]=n.files,e[1]=s):s=e[1];let r;e[2]!==n||e[3]!==s?(r={...n,files:s},e[2]=n,e[3]=s,e[4]=r):r=e[4];const i=r;let l;return e[5]!==i||e[6]!==o?(l=a.jsx(ni.Provider,{value:i,children:o}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const AK=2e4,ob=()=>typeof document>"u"||document.visibilityState==="visible"&&document.hasFocus()?"visible":"hidden",Y3=t=>{if(!Q0())return;const e=yo();e?.push?.setVisibility&&e.push.setVisibility({visible:t})},mX=t=>{const e=le.c(3),n=t?.enabled??!0;let o,s;e[0]!==n?(o=()=>{if(!n||!Q0()||typeof document>"u")return;const r=FK,i=_K,l=BK;r();const c=window.setInterval(i,AK);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=[n],e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]),g.useEffect(o,s)};function FK(){Y3(ob()==="visible")}function _K(){ob()==="visible"&&Y3(!0)}function BK(){Y3(!1)}const DK="OpenChamber",Cf=t=>t.replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()),TK=t=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return n[n.length-1]??""},PK=(t,e)=>[t,e,DK].filter(o=>typeof o=="string"&&o.trim().length>0).join(" | "),hX=()=>{const t=tn(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 Cf(r);const i=TK(t.path);return i?Cf(i):null},[t]),[n,o]=g.useState(null);g.useEffect(()=>{if(typeof window>"u"||!Et()){o(null);return}let r=!1;const i=async()=>{try{if(Do()){r||o(null);return}const c=window.__OPENCHAMBER_LOCAL_ORIGIN__||window.location.origin,d=wr();if(d&&Ni(d,c)){r||o(null);return}const f=(await u3()).hosts.find(h=>d?Ni(d,dr(h)):!1),m=f?.label?.trim()?uo(f.label.trim()):"Instance";r||o(m)}catch{r||o("Instance")}};i();const l=()=>{i()};return window.addEventListener("focus",l),()=>{r=!0,window.removeEventListener("focus",l)}},[]);const s=g.useMemo(()=>PK(e,n),[e,n]);g.useEffect(()=>{if(typeof document<"u"&&(document.title=s),!Et())return;(async()=>{try{if(typeof navigator<"u"&&/Macintosh|Mac OS X/.test(navigator.userAgent||""))return;await JP(s)}catch{return}})()},[s])},EK=()=>{const e=He.getState().currentSessionId;if(!e)return"";const o=Li().find(s=>s.id===e);return typeof o?.directory=="string"?o.directory:""},HK=async(t,e=6e3)=>{const n=new AbortController,o=setTimeout(()=>n.abort(),e),s=Date.now();try{const r=await We(t,{method:"GET",headers:{Accept:"application/json"},signal:n.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=n.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(o)}},IK=t=>{if(!t||!Number.isFinite(t))return"(n/a)";try{return new Date(t).toISOString()}catch{return"(invalid)"}},jK=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},LK=t=>!!t&&typeof t=="object"&&!Array.isArray(t),nr=(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,Sf=(t,e,n)=>t==="node-shebang"||t==="node-launcher"?e?`node (${e})`:"node":t==="bun-shebang"?n?`bun (${n})`:"bun":t||"direct executable",NK=async()=>{const t=new Date,e="1.12.2",n=typeof navigator<"u"?navigator.userAgent:"(no navigator)",o=EK(),s=ke.getState().eventStreamStatus,r=typeof window<"u"?window.location.origin:"",i=B4(),l=i.health(),c=i.api("/api/"),d=await(async()=>{if(!l)return null;const v=new AbortController,x=setTimeout(()=>v.abort(),5e3);try{const w=await We(l,{method:"GET",headers:{Accept:"application/json"},signal:v.signal});if(!w.ok)return null;const S=await w.json().catch(()=>null);return!S||typeof S!="object"||Array.isArray(S)?null:S}catch{return null}finally{clearTimeout(x)}})(),u=await(async()=>{if(!c)return null;const v=new AbortController,x=setTimeout(()=>v.abort(),7e3);try{const w=await We(i.api("/api/config/opencode-resolution"),{method:"GET",headers:{Accept:"application/json"},signal:v.signal}),S=w.headers.get("content-type")||"(none)";if(!w.ok)return{data:null,status:w.status,error:`http ${w.status} content-type=${S}`};const C=await w.text();let M=null;try{M=JSON.parse(C)}catch{const A=C.replace(/\s+/g," ").slice(0,120);return{data:null,status:w.status,error:`invalid json content-type=${S} body=${A||"(empty)"}`}}return!M||typeof M!="object"||Array.isArray(M)?{data:null,status:w.status,error:`invalid json-shape content-type=${S}`}:{data:M,status:w.status,error:null}}catch(w){return{data:null,status:null,error:w instanceof Error?w.message:String(w)}}finally{clearTimeout(x)}})()||{data:null,error:null},f=(v,x=!0)=>{if(!c)return null;const w=new URL(v.replace(/^\/+/,""),c);return x&&o&&w.searchParams.set("directory",o),w.toString()},m=[{label:"health",path:"/api/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}],h=c?await Promise.all(m.map(async v=>{const x=f(v.path,v.includeDirectory!==!1);if(!x)return{label:v.label,url:"(none)",result:null};const w=await HK(x,typeof v.timeoutMs=="number"?v.timeoutMs:void 0);return{label:v.label,url:x,result:w}})):[],p=[];p.push(`Time: ${t.toISOString()}`),p.push(`OpenChamber version: ${e}`),p.push(`Runtime: ${r||"(unknown)"} (api=${c||"(unknown)"})`),p.push(`OpenCode SDK base: ${Je.getBaseUrl()}`),p.push(`Event stream: ${s}`),p.push(`Directory: ${o||"(none)"}`),p.push(`Platform: ${n}`);const b=jK(d?.openCodePort);if(p.push(`OpenCode runtime port: ${b??"(unknown)"}`),typeof d?.openCodeRunning=="boolean"&&p.push(`OpenCode runtime running: ${d.openCodeRunning?"yes":"no"}`),typeof d?.openCodeSecureConnection=="boolean"&&p.push(`Secure OpenCode connection: ${d.openCodeSecureConnection?"true":"false"}`),typeof d?.openCodeAuthSource=="string"&&d.openCodeAuthSource.trim()&&p.push(`OpenCode auth source: ${d.openCodeAuthSource}`),typeof window<"u"){const v=window.__OPENCHAMBER_MACOS_MAJOR__;typeof v=="number"&&Number.isFinite(v)&&v>0&&p.push(`macOS major: ${v}`)}if(/Mac OS X|Macintosh/.test(n)){p.push(""),p.push("OpenCode CLI resolution:");const v=LK(d?.lastOpenCodeLaunchDiagnostics)?d.lastOpenCodeLaunchDiagnostics:null,x=v&&Array.isArray(v.args)?v.args.filter(P=>typeof P=="string"):[],w=u.data,S=w&&typeof w.configured=="string"?w.configured:null,C=w&&typeof w.resolved=="string"?w.resolved:d&&typeof d.opencodeBinaryResolved=="string"?d.opencodeBinaryResolved:"",M=w&&typeof w.resolvedDir=="string"?w.resolvedDir:"",A=w&&typeof w.source=="string"?w.source:d&&typeof d.opencodeBinarySource=="string"?d.opencodeBinarySource:"",k=w&&typeof w.launchBinary=="string"?w.launchBinary:d&&typeof d.opencodeLaunchBinary=="string"?d.opencodeLaunchBinary:"",D=w&&typeof w.launchWrapperType=="string"?w.launchWrapperType:d&&typeof d.opencodeLaunchWrapperType=="string"?d.opencodeLaunchWrapperType:"",_=w&&Array.isArray(w.launchArgs)?w.launchArgs.filter(P=>typeof P=="string"):d&&Array.isArray(d.opencodeLaunchArgs)?d.opencodeLaunchArgs.filter(P=>typeof P=="string"):[],F=w&&typeof w.node=="string"?w.node:d&&typeof d.nodeBinaryResolved=="string"?d.nodeBinaryResolved:"",B=w&&typeof w.bun=="string"?w.bun:d&&typeof d.bunBinaryResolved=="string"?d.bunBinaryResolved:"",j=w&&typeof w.detectedNow=="string"?w.detectedNow:"",T=w&&typeof w.detectedSourceNow=="string"?w.detectedSourceNow:"";if(S!==null&&p.push(`- configured: ${S.trim().length===0?"(cleared)":S}`),C){const P=M||(C.includes("/")?C.split("/").slice(0,-1).join("/")||"/":"");p.push(`- opencode: ${C}${P?` (dir=${P})`:""}`)}else p.push("- opencode: (n/a)");p.push(`- source: ${A||"(n/a)"}`),j&&(p.push(`- detected-now: ${j}`),p.push(`- detected-source: ${T||"(n/a)"}`)),v?(p.push(`- launched-at: ${nr(v.launchedAt)}`),p.push(`- launch: ${nr(v.binary)} ${x.join(" ")}`.trim()),p.push(`- cwd: ${nr(v.cwd)}`),p.push(`- wrapper: ${nr(v.wrapperType)}`),p.push(`- runtime: ${Sf(nr(v.wrapperType,""),F,B)}`),p.push(`- PATH entries: ${nr(v.pathEntryCount,"(unknown)")}`),p.push(`- shell env: ${nr(v.hasShellEnv,"(unknown)")} (${nr(v.shellEnvKeysCount,"?")} keys)`)):(p.push(`- launch-binary: ${k||"(n/a)"}`),p.push(`- launch-wrapper: ${D||"(n/a)"}`),p.push(`- launch-args: ${_.length?_.join(" "):"(none)"}`),p.push(`- runtime: ${Sf(D||"",F,B)}`)),!w&&u.error&&p.push(`- resolution-endpoint: ${u.error}`)}if(p.push(""),h.length){p.push("OpenCode API probes:");for(const v of h){if(!v.result){p.push(`- ${v.label}: (no url)`);continue}const{ok:x,status:w,elapsedMs:S,summary:C}=v.result,M=x?"":` url=${v.url}`;p.push(`- ${v.label}: ${x?"ok":"fail"} status=${w} time=${S}ms ${C}${M}`)}}else p.push("OpenCode API probes: (skipped)");return p.push(""),p.push(`Generated: ${IK(Date.now())}`),p.join(`
7113
+ ${e.componentStackLabel}${this.state.errorInfo.componentStack}`:""]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(kt,{onClick:this.handleReset,variant:"outline",className:"flex-1",children:[a.jsx(z,{name:"restart",className:"h-4 w-4 mr-2"}),e.tryAgain]}),a.jsx(kt,{onClick:this.handleCopy,variant:"outline",className:"flex-1",children:this.state.copied?e.copied:e.copy})]})]})]})}):this.props.children}}const dX=t=>{const e=le.c(29),{children:n,fallback:o}=t,{t:s}=nt();let r;e[0]!==s?(r=s("errorBoundary.state.unknownError"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==s?(i=s("errorBoundary.title"),e[2]=s,e[3]=i):i=e[3];let l;e[4]!==s?(l=s("errorBoundary.description"),e[4]=s,e[5]=l):l=e[5];let c;e[6]!==s?(c=s("errorBoundary.actions.errorDetails"),e[6]=s,e[7]=c):c=e[7];let d;e[8]!==s?(d=s("errorBoundary.state.componentStackLabel"),e[8]=s,e[9]=d):d=e[9];let u;e[10]!==s?(u=s("errorBoundary.actions.tryAgain"),e[10]=s,e[11]=u):u=e[11];let f;e[12]!==s?(f=s("errorBoundary.actions.copied"),e[12]=s,e[13]=f):f=e[13];let m;e[14]!==s?(m=s("errorBoundary.actions.copy"),e[14]=s,e[15]=m):m=e[15];let h;e[16]!==r||e[17]!==i||e[18]!==l||e[19]!==c||e[20]!==d||e[21]!==u||e[22]!==f||e[23]!==m?(h={unknownError:r,title:i,description:l,detailsSummary:c,componentStackLabel:d,tryAgain:u,copied:f,copy:m},e[16]=r,e[17]=i,e[18]=l,e[19]=c,e[20]=d,e[21]=u,e[22]=f,e[23]=m,e[24]=h):h=e[24];const p=h;let b;return e[25]!==n||e[26]!==o||e[27]!==p?(b=a.jsx(mK,{fallback:o,strings:p,children:n}),e[25]=n,e[26]=o,e[27]=p,e[28]=b):b=e[28],b},hK=["standalone","minimal-ui","fullscreen","window-controls-overlay"],vf="openchamber.pwaRecentSessions",pK=t=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(`(display-mode: ${t})`).matches,uX=()=>typeof window>"u"?"browser":typeof document<"u"&&document.referrer.startsWith("android-app://")?"twa":window.navigator.standalone?"standalone":hK.find(n=>pK(n))??"browser",gK=1440*60*1e3,Xg=5,wf=1440*60*1e3,nd=t=>t.time?.updated??t.time?.created??0,xf=({sessions:t,currentSessionId:e,cutoffDays:n,keepRecent:o=Xg,now:s=Date.now()})=>{if(!Array.isArray(t)||n<=0)return[];const r=s-n*gK,i=[...t].sort((c,d)=>nd(d)-nd(c)),l=new Set(i.slice(0,o).map(c=>c.id));return i.filter(c=>{if(!c?.id||l.has(c.id)||c.id===e||c.share)return!1;const d=nd(c);return d?d<r:!1}).map(c=>c.id)},bK=t=>{const e=typeof t=="object"?t:void 0,n=e?.autoRun!==!1,o=typeof t=="boolean"?t:e?.enabled??!0,s=He(x=>x.currentSessionId),r=He(x=>x.isLoading),i=_n(x=>x.activeSessions),l=_n(x=>x.hasLoaded),c=ke(x=>x.autoDeleteEnabled),d=ke(x=>x.autoDeleteAfterDays),u=ke(x=>x.sessionRetentionAction),f=ke(x=>x.autoDeleteLastRunAt),m=ke(x=>x.setAutoDeleteLastRunAt),[h,p]=g.useState(!1),b=g.useRef(!1);g.useEffect(()=>{_d(hr())},[]);const y=g.useMemo(()=>d<=0?[]:xf({sessions:i,currentSessionId:s,cutoffDays:d}),[d,s,i]),v=g.useCallback(async({force:x=!1}={})=>{if(b.current)return{completedIds:[],failedIds:[],action:u,skippedReason:"running"};if((!c||d<=0)&&!x)return{completedIds:[],failedIds:[],action:u,skippedReason:"disabled"};if(r)return{completedIds:[],failedIds:[],action:u,skippedReason:"loading"};const w=Date.now();if(!x&&f&&w-f<wf)return{completedIds:[],failedIds:[],action:u,skippedReason:"cooldown"};const{activeSessions:S}=await _d(hr());if(S.length===0)return{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};const C=xf({sessions:S,currentSessionId:s,cutoffDays:d,now:w});if(C.length===0)return m(w),{completedIds:[],failedIds:[],action:u,skippedReason:"no-candidates"};b.current=!0,p(!0);try{const M=new Map(S.map(D=>[D.id,D])),A=[],k=[];for(const D of C){const _=M.get(D),F=_?B1(_):null;if(!F){k.push(D);continue}try{u==="archive"?await Je.updateSession(D,{time:{archived:Date.now()}},F):await Je.deleteSession(D,F),A.push(D)}catch{k.push(D)}}return u==="archive"?_n.getState().archiveSessions(A):_n.getState().removeSessions(A),{completedIds:A,failedIds:k,action:u}}finally{b.current=!1,p(!1),m(Date.now())}},[d,c,f,s,r,u,m]);return g.useEffect(()=>{if(!o||!n||!c||d<=0||r||!l||i.length===0)return;const x=Date.now();f&&x-f<wf||v()},[d,c,f,n,o,l,i.length,r,v]),{candidates:y,isRunning:h,runCleanup:v,keepRecentCount:Xg,action:u}},yK=40,vK=20*1024*1024,Ns=new Map;let J0=0;function wK(t){return t.length*2}function eb(t,e){const n=Ns.get(t);n!==void 0&&(J0-=n),Ns.delete(t),Ns.set(t,e),J0+=e}function tb(t,e){const n=Ns.get(t);n===void 0&&e===void 0||eb(t,n??0)}function nb(t){const e=Ns.get(t);e!==void 0&&(Ns.delete(t),J0-=e)}function xK(t,e){const n=t??new Set;for(;Ns.size>yK||J0>vK;){const o=Ns.keys().next().value;if(!o)return;if(n.has(o)){if(tb(o),Ns.size<=n.size)return;continue}nb(o),e(o)}}function CK(t,e){eb(t,e)}function SK(t){nb(t)}function kK(t,e){tb(t,e)}function MK(t){const e=new Map,n=f=>{e.delete(f),SK(f)},o=f=>{const m=f.endsWith("/")?f:`${f}/`;for(const h of e.keys())(h===f||h.startsWith(m))&&n(h)},s=(f,m)=>m.isFile?f.mtimeMs!==void 0&&m.mtimeMs!==void 0?f.mtimeMs===m.mtimeMs&&f.size===m.size:f.size===m.size:!1,r=(f,m,h)=>{const p=wK(m.content);return e.set(f,{...m,size:h?.isFile?h.size:void 0,mtimeMs:h?.isFile?h.mtimeMs:void 0}),CK(f,p),xK(new Set,y=>{e.delete(y)}),m},i=async(f,m)=>{const h=await t.statFile?.(f,m).catch(()=>null),p=await t.readFile(f,m),b=await t.statFile?.(f,m).catch(()=>null);if(h&&b&&h.isFile&&b.isFile){if(h.size===b.size&&h.mtimeMs===b.mtimeMs)return r(f,p,b);const y=await t.statFile?.(f,m).catch(()=>null),v=await t.readFile(f,m),x=await t.statFile?.(f,m).catch(()=>null);return y&&x&&y.isFile&&x.isFile&&y.size===x.size&&y.mtimeMs===x.mtimeMs,r(f,v,x)}return r(f,p,b??h)},l=t.readFile?async(f,m)=>{if(m?.allowOutsideWorkspace)return i(f,m);const h=e.get(f);if(h){if(t.statFile){const p=await t.statFile(f).catch(()=>(n(f),null));if(!p||!s(h,p))return n(f),i(f)}return kK(f),{content:h.content,path:h.path}}return i(f)}:void 0,c=t.writeFile?async(f,m)=>(n(f),t.writeFile(f,m)):void 0,d=t.delete?async f=>(o(f),t.delete(f)):void 0,u=t.rename?async(f,m)=>(o(f),o(m),t.rename(f,m)):void 0;return{...t,readFile:l,writeFile:c,delete:d,rename:u}}function fX(t){const e=le.c(8),{apis:n,children:o}=t;let s;e[0]!==n.files?(s=MK(n.files),e[0]=n.files,e[1]=s):s=e[1];let r;e[2]!==n||e[3]!==s?(r={...n,files:s},e[2]=n,e[3]=s,e[4]=r):r=e[4];const i=r;let l;return e[5]!==i||e[6]!==o?(l=a.jsx(ni.Provider,{value:i,children:o}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const AK=2e4,ob=()=>typeof document>"u"||document.visibilityState==="visible"&&document.hasFocus()?"visible":"hidden",Y3=t=>{if(!Q0())return;const e=yo();e?.push?.setVisibility&&e.push.setVisibility({visible:t})},mX=t=>{const e=le.c(3),n=t?.enabled??!0;let o,s;e[0]!==n?(o=()=>{if(!n||!Q0()||typeof document>"u")return;const r=FK,i=_K,l=BK;r();const c=window.setInterval(i,AK);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=[n],e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]),g.useEffect(o,s)};function FK(){Y3(ob()==="visible")}function _K(){ob()==="visible"&&Y3(!0)}function BK(){Y3(!1)}const DK="OpenChamber",Cf=t=>t.replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()),TK=t=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return n[n.length-1]??""},PK=(t,e)=>[t,e,DK].filter(o=>typeof o=="string"&&o.trim().length>0).join(" | "),hX=()=>{const t=tn(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 Cf(r);const i=TK(t.path);return i?Cf(i):null},[t]),[n,o]=g.useState(null);g.useEffect(()=>{if(typeof window>"u"||!Et()){o(null);return}let r=!1;const i=async()=>{try{if(Do()){r||o(null);return}const c=window.__OPENCHAMBER_LOCAL_ORIGIN__||window.location.origin,d=wr();if(d&&Ni(d,c)){r||o(null);return}const f=(await u3()).hosts.find(h=>d?Ni(d,dr(h)):!1),m=f?.label?.trim()?uo(f.label.trim()):"Instance";r||o(m)}catch{r||o("Instance")}};i();const l=()=>{i()};return window.addEventListener("focus",l),()=>{r=!0,window.removeEventListener("focus",l)}},[]);const s=g.useMemo(()=>PK(e,n),[e,n]);g.useEffect(()=>{if(typeof document<"u"&&(document.title=s),!Et())return;(async()=>{try{if(typeof navigator<"u"&&/Macintosh|Mac OS X/.test(navigator.userAgent||""))return;await JP(s)}catch{return}})()},[s])},EK=()=>{const e=He.getState().currentSessionId;if(!e)return"";const o=Li().find(s=>s.id===e);return typeof o?.directory=="string"?o.directory:""},HK=async(t,e=6e3)=>{const n=new AbortController,o=setTimeout(()=>n.abort(),e),s=Date.now();try{const r=await We(t,{method:"GET",headers:{Accept:"application/json"},signal:n.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=n.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(o)}},IK=t=>{if(!t||!Number.isFinite(t))return"(n/a)";try{return new Date(t).toISOString()}catch{return"(invalid)"}},jK=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},LK=t=>!!t&&typeof t=="object"&&!Array.isArray(t),nr=(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,Sf=(t,e,n)=>t==="node-shebang"||t==="node-launcher"?e?`node (${e})`:"node":t==="bun-shebang"?n?`bun (${n})`:"bun":t||"direct executable",NK=async()=>{const t=new Date,e="1.12.3",n=typeof navigator<"u"?navigator.userAgent:"(no navigator)",o=EK(),s=ke.getState().eventStreamStatus,r=typeof window<"u"?window.location.origin:"",i=B4(),l=i.health(),c=i.api("/api/"),d=await(async()=>{if(!l)return null;const v=new AbortController,x=setTimeout(()=>v.abort(),5e3);try{const w=await We(l,{method:"GET",headers:{Accept:"application/json"},signal:v.signal});if(!w.ok)return null;const S=await w.json().catch(()=>null);return!S||typeof S!="object"||Array.isArray(S)?null:S}catch{return null}finally{clearTimeout(x)}})(),u=await(async()=>{if(!c)return null;const v=new AbortController,x=setTimeout(()=>v.abort(),7e3);try{const w=await We(i.api("/api/config/opencode-resolution"),{method:"GET",headers:{Accept:"application/json"},signal:v.signal}),S=w.headers.get("content-type")||"(none)";if(!w.ok)return{data:null,status:w.status,error:`http ${w.status} content-type=${S}`};const C=await w.text();let M=null;try{M=JSON.parse(C)}catch{const A=C.replace(/\s+/g," ").slice(0,120);return{data:null,status:w.status,error:`invalid json content-type=${S} body=${A||"(empty)"}`}}return!M||typeof M!="object"||Array.isArray(M)?{data:null,status:w.status,error:`invalid json-shape content-type=${S}`}:{data:M,status:w.status,error:null}}catch(w){return{data:null,status:null,error:w instanceof Error?w.message:String(w)}}finally{clearTimeout(x)}})()||{data:null,error:null},f=(v,x=!0)=>{if(!c)return null;const w=new URL(v.replace(/^\/+/,""),c);return x&&o&&w.searchParams.set("directory",o),w.toString()},m=[{label:"health",path:"/api/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}],h=c?await Promise.all(m.map(async v=>{const x=f(v.path,v.includeDirectory!==!1);if(!x)return{label:v.label,url:"(none)",result:null};const w=await HK(x,typeof v.timeoutMs=="number"?v.timeoutMs:void 0);return{label:v.label,url:x,result:w}})):[],p=[];p.push(`Time: ${t.toISOString()}`),p.push(`OpenChamber version: ${e}`),p.push(`Runtime: ${r||"(unknown)"} (api=${c||"(unknown)"})`),p.push(`OpenCode SDK base: ${Je.getBaseUrl()}`),p.push(`Event stream: ${s}`),p.push(`Directory: ${o||"(none)"}`),p.push(`Platform: ${n}`);const b=jK(d?.openCodePort);if(p.push(`OpenCode runtime port: ${b??"(unknown)"}`),typeof d?.openCodeRunning=="boolean"&&p.push(`OpenCode runtime running: ${d.openCodeRunning?"yes":"no"}`),typeof d?.openCodeSecureConnection=="boolean"&&p.push(`Secure OpenCode connection: ${d.openCodeSecureConnection?"true":"false"}`),typeof d?.openCodeAuthSource=="string"&&d.openCodeAuthSource.trim()&&p.push(`OpenCode auth source: ${d.openCodeAuthSource}`),typeof window<"u"){const v=window.__OPENCHAMBER_MACOS_MAJOR__;typeof v=="number"&&Number.isFinite(v)&&v>0&&p.push(`macOS major: ${v}`)}if(/Mac OS X|Macintosh/.test(n)){p.push(""),p.push("OpenCode CLI resolution:");const v=LK(d?.lastOpenCodeLaunchDiagnostics)?d.lastOpenCodeLaunchDiagnostics:null,x=v&&Array.isArray(v.args)?v.args.filter(P=>typeof P=="string"):[],w=u.data,S=w&&typeof w.configured=="string"?w.configured:null,C=w&&typeof w.resolved=="string"?w.resolved:d&&typeof d.opencodeBinaryResolved=="string"?d.opencodeBinaryResolved:"",M=w&&typeof w.resolvedDir=="string"?w.resolvedDir:"",A=w&&typeof w.source=="string"?w.source:d&&typeof d.opencodeBinarySource=="string"?d.opencodeBinarySource:"",k=w&&typeof w.launchBinary=="string"?w.launchBinary:d&&typeof d.opencodeLaunchBinary=="string"?d.opencodeLaunchBinary:"",D=w&&typeof w.launchWrapperType=="string"?w.launchWrapperType:d&&typeof d.opencodeLaunchWrapperType=="string"?d.opencodeLaunchWrapperType:"",_=w&&Array.isArray(w.launchArgs)?w.launchArgs.filter(P=>typeof P=="string"):d&&Array.isArray(d.opencodeLaunchArgs)?d.opencodeLaunchArgs.filter(P=>typeof P=="string"):[],F=w&&typeof w.node=="string"?w.node:d&&typeof d.nodeBinaryResolved=="string"?d.nodeBinaryResolved:"",B=w&&typeof w.bun=="string"?w.bun:d&&typeof d.bunBinaryResolved=="string"?d.bunBinaryResolved:"",j=w&&typeof w.detectedNow=="string"?w.detectedNow:"",T=w&&typeof w.detectedSourceNow=="string"?w.detectedSourceNow:"";if(S!==null&&p.push(`- configured: ${S.trim().length===0?"(cleared)":S}`),C){const P=M||(C.includes("/")?C.split("/").slice(0,-1).join("/")||"/":"");p.push(`- opencode: ${C}${P?` (dir=${P})`:""}`)}else p.push("- opencode: (n/a)");p.push(`- source: ${A||"(n/a)"}`),j&&(p.push(`- detected-now: ${j}`),p.push(`- detected-source: ${T||"(n/a)"}`)),v?(p.push(`- launched-at: ${nr(v.launchedAt)}`),p.push(`- launch: ${nr(v.binary)} ${x.join(" ")}`.trim()),p.push(`- cwd: ${nr(v.cwd)}`),p.push(`- wrapper: ${nr(v.wrapperType)}`),p.push(`- runtime: ${Sf(nr(v.wrapperType,""),F,B)}`),p.push(`- PATH entries: ${nr(v.pathEntryCount,"(unknown)")}`),p.push(`- shell env: ${nr(v.hasShellEnv,"(unknown)")} (${nr(v.shellEnvKeysCount,"?")} keys)`)):(p.push(`- launch-binary: ${k||"(n/a)"}`),p.push(`- launch-wrapper: ${D||"(n/a)"}`),p.push(`- launch-args: ${_.length?_.join(" "):"(none)"}`),p.push(`- runtime: ${Sf(D||"",F,B)}`)),!w&&u.error&&p.push(`- resolution-endpoint: ${u.error}`)}if(p.push(""),h.length){p.push("OpenCode API probes:");for(const v of h){if(!v.result){p.push(`- ${v.label}: (no url)`);continue}const{ok:x,status:w,elapsedMs:S,summary:C}=v.result,M=x?"":` url=${v.url}`;p.push(`- ${v.label}: ${x?"ok":"fail"} status=${w} time=${S}ms ${C}${M}`)}}else p.push("OpenCode API probes: (skipped)");return p.push(""),p.push(`Generated: ${IK(Date.now())}`),p.join(`
7114
7114
  `)},RK=async()=>{const t=await NK(),e=ke.getState();e.setOpenCodeStatusText(t),e.setOpenCodeStatusDialogOpen(!0)},VK=()=>{const t=le.c(60),e=He(zK),n=He(OK),o=He($K),s=He(ZK),r=X4,i=ke(UK),l=ke(qK),c=ke(WK),d=ke(GK),u=ke(KK),f=ke(YK),m=ke(JK),h=ke(QK),p=ke(XK),b=ke(eY),y=ke(tY),v=ke(nY),x=ke(oY),w=ke(sY),S=ke(rY),C=ke(iY),M=en(aY),A=tn(lY),{themeMode:k,setThemeMode:D}=Zs(),{working:_}=qg(),F=g.useRef(null),B=g.useRef(null),j=g.useRef(k);let T,P;t[0]!==k?(T=()=>{j.current=k},P=[k],t[0]=k,t[1]=T,t[2]=P):(T=t[1],P=t[2]),g.useEffect(T,P);let I;t[3]!==o?(I=()=>{B.current&&(clearTimeout(B.current),B.current=null),F.current=null,o()},t[3]=o,t[4]=I):I=t[4];const O=I;let L;t[5]!==A?.id||t[6]!==A?.path||t[7]!==n||t[8]!==M||t[9]!==s||t[10]!==p||t[11]!==e||t[12]!==O||t[13]!==y||t[14]!==h||t[15]!==x||t[16]!==u||t[17]!==f||t[18]!==b||t[19]!==v||t[20]!==D||t[21]!==w||t[22]!==C||t[23]!==m||t[24]!==i||t[25]!==S||t[26]!==l||t[27]!==d||t[28]!==c||t[29]!==_?(L=()=>{const X=ne=>B3(ne,C),R=cY,Q=['[data-slot="dropdown-menu-content"]','[data-slot="select-content"]','[role="combobox"]','[role="listbox"]','[role="menu"]','[role="menuitem"]','[role="option"]',"[data-radix-popper-content-wrapper]"].join(","),de=ne=>ne instanceof Element&&!!ne.closest(Q),oe=uY,xe=ne=>{if(R(ne.target)){if(Yt(ne,X("toggle_terminal"))){const{isMobile:ae}=ke.getState();if(ae)return;ne.preventDefault(),ne.stopPropagation(),m();return}if(Yt(ne,X("toggle_terminal_expanded"))){const{isMobile:ae,isBottomTerminalExpanded:Me}=ke.getState();if(ae)return;ne.preventDefault(),ne.stopPropagation(),h(!Me);return}}},me=ne=>{if(R(ne.target))return;const ae=fY;if(Yt(ne,X("open_command_palette"))){ne.preventDefault(),i();return}if(Yt(ne,X("open_timeline_dialog"))){ne.preventDefault(),w(!0);return}if(Yt(ne,X("open_status"))){ne.preventDefault(),RK();return}if(Yt(ne,X("open_help"))){ne.preventDefault(),l();return}if(D4()&&Yt(ne,X("new_mini_chat"))){ne.preventDefault(),Wn("desktop_open_draft_mini_chat_window",{directory:M||A?.path||"",projectId:A?.id??null}).catch(mY);return}const Me=Yt(ne,X("new_chat")),J=Yt(ne,X("new_chat_worktree"));if(Me||J){if(ne.preventDefault(),y("chat"),b(!1),!Ht()&&J){JV();return}e();return}if(Yt(ne,X("cycle_theme"))){ne.preventDefault();const ce=["light","dark","system"],ue=document.activeElement,ge=(ce.indexOf(j.current)+1)%ce.length;D(ce[ge]),requestAnimationFrame(()=>{typeof document>"u"||typeof window>"u"||(document.hasFocus()||window.focus(),ue&&document.contains(ue)&&ue.focus({preventScroll:!0}))});return}if(Yt(ne,X("open_settings"))){ne.preventDefault();const{isSettingsDialogOpen:ce}=ke.getState();v(!ce);return}if(Yt(ne,X("toggle_sidebar"))){ne.preventDefault();const{isMobile:ce,isSessionSwitcherOpen:ue}=ke.getState();ce?b(!ue):c();return}if(Yt(ne,X("focus_input"))){ne.preventDefault(),document.querySelector('textarea[data-chat-input="true"]')?.focus();return}const be=X("cycle_agent"),Z=be&&!be.includes("shift")?L1(`shift+${be}`):"",te=Z&&Yt(ne,Z)?-1:Yt(ne,be)?1:0;if(te!==0){const{isSettingsDialogOpen:ce,isCommandPaletteOpen:ue,isHelpDialogOpen:re,isSessionSwitcherOpen:ge,isAboutDialogOpen:ee,activeMainTab:G}=ke.getState();if(ce||ue||re||ge||ee||G!=="chat"||!ae(ne.target))return;const ve=Ee.getState(),U=F3(ve.getVisibleAgents(),ve.currentAgentName,te);if(!U)return;ne.preventDefault(),ve.setAgent(U),ke.getState().addRecentAgent(U);const ie=He.getState().currentSessionId;ie&&zt.getState().saveSessionAgentSelection(ie,U);return}if(Yt(ne,X("toggle_right_sidebar"))){const{isMobile:ce}=ke.getState();if(ce)return;ne.preventDefault(),d();return}if(Yt(ne,X("open_right_sidebar_git"))){const{isMobile:ce}=ke.getState();if(ce)return;ne.preventDefault(),u(!0),f("git");return}if(Yt(ne,X("open_right_sidebar_files"))){const{isMobile:ce}=ke.getState();if(ce)return;ne.preventDefault(),u(!0),f("files");return}if(Yt(ne,X("cycle_right_sidebar_tab"))){const{isMobile:ce,rightSidebarTab:ue}=ke.getState();if(ce)return;const re=["git","files","context"],ge=re.indexOf(ue),ee=re[(ge+1)%re.length];ne.preventDefault(),u(!0),f(ee);return}if(Yt(ne,X("toggle_terminal"))){const{isMobile:ce}=ke.getState();if(ce)return;ne.preventDefault(),m();return}if(Yt(ne,X("toggle_terminal_expanded"))){const{isMobile:ce,isBottomTerminalExpanded:ue}=ke.getState();if(ce)return;ne.preventDefault(),h(!ue);return}if(Yt(ne,X("open_model_selector"))){const{isSettingsDialogOpen:ce,isCommandPaletteOpen:ue,isHelpDialogOpen:re,isSessionSwitcherOpen:ge,isAboutDialogOpen:ee,activeMainTab:G,isModelSelectorOpen:pe}=ke.getState();if(ce||ue||re||ge||ee||!(G==="chat"))return;ne.preventDefault(),x(!pe);return}if(Yt(ne,X("cycle_thinking_variant"))){const{isSettingsDialogOpen:ce,isCommandPaletteOpen:ue,isHelpDialogOpen:re,isSessionSwitcherOpen:ge,isAboutDialogOpen:ee,activeMainTab:G}=ke.getState();if(ce||ue||re||ge||ee||!(G==="chat"))return;const U=Ee.getState();if(U.getCurrentModelVariants().length===0)return;ne.preventDefault(),U.cycleCurrentVariant();const Y=Ee.getState().currentVariant,Ce=He.getState().currentSessionId,Se=Ee.getState().currentAgentName,ye=Ee.getState().currentProviderId,De=Ee.getState().currentModelId;Ce&&Se&&ye&&De&&zt.getState().saveAgentModelVariantForSession(Ce,Se,ye,De,Y);return}if(Yt(ne,X("cycle_favorite_model_forward"))||Yt(ne,X("cycle_favorite_model_backward"))){const{isSettingsDialogOpen:ce,isCommandPaletteOpen:ue,isHelpDialogOpen:re,isSessionSwitcherOpen:ge,isAboutDialogOpen:ee,activeMainTab:G,favoriteModels:pe,addRecentModel:ve}=ke.getState();if(ce||ue||re||ge||ee||!(G==="chat")||pe.length===0)return;ne.preventDefault();const{currentProviderId:Y,currentModelId:Ce,setProvider:Se,setModel:ye}=Ee.getState(),De=pe.length,_e=pe.findIndex(fe=>fe.providerID===Y&&fe.modelID===Ce),he=Yt(ne,X("cycle_favorite_model_forward"))?1:-1,Ae=pe[(_e+he+De)%De];Se(Ae.providerID),ye(Ae.modelID),ve(Ae.providerID,Ae.modelID);return}if(Yt(ne,X("expand_input"))){if(p)return;ne.preventDefault(),S();return}if(ne.key==="Escape"){const ce=ne.target,ue=!!ce?.closest('[role="dialog"]'),re=!!document.querySelector('[data-settings-view="true"]'),ge=!!(ce?.closest(".terminal-viewport-container")||ce?.getAttribute("data-terminal-hidden-input")==="true"),ee=de(ce)||oe(),{isSettingsDialogOpen:G,isCommandPaletteOpen:pe,isHelpDialogOpen:ve,isSessionSwitcherOpen:U,isAboutDialogOpen:ie,isMultiRunLauncherOpen:Y,isImagePreviewOpen:Ce,activeMainTab:Se}=ke.getState();if(ue||ge||ee){O();return}if(G){ne.preventDefault(),v(!1),O();return}if(re){O();return}if(pe||ve||U||ie||Y||Ce||!(Se==="chat")){O();return}const _e=s;if(!(_.canAbort&&!!_e)){O();return}const Ae=Date.now(),fe=F.current;if(fe&&Ae<fe){ne.preventDefault(),O(),r(_e??"");return}ne.preventDefault();const Te=n(3e3)??Ae+3e3;F.current=Te,B.current&&clearTimeout(B.current);const je=Math.max(Te-Ae,0);B.current=setTimeout(()=>{F.current&&Date.now()>=F.current&&O()},je||0);return}};return window.addEventListener("keydown",xe,!0),window.addEventListener("keydown",me),()=>{window.removeEventListener("keydown",xe,!0),window.removeEventListener("keydown",me)}},t[5]=A?.id,t[6]=A?.path,t[7]=n,t[8]=M,t[9]=s,t[10]=p,t[11]=e,t[12]=O,t[13]=y,t[14]=h,t[15]=x,t[16]=u,t[17]=f,t[18]=b,t[19]=v,t[20]=D,t[21]=w,t[22]=C,t[23]=m,t[24]=i,t[25]=S,t[26]=l,t[27]=d,t[28]=c,t[29]=_,t[30]=L):L=t[30];const q=A?.id,$=A?.path;let V;t[31]!==n||t[32]!==M||t[33]!==s||t[34]!==p||t[35]!==e||t[36]!==O||t[37]!==y||t[38]!==h||t[39]!==x||t[40]!==u||t[41]!==f||t[42]!==b||t[43]!==v||t[44]!==D||t[45]!==w||t[46]!==C||t[47]!==q||t[48]!==$||t[49]!==m||t[50]!==i||t[51]!==S||t[52]!==l||t[53]!==d||t[54]!==c||t[55]!==_?(V=[e,r,i,l,c,d,u,f,m,h,p,b,y,v,x,w,S,D,_,n,O,s,M,q,$,C],t[31]=n,t[32]=M,t[33]=s,t[34]=p,t[35]=e,t[36]=O,t[37]=y,t[38]=h,t[39]=x,t[40]=u,t[41]=f,t[42]=b,t[43]=v,t[44]=D,t[45]=w,t[46]=C,t[47]=q,t[48]=$,t[49]=m,t[50]=i,t[51]=S,t[52]=l,t[53]=d,t[54]=c,t[55]=_,t[56]=V):V=t[56],g.useEffect(L,V);let W,E;t[57]!==O?(W=()=>()=>{O()},E=[O],t[57]=O,t[58]=W,t[59]=E):(W=t[58],E=t[59]),g.useEffect(W,E)};function zK(t){return t.openNewSessionDraft}function OK(t){return t.armAbortPrompt}function $K(t){return t.clearAbortPrompt}function ZK(t){return t.currentSessionId}function UK(t){return t.toggleCommandPalette}function qK(t){return t.toggleHelpDialog}function WK(t){return t.toggleSidebar}function GK(t){return t.toggleRightSidebar}function KK(t){return t.setRightSidebarOpen}function YK(t){return t.setRightSidebarTab}function JK(t){return t.toggleBottomTerminal}function QK(t){return t.setBottomTerminalExpanded}function XK(t){return t.isMobile}function eY(t){return t.setSessionSwitcherOpen}function tY(t){return t.setActiveMainTab}function nY(t){return t.setSettingsDialogOpen}function oY(t){return t.setModelSelectorOpen}function sY(t){return t.setTimelineDialogOpen}function rY(t){return t.toggleExpandedInput}function iY(t){return t.shortcutOverrides}function aY(t){return t.currentDirectory}function lY(t){return t.getActiveProject()}function cY(t){return t instanceof Element?!!(t.closest(".terminal-viewport-container")||t.getAttribute("data-terminal-hidden-input")==="true"):!1}function dY(t){return t.getClientRects().length>0}function uY(){const t=document.querySelectorAll('[data-slot="dropdown-menu-content"], [data-slot="select-content"], [role="listbox"], [role="menu"], [data-radix-popper-content-wrapper]');return Array.from(t).some(dY)}function fY(t){return t instanceof HTMLTextAreaElement&&t.getAttribute("data-chat-input")==="true"}function mY(t){console.warn("[keyboard-shortcuts] failed to open draft mini chat window",t)}const hY=3,pY=(t,e)=>{if(typeof t!="string")return e;const n=t.trim().replace(/\s+/g," ");return n?n.slice(0,48):e},gY=(t,e)=>{const n=e?[...t.filter(r=>r.id===e),...t.filter(r=>r.id!==e)]:t,o=[],s=new Set;for(const r of n){const i=typeof r.id=="string"?r.id.trim():"";if(!(!i||s.has(i))&&(s.add(i),o.push({sessionId:i,title:pY(r.title,`Session ${o.length+1}`)}),o.length>=hY))break}return o},bY=()=>{const t=le.c(9),e=ca(),n=He(yY);let o;t[0]!==n||t[1]!==e?(o=gY(e,n),t[0]=n,t[1]=e,t[2]=o):o=t[2];const s=o;let r;t[3]!==s?(r=JSON.stringify(s),t[3]=s,t[4]=r):r=t[4];const i=r;let l,c;t[5]!==s||t[6]!==i?(l=()=>{if(typeof window>"u"||!Q0())return;try{s.length===0?localStorage.removeItem(vf):localStorage.setItem(vf,i)}catch{return}window.__OPENCHAMBER_UPDATE_PWA_MANIFEST__?.()},c=[s,i],t[5]=s,t[6]=i,t[7]=l,t[8]=c):(l=t[7],c=t[8]),g.useEffect(l,c)};function yY(t){return t.currentSessionId}const vY=2e3,wY=t=>{const e=He.getState().sessionAbortFlags.get(t);return e?Date.now()-e.timestamp<vY:!1},xY=t=>{const e=t[0];if(!e)return null;const n=Ee.getState().getVisibleAgents(),{sanitizedText:o,mention:s}=i4(e.content,n);return{queuedMessageId:e.id,primaryText:o,primaryAttachments:e.attachments??[],agentMentionName:s?.name,sendConfig:e.sendConfig}},CY=(t,e,n)=>He.getState().sendMessage(e.primaryText,n.providerID,n.modelID,n.agent,e.primaryAttachments,e.agentMentionName,void 0,n.variant,"normal",{sessionId:t}),SY=t=>{const e=Oo.getState(),n=Ee.getState(),o=zt.getState(),s=e.getSessionAgentSelection(t)??e.getCurrentAgent(t)??n.currentAgentName??void 0,r=e.getSessionModelSelection(t),i=s?e.getAgentModelForSession(t,s):null,l=i?.providerId??r?.providerId??n.currentProviderId??o.lastUsedProvider?.providerID,c=i?.modelId??r?.modelId??n.currentModelId??o.lastUsedProvider?.modelID,d=s&&l&&c?o.getAgentModelVariantForSession(t,s,l,c)??e.getAgentModelVariantForSession(t,s,l,c):void 0;return{providerID:l,modelID:c,agent:s,variant:d}},kY=(t,e)=>(t==="busy"||t==="retry")&&e==="idle";function MY(t){const e=typeof t=="boolean"?t:t?.enabled??!0,n=Qo(i=>i.queuedMessages),o=no(i=>i.session_status),s=g.useRef(new Set),r=g.useRef(new Map);g.useEffect(()=>{if(!e)return;const i=async(u,f)=>{if(f.length===0||s.current.has(u)||wY(u)||(VS(u)?.type??"idle")!=="idle")return;const h=xY(f);if(!h||!h.primaryText&&h.primaryAttachments.length===0)return;const p=h.sendConfig,b=p?.providerID&&p?.modelID?p:SY(u);if(!(!b.providerID||!b.modelID)){s.current.add(u);try{await CY(u,h,{providerID:b.providerID,modelID:b.modelID,agent:b.agent,variant:b.variant});const y=Qo.getState().removeFromQueue;y(u,h.queuedMessageId)}catch(y){console.warn("[queue] queued auto-send failed:",y)}finally{s.current.delete(u)}}},l=o??{},c=new Map(r.current);for(const[u,f]of Object.entries(l))f&&c.set(u,f.type);Object.entries(n).forEach(([u,f])=>{const m=l[u]?.type??"idle",h=r.current.get(u);f.length>0&&kY(h,m)&&i(u,f),c.set(u,m)}),r.current=c},[e,n,o])}const od=t=>Number.isFinite(t)?`${Math.max(0,Math.round(t))}px`:"0px",sd=(t,e,n,o)=>{t.style.setProperty("--oc-wco-left-inset",od(e)),t.style.setProperty("--oc-wco-right-inset",od(n)),t.style.setProperty("--oc-wco-titlebar-height",od(o))},AY=()=>{const t=le.c(1);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[0]=e):e=t[0],g.useEffect(FY,e)};function FY(){if(typeof window>"u"||!Q0())return;const t=document.documentElement,e=typeof window.matchMedia=="function"?window.matchMedia("(display-mode: window-controls-overlay)"):null,o=window.navigator.windowControlsOverlay,s=()=>{if(!o||!e?.matches||!o.visible){sd(t,0,0,0);return}const i=o.getTitlebarAreaRect(),l=Math.max(0,Number(i.x)||0),c=Math.max(0,Number(i.width)||0),d=Math.max(0,Number(i.height)||0),u=Math.max(0,window.innerWidth-(l+c));sd(t,l,u,d)},r=()=>{s()};return s(),window.addEventListener("resize",s),window.addEventListener("focus",s),e&&(typeof e.addEventListener=="function"?e.addEventListener("change",r):typeof e.addListener=="function"&&e.addListener(r)),o&&typeof o.addEventListener=="function"&&o.addEventListener("geometrychange",s),()=>{window.removeEventListener("resize",s),window.removeEventListener("focus",s),e&&(typeof e.removeEventListener=="function"?e.removeEventListener("change",r):typeof e.removeListener=="function"&&e.removeListener(r)),o&&typeof o.removeEventListener=="function"&&o.removeEventListener("geometrychange",s),sd(t,0,0,0)}}const _Y="openchamber:mini-chat-presence",BY=()=>{const t=M3(),e=g.useRef(t.optimistic.add),n=g.useRef(t.optimistic.remove);return e.current=t.optimistic.add,n.current=t.optimistic.remove,g.useEffect(()=>{Km(o=>e.current(o),o=>n.current(o))},[]),null},DY=()=>{const t=le.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[0]=e):e=t[0],g.useEffect(EY,e),null};function TY(t){const e=le.c(1),{embeddedBackgroundWorkEnabled:n}=t;bK(n),MY(n);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(BY,{}),e[0]=o):o=e[0],o}function pX(t){const e=le.c(5),{embeddedBackgroundWorkEnabled:n}=t;bY(),AY(),VK();let o;e[0]!==n?(o=a.jsx(TY,{embeddedBackgroundWorkEnabled:n}),e[0]=n,e[1]=o):o=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(DY,{}),e[2]=s):s=e[2];let r;return e[3]!==o?(r=a.jsxs(a.Fragment,{children:[o,s]}),e[3]=o,e[4]=r):r=e[4],r}function PY(t){const e=t.data;if(e?.type!=="mini-chat-session-presence"||!e.sessionId||!e.directory)return;const n=e.viewed!==!1;XM(e.directory,e.sessionId,n),n&&Om(e.sessionId)}function EY(){if(typeof BroadcastChannel>"u")return;const t=new BroadcastChannel(_Y);return t.onmessage=PY,()=>t.close()}const HY=()=>{const t=le.c(3),e=ke(IY),n=ke(jY);let o;return t[0]!==n||t[1]!==e?(o={uiFont:e,monoFont:n},t[0]=n,t[1]=e,t[2]=o):o=t[2],o};function IY(t){return t.uiFont}function jY(t){return t.monoFont}const kf=new Set,rd=new Map,LY=(t,e)=>`https://cdn.jsdelivr.net/npm/${encodeURIComponent(t.packageName).replace("%40","@").replace("%2F","/")}/files/${t.filePrefix}-latin-${e}-normal.woff2`,NY=(t,e)=>{const n=`${t.family}:${e}`;if(kf.has(n))return Promise.resolve();const o=rd.get(n);if(o)return o;if(typeof document>"u"||typeof FontFace>"u"||!document.fonts)return Promise.resolve();const s=new FontFace(t.family,`url(${LY(t,e)}) format('woff2')`,{style:"normal",weight:String(e),display:"swap"});document.fonts.add(s);const r=s.load().then(()=>{kf.add(n)}).catch(i=>{document.fonts.delete(s),console.warn(`Failed to load font: ${t.family} ${e}`,i)}).finally(()=>{rd.delete(n)});return rd.set(n,r),r},sb=t=>t?Promise.all(t.weights.map(e=>NY(t,e))).then(()=>{}):Promise.resolve(),RY=t=>sb(m0[t]?.source),VY=t=>sb(h0[t]?.source);function gX(){const t=le.c(4),{uiFont:e,monoFont:n}=HY();let o,s;t[0]!==n||t[1]!==e?(o=()=>{if(typeof document>"u")return;const r=document.documentElement,i=m0[e]?.stack??m0[Qf].stack,l=h0[n]?.stack??h0[Xf].stack;RY(e),VY(n),r.style.setProperty("--font-sans",i),r.style.setProperty("--font-heading",i),r.style.setProperty("--font-family-sans",i),r.style.setProperty("--font-mono",l),r.style.setProperty("--font-family-mono",l),r.style.setProperty("--ui-regular-font-weight","400"),document.body&&(document.body.style.fontFamily=i)},s=[e,n],t[0]=n,t[1]=e,t[2]=o,t[3]=s):(o=t[2],s=t[3]),g.useEffect(o,s)}export{dX as $,WQ as A,kt as B,$V as C,tn as D,ym as E,Uo as F,xm as G,z as H,ws as I,RI as J,vm as K,jx as L,ps as M,iS as N,D1 as O,wm as P,tX as Q,Ee as R,gl as S,ke as T,q0 as U,J9 as V,GY as W,Je as X,gX as Y,mX as Z,hX as _,oi as a,YZ as a$,DJ as a0,fX as a1,Kd as a2,pX as a3,_J as a4,HQ as a5,SA as a6,UJ as a7,rQ as a8,nQ as a9,XQ as aA,uB as aB,ar as aC,CU as aD,Vj as aE,TJ as aF,D4 as aG,pQ as aH,Ht as aI,u3 as aJ,Ni as aK,dr as aL,uo as aM,hr as aN,p1 as aO,PJ as aP,_Q as aQ,ZQ as aR,Wn as aS,JY as aT,xQ as aU,B3 as aV,OJ as aW,Yt as aX,ta as aY,OZ as aZ,nU as a_,tQ as aa,P_ as ab,yx as ac,px as ad,S_ as ae,iQ as af,aQ as ag,lQ as ah,$t as ai,Zt as aj,Ot as ak,un as al,Et as am,Do as an,dJ as ao,ns as ap,lJ as aq,rw as ar,$r as as,Yu as at,Zr as au,Or as av,fJ as aw,yo as ax,rs as ay,ju as az,Sl as b,Yw as b$,A3 as b0,br as b1,yr as b2,Vs as b3,Rs as b4,Nt as b5,TV as b6,KQ as b7,uV as b8,Fn as b9,IF as bA,n_ as bB,YF as bC,QF as bD,t_ as bE,e_ as bF,XF as bG,Zn as bH,B8 as bI,P8 as bJ,T8 as bK,E8 as bL,V2 as bM,Pn as bN,CF as bO,l_ as bP,R_ as bQ,oX as bR,EJ as bS,NN as bT,AQ as bU,FQ as bV,PQ as bW,w9 as bX,G4 as bY,SF as bZ,HJ as b_,XV as ba,JR as bb,zt as bc,JQ as bd,XY as be,QQ as bf,x9 as bg,g3 as bh,N0 as bi,YQ as bj,tV as bk,rz as bl,R9 as bm,iz as bn,az as bo,lz as bp,cz as bq,_F as br,BF as bs,sa as bt,DF as bu,TF as bv,PF as bw,EF as bx,LF as by,aX as bz,MQ as c,AJ as c$,Xw as c0,pm as c1,bj as c2,gj as c3,zJ as c4,g1 as c5,gQ as c6,bQ as c7,Pp as c8,T3 as c9,OQ as cA,vr as cB,$Q as cC,VQ as cD,RQ as cE,ZJ as cF,M8 as cG,Td as cH,NQ as cI,qQ as cJ,mU as cK,UQ as cL,aJ as cM,iJ as cN,D8 as cO,Qp as cP,Yp as cQ,_o as cR,$4 as cS,us as cT,ni as cU,ti as cV,M3 as cW,n1 as cX,c3 as cY,BJ as cZ,a3 as c_,cJ as ca,rX as cb,iX as cc,$J as cd,ca as ce,Q9 as cf,_9 as cg,P1 as ch,M4 as ci,Si as cj,pl as ck,np as cl,Q0 as cm,BQ as cn,RJ as co,sX as cp,B1 as cq,Ac as cr,JV as cs,kQ as ct,$L as cu,MJ as cv,Up as cw,kj as cx,Wp as cy,zQ as cz,Z0 as d,wz as d$,IQ as d0,zA as d1,yQ as d2,vQ as d3,wQ as d4,jQ as d5,LM as d6,kJ as d7,DQ as d8,Ld as d9,mJ as dA,sQ as dB,SJ as dC,Tt as dD,uJ as dE,tw as dF,ew as dG,UY as dH,bJ as dI,gJ as dJ,FJ as dK,qY as dL,WY as dM,sw as dN,cQ as dO,hl as dP,dK as dQ,uK as dR,fK as dS,cX as dT,ss as dU,Ka as dV,bo as dW,MC as dX,CJ as dY,hQ as dZ,R4 as d_,Nd as da,fl as db,UV as dc,L9 as dd,GQ as de,Ri as df,J6 as dg,RS as dh,Ed as di,EQ as dj,GR as dk,KR as dl,oQ as dm,D9 as dn,x3 as dp,no as dq,lX as dr,MG as ds,vJ as dt,wJ as du,yJ as dv,cK as dw,Li as dx,RK as dy,hJ as dz,TQ as e,KY as e$,vz as e0,xz as e1,ys as e2,mo as e3,xJ as e4,jW as e5,zF as e6,VF as e7,RF as e8,UF as e9,pJ as eA,Iw as eB,Qf as eC,jw as eD,Xf as eE,Kw as eF,nl as eG,sJ as eH,nJ as eI,oJ as eJ,zi as eK,y3 as eL,bK as eM,$a as eN,sp as eO,QJ as eP,SB as eQ,wB as eR,xB as eS,Dc as eT,XJ as eU,eQ as eV,TE as eW,rn as eX,ds as eY,dQ as eZ,Fs as e_,qF as ea,NF as eb,vC as ec,nB as ed,iu as ee,WJ as ef,f3 as eg,GJ as eh,tB as ei,JJ as ej,qJ as ek,eX as el,Yd as em,U_ as en,jn as eo,KJ as ep,YJ as eq,sF as er,jJ as es,IJ as et,LJ as eu,oF as ev,nF as ew,Qw as ex,uX as ey,Qo as ez,Jn as f,rJ as f0,YY as f1,CQ as f2,L1 as f3,r8 as f4,SQ as f5,qi as f6,pp as f7,$B as f8,QY as f9,eJ as fa,tJ as fb,VJ as fc,nX as fd,y9 as fe,Oo as ff,WV as fg,OV as fh,J4 as fi,Q4 as fj,XN as fk,r3 as fl,TY as fm,LQ as fn,Ls as fo,uQ as fp,KE as fq,WE as fr,$N as fs,$o as ft,c4 as fu,_c as fv,HY as fw,h0 as fx,NJ as fy,pF as g,yF as h,bF as i,xF as j,da as k,fQ as l,N as m,mQ as n,Zo as o,Zs as p,w1 as q,V0 as r,gF as s,Ze as t,nt as u,si as v,RM as w,_n as x,He as y,en as z};