@kaitranntt/ccs 7.50.0-dev.7 → 7.50.0-dev.9

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 (100) hide show
  1. package/README.md +22 -1
  2. package/dist/auth/account-context.d.ts +5 -0
  3. package/dist/auth/account-context.d.ts.map +1 -1
  4. package/dist/auth/account-context.js +30 -5
  5. package/dist/auth/account-context.js.map +1 -1
  6. package/dist/auth/auth-commands.d.ts.map +1 -1
  7. package/dist/auth/auth-commands.js +6 -0
  8. package/dist/auth/auth-commands.js.map +1 -1
  9. package/dist/auth/commands/create-command.d.ts.map +1 -1
  10. package/dist/auth/commands/create-command.js +7 -4
  11. package/dist/auth/commands/create-command.js.map +1 -1
  12. package/dist/auth/commands/list-command.d.ts.map +1 -1
  13. package/dist/auth/commands/list-command.js +3 -1
  14. package/dist/auth/commands/list-command.js.map +1 -1
  15. package/dist/auth/commands/show-command.d.ts.map +1 -1
  16. package/dist/auth/commands/show-command.js +1 -0
  17. package/dist/auth/commands/show-command.js.map +1 -1
  18. package/dist/auth/commands/types.d.ts +2 -0
  19. package/dist/auth/commands/types.d.ts.map +1 -1
  20. package/dist/auth/commands/types.js +2 -0
  21. package/dist/auth/commands/types.js.map +1 -1
  22. package/dist/auth/profile-detector.d.ts.map +1 -1
  23. package/dist/auth/profile-detector.js +1 -0
  24. package/dist/auth/profile-detector.js.map +1 -1
  25. package/dist/auth/profile-registry.d.ts +1 -0
  26. package/dist/auth/profile-registry.d.ts.map +1 -1
  27. package/dist/auth/profile-registry.js +7 -0
  28. package/dist/auth/profile-registry.js.map +1 -1
  29. package/dist/cliproxy/config/generator.d.ts +2 -1
  30. package/dist/cliproxy/config/generator.d.ts.map +1 -1
  31. package/dist/cliproxy/config/generator.js +18 -8
  32. package/dist/cliproxy/config/generator.js.map +1 -1
  33. package/dist/commands/help-command.d.ts.map +1 -1
  34. package/dist/commands/help-command.js +6 -1
  35. package/dist/commands/help-command.js.map +1 -1
  36. package/dist/config/migration-manager.d.ts.map +1 -1
  37. package/dist/config/migration-manager.js +3 -0
  38. package/dist/config/migration-manager.js.map +1 -1
  39. package/dist/config/unified-config-types.d.ts +2 -0
  40. package/dist/config/unified-config-types.d.ts.map +1 -1
  41. package/dist/config/unified-config-types.js.map +1 -1
  42. package/dist/management/instance-manager.d.ts.map +1 -1
  43. package/dist/management/instance-manager.js +1 -0
  44. package/dist/management/instance-manager.js.map +1 -1
  45. package/dist/management/shared-manager.d.ts +12 -0
  46. package/dist/management/shared-manager.d.ts.map +1 -1
  47. package/dist/management/shared-manager.js +99 -0
  48. package/dist/management/shared-manager.js.map +1 -1
  49. package/dist/types/config.d.ts +2 -0
  50. package/dist/types/config.d.ts.map +1 -1
  51. package/dist/types/config.js.map +1 -1
  52. package/dist/ui/assets/accounts-y2u0CVK8.js +1 -0
  53. package/dist/ui/assets/{alert-dialog-DYqj_ln8.js → alert-dialog-CetY4Iww.js} +1 -1
  54. package/dist/ui/assets/{api-DUB7WunM.js → api-5q1FT1uL.js} +1 -1
  55. package/dist/ui/assets/{auth-section-BPGGH-pS.js → auth-section-CaQeee-F.js} +1 -1
  56. package/dist/ui/assets/{backups-section-taD9idsR.js → backups-section-hF88BjYJ.js} +1 -1
  57. package/dist/ui/assets/{checkbox-C2wWJ45q.js → checkbox-Dhm5Fzkb.js} +1 -1
  58. package/dist/ui/assets/cliproxy-BeYNWmY_.js +3 -0
  59. package/dist/ui/assets/{cliproxy-control-panel-D_JZc88E.js → cliproxy-control-panel-CJELeI80.js} +1 -1
  60. package/dist/ui/assets/{confirm-dialog-CQGjNqDg.js → confirm-dialog-Dn3SrwNV.js} +1 -1
  61. package/dist/ui/assets/{copilot-C55LbvKL.js → copilot-vwT-4_V4.js} +1 -1
  62. package/dist/ui/assets/{cursor-DRxLX6HL.js → cursor-CN3lIX63.js} +1 -1
  63. package/dist/ui/assets/{droid-DlECj4OZ.js → droid-DBP2yCY7.js} +2 -2
  64. package/dist/ui/assets/{globalenv-section-BZl3-nsE.js → globalenv-section-DNKAJasL.js} +1 -1
  65. package/dist/ui/assets/{health-KcXhO7a4.js → health-C7tNiLzc.js} +1 -1
  66. package/dist/ui/assets/icons-DrewC9c3.js +1 -0
  67. package/dist/ui/assets/index-C8-ef-r7.js +1 -0
  68. package/dist/ui/assets/{index-mxDT1Fbu.js → index-MGh88HoC.js} +1 -1
  69. package/dist/ui/assets/{index-fsXcStKP.js → index-QBUSDLTx.js} +1 -1
  70. package/dist/ui/assets/index-k-HuyjpO.js +47 -0
  71. package/dist/ui/assets/index-s-oTl3hW.css +1 -0
  72. package/dist/ui/assets/{index-D7S6Q5bp.js → index-uYnNU6Ut.js} +1 -1
  73. package/dist/ui/assets/{proxy-status-widget-BxkoV1g7.js → proxy-status-widget-CIm5vKY7.js} +1 -1
  74. package/dist/ui/assets/{radix-ui-DIWAxjEp.js → radix-ui-C1Gpgz6I.js} +1 -1
  75. package/dist/ui/assets/{separator-lXjk7_Ls.js → separator-BLVyAGAm.js} +1 -1
  76. package/dist/ui/assets/shared-CHH09ZNi.js +8 -0
  77. package/dist/ui/assets/{switch-lf-m6i0R.js → switch-CwLyB4JK.js} +1 -1
  78. package/dist/ui/assets/{tanstack-Hn82hibe.js → tanstack-DDJIhNJd.js} +1 -1
  79. package/dist/ui/assets/{updates-Dok03EVa.js → updates-VlxL3aum.js} +1 -1
  80. package/dist/ui/index.html +5 -5
  81. package/dist/web-server/routes/account-route-helpers.d.ts +3 -0
  82. package/dist/web-server/routes/account-route-helpers.d.ts.map +1 -1
  83. package/dist/web-server/routes/account-route-helpers.js.map +1 -1
  84. package/dist/web-server/routes/account-routes.d.ts.map +1 -1
  85. package/dist/web-server/routes/account-routes.js +124 -0
  86. package/dist/web-server/routes/account-routes.js.map +1 -1
  87. package/dist/web-server/routes/config-routes.d.ts.map +1 -1
  88. package/dist/web-server/routes/config-routes.js +14 -0
  89. package/dist/web-server/routes/config-routes.js.map +1 -1
  90. package/dist/web-server/shared-routes.d.ts.map +1 -1
  91. package/dist/web-server/shared-routes.js +350 -52
  92. package/dist/web-server/shared-routes.js.map +1 -1
  93. package/package.json +1 -1
  94. package/dist/ui/assets/accounts-hMd2X1rs.js +0 -1
  95. package/dist/ui/assets/cliproxy-DQBcXCu5.js +0 -3
  96. package/dist/ui/assets/icons-D7XDTBCN.js +0 -1
  97. package/dist/ui/assets/index-BtROiILs.js +0 -47
  98. package/dist/ui/assets/index-C5CDmWs5.css +0 -1
  99. package/dist/ui/assets/index-Cl4dUJFw.js +0 -1
  100. package/dist/ui/assets/shared-NtPxxEp6.js +0 -1
@@ -1,3 +0,0 @@
1
- import{j as e}from"./radix-ui-DIWAxjEp.js";import{r}from"./react-vendor-CNOkPC89.js";import{a as Le,u as js,b as Bs}from"./tanstack-Hn82hibe.js";import{b as R,C as vs,a as Ns,c as H,P as ye,L as W,I as re,q as Ie,r as Fe,s as Ue,t as Ke,v as he,a1 as bs,a2 as Gs,a3 as $s,a4 as Qs,u as ws,a5 as qe,a6 as He,a7 as Be,a8 as Ge,a9 as ys,aa as as,ab as Vs,ac as zs,ad as Js,ae as ks,W as Ne,B as U,af as Re,ag as ns,ah as Ws,ai as Ys,aj as Xs,ak as Zs,al as is,am as rs,an as et,w as Cs,m as $e,ao as st,ap as tt,aq as at,l as nt,ar as it,as as rt,at as ot,au as lt,av as ct,aw as dt,ax as oe,T as le,o as ce,p as de,ay as ut,az as mt,aA as xt,aB as os,aC as pt,aD as ht,aE as gt,aF as ft,aG as jt,aH as vt,aI as Nt,O as bt,Q as wt,R as ls,U as cs,aJ as yt,aK as kt,aL as Ct,aM as At,aN as St,aO as Pt,aP as Mt,aQ as Tt,aR as Ot,aS as Rt,aT as Et,S as _t}from"./index-BtROiILs.js";import{C as Ee}from"./default-ports-1QQSffYX.js";import{t as K}from"./notifications-B2HqRBj7.js";import{c as As,L as J,n as me,z as Dt,k as se,m as Ss,ao as Qe,R as Ve,o as xe,a1 as fe,T as ze,$ as Lt,ap as Ps,aq as It,ar as ke,Z as je,I as Ms,g as Ft,a3 as Ts,as as Ut,ai as Kt,X as Je,a0 as Os,t as Rs,u as _e,at as qt,q as ds,au as Ht,ah as Es,r as Bt,av as us,l as Gt,a2 as $t,al as Qt,aw as _s}from"./icons-D7XDTBCN.js";import{R as be,A as ms,D as Pe,i as Vt,a as zt,P as Jt}from"./proxy-status-widget-BxkoV1g7.js";import{C as we}from"./checkbox-C2wWJ45q.js";import{C as Wt}from"./confirm-dialog-CQGjNqDg.js";import{S as We}from"./separator-lXjk7_Ls.js";import{S as Ds}from"./switch-lf-m6i0R.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-DYqj_ln8.js";const ge={agy:{provider:"agy",displayName:"Antigravity",defaultModel:"claude-opus-4-6-thinking",models:[{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",description:"Latest flagship, extended thinking",extendedContext:!1,presetMapping:{default:"claude-opus-4-6-thinking",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6-thinking",haiku:"claude-sonnet-4-6"}},{id:"claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking",description:"Previous flagship, extended thinking",presetMapping:{default:"claude-opus-4-5-thinking",opus:"claude-opus-4-5-thinking",sonnet:"claude-sonnet-4-6-thinking",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-6-thinking",name:"Claude Sonnet 4.6 Thinking",description:"Latest Sonnet with extended thinking",presetMapping:{default:"claude-sonnet-4-6-thinking",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6-thinking",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Latest Sonnet baseline",presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking",description:"Balanced with extended thinking",presetMapping:{default:"claude-sonnet-4-5-thinking",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-5-thinking",haiku:"claude-sonnet-4-5"}},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",description:"Fast and capable",presetMapping:{default:"claude-sonnet-4-5",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-5",haiku:"claude-sonnet-4-5"}},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",description:"Google latest model via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3-pro-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash",description:"Fast Gemini model via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}}]},gemini:{provider:"gemini",displayName:"Gemini",defaultModel:"gemini-2.5-pro",models:[{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",tier:"paid",description:"Latest model, requires paid Google account",extendedContext:!0,presetMapping:{default:"gemini-3-pro-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash",tier:"paid",description:"Fast Gemini 3 model, requires paid Google account",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3-pro-preview",sonnet:"gemini-3-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",description:"Stable, works with free Google account",extendedContext:!0,presetMapping:{default:"gemini-2.5-pro",opus:"gemini-2.5-pro",sonnet:"gemini-2.5-pro",haiku:"gemini-2.5-flash"}}]},codex:{provider:"codex",displayName:"Codex",defaultModel:"gpt-5.3-codex",models:[{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",description:"Supports up to xhigh effort",presetMapping:{default:"gpt-5.3-codex",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-mini"}},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",description:"Previous stable Codex model",presetMapping:{default:"gpt-5.2-codex",opus:"gpt-5.2-codex",sonnet:"gpt-5.2-codex",haiku:"gpt-5-mini"}},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"Fast, capped at high effort (no xhigh)",presetMapping:{default:"gpt-5-mini",opus:"gpt-5.3-codex",sonnet:"gpt-5-mini",haiku:"gpt-5-mini"}},{id:"gpt-5.1-codex-max",name:"Codex Max (5.1)",description:"Legacy most capable Codex model",presetMapping:{default:"gpt-5.1-codex-max",opus:"gpt-5.1-codex-max",sonnet:"gpt-5.1-codex-max",haiku:"gpt-5.1-codex-mini"}},{id:"gpt-5.2",name:"GPT 5.2",description:"Latest GPT model",presetMapping:{default:"gpt-5.2",opus:"gpt-5.2",sonnet:"gpt-5.2",haiku:"gpt-5.2"}},{id:"gpt-5.1-codex-mini",name:"Codex Mini",description:"Fast and efficient Codex model"}]},qwen:{provider:"qwen",displayName:"Qwen",defaultModel:"qwen3-coder-plus",models:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus",description:"Code-focused model (1M context)",presetMapping:{default:"qwen3-coder-plus",opus:"qwen3-max",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-flash"}},{id:"qwen3-max",name:"Qwen3 Max",description:"Flagship model (256K context)",presetMapping:{default:"qwen3-max",opus:"qwen3-max",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-flash"}},{id:"qwen3-max-preview",name:"Qwen3 Max Preview",description:"Preview with thinking support (256K)",presetMapping:{default:"qwen3-max-preview",opus:"qwen3-max-preview",sonnet:"qwen3-max",haiku:"qwen3-coder-flash"}},{id:"qwen3-235b",name:"Qwen3 235B",description:"Large 235B A22B model",presetMapping:{default:"qwen3-235b",opus:"qwen3-max",sonnet:"qwen3-235b",haiku:"qwen3-coder-flash"}},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus",description:"Vision-language multimodal"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash",description:"Fast code generation"},{id:"qwen3-32b",name:"Qwen3 32B",description:"Qwen3 32B model"}]},iflow:{provider:"iflow",displayName:"iFlow",defaultModel:"qwen3-coder-plus",models:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus",description:"Recommended default for iFlow accounts",presetMapping:{default:"qwen3-coder-plus",opus:"qwen3-coder-plus",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-plus"}},{id:"qwen3-max",name:"Qwen3 Max",description:"Flagship Qwen model via iFlow"},{id:"kimi-k2.5",name:"Kimi K2.5",description:"Latest Kimi model via iFlow"},{id:"kimi-k2",name:"Kimi K2",description:"Kimi general model"},{id:"deepseek-v3.2-chat",name:"DeepSeek V3.2 Chat",description:"Stable DeepSeek chat model"},{id:"deepseek-r1",name:"DeepSeek R1",description:"Reasoning-focused DeepSeek model"},{id:"glm-4.7",name:"GLM 4.7",description:"Zhipu GLM 4.7 via iFlow"},{id:"minimax-m2.5",name:"MiniMax M2.5",description:"MiniMax M2.5 via iFlow"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus",description:"Vision-language model"}]},kimi:{provider:"kimi",displayName:"Kimi (Moonshot)",defaultModel:"kimi-k2.5",models:[{id:"kimi-k2.5",name:"Kimi K2.5",description:"Latest multimodal model (262K context)",presetMapping:{default:"kimi-k2.5",opus:"kimi-k2.5",sonnet:"kimi-k2-thinking",haiku:"kimi-k2"}},{id:"kimi-k2-thinking",name:"Kimi K2 Thinking",description:"Extended reasoning model",presetMapping:{default:"kimi-k2-thinking",opus:"kimi-k2.5",sonnet:"kimi-k2-thinking",haiku:"kimi-k2"}},{id:"kimi-k2",name:"Kimi K2",description:"Flagship coding model"}]},kiro:{provider:"kiro",displayName:"Kiro (AWS)",defaultModel:"kiro-claude-sonnet-4-5",models:[{id:"kiro-claude-opus-4-5",name:"Kiro Claude Opus 4.5",description:"Claude Opus 4.5 via Kiro (2.2x credit)",presetMapping:{default:"kiro-claude-opus-4-5",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4-5",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4-5",name:"Kiro Claude Sonnet 4.5",description:"Claude Sonnet 4.5 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4-5",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4-5",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4",name:"Kiro Claude Sonnet 4",description:"Claude Sonnet 4 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-haiku-4-5",name:"Kiro Claude Haiku 4.5",description:"Claude Haiku 4.5 via Kiro (0.4x credit)"}]},ghcp:{provider:"ghcp",displayName:"GitHub Copilot (OAuth)",defaultModel:"claude-sonnet-4.5",models:[{id:"claude-opus-4.5",name:"Claude Opus 4.5",description:"Anthropic Claude Opus 4.5 via GitHub Copilot",presetMapping:{default:"claude-opus-4.5",opus:"claude-opus-4.5",sonnet:"claude-sonnet-4.5",haiku:"claude-haiku-4.5"}},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",description:"Anthropic Claude Sonnet 4.5 via GitHub Copilot",presetMapping:{default:"claude-sonnet-4.5",opus:"claude-opus-4.5",sonnet:"claude-sonnet-4.5",haiku:"claude-haiku-4.5"}},{id:"claude-sonnet-4",name:"Claude Sonnet 4",description:"Anthropic Claude Sonnet 4 via GitHub Copilot"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",description:"Anthropic Claude Haiku 4.5 via GitHub Copilot"},{id:"gpt-5.2",name:"GPT-5.2",description:"OpenAI GPT-5.2 via GitHub Copilot",presetMapping:{default:"gpt-5.2",opus:"gpt-5.2",sonnet:"gpt-5.1",haiku:"gpt-5-mini"}},{id:"gpt-5.1",name:"GPT-5.1",description:"OpenAI GPT-5.1 via GitHub Copilot"},{id:"gpt-5",name:"GPT-5",description:"OpenAI GPT-5 via GitHub Copilot"},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"OpenAI GPT-5 Mini via GitHub Copilot"},{id:"gemini-3-pro",name:"Gemini 3 Pro",description:"Google Gemini 3 Pro via GitHub Copilot"}]},claude:{provider:"claude",displayName:"Claude (Anthropic)",defaultModel:"claude-sonnet-4-5-20250929",models:[{id:"claude-opus-4-6",name:"Claude Opus 4.6",description:"Latest flagship model",extendedContext:!0,presetMapping:{default:"claude-opus-4-6",opus:"claude-opus-4-6",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",description:"Most capable Claude model",extendedContext:!0,presetMapping:{default:"claude-opus-4-5-20251101",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",description:"Balanced performance and speed",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-5-20250929",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4",description:"Previous generation Sonnet",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-20250514",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-20250514",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",description:"Fast and efficient"}]}},Me="ccs-internal-managed";async function Yt(){try{const s=await fetch("/api/settings/auth/tokens/raw");return s.ok?(await s.json())?.apiKey?.value??Me:Me}catch{return Me}}async function De(s,a){const t=ge[s];if(!t)return{success:!1};const n=t.models[0],i=n?.presetMapping||{default:t.defaultModel,opus:t.defaultModel,sonnet:t.defaultModel,haiku:t.defaultModel},o=await Yt(),c={env:{ANTHROPIC_BASE_URL:`http://127.0.0.1:${Ee}/api/provider/${s}`,ANTHROPIC_AUTH_TOKEN:o,ANTHROPIC_MODEL:i.default,ANTHROPIC_DEFAULT_OPUS_MODEL:i.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:i.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:i.haiku}};try{return{success:(await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:c})})).ok,presetName:n?.name||t.defaultModel}}catch{return{success:!1}}}function Xt({currentProgress:s,allSteps:a}){return e.jsx("div",{className:"flex justify-center gap-1 pt-2",children:a.map((t,n)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${s>=n?"bg-primary":"bg-muted"}`},t))})}function Zt({providers:s,onSelect:a}){return e.jsx("div",{className:"grid gap-2",children:s.map(t=>e.jsxs("button",{onClick:()=>a(t.id),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:t.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:t.description})]}),e.jsx(As,{className:"w-4 h-4 text-muted-foreground"})]},t.id))})}function ea({selectedProvider:s,providers:a,authCommand:t,isRefreshing:n,isPending:i,onBack:o,onStartAuth:l,onRefresh:c}){const[j,h]=r.useState(!1),x=async b=>{await navigator.clipboard.writeText(b),h(!0),setTimeout(()=>h(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Authenticate with ",a.find(b=>b.id===s)?.name," to add an account"]}),e.jsx(R,{onClick:l,disabled:i,className:"w-full gap-2",size:"lg",children:i?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"w-4 h-4 animate-spin"}),"Authenticating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4"}),"Authenticate in Browser"]})}),i&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Complete the OAuth flow in your browser..."})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or use terminal"})})]}),e.jsx(vs,{children:e.jsxs(Ns,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Dt,{className:"w-4 h-4"}),"Run this command in your terminal:"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 px-3 py-2 bg-muted rounded-md font-mono text-sm",children:t}),e.jsx(R,{variant:"outline",size:"icon",onClick:()=>x(t),children:j?e.jsx(se,{className:"w-4 h-4 text-green-500"}):e.jsx(Ss,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(R,{variant:"ghost",onClick:o,disabled:i,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs(R,{variant:"outline",onClick:c,disabled:n||i,children:[e.jsx(Ve,{className:`w-4 h-4 mr-2 ${n?"animate-spin":""}`}),n?"Checking...":"Refresh Status"]})]})]})}function sa({accounts:s,privacyMode:a,onSelect:t,onAddNew:n,onBack:i}){return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Select an account (",s.length,")"]}),e.jsx("div",{className:"grid gap-2 max-h-[320px] overflow-y-auto pr-1",children:s.map(o=>e.jsxs("button",{type:"button",onClick:()=>t(o),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center",children:e.jsx(xe,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsx("div",{className:H("font-medium",a&&ye),children:o.email||o.id}),o.isDefault&&e.jsx("div",{className:"text-xs text-muted-foreground",children:"Default account"})]})]}),e.jsx(As,{className:"w-4 h-4 text-muted-foreground"})]},o.id))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or"})})]}),e.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 p-3 border-2 border-dashed border-primary/50 rounded-lg hover:border-primary hover:bg-primary/5 transition-colors text-left",onClick:n,children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(me,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-primary",children:"Add new account"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Authenticate with a different account"})]})]}),e.jsx("div",{className:"flex items-center justify-between pt-2",children:e.jsxs(R,{variant:"ghost",onClick:i,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),"Back"]})})]})}const xs="__custom__";function ta({selectedProvider:s,selectedAccount:a,variantName:t,modelName:n,isPending:i,privacyMode:o,onVariantNameChange:l,onModelChange:c,onBack:j,onSkip:h,onCreate:x}){const b=ge[s]?.models||[],u=n&&!b.some(g=>g.id===n),[v,C]=r.useState(u),m=g=>{g===xs?(C(!0),c("")):(C(!1),c(g))};return e.jsxs("div",{className:"space-y-4",children:[a&&e.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted/50 rounded-md text-sm",children:[e.jsx(xe,{className:"w-4 h-4"}),e.jsxs("span",{children:["Using:"," ",e.jsx("span",{className:H(o&&ye),children:a.email||a.id})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(W,{htmlFor:"variant-name",children:"Variant Name *"}),e.jsx(re,{id:"variant-name",value:t,onChange:g=>l(g.target.value),placeholder:"e.g., my-gemini, g3, flash"}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Use this name to invoke: ccs ",t||"<name>",' "prompt"']})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(W,{children:"Model"}),v?e.jsxs("div",{className:"space-y-2",children:[e.jsx(re,{value:n,onChange:g=>c(g.target.value),placeholder:"e.g., gemini-2.5-pro, claude-opus-4-5"}),e.jsx("button",{type:"button",className:"text-xs text-primary hover:underline",onClick:()=>C(!1),children:"Choose from presets instead"})]}):e.jsxs(Ie,{value:b.some(g=>g.id===n)?n:"",onValueChange:m,children:[e.jsx(Fe,{children:e.jsx(Ue,{placeholder:"Select a model"})}),e.jsxs(Ke,{children:[b.map(g=>e.jsx(he,{value:g.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:g.name}),g.description&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["- ",g.description]})]})},g.id)),e.jsx(he,{value:xs,children:e.jsx("span",{className:"text-primary",children:"Custom model name..."})})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:v?"Enter any model name supported by CLIProxy":`Default: ${ge[s]?.defaultModel||"provider default"}`})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs(R,{variant:"ghost",onClick:j,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(R,{variant:"ghost",onClick:h,children:"Skip"}),e.jsx(R,{onClick:x,disabled:!t||i,children:i?"Creating...":"Create Variant"})]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"Skip if you just wanted to add an account without creating a variant"})]})}function aa({variantName:s,onClose:a}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-16 h-16 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center",children:e.jsx(se,{className:"w-8 h-8 text-green-600 dark:text-green-400"})})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-lg",children:"Variant Created!"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Your custom variant is ready to use"})]}),e.jsx(vs,{children:e.jsxs(Ns,{className:"p-4 space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Usage:"}),e.jsxs("code",{className:"block px-3 py-2 bg-muted rounded-md font-mono text-sm",children:["ccs ",s,' "your prompt here"']})]})}),e.jsx(R,{onClick:a,className:"w-full",children:"Done"})]})}function na({open:s,onClose:a}){const[t,n]=r.useState("provider"),[i,o]=r.useState(""),[l,c]=r.useState(null),[j,h]=r.useState(""),[x,b]=r.useState(""),[u,v]=r.useState(!1),[C,m]=r.useState(!1),{data:g,refetch:p}=bs(),O=Gs(),P=$s(),k=Qs(),{privacyMode:_}=ws(),w=g?.authStatus.find(M=>M.provider===i),E=r.useMemo(()=>w?.accounts||[],[w?.accounts]);r.useEffect(()=>{if(!s){const M=setTimeout(()=>{n("provider"),o(""),c(null),h(""),b(""),m(!1)},0);return()=>clearTimeout(M)}},[s]),r.useEffect(()=>{if(t==="auth"&&E.length>0&&!C){const M=setTimeout(()=>{n("account")},0);return()=>clearTimeout(M)}},[t,E,C]);const N=async()=>{v(!0),await p(),v(!1)},F=()=>{const M=(w?.accounts?.length||0)===0;P.mutate({provider:i},{onSuccess:async T=>{if(M){const I=await De(i);I.success&&I.presetName?K.success(`Applied "${I.presetName}" preset`):I.success||K.warning("Account added, but failed to apply default preset")}T.account&&(c(T.account),n("variant")),p()}})},y=M=>{o(M),(g?.authStatus.find($=>$.provider===M)?.accounts||[]).length===0?n("auth"):n("account")},f=M=>{c(M),n("variant")},A=async()=>{if(!(!j||!i))try{await O.mutateAsync({name:j,provider:i,model:x||void 0,account:l?.id}),n("success")}catch(M){console.error("Failed to create variant:",M)}},L=`ccs ${i} --auth --add`,B=zs(t),G=M=>{if(!M&&(P.isPending&&i&&k.mutate(i),t==="success"||t==="provider")){a();return}};return e.jsx(qe,{open:s,onOpenChange:G,children:e.jsxs(He,{className:"sm:max-w-lg",onPointerDownOutside:M=>{t!=="success"&&t!=="provider"&&M.preventDefault()},onEscapeKeyDown:M=>{(P.isPending||O.isPending)&&M.preventDefault()},children:[e.jsxs(Be,{children:[e.jsxs(Ge,{className:"flex items-center gap-2",children:[e.jsx(fe,{className:"w-5 h-5 text-primary"}),"Quick Setup Wizard"]}),e.jsxs(ys,{children:[t==="provider"&&"Select a provider to get started",t==="auth"&&"Authenticate with your provider",t==="account"&&"Select which account to use",t==="variant"&&"Create your custom variant",t==="success"&&"Setup complete!"]})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[t==="provider"&&e.jsx(Zt,{providers:as,onSelect:y}),t==="auth"&&e.jsx(ea,{selectedProvider:i,providers:as,authCommand:L,isRefreshing:u,isPending:P.isPending,onBack:()=>n("provider"),onStartAuth:F,onRefresh:N}),t==="account"&&e.jsx(sa,{accounts:E,privacyMode:_,onSelect:f,onAddNew:()=>{m(!0),n("auth")},onBack:()=>n("provider")}),t==="variant"&&e.jsx(ta,{selectedProvider:i,selectedAccount:l,variantName:j,modelName:x,isPending:O.isPending,privacyMode:_,onVariantNameChange:h,onModelChange:b,onBack:()=>E.length>0?n("account"):n("provider"),onSkip:a,onCreate:A}),t==="success"&&e.jsx(aa,{variantName:j,onClose:a})]}),e.jsx(Xt,{currentProgress:B,allSteps:Vs})]})})}const ia=3e3,ra=300*1e3;async function Te(s){const a=await s.text();if(!a)return{};try{return JSON.parse(a)}catch{const t=s.status>=400?`Request failed with status ${s.status}`:void 0;return t?{error:t}:{}}}const ie={provider:null,isAuthenticating:!1,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:!1};function oa(){const[s,a]=r.useState(ie),t=r.useRef(null),n=r.useRef(null),i=r.useRef(0),o=r.useRef(!1),l=Le(),c=r.useCallback(()=>{n.current&&(clearInterval(n.current),n.current=null)},[]);r.useEffect(()=>()=>{t.current?.abort(),c(),o.current=!1},[c]);const j=r.useCallback(async(u,v)=>{if(Date.now()-i.current>ra){c(),a(C=>({...C,isAuthenticating:!1,error:"Authentication timed out. Please try again."}));return}try{const m=await(await fetch(`/api/cliproxy/auth/${u}/status?state=${encodeURIComponent(v)}`)).json();if(m.status==="ok")c(),l.invalidateQueries({queryKey:["cliproxy-auth"]}),l.invalidateQueries({queryKey:["account-quota"]}),K.success(`${u} authentication successful`),o.current=!1,a(ie);else if(m.status==="auth_url"){const g=m.url||m.auth_url;g&&(a(p=>({...p,authUrl:g})),o.current||(o.current=!0,window.open(g,"_blank")))}else if(m.status==="device_code"){c();const g=m.user_code&&m.verification_url?`Open ${m.verification_url} and enter code: ${m.user_code}`:"Switch to Device Code method and try again.";K.error("Provider returned Device Code flow in callback mode"),a(p=>({...p,isAuthenticating:!1,error:g}))}else if(m.status==="error"){c();const g=m.error||"Authentication failed";K.error(g),a(p=>({...p,isAuthenticating:!1,error:g}))}}catch{}},[l,c]),h=r.useCallback(async(u,v)=>{if(!Js(u)){a({...ie,error:`Unknown provider: ${u}`});return}t.current?.abort(),c(),o.current=!1;const C=new AbortController;t.current=C;const g=(v?.flowType||(ks(u)?"device_code":"authorization_code"))==="device_code",p=v?.startEndpoint||(g?"start":"start-url"),O={nickname:v?.nickname,kiroMethod:v?.kiroMethod,riskAcknowledgement:v?.riskAcknowledgement};a({provider:u,isAuthenticating:!0,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:g});try{if(p==="start")fetch(`/api/cliproxy/auth/${u}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O),signal:C.signal}).then(async P=>{const k=await Te(P),_=k.success===!0;if(P.ok&&_)l.invalidateQueries({queryKey:["cliproxy-auth"]}),l.invalidateQueries({queryKey:["account-quota"]}),o.current=!1,a(ie);else{const w=typeof k.error=="string"?k.error:"Authentication failed";K.error(w),a(E=>({...E,isAuthenticating:!1,error:w}))}}).catch(P=>{if(P instanceof Error&&P.name==="AbortError")return;const k=P instanceof Error?P.message:"Authentication failed";K.error(k),a(_=>({..._,isAuthenticating:!1,error:k}))});else{const P=await fetch(`/api/cliproxy/auth/${u}/start-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O),signal:C.signal}),k=await Te(P),_=k.success===!0;if(!P.ok||!_){const N=typeof k.error=="string"?k.error:"Failed to start OAuth";throw new Error(N)}const w=typeof k.authUrl=="string"?k.authUrl:null,E=typeof k.state=="string"?k.state:null;a(N=>({...N,authUrl:w,oauthState:E})),w&&(o.current=!0,window.open(w,"_blank")),E&&(i.current=Date.now(),n.current=setInterval(()=>{j(u,E)},ia))}}catch(P){if(P instanceof Error&&P.name==="AbortError"){o.current=!1,a(ie);return}const k=P instanceof Error?P.message:"Authentication failed";K.error(k),a(_=>({..._,isAuthenticating:!1,error:k}))}},[j,c,l]),x=r.useCallback(()=>{const u=s.provider;t.current?.abort(),c(),o.current=!1,a(ie),u&&Ne.cliproxy.auth.cancel(u).catch(()=>{})},[s.provider,c]),b=r.useCallback(async u=>{if(s.provider){a(v=>({...v,isSubmittingCallback:!0,error:null}));try{const v=await fetch(`/api/cliproxy/auth/${s.provider}/submit-callback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirectUrl:u})}),C=await Te(v),m=C.success===!0;if(v.ok&&m)c(),l.invalidateQueries({queryKey:["cliproxy-auth"]}),l.invalidateQueries({queryKey:["account-quota"]}),K.success(`${s.provider} authentication successful`),a(ie);else{const g=typeof C.error=="string"?C.error:"Callback submission failed";throw new Error(g)}}catch(v){const C=v instanceof Error?v.message:"Failed to submit callback";K.error(C),a(m=>({...m,isSubmittingCallback:!1,error:C}))}}},[s.provider,l,c]);return r.useMemo(()=>({...s,startAuth:h,cancelAuth:x,submitCallback:b}),[s,h,x,b])}function Ls({className:s,showAcknowledgement:a=!1,acknowledgementPhrase:t=be,acknowledgementText:n="",onAcknowledgementTextChange:i,disabled:o=!1,showProxySettingsLink:l=!1}){const c="OAuth Account Safety Warning",j="Issue #509 · Gemini + AGY OAuth risk",h=e.jsxs(e.Fragment,{children:["Issue #509 documents suspension/ban reports tied to ",e.jsx("code",{className:"font-mono",children:"ccs agy"})," ","and shared-account usage between ",e.jsx("code",{className:"font-mono",children:"ccs gemini"})," and"," ",e.jsx("code",{className:"font-mono",children:"ccs agy"}),"."]}),x=e.jsx(e.Fragment,{children:"Continue only if you accept full responsibility for OAuth and account-access risk."});return e.jsxs("section",{role:"alert",className:H("relative overflow-hidden rounded-xl border border-amber-500/30 bg-gradient-to-br from-amber-50 via-background to-rose-50/70 shadow-sm dark:from-amber-950/20 dark:to-rose-950/20",s),children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-0.5 bg-gradient-to-r from-amber-500 via-orange-500 to-rose-500"}),e.jsxs("div",{className:"space-y-3 p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"mt-0.5 inline-flex h-7 w-7 items-center justify-center rounded-md bg-amber-500/15 text-amber-700 dark:text-amber-400",children:e.jsx(ze,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:c}),e.jsx("p",{className:"text-xs text-muted-foreground",children:j})]})]}),e.jsx(U,{variant:"outline",className:"border-amber-500/40 text-amber-700 dark:text-amber-300",children:"High Risk"})]}),e.jsxs("div",{className:"space-y-2 text-sm leading-relaxed",children:[e.jsx("p",{children:h}),e.jsx("p",{className:"font-medium text-amber-900 dark:text-amber-200",children:x}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"CCS is provided as-is and does not take responsibility for suspension, bans, or access loss from upstream providers."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("a",{href:"https://github.com/kaitranntt/ccs/issues/509",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-xs font-medium text-amber-800 transition-colors hover:bg-amber-500/15 dark:text-amber-200",children:["Read issue #509",e.jsx(me,{className:"h-3.5 w-3.5"})]}),l&&e.jsxs("a",{href:"/settings?tab=proxy",className:"inline-flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-xs font-medium text-amber-800 transition-colors hover:bg-amber-500/15 dark:text-amber-200",children:[e.jsx(Lt,{className:"h-3.5 w-3.5"}),"Gemini + AGY controls: Settings > Proxy"]}),e.jsx("span",{className:"rounded-md border border-border/70 bg-muted/60 px-2.5 py-1 text-xs text-muted-foreground",children:"Applies to CLI and dashboard auth"})]}),a&&i&&e.jsxs("div",{className:"rounded-lg border border-amber-500/25 bg-amber-500/5 p-2.5",children:[e.jsxs(W,{htmlFor:"account-risk-ack-text",className:"text-xs leading-5",children:["Type exact phrase to continue:"," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:t})]}),e.jsx(re,{id:"account-risk-ack-text",value:n,onChange:C=>i(C.target.value),placeholder:t,disabled:o,className:"mt-2 font-mono text-xs"})]})]})]})}function la({className:s,value:a,onChange:t,disabled:n=!1}){const i=[a.reviewedIssue509,a.understandsBanRisk,a.acceptsFullResponsibility,a.typedPhrase.trim().replace(/\s+/g," ").toUpperCase()===ms].filter(Boolean).length,o=i/4*100,l=c=>{t({...a,...c})};return e.jsxs("section",{role:"alert",className:H("relative overflow-hidden rounded-xl border border-rose-500/35 bg-gradient-to-br from-rose-50 via-background to-amber-50/70 p-4 shadow-sm dark:from-rose-950/20 dark:to-amber-950/20",s),children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-0.5 bg-gradient-to-r from-rose-500 via-orange-500 to-amber-500"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"mt-0.5 inline-flex h-7 w-7 items-center justify-center rounded-md bg-rose-500/15 text-rose-700 dark:text-rose-300",children:e.jsx(ze,{className:"h-4 w-4"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:"Antigravity OAuth Responsibility"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Complete all 4 steps before you can authenticate."})]})]}),e.jsx(U,{variant:"outline",className:"border-rose-500/40 text-rose-700 dark:text-rose-300",children:"Mandatory"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:"Completion"}),e.jsxs("span",{children:[i,"/4 steps"]})]}),e.jsx(Re,{value:o,className:"h-2"})]}),e.jsxs("div",{className:"space-y-3 rounded-lg border border-rose-500/20 bg-rose-500/5 p-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(we,{id:"agy-step-reviewed-issue",checked:a.reviewedIssue509,onCheckedChange:c=>l({reviewedIssue509:!!c}),disabled:n}),e.jsx(W,{htmlFor:"agy-step-reviewed-issue",className:"text-xs leading-5",children:"Step 1: I reviewed issue #509 and understand AGY OAuth can trigger account bans/suspensions."})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(we,{id:"agy-step-understands-risk",checked:a.understandsBanRisk,onCheckedChange:c=>l({understandsBanRisk:!!c}),disabled:n}),e.jsx(W,{htmlFor:"agy-step-understands-risk",className:"text-xs leading-5",children:"Step 2: I understand this OAuth action is my own decision and I accept the upstream risk."})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(we,{id:"agy-step-accept-responsibility",checked:a.acceptsFullResponsibility,onCheckedChange:c=>l({acceptsFullResponsibility:!!c}),disabled:n}),e.jsx(W,{htmlFor:"agy-step-accept-responsibility",className:"text-xs leading-5",children:"Step 3: I accept full responsibility. CCS is not liable for suspension, bans, or access loss."})]})]}),e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/25 bg-amber-500/5 p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-amber-800 dark:text-amber-200",children:[e.jsx(Ps,{className:"h-3.5 w-3.5"}),"Step 4: Type exact phrase to continue"]}),e.jsx(re,{value:a.typedPhrase,onChange:c=>l({typedPhrase:c.target.value}),placeholder:ms,disabled:n,className:"font-mono text-xs"})]}),e.jsx("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:e.jsxs("a",{href:"https://github.com/kaitranntt/ccs/issues/509",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border border-rose-500/30 bg-rose-500/10 px-2.5 py-1 font-medium text-rose-800 transition-colors hover:bg-rose-500/15 dark:text-rose-200",children:["Read issue #509",e.jsx(me,{className:"h-3.5 w-3.5"})]})})]})]})}function ca(s){return s.trim().replace(/\s+/g," ").toUpperCase()}function da({open:s,onClose:a,provider:t,displayName:n,isFirstAccount:i=!1}){const[o,l]=r.useState(""),[c,j]=r.useState(""),[h,x]=r.useState(!1),[b,u]=r.useState(null),[v,C]=r.useState(""),[m,g]=r.useState(Pe),[p,O]=r.useState(!1),[P,k]=r.useState(!1),[_,w]=r.useState(ns),E=r.useRef(!1),N=oa(),F=Ws(),y=t==="kiro",f=t==="gemini",A=t==="agy"&&!p,L=t==="agy"&&P,B=Vt(m),G=ca(v)===be,M=ks(t),T=Ys(t),I=Xs(_),$=y?I.flowType==="device_code":M,Q=N.isAuthenticating||F.isPending,Y=o.trim(),X=b||N.error,d=r.useCallback(async()=>{const S=await fetch("/api/settings/auth/antigravity-risk");if(!S.ok)throw new Error("Failed to load Antigravity power user setting");return(await S.json()).antigravityAckBypass===!0},[]),D=()=>{l(""),j(""),x(!1),u(null),C(""),g(Pe),O(!1),k(!1),w(ns),E.current=!1,a()};r.useEffect(()=>{s&&(C(""),g(Pe),u(null))},[t,s]),r.useEffect(()=>{let S=!1;if(!s||t!=="agy"){O(!1),k(!1);return}return(async()=>{try{k(!0);const ee=await d();S||O(ee)}catch{S||O(!1)}finally{S||k(!1)}})(),()=>{S=!0}},[d,s,t]),r.useEffect(()=>{if(!s||t!=="agy"||!N.error||!p)return;const S=N.error.toLowerCase();if(!(S.includes("agy_risk_ack_required")||S.includes("responsibility acknowledgement")||S.includes("responsibility checklist")))return;let ee=!1;return(async()=>{try{k(!0);const ve=await d();if(ee)return;O(ve),ve||u("Power user mode is off. Complete the AGY checklist and retry.")}catch{if(ee)return;O(!1),u("Power user mode is off. Complete the AGY checklist and retry.")}finally{ee||k(!1)}})(),()=>{ee=!0}},[p,N.error,d,s,t]),r.useEffect(()=>{!N.isAuthenticating&&!N.error&&N.provider===null&&s&&E.current&&(E.current=!1,(async()=>{try{const te=await De(t);te.success&&te.presetName&&i&&K.success(`Applied "${te.presetName}" preset`)}catch{}D()})())},[N.isAuthenticating,N.error,N.provider]);const V=()=>{N.cancelAuth(),D()},Z=async()=>{N.authUrl&&(await navigator.clipboard.writeText(N.authUrl),x(!0),setTimeout(()=>x(!1),2e3))},pe=()=>{c.trim()&&N.submitCallback(c.trim())},Ce=()=>{if(L){u("Loading Antigravity safety settings. Please wait a moment and retry.");return}if(A&&!B){u("Complete all Antigravity responsibility steps before authenticating this provider.");return}if(f&&!G){u(`Type "${be}" to acknowledge the account safety warning before authenticating this provider.`);return}if(T&&!Y){u(`Nickname is required for ${n} accounts.`);return}u(null),E.current=!0,N.startAuth(t,{nickname:Y||void 0,kiroMethod:y?_:void 0,flowType:y?I.flowType:void 0,startEndpoint:y?I.startEndpoint:void 0,riskAcknowledgement:A?{version:zt,reviewedIssue509:m.reviewedIssue509,understandsBanRisk:m.understandsBanRisk,acceptsFullResponsibility:m.acceptsFullResponsibility,typedPhrase:m.typedPhrase}:void 0})},Ae=()=>{E.current=!0,F.mutate(void 0,{onSuccess:async()=>{const S=await De("kiro");S.success&&S.presetName&&i&&K.success(`Applied "${S.presetName}" preset`),D()}})},Se=S=>{S||V()},z=N.isAuthenticating;return e.jsx(qe,{open:s,onOpenChange:Se,children:e.jsxs(He,{className:"sm:max-w-md",onInteractOutside:S=>{z&&S.preventDefault()},children:[e.jsxs(Be,{children:[e.jsxs(Ge,{children:["Add ",n," Account"]}),e.jsx(ys,{children:y?"Choose a Kiro auth method, then authenticate via browser or import from Kiro IDE.":$?"Click Authenticate. A verification code will appear for you to enter on the provider website.":"Click Authenticate to get an OAuth URL. Open it in any browser to sign in."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[A&&!z&&e.jsx(la,{value:m,onChange:S=>{g(S),u(null)},disabled:Q}),t==="agy"&&p&&!z&&e.jsxs("div",{className:"rounded-lg border border-amber-400/35 bg-amber-50/70 p-3 text-xs text-amber-900 dark:border-amber-800/60 dark:bg-amber-950/25 dark:text-amber-100",children:[e.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 font-semibold",children:[e.jsx(Ps,{className:"h-3.5 w-3.5"}),"Power user mode enabled"]}),"AGY responsibility checklist is skipped from Settings ",">"," Proxy. You accept full responsibility for OAuth/account risk."]}),f&&!z&&e.jsx(Ls,{showAcknowledgement:!0,acknowledgementPhrase:be,acknowledgementText:v,onAcknowledgementTextChange:S=>{C(S),u(null)},disabled:Q}),y&&!z&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(W,{htmlFor:"kiro-auth-method",children:"Auth Method"}),e.jsxs(Ie,{value:_,onValueChange:S=>{w(S),u(null)},children:[e.jsx(Fe,{id:"kiro-auth-method",children:e.jsx(Ue,{placeholder:"Select Kiro auth method"})}),e.jsx(Ke,{children:Zs.map(S=>e.jsx(he,{value:S.id,children:S.label},S.id))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:I.description})]}),!z&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(W,{htmlFor:"nickname",children:T?"Nickname (required)":"Nickname (optional)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(xe,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(re,{id:"nickname",value:o,onChange:S=>{l(S.target.value),u(null)},placeholder:"e.g., work, personal",disabled:Q,className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:T?"Required for this provider. Use a unique friendly name (e.g., work, personal).":"A friendly name to identify this account. Auto-generated from email if left empty."})]}),z&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx(J,{className:"w-4 h-4 inline mr-2 animate-spin"}),"Waiting for authentication..."]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:N.isDeviceCodeFlow?"A verification code dialog will appear shortly. Enter the code on the provider website.":"Complete the authentication in your browser. This dialog closes automatically."})]}),N.authUrl&&!N.isDeviceCodeFlow&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(W,{className:"text-xs",children:"Open this URL in any browser to sign in:"}),e.jsxs("div",{className:"p-3 bg-muted rounded-md",children:[e.jsx("p",{className:"text-xs text-muted-foreground break-all font-mono line-clamp-3",children:N.authUrl}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(R,{variant:"outline",size:"sm",onClick:Z,children:h?e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-3 h-3 mr-1"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ss,{className:"w-3 h-3 mr-1"}),"Copy"]})}),e.jsxs(R,{variant:"outline",size:"sm",onClick:()=>{if(!N.authUrl)return;const S=window.open(N.authUrl,"_blank");(!S||S.closed||typeof S.closed>"u")&&K.warning("Popup blocked. Copy the URL above and open it manually in your browser.",{duration:5e3})},children:[e.jsx(me,{className:"w-3 h-3 mr-1"}),"Open"]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(W,{htmlFor:"callback-url",className:"text-xs",children:"Redirect didn't work? Paste the callback URL:"}),e.jsx(re,{id:"callback-url",value:c,onChange:S=>j(S.target.value),placeholder:"Paste the redirect URL here...",className:"font-mono text-xs"}),e.jsx(R,{variant:"secondary",size:"sm",onClick:pe,disabled:!c.trim()||N.isSubmittingCallback,children:N.isSubmittingCallback?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"w-3 h-3 mr-1 animate-spin"}),"Submitting..."]}):"Submit Callback"})]})]}),!N.authUrl&&!N.isDeviceCodeFlow&&e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"Preparing sign-in URL..."})]}),X&&e.jsx("p",{className:"text-xs text-center text-destructive",children:X}),F.isPending&&e.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[e.jsx(J,{className:"w-4 h-4 inline mr-2 animate-spin"}),"Importing token from Kiro IDE..."]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[e.jsx(R,{variant:"ghost",onClick:V,children:"Cancel"}),y&&!z&&e.jsx(R,{variant:"outline",onClick:Ae,disabled:Q,children:F.isPending?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"w-4 h-4 mr-2 animate-spin"}),"Importing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(It,{className:"w-4 h-4 mr-2"}),"Import from IDE"]})}),!z&&e.jsxs(R,{onClick:Ce,disabled:Q||L||T&&!Y||A&&!B||f&&!G,children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),"Authenticate"]})]})]})]})})}const Ye="[1m]";function ua(s){return s.toLowerCase().startsWith("gemini-")}function Xe(s){return s.toLowerCase().endsWith(Ye.toLowerCase())}function ma(s){return!s||Xe(s)?s:`${s}${Ye}`}function Is(s){return s&&(Xe(s)?s.slice(0,-Ye.length):s)}const ps=["ANTHROPIC_MODEL"],xa=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"];function pa(s){const a=s?.env||{};return xa.filter(t=>!a[t]?.trim())}function ha(s){const[a,t]=r.useState(null),[n,i]=r.useState(!1),o=Le(),{data:l,isLoading:c,refetch:j}=js({queryKey:["settings",s],queryFn:async()=>{const y=await fetch(`/api/settings/${s}/raw`);return y.ok?y.json():{profile:s,settings:{env:{}},mtime:Date.now(),path:`~/.ccs/profiles/${s}/settings.json`}}}),h=l?.settings,x=r.useMemo(()=>a!==null?a:h?JSON.stringify(h,null,2):`{
2
- "env": {}
3
- }`,[a,h]),b=r.useCallback(y=>{t(y)},[]),u=r.useMemo(()=>{try{return JSON.parse(x)}catch{return h||{env:{}}}},[x,h]),v=u?.env?.ANTHROPIC_MODEL,C=u?.env?.ANTHROPIC_DEFAULT_OPUS_MODEL,m=u?.env?.ANTHROPIC_DEFAULT_SONNET_MODEL,g=u?.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL,p=r.useMemo(()=>{const y=u?.env||{};return ps.some(f=>{const A=y[f];return A&&Xe(A)})},[u]),O=r.useCallback((y,f)=>{const A={...u?.env||{},[y]:f},L={...u,env:A};t(JSON.stringify(L,null,2))},[u]),P=r.useCallback(y=>{const f=u?.env||{},A={};for(const G of ps){const M=f[G];M&&(A[G]=y?ma(M):Is(M))}const L={...f,...A};delete L.CCS_EXTENDED_CONTEXT;const B={...u,env:L};t(JSON.stringify(B,null,2))},[u]),k=r.useCallback(y=>{const f={...u?.env||{},...y},A={...u,env:f};t(JSON.stringify(A,null,2))},[u]),_=r.useMemo(()=>{try{return JSON.parse(x),!0}catch{return!1}},[x]),w=r.useMemo(()=>a===null?!1:a!==JSON.stringify(h,null,2),[a,h]),E=r.useMemo(()=>pa(u),[u]),N=Bs({mutationFn:async()=>{const y=JSON.parse(x),f=await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:y,expectedMtime:l?.mtime})});if(f.status===409)throw new Error("CONFLICT");if(!f.ok)throw new Error("Failed to save");return f.json()},onSuccess:y=>{o.invalidateQueries({queryKey:["settings",s]}),t(null),y?.warning?K.success("Settings saved",{description:y.warning}):K.success("Settings saved")},onError:y=>{y.message==="CONFLICT"?i(!0):K.error(y.message)}}),F=async y=>{i(!1),y?(await j(),N.mutate()):t(null)};return{data:l,isLoading:c,refetch:j,rawJsonContent:x,rawJsonEdits:a,isRawJsonValid:_,hasChanges:w,currentSettings:u,currentModel:v,opusModel:C,sonnetModel:m,haikuModel:g,extendedContextEnabled:p,toggleExtendedContext:P,handleRawJsonChange:b,updateEnvValue:O,updateEnvValues:k,saveMutation:{mutate:()=>N.mutate(),isPending:N.isPending},conflictDialog:n,setConflictDialog:i,handleConflictResolve:F,missingRequiredFields:E}}const ga=/-(medium|high|xhigh)$/i;function fa(s){if(!s)return;const a=s.trim().match(ga);if(a?.[1])return a[1].toLowerCase()}function Oe(s){if(!s)return null;const a=fa(s);return a?{label:`Pinned ${a}`,explicit:!0}:{label:"Auto effort",explicit:!1}}function ne({label:s,description:a,value:t,onChange:n,catalog:i,allModels:o,disabled:l}){const c=new Set(i?.models.map(x=>x.id)||[]),j=i?.provider==="codex",h=j?Oe(t):null;return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium",children:s}),a&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:a})]}),e.jsxs(Ie,{value:t||"",onValueChange:n,disabled:l,children:[e.jsx(Fe,{className:"h-9",children:e.jsx(Ue,{placeholder:"Select model",children:t&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:t}),h&&e.jsx(U,{variant:h.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:h.label})]})})}),e.jsxs(Ke,{className:"max-h-[300px]",children:[i&&i.models.length>0&&e.jsxs(is,{children:[e.jsx(rs,{className:"text-xs text-primary",children:"Recommended"}),i.models.map(x=>{const b=j?Oe(x.id):null;return e.jsx(he,{value:x.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:x.id}),x.tier==="paid"&&e.jsx(U,{variant:"outline",className:"text-[9px] h-4 px-1",children:"PAID"}),b&&e.jsx(U,{variant:b.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:b.label}),t===x.id&&e.jsx(se,{className:"w-3 h-3 text-primary ml-auto"})]})},x.id)})]}),o.length>0&&e.jsxs(is,{children:[e.jsxs(rs,{className:"text-xs text-muted-foreground",children:["All Models (",o.length,")"]}),o.filter(x=>!c.has(x.id)).map(x=>{const b=j?Oe(x.id):null;return e.jsx(he,{value:x.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:x.id}),b&&e.jsx(U,{variant:b.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:b.label}),t===x.id&&e.jsx(se,{className:"w-3 h-3 text-primary ml-auto"})]})},x.id)})]}),(!i||i.models.length===0)&&o.length===0&&e.jsx("div",{className:"py-2 px-3 text-xs text-muted-foreground",children:"No models available"})]})]})]})}function ja({open:s,onClose:a,currentValues:t,onApply:n,onSave:i,isSaving:o,catalog:l,allModels:c}){const[j,h]=r.useState(t),[x,b]=r.useState(""),u=v=>{v?(h(t),b("")):a()};return e.jsx(qe,{open:s,onOpenChange:u,children:e.jsxs(He,{className:"sm:max-w-md",children:[e.jsx(Be,{children:e.jsxs(Ge,{className:"flex items-center gap-2",children:[e.jsx(fe,{className:"w-4 h-4"}),"Custom Preset"]})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(W,{htmlFor:"preset-name",children:"Preset Name (optional)"}),e.jsx(re,{id:"preset-name",value:x,onChange:v=>b(v.target.value),placeholder:"e.g., My Custom Config",className:"text-sm"})]}),e.jsx(We,{}),l?.provider==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground rounded-md border bg-muted/30 px-2.5 py-2",children:["Codex tip: suffixes ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and ",e.jsx("code",{children:"-xhigh"})," ","pin effort. Unsuffixed models use Thinking settings."]}),e.jsx(ne,{label:"Default Model",description:"Used when no specific tier is requested",value:j.default,onChange:v=>h({...j,default:v}),catalog:l,allModels:c}),e.jsx(ne,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:j.opus,onChange:v=>h({...j,opus:v}),catalog:l,allModels:c}),e.jsx(ne,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:j.sonnet,onChange:v=>h({...j,sonnet:v}),catalog:l,allModels:c}),e.jsx(ne,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:j.haiku,onChange:v=>h({...j,haiku:v}),catalog:l,allModels:c})]}),e.jsxs(et,{className:"gap-2 sm:gap-0",children:[e.jsx(R,{variant:"outline",onClick:a,children:"Cancel"}),i&&e.jsxs(R,{variant:"secondary",onClick:()=>i(j,x||void 0),disabled:o||!x.trim(),children:[o?e.jsx(J,{className:"w-4 h-4 mr-1 animate-spin"}):e.jsx(ke,{className:"w-4 h-4 mr-1"}),"Save Preset"]}),e.jsxs(R,{onClick:()=>n(j,x||void 0),children:[e.jsx(je,{className:"w-4 h-4 mr-1"}),"Apply Preset"]})]})]})})}function ue({label:s,command:a}){return e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:s}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsx("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:a}),e.jsx(Cs,{value:a,size:"icon",className:"h-6 w-6"})]})]})}function va({provider:s,displayName:a,defaultTarget:t,data:n,authStatus:i}){const o=t||"claude",l=o==="droid";return e.jsx($e,{className:"h-full",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2 mb-3",children:[e.jsx(Ms,{className:"w-4 h-4"}),"Provider Information"]}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Provider"}),e.jsx("span",{className:"font-mono",children:a})]}),n&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"File Path"}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-xs break-all",children:n.path}),e.jsx(Cs,{value:n.path,size:"icon",className:"h-5 w-5"})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Last Modified"}),e.jsx("span",{className:"text-xs",children:new Date(n.mtime).toLocaleString()})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Status"}),i.authenticated?e.jsxs(U,{variant:"outline",className:"w-fit text-green-600 border-green-200 bg-green-50",children:[e.jsx(Ft,{className:"w-3 h-3 mr-1"}),"Authenticated"]}):e.jsx(U,{variant:"outline",className:"w-fit text-muted-foreground",children:"Not connected"})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Default Target"}),e.jsx("span",{className:"font-mono",children:o})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:"Quick Usage"}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsx(ue,{label:"Run with prompt",command:`ccs ${s} "your prompt"`}),e.jsx(ue,{label:l?"Droid alias (explicit)":"Run on Droid",command:l?`ccsd ${s} "your prompt"`:`ccs ${s} --target droid "your prompt"`}),e.jsx(ue,{label:l?"Override to Claude":"Override target",command:`ccs ${s} --target claude "your prompt"`}),e.jsx(ue,{label:"Change model",command:`ccs ${s} --config`}),e.jsx(ue,{label:"Add account",command:`ccs ${s} --add`}),e.jsx(ue,{label:"List accounts",command:`ccs ${s} --accounts`})]})]})]})})}const Na={sm:{container:"w-6 h-6",icon:"w-4 h-4",text:"text-xs"},md:{container:"w-8 h-8",icon:"w-5 h-5",text:"text-sm"},lg:{container:"w-12 h-12",icon:"w-8 h-8",text:"text-lg"}};function Ze({provider:s,className:a,size:t="md"}){const n=st(s),i=Na[t],o=tt(s);return e.jsx("div",{className:H("flex items-center justify-center rounded-md",o&&(at(s)?"bg-gray-900 p-1":"bg-white p-1"),i.container,a),children:o?e.jsx("img",{src:o,alt:`${s} logo`,className:H(i.icon,"object-contain")}):e.jsx("span",{className:H("font-semibold",n.textClass,i.text),children:n.letter})})}function ba({displayName:s,logoProvider:a,provider:t,data:n,isLoading:i,hasChanges:o,isRawJsonValid:l,isSaving:c,isRemoteMode:j,port:h,onRefetch:x,onSave:b}){return e.jsxs("div",{className:"px-6 py-4 border-b bg-background flex items-center justify-between shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ze,{provider:a||t,size:"lg"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),j&&e.jsxs(U,{variant:"secondary",className:"text-xs gap-1 bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:[e.jsx(Ts,{className:"w-3 h-3"}),"Remote"]}),h&&e.jsxs(U,{variant:"outline",className:"text-xs gap-1 font-mono",children:[e.jsx(Ut,{className:"w-3 h-3"}),":",h]}),!j&&n?.path&&e.jsx(U,{variant:"outline",className:"text-xs",children:n.path.replace(/^.*[\\/]/,"")})]}),j?e.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400 mt-0.5",children:"Traffic auto-routed to remote server"}):n&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Last modified: ",new Date(n.mtime).toLocaleString()]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(R,{variant:"ghost",size:"sm",onClick:x,disabled:i,children:e.jsx(Ve,{className:`w-4 h-4 ${i?"animate-spin":""}`})}),e.jsx(R,{size:"sm",onClick:b,disabled:c||!o||!l,children:c?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function wa({model:s,provider:a,enabled:t,onToggle:n,disabled:i,className:o}){if(!s?.extendedContext)return null;const l=ua(s.id);return e.jsxs("div",{className:H("rounded-lg border p-3 space-y-2",t?"border-primary/50 bg-primary/5":"border-border bg-muted/30",o),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{className:H("w-4 h-4",t?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-sm font-medium",children:"Extended Context"}),e.jsx(U,{variant:t?"default":"secondary",className:"text-[10px] h-5 px-1.5",children:"1M tokens"})]}),e.jsx(Ds,{checked:t,onCheckedChange:n,disabled:i})]}),e.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(Ms,{className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{children:"Enables 1M token context window instead of default 200K."}),e.jsx("p",{className:"text-[10px]",children:l?e.jsxs("span",{className:"text-primary",children:["Auto-enabled for ",a," Gemini models"]}):e.jsxs("span",{children:["Opt-in for ",a," Claude models via --1m flag"]})}),t&&e.jsx("p",{className:"text-amber-600 dark:text-amber-500",children:"Note: 2x input pricing applies for tokens beyond 200K"})]})]})]})}function ya({catalog:s,savedPresets:a,currentModel:t,opusModel:n,sonnetModel:i,haikuModel:o,providerModels:l,provider:c,extendedContextEnabled:j,onExtendedContextToggle:h,onApplyPreset:x,onUpdateEnvValue:b,onOpenCustomPreset:u,onDeletePreset:v,isDeletePending:C}){const m=s&&s.models.length>0||a.length>0,g=r.useMemo(()=>{if(!s||!t)return;const p=Is(t);return s.models.find(O=>O.id===p)},[s,t]);return e.jsxs(e.Fragment,{children:[m&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[e.jsx(fe,{className:"w-4 h-4"}),"Presets"]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Apply pre-configured model mappings"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s?.models.slice(0,4).map(p=>e.jsxs(R,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>{const O=p.presetMapping||{default:p.id,opus:p.id,sonnet:p.id,haiku:p.id};x({ANTHROPIC_MODEL:O.default,ANTHROPIC_DEFAULT_OPUS_MODEL:O.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:O.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:O.haiku})},children:[e.jsx(je,{className:"w-3 h-3"}),p.name]},p.id)),a.map(p=>e.jsxs("div",{className:"group relative",children:[e.jsxs(R,{variant:"secondary",size:"sm",className:"text-xs h-7 gap-1 pr-6",onClick:()=>{x({ANTHROPIC_MODEL:p.default,ANTHROPIC_DEFAULT_OPUS_MODEL:p.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:p.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:p.haiku})},children:[e.jsx(ke,{className:"w-3 h-3 fill-current"}),p.name]}),e.jsx(R,{variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-7 w-5 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:O=>{O.stopPropagation(),v(p.name)},disabled:C,children:e.jsx(Je,{className:"w-3 h-3"})})]},p.name)),e.jsxs(R,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1 border-primary/50 text-primary hover:bg-primary/10 hover:border-primary",onClick:u,children:[e.jsx(Os,{className:"w-3 h-3"}),"Custom"]})]})]}),e.jsx(We,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-2",children:"Model Mapping"}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"Configure which models to use for each tier"}),c==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground mb-3 rounded-md border bg-muted/30 px-2.5 py-2",children:["Codex tip: suffixes ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and ",e.jsx("code",{children:"-xhigh"})," ","pin reasoning effort. Unsuffixed models use Thinking settings."]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(ne,{label:"Default Model",description:"Used when no specific tier is requested",value:t,onChange:p=>b("ANTHROPIC_MODEL",p),catalog:s,allModels:l}),g?.extendedContext&&h&&e.jsx(wa,{model:g,provider:c,enabled:j??!1,onToggle:h}),e.jsx(ne,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:n,onChange:p=>b("ANTHROPIC_DEFAULT_OPUS_MODEL",p),catalog:s,allModels:l}),e.jsx(ne,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:i,onChange:p=>b("ANTHROPIC_DEFAULT_SONNET_MODEL",p),catalog:s,allModels:l}),e.jsx(ne,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:o,onChange:p=>b("ANTHROPIC_DEFAULT_HAIKU_MODEL",p),catalog:s,allModels:l})]})]})]})}function hs(s){const a=Math.max(0,Math.min(100,s));return a<=20?"bg-destructive":a<=50?"bg-yellow-500":"bg-green-500"}function gs(s){if(!s)return"";try{const a=new Date(s),n=new Date().getTime()-a.getTime();if(n<0)return"just now";const i=Math.floor(n/(1e3*60)),o=Math.floor(n/(1e3*60*60)),l=Math.floor(n/(1e3*60*60*24));return l>0?`${l}d ago`:o>0?`${o}h ago`:i>0?`${i}m ago`:"just now"}catch{return""}}function ka(s){if(!s)return!1;try{const a=new Date(s);return new Date().getTime()-a.getTime()<3600*1e3}catch{return!1}}function Ca({account:s,onSetDefault:a,onRemove:t,onPauseToggle:n,isRemoving:i,isPausingAccount:o,privacyMode:l,showQuota:c,selectable:j,selected:h,onSelectChange:x}){const b=s.provider.toLowerCase(),u=b==="codex",v=b==="claude"||b==="anthropic",{data:C}=nt(c),{data:m,isLoading:g}=it(b,s.id,c),p=C?.accountStats?.[s.email||s.id]?.lastUsedAt,O=ka(p),P=rt(s.provider,m),k=ot(s.provider,m),_=u&&m&&lt(m)?ct(m.windows):null,w=[{label:"5h",value:_?.fiveHourWindow?.remainingPercent??null},{label:"Weekly",value:_?.weeklyWindow?.remainingPercent??null}].filter(f=>f.value!==null),E=v&&m&&dt(m)?[{label:"5h",value:m.coreUsage?.fiveHour?.remainingPercent??m.windows.find(f=>f.rateLimitType==="five_hour")?.remainingPercent??null},{label:"Weekly",value:m.coreUsage?.weekly?.remainingPercent??m.windows.find(f=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(f.rateLimitType))?.remainingPercent??null}].filter(f=>f.value!==null):[],N=u?w:v?E:[],F=P!==null?pt(P):null,y=F!==null?Number(F):null;return e.jsxs("div",{className:H("flex flex-col gap-2 p-3 rounded-lg border transition-colors overflow-hidden",s.isDefault?"border-primary/30 bg-primary/5":"border-border hover:bg-muted/30",s.paused&&"opacity-75",h&&"ring-2 ring-primary/50 bg-primary/5"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[j&&e.jsx("button",{type:"button",onClick:()=>x?.(!h),className:H("flex items-center justify-center w-5 h-5 rounded border-2 transition-colors shrink-0",h?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),"aria-label":h?"Deselect account":"Select account",children:h&&e.jsx(se,{className:"w-3 h-3"})}),n&&e.jsx(oe,{children:e.jsxs(le,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>n(!s.paused),disabled:o,children:o?e.jsx(J,{className:"w-4 h-4 animate-spin"}):s.paused?e.jsx(Rs,{className:"w-4 h-4 text-emerald-500"}):e.jsx(_e,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(de,{side:"top",children:s.paused?"Resume account":"Pause account"})]})}),e.jsxs("div",{className:"relative shrink-0",children:[e.jsx("div",{className:H("flex items-center justify-center w-8 h-8 rounded-full",s.isDefault?"bg-primary/10":"bg-muted"),children:e.jsx(xe,{className:"w-4 h-4"})}),s.tier&&s.tier!=="unknown"&&s.tier!=="free"&&e.jsx("span",{className:H("absolute -bottom-0.5 -right-0.5 text-[7px] font-bold uppercase px-1 py-px rounded","ring-1 ring-background",s.tier==="ultra"?"bg-violet-500/20 text-violet-600 dark:bg-violet-500/30 dark:text-violet-300":"bg-yellow-500/20 text-yellow-700 dark:bg-yellow-500/25 dark:text-yellow-400"),children:s.tier==="ultra"?"U":"P"})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:H("font-medium text-sm truncate",l&&ye),children:s.email||s.id}),s.isDefault&&e.jsxs(U,{variant:"secondary",className:"text-[10px] h-4 px-1.5 gap-0.5",children:[e.jsx(ke,{className:"w-2.5 h-2.5 fill-current"}),"Default"]}),s.paused&&e.jsxs(U,{variant:"outline",className:"text-[10px] h-4 px-1.5 border-yellow-500 text-yellow-600",children:[e.jsx(_e,{className:"w-2 h-2 mr-0.5"}),"Paused"]})]}),s.provider==="agy"&&e.jsx("div",{className:"flex items-center gap-1.5 mt-1",children:s.projectId?e.jsx(oe,{children:e.jsxs(le,{children:[e.jsx(ce,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(qt,{className:"w-3 h-3","aria-hidden":"true"}),e.jsx("span",{className:H("font-mono max-w-[180px] truncate",l&&ye),title:s.projectId,children:s.projectId})]})}),e.jsx(de,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:"GCP Project ID (read-only)"})})]})}):e.jsx(oe,{children:e.jsxs(le,{children:[e.jsx(ce,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-500",children:[e.jsx(ze,{className:"w-3 h-3","aria-label":"Warning"}),e.jsx("span",{children:"Project ID: N/A"})]})}),e.jsx(de,{side:"bottom",className:"max-w-[250px]",children:e.jsxs("div",{className:"text-xs space-y-1",children:[e.jsx("p",{className:"font-medium text-amber-600",children:"Missing Project ID"}),e.jsx("p",{children:"This may cause errors. Remove the account and re-add it to fetch the project ID."})]})})]})})}),s.lastUsedAt&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-0.5",children:[e.jsx(ds,{className:"w-3 h-3"}),"Last used: ",new Date(s.lastUsedAt).toLocaleDateString()]})]})]}),e.jsxs(ut,{children:[e.jsx(mt,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:e.jsx(Ht,{className:"w-4 h-4"})})}),e.jsxs(xt,{align:"end",children:[!s.isDefault&&e.jsxs(os,{onClick:a,children:[e.jsx(ke,{className:"w-4 h-4 mr-2"}),"Set as default"]}),e.jsxs(os,{className:"text-destructive focus:text-destructive",onClick:t,disabled:i,children:[e.jsx(Es,{className:"w-4 h-4 mr-2"}),i?"Removing...":"Remove account"]})]})]})]}),c&&e.jsx("div",{className:"pl-11",children:g?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(J,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Loading quota..."})]}):y!==null?e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:O?e.jsxs(e.Fragment,{children:[e.jsx(Bt,{className:"w-3 h-3 text-emerald-500"}),e.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["Active · ",gs(p)]})]}):p?e.jsxs(e.Fragment,{children:[e.jsx(ds,{className:"w-3 h-3 text-muted-foreground"}),e.jsxs("span",{className:"text-muted-foreground",children:["Last used ",gs(p)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(us,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Not used yet"})]})}),e.jsx(oe,{children:e.jsxs(le,{children:[e.jsx(ce,{asChild:!0,children:N.length>0?e.jsx("div",{className:"space-y-1.5",children:N.map(f=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-10 text-[10px] text-muted-foreground",children:f.label}),e.jsx(Re,{value:Math.max(0,Math.min(100,f.value)),className:"h-2 flex-1",indicatorClassName:hs(f.value)}),e.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[f.value,"%"]})]},f.label))}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Re,{value:Math.max(0,Math.min(100,y)),className:"h-2 flex-1",indicatorClassName:hs(y)}),e.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[F,"%"]})]})}),e.jsx(de,{side:"bottom",className:"max-w-xs",children:e.jsx(ht,{quota:m,resetTime:k})})]})})]}):m?.success?e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(U,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-muted-foreground/50 text-muted-foreground",children:[e.jsx(us,{className:"w-3 h-3"}),"No limits"]})}):m?.needsReauth?e.jsx(oe,{children:e.jsxs(le,{children:[e.jsx(ce,{asChild:!0,children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(U,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-amber-500/50 text-amber-600 dark:text-amber-400",children:[e.jsx(Gt,{className:"w-3 h-3"}),"Reauth"]})})}),e.jsx(de,{side:"bottom",className:"max-w-[220px]",children:e.jsx("p",{className:"text-xs",children:m.error?.includes("No refresh token")?"No refresh token available. Remove and re-add account to fix.":m.error?.includes("refresh")||m.error?.includes("Invalid")?`Auto-refresh failed: ${m.error}`:`Token issue: ${m.error||"Re-authenticate required"}`})})]})}):m?.error||m&&!m.success?e.jsx(oe,{children:e.jsxs(le,{children:[e.jsx(ce,{asChild:!0,children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(U,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-muted-foreground/50 text-muted-foreground",children:[e.jsx($t,{className:"w-3 h-3"}),"N/A"]})})}),e.jsx(de,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:m?.error||"Quota information unavailable"})})]})}):null})]})}function Aa({selectedCount:s,onPauseSelected:a,onResumeSelected:t,onClearSelection:n,isPausing:i,isResuming:o}){if(s<1)return null;const l=i||o;return e.jsxs("div",{className:"flex items-center gap-3 p-2 bg-muted/50 rounded-lg border mt-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[s," selected"]}),e.jsx(R,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:n,disabled:l,children:"Clear"}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(R,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:a,disabled:l,children:[i?e.jsx(J,{className:"w-3 h-3 animate-spin"}):e.jsx(_e,{className:"w-3 h-3"}),"Pause Selected"]}),e.jsxs(R,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:t,disabled:l,children:[o?e.jsx(J,{className:"w-3 h-3 animate-spin"}):e.jsx(Rs,{className:"w-3 h-3"}),"Resume Selected"]})]})]})}function Sa({accounts:s,onAddAccount:a,onSetDefault:t,onRemoveAccount:n,onPauseToggle:i,onSoloMode:o,onBulkPause:l,onBulkResume:c,isRemovingAccount:j,isPausingAccount:h,isSoloingAccount:x,isBulkPausing:b,isBulkResuming:u,privacyMode:v,showQuota:C,isKiro:m,kiroNoIncognito:g,onKiroNoIncognitoChange:p,kiroSettingsLoading:O}){const[P,k]=r.useState(new Set),_=r.useMemo(()=>new Set(s.map(T=>T.id)),[s]),w=r.useMemo(()=>new Set([...P].filter(T=>_.has(T))),[P,_]),E=!!(l&&c),N=w.size,F=s.length>0&&w.size===s.length,y=w.size>0&&w.size<s.length,f=r.useCallback(T=>{k(I=>{const $=new Set(I);return $.has(T)?$.delete(T):$.add(T),$})},[]),A=r.useCallback(()=>{k(new Set(s.map(T=>T.id)))},[s]),L=r.useCallback(()=>{k(new Set)},[]),B=r.useCallback(()=>{F?L():A()},[F,A,L]),G=r.useCallback(()=>{l&&w.size>0&&(l(Array.from(w)),k(new Set))},[l,w]),M=r.useCallback(()=>{c&&w.size>0&&(c(Array.from(w)),k(new Set))},[c,w]);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[E&&s.length>0&&e.jsx(we,{checked:F,onCheckedChange:B,"aria-label":"Select all accounts",className:y?"data-[state=checked]:bg-primary/50":"",...y?{"data-state":"indeterminate"}:{}}),e.jsx(xe,{className:"w-4 h-4"}),"Accounts",s.length>0&&e.jsx(U,{variant:"secondary",className:"text-xs",children:s.length})]}),e.jsxs(R,{variant:"default",size:"sm",className:"h-7 text-xs gap-1",onClick:a,children:[e.jsx(Os,{className:"w-3 h-3"}),"Add"]})]}),E&&N>0&&e.jsx(Aa,{selectedCount:N,onPauseSelected:G,onResumeSelected:M,onClearSelection:L,isPausing:!!b,isResuming:!!u}),s.length>0?e.jsx("div",{className:"space-y-2",children:s.map(T=>e.jsx(Ca,{account:T,onSetDefault:()=>t(T.id),onRemove:()=>n(T.id),onPauseToggle:i?I=>i(T.id,I):void 0,onSoloMode:o?()=>o(T.id):void 0,isRemoving:j,isPausingAccount:h,isSoloingAccount:x,privacyMode:v,showQuota:C,selectable:E,selected:w.has(T.id),onSelectChange:()=>f(T.id)},T.id))}):e.jsxs("div",{className:"py-6 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed",children:[e.jsx(xe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No accounts connected"}),e.jsx("p",{className:"text-xs opacity-70",children:"Add an account to get started"})]}),m&&p&&e.jsx("div",{className:"mt-3 pt-3 border-t border-dashed",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Ts,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Use incognito"})]}),e.jsx(Ds,{checked:!g,onCheckedChange:T=>p(!T),disabled:O,className:"scale-90"})]})})]})}function Pa({provider:s,catalog:a,savedPresets:t,currentModel:n,opusModel:i,sonnetModel:o,haikuModel:l,providerModels:c,extendedContextEnabled:j,onExtendedContextToggle:h,onApplyPreset:x,onUpdateEnvValue:b,onOpenCustomPreset:u,onDeletePreset:v,isDeletePending:C,accounts:m,onAddAccount:g,onSetDefault:p,onRemoveAccount:O,onPauseToggle:P,onSoloMode:k,onBulkPause:_,onBulkResume:w,isRemovingAccount:E,isPausingAccount:N,isSoloingAccount:F,isBulkPausing:y,isBulkResuming:f,privacyMode:A,isRemoteMode:L}){const B=s.toLowerCase(),G=(gt.includes(B)||["anthropic","antigravity","gemini-cli","copilot","github-copilot"].includes(B))&&!L,M=s==="kiro",[T,I]=r.useState(!0),[$,Q]=r.useState(!0),[Y,X]=r.useState(!1),d=r.useCallback(async()=>{if(M)try{Q(!0);const Z=(await Ne.config.get()).cliproxy;I(Z?.kiro_no_incognito??!0)}catch{I(!0)}finally{Q(!1)}},[M]),D=r.useCallback(async V=>{I(V),X(!0);try{const Z=await Ne.config.get(),pe=Z.cliproxy??{};await Ne.config.update({...Z,cliproxy:{...pe,kiro_no_incognito:V}})}catch{I(!V)}finally{X(!1)}},[]);return r.useEffect(()=>{d()},[d]),e.jsx($e,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsx(ya,{catalog:a,savedPresets:t,currentModel:n,opusModel:i,sonnetModel:o,haikuModel:l,providerModels:c,provider:s,extendedContextEnabled:j,onExtendedContextToggle:h,onApplyPreset:x,onUpdateEnvValue:b,onOpenCustomPreset:u,onDeletePreset:v,isDeletePending:C}),e.jsx(We,{}),e.jsx(Sa,{accounts:m,onAddAccount:g,onSetDefault:p,onRemoveAccount:O,onPauseToggle:P,onSoloMode:k,onBulkPause:_,onBulkResume:w,isRemovingAccount:E,isPausingAccount:N,isSoloingAccount:F,isBulkPausing:y,isBulkResuming:f,privacyMode:A,showQuota:G,isKiro:M,kiroNoIncognito:T,onKiroNoIncognitoChange:D,kiroSettingsLoading:$||Y})]})})}function fs({provider:s,displayName:a,authStatus:t,catalog:n,logoProvider:i,baseProvider:o,isRemoteMode:l,port:c,defaultTarget:j,onAddAccount:h,onSetDefault:x,onRemoveAccount:b,onPauseToggle:u,onSoloMode:v,onBulkPause:C,onBulkResume:m,isRemovingAccount:g,isPausingAccount:p,isSoloingAccount:O,isBulkPausing:P,isBulkResuming:k}){const[_,w]=r.useState(!1),{privacyMode:E}=ws(),{data:N}=ft(),{data:F}=jt(s),y=vt(),f=Nt(),A=F?.presets||[],L=o||s,B=r.useMemo(()=>{if(!N?.models)return[];const ae={gemini:["google"],agy:["antigravity"],codex:["openai"],qwen:["alibaba","qwen"],iflow:["iflow"],kiro:["kiro","aws"],ghcp:["github","copilot"],kimi:["kimi","moonshot"]}[L.toLowerCase()]||[L.toLowerCase()];return N.models.filter(ts=>ae.some(Hs=>ts.owned_by.toLowerCase().includes(Hs)))},[N,L]),G=(o||s).toLowerCase(),{data:M,isLoading:T,refetch:I,rawJsonContent:$,rawJsonEdits:Q,isRawJsonValid:Y,hasChanges:X,currentModel:d,opusModel:D,sonnetModel:V,haikuModel:Z,extendedContextEnabled:pe,toggleExtendedContext:Ce,handleRawJsonChange:Ae,updateEnvValue:Se,updateEnvValues:z,saveMutation:S,conflictDialog:te,handleConflictResolve:ee,missingRequiredFields:es}=ha(s),ve=r.useMemo(()=>(t.accounts||[]).map(q=>({...q,provider:q.provider||o||s})),[t.accounts,o,s]),{data:Fs}=js({queryKey:["auth-tokens-raw"],queryFn:async()=>{const q=await fetch("/api/settings/auth/tokens/raw");return q.ok?q.json():{apiKey:{value:"ccs-internal-managed"}}},staleTime:6e4}),ss=Fs?.apiKey?.value??"ccs-internal-managed",Us=q=>{z({ANTHROPIC_BASE_URL:`http://127.0.0.1:${c??Ee}/api/provider/${G}`,ANTHROPIC_AUTH_TOKEN:ss,...q}),K.success(`Applied "${q.ANTHROPIC_MODEL?.split("/").pop()||"preset"}" preset`)},Ks=(q,ae)=>{z({ANTHROPIC_BASE_URL:`http://127.0.0.1:${c??Ee}/api/provider/${G}`,ANTHROPIC_AUTH_TOKEN:ss,ANTHROPIC_MODEL:q.default,ANTHROPIC_DEFAULT_OPUS_MODEL:q.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:q.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:q.haiku}),K.success(`Applied ${ae?`"${ae}"`:"custom"} preset`),w(!1)},qs=(q,ae)=>{if(!ae){K.error("Please enter a preset name to save");return}y.mutate({profile:s,data:{name:ae,...q}}),w(!1)};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(ba,{provider:s,displayName:a,logoProvider:i,data:M,isLoading:T,hasChanges:X,isRawJsonValid:Y,isSaving:S.isPending,isRemoteMode:l,port:c,onRefetch:I,onSave:()=>S.mutate()}),T?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(J,{className:"w-8 h-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading settings..."})]}):e.jsxs("div",{className:"flex-1 grid grid-cols-[40%_60%] divide-x overflow-hidden",children:[e.jsx("div",{className:"flex flex-col overflow-hidden bg-muted/5",children:e.jsxs(bt,{defaultValue:"config",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(wt,{className:"w-full",children:[e.jsx(ls,{value:"config",className:"flex-1",children:"Model Config"}),e.jsx(ls,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsx(cs,{value:"config",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(Pa,{provider:s,catalog:n,savedPresets:A,currentModel:d,opusModel:D,sonnetModel:V,haikuModel:Z,providerModels:B,extendedContextEnabled:pe,onExtendedContextToggle:Ce,onApplyPreset:Us,onUpdateEnvValue:Se,onOpenCustomPreset:()=>w(!0),onDeletePreset:q=>f.mutate({profile:s,name:q}),isDeletePending:f.isPending,accounts:ve,onAddAccount:h,onSetDefault:x,onRemoveAccount:b,onPauseToggle:u,onSoloMode:v,onBulkPause:C,onBulkResume:m,isRemovingAccount:g,isPausingAccount:p,isSoloingAccount:O,isBulkPausing:P,isBulkResuming:k,privacyMode:E,isRemoteMode:l})}),e.jsx(cs,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(va,{provider:s,displayName:a,defaultTarget:j,data:M,authStatus:t})})]})]})}),e.jsxs("div",{className:"flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-2 bg-muted/30 border-b flex items-center gap-2 shrink-0 h-[45px]",children:[e.jsx(Qt,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Raw Configuration (JSON)"})]}),e.jsx(yt,{rawJsonContent:$,isRawJsonValid:Y,rawJsonEdits:Q,onRawJsonChange:Ae,profileEnv:M?.settings?.env,missingRequiredFields:es})]})]}),e.jsx(Wt,{open:te,title:"File Modified Externally",description:"This settings file was modified by another process. Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>ee(!0),onCancel:()=>ee(!1)}),e.jsx(ja,{open:_,onClose:()=>w(!1),currentValues:{default:d||"",opus:D||"",sonnet:V||"",haiku:Z||""},onApply:Ks,onSave:qs,isSaving:y.isPending,catalog:n,allModels:B})]})}function Ma({status:s,isSelected:a,onSelect:t}){const n=s.accounts?.length||0;return e.jsxs("button",{className:H("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors cursor-pointer text-left",a?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:t,children:[e.jsx(Ze,{provider:s.provider,size:"md"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:s.displayName}),n>0&&e.jsx(U,{variant:"secondary",className:"text-[10px] h-4 px-1",children:n})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:s.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-green-600",children:"Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Je,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not connected"})]})})]})]})}function Ta({variant:s,parentAuth:a,isSelected:t,onSelect:n,onDelete:i,isDeleting:o}){return e.jsxs("button",{className:H("group w-full flex items-center gap-3 px-3 py-2 rounded-lg transition-colors cursor-pointer text-left pl-6",t?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:n,children:[e.jsxs("div",{className:"relative",children:[e.jsx(Ze,{provider:s.provider,size:"sm"}),e.jsx(_s,{className:"w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5 text-muted-foreground"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e.jsx(U,{variant:"outline",className:"text-[9px] h-4 px-1",children:"variant"}),e.jsx(U,{variant:"outline",className:"text-[9px] h-4 px-1 uppercase",children:s.target||"claude"})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:a?.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-3 h-3 text-green-600"}),e.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["via ",s.provider]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Je,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Parent not connected"})]})})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:l=>{l.stopPropagation(),i()},disabled:o,children:e.jsx(Es,{className:"w-3 h-3"})})]})}function Oa({onSetup:s}){return e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20",children:e.jsxs("div",{className:"text-center max-w-md px-8",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mx-auto mb-6",children:e.jsx(je,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"CCS Profile Manager"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Manage OAuth authentication, account preferences, and model selection for CLIProxy providers. Configure how CCS routes requests to different AI backends."}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-6",children:["For live usage stats and real-time monitoring, visit the"," ",e.jsx("a",{href:"/cliproxy/control-panel",className:"text-primary hover:underline",children:"Control Panel"}),"."]}),e.jsxs(R,{onClick:s,className:"gap-2",children:[e.jsx(fe,{className:"w-4 h-4"}),"Quick Setup"]})]})})}function za(){const s=Le(),{data:a,isLoading:t}=bs(),{data:n,isFetching:i}=kt(),{data:o}=Ct(),l=At(),c=St(),j=Pt(),h=Mt(),x=Tt(),b=Ot(),u=Rt(),v=Et(),[C,m]=r.useState(()=>typeof window<"u"?localStorage.getItem("cliproxy-selected-provider"):null),[g,p]=r.useState(null),[O,P]=r.useState(!1),[k,_]=r.useState(null),w=r.useMemo(()=>a?.authStatus||[],[a?.authStatus]),E=a?.source==="remote",N=r.useMemo(()=>n?.variants||[],[n?.variants]),F=d=>{m(d),d&&localStorage.setItem("cliproxy-selected-provider",d)},y=r.useMemo(()=>g?null:C&&w.some(d=>d.provider===C)?C:w.length>0&&(w.find(D=>(D.accounts?.length||0)>0)?.provider||w[0]?.provider)||null,[C,g,w]),f=w.find(d=>d.provider===y),A=N.find(d=>d.name===g),L=A?w.find(d=>d.provider===A.provider):void 0,B=(A?.provider||f?.provider||"").toLowerCase().trim(),G=B==="gemini"||B==="agy",M=()=>{s.invalidateQueries({queryKey:["cliproxy"]}),s.invalidateQueries({queryKey:["cliproxy-auth"]})},T=(d,D,V)=>{j.isPending||h.isPending||(V?j.mutate({provider:d,accountId:D}):h.mutate({provider:d,accountId:D}))},I=(d,D)=>{x.isPending||x.mutate({provider:d,accountId:D})},$=(d,D)=>{b.isPending||b.mutate({provider:d,accountIds:D})},Q=(d,D)=>{u.isPending||u.mutate({provider:d,accountIds:D})},Y=d=>{F(d),p(null)},X=d=>{p(d),F(null)};return e.jsxs("div",{className:"h-[calc(100vh-100px)] flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/30",children:[e.jsxs("div",{className:"p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:o?.backendLabel??"CLIProxy"})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:M,disabled:i,children:e.jsx(Ve,{className:H("w-4 h-4",i&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"CCS-level account management"}),e.jsxs(R,{variant:"default",size:"sm",className:"w-full gap-2",onClick:()=>P(!0),children:[e.jsx(fe,{className:"w-4 h-4"}),"Quick Setup"]})]}),e.jsx($e,{className:"flex-1",children:e.jsxs("div",{className:"p-2",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2",children:"Providers"}),t?e.jsx("div",{className:"space-y-2 px-2",children:[1,2,3,4].map(d=>e.jsx(_t,{className:"h-14 w-full rounded-lg"},d))}):e.jsx("div",{className:"space-y-1",children:w.map(d=>e.jsx(Ma,{status:d,isSelected:y===d.provider,onSelect:()=>Y(d.provider)},d.provider))}),N.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2 mt-4 flex items-center gap-1.5",children:[e.jsx(_s,{className:"w-3 h-3"}),"Variants"]}),e.jsx("div",{className:"space-y-1",children:N.map(d=>e.jsx(Ta,{variant:d,parentAuth:w.find(D=>D.provider===d.provider),isSelected:g===d.name,onSelect:()=>X(d.name),onDelete:()=>v.mutate(d.name),isDeleting:v.isPending},d.name))})]})]})}),e.jsx("div",{className:"p-3 border-t",children:e.jsx(Jt,{})}),e.jsx("div",{className:"p-3 border-t bg-background text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{children:[w.length," provider",w.length!==1?"s":""]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(se,{className:"w-3 h-3 text-green-600"}),w.filter(d=>d.authenticated).length," connected"]})]})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background",children:[G&&e.jsx(Ls,{showProxySettingsLink:!0,className:"mx-4 mt-4"}),A&&L?e.jsx(fs,{provider:A.name,displayName:`${A.name} (${A.provider} variant)`,authStatus:L,catalog:ge[A.provider],logoProvider:A.provider,baseProvider:A.provider,defaultTarget:A.target,isRemoteMode:E,port:A.port,onAddAccount:()=>_({provider:A.provider,displayName:L.displayName,isFirstAccount:(L.accounts?.length||0)===0}),onSetDefault:d=>l.mutate({provider:A.provider,accountId:d}),onRemoveAccount:d=>c.mutate({provider:A.provider,accountId:d}),onPauseToggle:(d,D)=>T(A.provider,d,D),onSoloMode:d=>I(A.provider,d),onBulkPause:d=>$(A.provider,d),onBulkResume:d=>Q(A.provider,d),isRemovingAccount:c.isPending,isPausingAccount:j.isPending||h.isPending,isSoloingAccount:x.isPending,isBulkPausing:b.isPending,isBulkResuming:u.isPending}):f?e.jsx(fs,{provider:f.provider,displayName:f.displayName,authStatus:f,catalog:ge[f.provider],isRemoteMode:E,onAddAccount:()=>_({provider:f.provider,displayName:f.displayName,isFirstAccount:(f.accounts?.length||0)===0}),onSetDefault:d=>l.mutate({provider:f.provider,accountId:d}),onRemoveAccount:d=>c.mutate({provider:f.provider,accountId:d}),onPauseToggle:(d,D)=>T(f.provider,d,D),onSoloMode:d=>I(f.provider,d),onBulkPause:d=>$(f.provider,d),onBulkResume:d=>Q(f.provider,d),isRemovingAccount:c.isPending,isPausingAccount:j.isPending||h.isPending,isSoloingAccount:x.isPending,isBulkPausing:b.isPending,isBulkResuming:u.isPending}):e.jsx(Oa,{onSetup:()=>P(!0)})]}),e.jsx(na,{open:O,onClose:()=>P(!1)}),e.jsx(da,{open:k!==null,onClose:()=>_(null),provider:k?.provider||"",displayName:k?.displayName||"",isFirstAccount:k?.isFirstAccount||!1})]})}export{za as CliproxyPage};
@@ -1 +0,0 @@
1
- import{r as d}from"./react-vendor-CNOkPC89.js";const M=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,c,o)=>o?o.toUpperCase():c.toLowerCase()),s=t=>{const e=_(t);return e.charAt(0).toUpperCase()+e.slice(1)},k=(...t)=>t.filter((e,c,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===c).join(" ").trim(),v=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var x={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const m=d.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:y="",children:h,iconNode:r,...n},i)=>d.createElement("svg",{ref:i,...x,width:e,height:e,stroke:t,strokeWidth:o?Number(c)*24/Number(e):c,className:k("lucide",y),...!h&&!v(n)&&{"aria-hidden":"true"},...n},[...r.map(([p,l])=>d.createElement(p,l)),...Array.isArray(h)?h:[h]]));const a=(t,e)=>{const c=d.forwardRef(({className:o,...y},h)=>d.createElement(m,{ref:h,iconNode:e,className:k(`lucide-${M(s(t))}`,`lucide-${t}`,o),...y}));return c.displayName=s(t),c};const g=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],w2=a("activity",g);const f=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],N2=a("archive",f);const w=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],$2=a("arrow-down-left",w);const N=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],u2=a("arrow-down-right",N);const $=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],z2=a("arrow-down",$);const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],b2=a("arrow-left",u);const z=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],q2=a("arrow-right",z);const b=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],C2=a("arrow-up-right",b);const q=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],A2=a("arrow-up",q);const C=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],j2=a("book-open",C);const A=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],H2=a("bot",A);const j=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],V2=a("box",j);const H=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],L2=a("brain-circuit",H);const V=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],S2=a("brain",V);const L=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],B2=a("bug",L);const S=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],P2=a("calendar-clock",S);const B=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],R2=a("calendar",B);const P=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],E2=a("chart-column",P);const R=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],F2=a("chart-pie",R);const E=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],D2=a("check",E);const F=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],G2=a("chevron-down",F);const D=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],O2=a("chevron-left",D);const G=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],U2=a("chevron-right",G);const O=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Z2=a("chevron-up",O);const U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],T2=a("circle-alert",U);const Z=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],W2=a("circle-check-big",Z);const T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],I2=a("circle-check",T);const W=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],K2=a("circle-question-mark",W);const I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Q2=a("circle-x",I);const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],X2=a("circle",K);const Q=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],J2=a("clock",Q);const X=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Y2=a("cloud",X);const J=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],a0=a("code-xml",J);const Y=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],e0=a("code",Y);const a1=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],t0=a("coins",a1);const e1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],c0=a("copy",e1);const t1=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],o0=a("cpu",t1);const c1=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],h0=a("database",c1);const o1=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],d0=a("dollar-sign",o1);const h1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],y0=a("download",h1);const d1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],n0=a("ellipsis",d1);const y1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],s0=a("external-link",y1);const n1=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],k0=a("eye-off",n1);const s1=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],r0=a("eye",s1);const k1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],i0=a("file-braces",k1);const r1=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],p0=a("file-code-corner",r1);const i1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],l0=a("file-code",i1);const p1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],M0=a("file-down",p1);const l1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],_0=a("file-exclamation-point",l1);const M1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],v0=a("file-text",M1);const _1=[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z",key:"1u1bxd"}]],x0=a("folder-code",_1);const v1=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],m0=a("folder-open",v1);const x1=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],g0=a("folder",x1);const m1=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],f0=a("gauge",m1);const g1=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],w0=a("git-branch",g1);const f1=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],N0=a("github",f1);const w1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],$0=a("globe",w1);const N1=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],u0=a("grip-horizontal",N1);const $1=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],z0=a("grip-vertical",$1);const u1=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],b0=a("heart",u1);const z1=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],q0=a("house",z1);const b1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],C0=a("info",b1);const q1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],A0=a("key-round",q1);const C1=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],j0=a("key",C1);const A1=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],H0=a("laptop",A1);const j1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],V0=a("loader-circle",j1);const H1=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],L0=a("lock",H1);const V1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],S0=a("log-out",V1);const L1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],B0=a("megaphone",L1);const S1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],P0=a("monitor",S1);const B1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],R0=a("moon",B1);const P1=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],E0=a("network",P1);const R1=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],F0=a("package",R1);const E1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],D0=a("panel-left",E1);const F1=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],G0=a("pause",F1);const D1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],O0=a("play",D1);const G1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],U0=a("plus",G1);const O1=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Z0=a("power-off",O1);const U1=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],T0=a("power",U1);const Z1=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],W0=a("radio",Z1);const T1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],I0=a("refresh-cw",T1);const W1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],K0=a("rotate-ccw",W1);const I1=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Q0=a("rotate-cw",I1);const K1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],X0=a("save",K1);const Q1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],J0=a("search",Q1);const X1=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Y0=a("server",X1);const J1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],aa=a("settings-2",J1);const Y1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ea=a("settings",Y1);const a2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],ta=a("shield-alert",a2);const e2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ca=a("shield-check",e2);const t2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],oa=a("shield",t2);const c2=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],ha=a("sliders-horizontal",c2);const o2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],da=a("sparkles",o2);const h2=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],ya=a("square-terminal",h2);const d2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],na=a("square",d2);const y2=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],sa=a("star",y2);const n2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],ka=a("sun",n2);const s2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ra=a("terminal",s2);const k2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ia=a("trash-2",k2);const r2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],pa=a("trending-up",r2);const i2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],la=a("triangle-alert",i2);const p2=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ma=a("user",p2);const l2=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],_a=a("users",l2);const M2=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],va=a("wand-sparkles",M2);const _2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],xa=a("wifi-off",_2);const v2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],ma=a("wifi",v2);const x2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],ga=a("wrench",x2);const m2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fa=a("x",m2);const g2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],wa=a("zap",g2);export{aa as $,w2 as A,j2 as B,E2 as C,e0 as D,k0 as E,m0 as F,f0 as G,q0 as H,C0 as I,C2 as J,j0 as K,V0 as L,R0 as M,$2 as N,v0 as O,D0 as P,_0 as Q,I0 as R,ya as S,la as T,_a as U,u0 as V,xa as W,fa as X,G2 as Y,wa as Z,Z2 as _,N0 as a,U0 as a0,da as a1,T2 as a2,$0 as a3,S2 as a4,Y0 as a5,N2 as a6,l0 as a7,O2 as a8,L0 as a9,p0 as aA,L2 as aB,ha as aC,g0 as aD,ga as aE,P0 as aF,H2 as aG,P2 as aH,B0 as aI,F0 as aJ,Y2 as aK,H0 as aL,V2 as aM,B2 as aN,M0 as aO,Q0 as aP,na as aQ,z2 as aR,A2 as aS,d0 as aa,h0 as ab,u2 as ac,R2 as ad,t0 as ae,pa as af,F2 as ag,ia as ah,X0 as ai,J0 as aj,va as ak,a0 as al,q2 as am,i0 as an,b2 as ao,ta as ap,y0 as aq,sa as ar,E0 as as,x0 as at,n0 as au,K2 as av,w0 as aw,T0 as ax,Z0 as ay,ca as az,ea as b,U2 as c,ka as d,r0 as e,ma as f,oa as g,b0 as h,W2 as i,X2 as j,D2 as k,A0 as l,c0 as m,s0 as n,Ma as o,S0 as p,J2 as q,I2 as r,Q2 as s,O0 as t,G0 as u,z0 as v,K0 as w,W0 as x,o0 as y,ra as z};