@kaitranntt/ccs 7.66.1-dev.1 → 7.66.1-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +3 -1
  2. package/dist/cliproxy/config/generator.d.ts +2 -1
  3. package/dist/cliproxy/config/generator.d.ts.map +1 -1
  4. package/dist/cliproxy/config/generator.js +11 -1
  5. package/dist/cliproxy/config/generator.js.map +1 -1
  6. package/dist/cliproxy/index.d.ts +1 -1
  7. package/dist/cliproxy/index.d.ts.map +1 -1
  8. package/dist/cliproxy/index.js.map +1 -1
  9. package/dist/cliproxy/management-api-client.d.ts +9 -0
  10. package/dist/cliproxy/management-api-client.d.ts.map +1 -1
  11. package/dist/cliproxy/management-api-client.js +14 -0
  12. package/dist/cliproxy/management-api-client.js.map +1 -1
  13. package/dist/cliproxy/routing-strategy-http.d.ts +6 -0
  14. package/dist/cliproxy/routing-strategy-http.d.ts.map +1 -0
  15. package/dist/cliproxy/routing-strategy-http.js +115 -0
  16. package/dist/cliproxy/routing-strategy-http.js.map +1 -0
  17. package/dist/cliproxy/routing-strategy.d.ts +18 -0
  18. package/dist/cliproxy/routing-strategy.d.ts.map +1 -0
  19. package/dist/cliproxy/routing-strategy.js +123 -0
  20. package/dist/cliproxy/routing-strategy.js.map +1 -0
  21. package/dist/cliproxy/types.d.ts +7 -0
  22. package/dist/cliproxy/types.d.ts.map +1 -1
  23. package/dist/cliproxy/types.js.map +1 -1
  24. package/dist/commands/cliproxy/help-subcommand.d.ts.map +1 -1
  25. package/dist/commands/cliproxy/help-subcommand.js +3 -0
  26. package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
  27. package/dist/commands/cliproxy/index.d.ts.map +1 -1
  28. package/dist/commands/cliproxy/index.js +14 -0
  29. package/dist/commands/cliproxy/index.js.map +1 -1
  30. package/dist/commands/cliproxy/routing-subcommand.d.ts +4 -0
  31. package/dist/commands/cliproxy/routing-subcommand.d.ts.map +1 -0
  32. package/dist/commands/cliproxy/routing-subcommand.js +68 -0
  33. package/dist/commands/cliproxy/routing-subcommand.js.map +1 -0
  34. package/dist/commands/command-catalog.d.ts +1 -1
  35. package/dist/commands/command-catalog.d.ts.map +1 -1
  36. package/dist/commands/command-catalog.js +1 -0
  37. package/dist/commands/command-catalog.js.map +1 -1
  38. package/dist/commands/completion-backend.d.ts.map +1 -1
  39. package/dist/commands/completion-backend.js +6 -0
  40. package/dist/commands/completion-backend.js.map +1 -1
  41. package/dist/commands/help-command.d.ts.map +1 -1
  42. package/dist/commands/help-command.js +4 -1
  43. package/dist/commands/help-command.js.map +1 -1
  44. package/dist/config/unified-config-loader.d.ts.map +1 -1
  45. package/dist/config/unified-config-loader.js +6 -0
  46. package/dist/config/unified-config-loader.js.map +1 -1
  47. package/dist/config/unified-config-types.d.ts +7 -1
  48. package/dist/config/unified-config-types.d.ts.map +1 -1
  49. package/dist/config/unified-config-types.js +3 -0
  50. package/dist/config/unified-config-types.js.map +1 -1
  51. package/dist/ui/assets/{accounts-BUBaJvX6.js → accounts-DUWrYt3x.js} +1 -1
  52. package/dist/ui/assets/{alert-dialog-BSHMTH4-.js → alert-dialog-D_Yz_iZc.js} +1 -1
  53. package/dist/ui/assets/{api-ChLCuNLU.js → api-CBTgaJzF.js} +1 -1
  54. package/dist/ui/assets/{auth-section-BhmOD3zG.js → auth-section-BoDZqbPJ.js} +1 -1
  55. package/dist/ui/assets/{backups-section-Bi22P9k4.js → backups-section-D4-FbvV4.js} +1 -1
  56. package/dist/ui/assets/{channels-BzYyOP0U.js → channels-BFBl4r-j.js} +1 -1
  57. package/dist/ui/assets/{checkbox-DXj-4eLk.js → checkbox-DjeKLLRq.js} +1 -1
  58. package/dist/ui/assets/{claude-extension-Bh9pF8rf.js → claude-extension-C1FsOq-7.js} +1 -1
  59. package/dist/ui/assets/cliproxy-C2sZh-5V.js +3 -0
  60. package/dist/ui/assets/{cliproxy-ai-providers-C5Kw8KgM.js → cliproxy-ai-providers-DcCbeAbO.js} +1 -1
  61. package/dist/ui/assets/{cliproxy-control-panel-DLLoW9yz.js → cliproxy-control-panel-v4kA_2hy.js} +1 -1
  62. package/dist/ui/assets/{codex-CNDtlY6P.js → codex-Cj_wPgw5.js} +1 -1
  63. package/dist/ui/assets/{confirm-dialog-CF5EDIrm.js → confirm-dialog-B273dyaD.js} +1 -1
  64. package/dist/ui/assets/{copilot-DcsWzY5x.js → copilot-DvgELRFw.js} +1 -1
  65. package/dist/ui/assets/{cursor-D35uxPJ3.js → cursor-8gcvd36W.js} +1 -1
  66. package/dist/ui/assets/{droid-cwS_m2Fj.js → droid-DZDVCJBf.js} +1 -1
  67. package/dist/ui/assets/{globalenv-section-B7amS8JA.js → globalenv-section-CKv4BfT4.js} +1 -1
  68. package/dist/ui/assets/{health-BMb4MU3S.js → health-DmZLL4IN.js} +1 -1
  69. package/dist/ui/assets/icons-HPncf80J.js +1 -0
  70. package/dist/ui/assets/{index-BBHJt5Yt.js → index-B185OZF2.js} +1 -1
  71. package/dist/ui/assets/{index-osM0SZ9h.js → index-CObGkcxo.js} +1 -1
  72. package/dist/ui/assets/{index-Bmd4gqsh.js → index-D8NlA5zN.js} +11 -11
  73. package/dist/ui/assets/{index-CQSl6vEt.js → index-DESEUD89.js} +1 -1
  74. package/dist/ui/assets/{index-C90qrEFO.js → index-DUM_z9jT.js} +1 -1
  75. package/dist/ui/assets/index-DY4gWzEw.css +1 -0
  76. package/dist/ui/assets/{index-Cnp8oH1Z.js → index-l8yS9gLo.js} +1 -1
  77. package/dist/ui/assets/{masked-input-DUqplFGl.js → masked-input-C-vLCUuQ.js} +1 -1
  78. package/dist/ui/assets/proxy-status-widget-190bjsgV.js +1 -0
  79. package/dist/ui/assets/{raw-json-settings-editor-panel-eQGtUD6M.js → raw-json-settings-editor-panel-DcwxTJM2.js} +1 -1
  80. package/dist/ui/assets/{searchable-select-D_SVA6pH.js → searchable-select-CCNEAmMs.js} +1 -1
  81. package/dist/ui/assets/{separator-Cuk1ilZb.js → separator-DdqwGZjf.js} +1 -1
  82. package/dist/ui/assets/{shared-BaW8OUvz.js → shared-CiXoJI0N.js} +1 -1
  83. package/dist/ui/assets/{table-BKS_LAxP.js → table-BbSidPe4.js} +1 -1
  84. package/dist/ui/assets/{updates-CunZLYFy.js → updates-DqccLz_y.js} +1 -1
  85. package/dist/ui/index.html +3 -3
  86. package/dist/web-server/routes/cliproxy-routing-routes.d.ts +3 -0
  87. package/dist/web-server/routes/cliproxy-routing-routes.d.ts.map +1 -0
  88. package/dist/web-server/routes/cliproxy-routing-routes.js +34 -0
  89. package/dist/web-server/routes/cliproxy-routing-routes.js.map +1 -0
  90. package/dist/web-server/routes/index.d.ts.map +1 -1
  91. package/dist/web-server/routes/index.js +2 -0
  92. package/dist/web-server/routes/index.js.map +1 -1
  93. package/package.json +1 -1
  94. package/dist/ui/assets/cliproxy-oJmvPKpC.js +0 -3
  95. package/dist/ui/assets/icons-BxSzn11s.js +0 -1
  96. package/dist/ui/assets/index-Cw_d3NZ2.css +0 -1
  97. package/dist/ui/assets/proxy-status-widget-IxTsEDhP.js +0 -1
@@ -1,3 +0,0 @@
1
- import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as o}from"./react-vendor-CNOkPC89.js";import{a as st,u as Pt,b as es}from"./tanstack-DWm6aJ-G.js";import{a8 as ts,d as L,C as Mt,b as Dt,a9 as Tt,c as $,P as at,B as G,a as ae,aa as se,L as z,I as re,r as Be,s as ze,t as $e,v as Qe,w as be,ab as It,ac as ss,ad as as,ae as ns,u as Et,af as nt,ag as it,ah as rt,ai as ot,aj as Rt,ak as gt,al as is,am as rs,W as Ot,an as Je,ao as Lt,Y as Re,ap as os,aq as ft,ar as vt,as as ls,at as cs,au as ds,av as us,aw as ms,ax as ps,ay as xs,az as hs,aA as jt,aB as gs,x as _t,n as lt,aC as ct,aD as Nt,aE as Ft,aF as fs,m as vs,aG as js,aH as Ns,aI as We,T as Xe,p as Ye,q as Ze,aJ as bs,aK as ys,aL as ws,aM as bt,aN as Cs,aO as ks,aP as As,aQ as Ss,aR as Ps,aS as Ms,Q as Ds,R as Ts,U as yt,V as wt,aT as Is,aU as Es,aV as Rs,aW as Os,aX as Ls,aY as _s,aZ as Fs,a_ as Us,a$ as Ks,b0 as qs,b1 as Hs,b2 as Vs,S as Gs}from"./index-Bmd4gqsh.js";import{C as et}from"./default-ports-1QQSffYX.js";import{t as H}from"./notifications-B2HqRBj7.js";import{C as Ut,L as X,o as he,Y as Bs,l as pe,n as Kt,aA as dt,R as ut,p as ye,a7 as Ce,T as mt,a4 as zs,aB as qt,az as $s,y as pt,Z as ke,V as Ht,h as Qs,t as Vt,aC as Js,aq as Ws,X as xt,a6 as Gt,I as Bt,z as zt,aD as Xs,ap as $t,aE as Ys,at as Zs,aF as Qt}from"./icons-BxSzn11s.js";import{R as Oe,A as Ct,D as He,i as ea,a as ta}from"./antigravity-responsibility-constants-Bvh4Ybz0.js";import{C as Le}from"./checkbox-DXj-4eLk.js";import{C as sa}from"./confirm-dialog-CF5EDIrm.js";import{S as ht}from"./separator-Cuk1ilZb.js";import{S as aa}from"./searchable-select-D_SVA6pH.js";import{P as na}from"./proxy-status-widget-IxTsEDhP.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-BSHMTH4-.js";const Jt=Object.freeze({"gemini-3-pro-preview":"gemini-3.1-pro-preview","gemini-3.1-pro-preview":"gemini-3-pro-preview","gemini-3-flash-preview":"gemini-3.1-flash-preview","gemini-3.1-flash-preview":"gemini-3-flash-preview"}),ia=/^gemini-(\d+(?:[.-]\d+)*)-(pro|flash)-preview(-customtools)?$/i;function we(t){return ts(t).toLowerCase()}function _e(t){const s=we(t),a=s.match(ia);if(!a)return null;const[,n,i,d]=a;return{normalizedId:s,version:n.split(/[.-]/).map(m=>Number(m)),family:i,customtools:!!d,dottedVersion:n.includes(".")}}function Wt(t,s){const a=Math.max(t.length,s.length);for(let n=0;n<a;n+=1){const i=t[n]??0,d=s[n]??0;if(i!==d)return i>d?1:-1}return 0}function ra(t,s,a){if(t.customtools!==s.customtools)return t.customtools?1:-1;const n=Wt(t.version,s.version);if(n!==0)return n>0?-1:1;const i=+(t.dottedVersion===a.dottedVersion),d=+(s.dottedVersion===a.dottedVersion);return i!==d?d-i:t.normalizedId.localeCompare(s.normalizedId)}function kt(t,s){const a=we(s);return t.find(n=>we(n.id)===a)?.id}function oa(t,s){const a=_e(t);return!a||s.length===0?void 0:s.map(i=>{const d=_e(i.id);return!d||d.family!==a.family?null:{id:i.id,info:d}}).filter(i=>!!i).sort((i,d)=>ra(i.info,d.info,a))[0]?.id}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",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Latest Sonnet with thinking budget support",presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6",haiku:"claude-sonnet-4-6"}},{id:"gemini-3.1-pro-preview",name:"Gemini Pro",description:"Resolves to the best advertised Gemini Pro preview via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3.1-pro-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-1-flash-preview"}},{id:"gemini-3-1-flash-preview",name:"Gemini Flash",description:"Resolves to the best advertised Gemini Flash preview via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3-1-flash-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-1-flash-preview"}}]},gemini:{provider:"gemini",displayName:"Gemini",defaultModel:"gemini-2.5-pro",models:[{id:"gemini-3.1-pro-preview",name:"Gemini Pro",tier:"paid",description:"Uses the best advertised Gemini Pro preview when Google exposes one",extendedContext:!0,presetMapping:{default:"gemini-3.1-pro-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini Flash",tier:"paid",description:"Uses the best advertised Gemini Flash preview when Google exposes one",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-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-codex",models:[{id:"gpt-5-codex",name:"GPT-5 Codex",description:"Cross-plan safe Codex default",presetMapping:{default:"gpt-5-codex",opus:"gpt-5-codex",sonnet:"gpt-5-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5-codex-mini",name:"GPT-5 Codex Mini",description:"Faster and cheaper Codex option",presetMapping:{default:"gpt-5-codex-mini",opus:"gpt-5-codex",sonnet:"gpt-5-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"Legacy mini model ID kept for backwards compatibility",presetMapping:{default:"gpt-5-mini",opus:"gpt-5-codex",sonnet:"gpt-5-mini",haiku:"gpt-5-mini"}},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini",description:"Legacy fast Codex mini model",presetMapping:{default:"gpt-5.1-codex-mini",opus:"gpt-5.1-codex-max",sonnet:"gpt-5.1-codex-max",haiku:"gpt-5.1-codex-mini"}},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max",description:"Higher-effort Codex model with xhigh support",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-codex",name:"GPT-5.2 Codex",description:"Cross-plan Codex model with xhigh support",presetMapping:{default:"gpt-5.2-codex",opus:"gpt-5.2-codex",sonnet:"gpt-5.2-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",tier:"paid",description:"Paid Codex plans only",presetMapping:{default:"gpt-5.3-codex",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",tier:"paid",description:"Paid Codex plans only, ultra-fast coding model",presetMapping:{default:"gpt-5.3-codex-spark",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.4",name:"GPT-5.4",tier:"paid",description:"Paid Codex plans only, latest GPT-5 family model",presetMapping:{default:"gpt-5.4",opus:"gpt-5.4",sonnet:"gpt-5.4",haiku:"gpt-5-codex-mini"}}]},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",name:"Kimi K2",description:"Kimi model currently available via iFlow"},{id:"deepseek-v3.2",name:"DeepSeek V3.2",description:"Current DeepSeek V3.2 model via iFlow"},{id:"deepseek-r1",name:"DeepSeek R1",description:"Reasoning-focused DeepSeek model"},{id:"glm-4.6",name:"GLM 4.6",description:"Zhipu GLM 4.6 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-6",models:[{id:"kiro-claude-opus-4-6",name:"Kiro Claude Opus 4.6",description:"Claude Opus 4.6 via Kiro (2.2x credit)",presetMapping:{default:"kiro-claude-opus-4-6",opus:"kiro-claude-opus-4-6",sonnet:"kiro-claude-sonnet-4-6",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4-6",name:"Kiro Claude Sonnet 4.6",description:"Claude Sonnet 4.6 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4-6",opus:"kiro-claude-opus-4-6",sonnet:"kiro-claude-sonnet-4-6",haiku:"kiro-claude-haiku-4-5"}},{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-6",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-6",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Balanced performance and speed",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6",sonnet:"claude-sonnet-4-6",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"}]}};function Xt(t,s){const a=ge[t.toLowerCase()];if(!a)return;const n=we(s),i=Jt[n.toLowerCase()],d=a.models.find(c=>c.id===n||c.id===i);if(d)return d;const m=_e(n);if(m)return a.models.map(c=>({model:c,info:_e(c.id)})).filter(c=>!!(c.info&&c.info.family===m.family)).sort((c,l)=>Wt(l.info.version,c.info.version))[0]?.model}function Ne(t,s=[]){const a=we(t),n=oa(a,s);if(n)return n;const i=kt(s,a);if(i)return i;const d=Jt[a];return(d?kt(s,d):void 0)??a}function la(t,s=[]){return{default:Ne(t.default,s),opus:Ne(t.opus,s),sonnet:Ne(t.sonnet,s),haiku:Ne(t.haiku,s)}}function Yt(t,s=[]){if(!t)return[];const a=new Set;return t.models.map(n=>{const i=Ne(n.id,s),d=n.presetMapping?la(n.presetMapping,s):void 0;return{...n,id:i,presetMapping:d}}).filter(n=>a.has(n.id)?!1:(a.add(n.id),!0))}function ca(t,s){return Xt(t,s)?.extendedContext===!0}const Ve="ccs-internal-managed";async function da(){try{const t=await fetch("/api/settings/auth/tokens/raw");return t.ok?(await t.json())?.apiKey?.value??Ve:Ve}catch{return Ve}}async function tt(t,s){const a=ge[t];if(!a)return{success:!1};const n=a.models.find(l=>l.id===a.defaultModel)||a.models[0],i=n?.presetMapping||{default:a.defaultModel,opus:a.defaultModel,sonnet:a.defaultModel,haiku:a.defaultModel},d=await da(),c={env:{ANTHROPIC_BASE_URL:`http://127.0.0.1:${et}/api/provider/${t}`,ANTHROPIC_AUTH_TOKEN:d,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/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:c})})).ok,presetName:n?.name||a.defaultModel}}catch{return{success:!1}}}function ua({currentProgress:t,allSteps:s}){return e.jsx("div",{className:"flex justify-center gap-1 pt-2",children:s.map((a,n)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${t>=n?"bg-primary":"bg-muted"}`},a))})}function ma({providers:t,onSelect:s}){return e.jsx("div",{className:"grid gap-2",children:t.map(a=>e.jsxs("button",{onClick:()=>s(a.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:a.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:a.description})]}),e.jsx(Ut,{className:"w-4 h-4 text-muted-foreground"})]},a.id))})}function pa({selectedProvider:t,providers:s,authCommand:a,isRefreshing:n,isPending:i,onBack:d,onStartAuth:m,onRefresh:c}){const[l,p]=o.useState(!1),f=async h=>{await navigator.clipboard.writeText(h),p(!0),setTimeout(()=>p(!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 ",s.find(h=>h.id===t)?.name," to add an account"]}),e.jsx(L,{onClick:m,disabled:i,className:"w-full gap-2",size:"lg",children:i?e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"w-4 h-4 animate-spin"}),"Authenticating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{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(Mt,{children:e.jsxs(Dt,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Bs,{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:a}),e.jsx(L,{variant:"outline",size:"icon",onClick:()=>f(a),children:l?e.jsx(pe,{className:"w-4 h-4 text-green-500"}):e.jsx(Kt,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(L,{variant:"ghost",onClick:d,disabled:i,children:[e.jsx(dt,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs(L,{variant:"outline",onClick:c,disabled:n||i,children:[e.jsx(ut,{className:`w-4 h-4 mr-2 ${n?"animate-spin":""}`}),n?"Checking...":"Refresh Status"]})]})]})}function xa({accounts:t,privacyMode:s,onSelect:a,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 (",t.length,")"]}),e.jsx("div",{className:"grid gap-2 max-h-[320px] overflow-y-auto pr-1",children:t.map(d=>{const m=Tt(d.id,d.email,d.tokenFile);return e.jsxs("button",{type:"button",onClick:()=>a(d),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(ye,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:$("font-medium",s&&at),children:m.email}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[m.audienceLabel&&e.jsx(G,{variant:"outline",className:$("text-[10px] h-4 px-1.5 border-transparent",m.audience==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300"),children:m.audienceLabel}),m.detailLabel&&e.jsx(G,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:m.detailLabel}),d.isDefault&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Default account"})]})]})]}),e.jsx(Ut,{className:"w-4 h-4 text-muted-foreground"})]},d.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(he,{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(L,{variant:"ghost",onClick:i,children:[e.jsx(dt,{className:"w-4 h-4 mr-2"}),"Back"]})})]})}const At="__custom__";function ha({selectedProvider:t,selectedAccount:s,variantName:a,modelName:n,isPending:i,privacyMode:d,onVariantNameChange:m,onModelChange:c,onBack:l,onSkip:p,onCreate:f}){const{t:h}=ae(),g=ge[t]?.models||[],_=n&&!g.some(r=>r.id===n),[v,T]=o.useState(_),k=t==="agy"&&n.trim().length>0?se(n):!1,y=s?Tt(s.id,s.email,s.tokenFile):null,M=r=>{r===At?(T(!0),c("")):(T(!1),c(r))};return e.jsxs("div",{className:"space-y-4",children:[s&&e.jsxs("div",{className:"flex items-start gap-2 p-2 bg-muted/50 rounded-md text-sm",children:[e.jsx(ye,{className:"w-4 h-4"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("span",{children:[h("setupVariant.using")," ",e.jsx("span",{className:$(d&&at),children:y?.email})]}),(y?.audienceLabel||y?.detailLabel)&&e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[y?.audienceLabel&&e.jsx(G,{variant:"outline",className:$("text-[10px] h-4 px-1.5 border-transparent",y.audience==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300"),children:y.audienceLabel}),y?.detailLabel&&e.jsx(G,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:y.detailLabel})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"variant-name",children:h("setupVariant.variantNameRequired")}),e.jsx(re,{id:"variant-name",value:a,onChange:r=>m(r.target.value),placeholder:h("setupVariant.variantNamePlaceholder")}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[h("setupVariant.invokeHintPrefix")," ccs ",a||"<name>",' "prompt"']})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{children:h("setupVariant.model")}),v?e.jsxs("div",{className:"space-y-2",children:[e.jsx(re,{value:n,onChange:r=>c(r.target.value),placeholder:h("setupVariant.modelPlaceholder")}),k&&e.jsx("p",{className:"text-xs text-destructive",children:"Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated."}),e.jsx("button",{type:"button",className:"text-xs text-primary hover:underline",onClick:()=>{T(!1),t==="agy"&&se(n)&&c("")},children:h("setupVariant.choosePresetInstead")})]}):e.jsxs(Be,{value:g.some(r=>r.id===n)?n:"",onValueChange:M,children:[e.jsx(ze,{children:e.jsx($e,{placeholder:h("setupVariant.selectModel")})}),e.jsxs(Qe,{children:[g.map(r=>e.jsx(be,{value:r.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:r.name}),r.description&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["- ",r.description]})]})},r.id)),e.jsx(be,{value:At,children:e.jsx("span",{className:"text-primary",children:h("setupVariant.customModelName")})})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:v?h("setupVariant.enterAnyModel"):h("setupVariant.defaultModel",{model:ge[t]?.defaultModel||h("setupVariant.providerDefault")})})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs(L,{variant:"ghost",onClick:l,children:[e.jsx(dt,{className:"w-4 h-4 mr-2"}),h("setupVariant.back")]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{variant:"ghost",onClick:p,children:h("setupVariant.skip")}),e.jsx(L,{onClick:f,disabled:!a||i||k,children:h(i?"setupVariant.creating":"setupVariant.createVariant")})]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:h("setupVariant.skipHint")})]})}function ga({variantName:t,onClose:s}){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(pe,{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(Mt,{children:e.jsxs(Dt,{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 ",t,' "your prompt here"']})]})}),e.jsx(L,{onClick:s,className:"w-full",children:"Done"})]})}function fa({open:t,onClose:s}){const[a,n]=o.useState("provider"),[i,d]=o.useState(""),[m,c]=o.useState(null),[l,p]=o.useState(""),[f,h]=o.useState(""),[g,_]=o.useState(!1),[v,T]=o.useState(!1),{data:k,refetch:y}=It(),M=ss(),r=as(),b=ns(),{privacyMode:j}=Et(),A=k?.authStatus.find(R=>R.provider===i),I=o.useMemo(()=>A?.accounts||[],[A?.accounts]);o.useEffect(()=>{if(!t){const R=setTimeout(()=>{n("provider"),d(""),c(null),p(""),h(""),T(!1)},0);return()=>clearTimeout(R)}},[t]),o.useEffect(()=>{if(a==="auth"&&I.length>0&&!v){const R=setTimeout(()=>{n("account")},0);return()=>clearTimeout(R)}},[a,I,v]);const D=async()=>{_(!0),await y(),_(!1)},P=()=>{const R=(A?.accounts?.length||0)===0;r.mutate({provider:i},{onSuccess:async N=>{if(R){const K=await tt(i);K.success&&K.presetName?H.success(`Applied "${K.presetName}" preset`):K.success||H.warning(Ot.t("commonToast.accountAddedPresetFailed"))}N.account&&(c(N.account),n("variant")),y()}})},U=R=>{d(R),(k?.authStatus.find(q=>q.provider===R)?.accounts||[]).length===0?n("auth"):n("account")},C=R=>{c(R),n("variant")},w=async()=>{if(!(!l||!i))try{await M.mutateAsync({name:l,provider:i,model:f||void 0,account:m?.id}),n("success")}catch(R){console.error("Failed to create variant:",R)}},u=`ccs ${i} --auth --add`,F=rs(a),V=R=>{if(!R&&(r.isPending&&i&&b.mutate(i),a==="success"||a==="provider")){s();return}};return e.jsx(nt,{open:t,onOpenChange:V,children:e.jsxs(it,{className:"sm:max-w-lg",onPointerDownOutside:R=>{a!=="success"&&a!=="provider"&&R.preventDefault()},onEscapeKeyDown:R=>{(r.isPending||M.isPending)&&R.preventDefault()},children:[e.jsxs(rt,{children:[e.jsxs(ot,{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:"w-5 h-5 text-primary"}),"Quick Setup Wizard"]}),e.jsxs(Rt,{children:[a==="provider"&&"Select a provider to get started",a==="auth"&&"Authenticate with your provider",a==="account"&&"Select which account to use",a==="variant"&&"Create your custom variant",a==="success"&&"Setup complete!"]})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[a==="provider"&&e.jsx(ma,{providers:gt,onSelect:U}),a==="auth"&&e.jsx(pa,{selectedProvider:i,providers:gt,authCommand:u,isRefreshing:g,isPending:r.isPending,onBack:()=>n("provider"),onStartAuth:P,onRefresh:D}),a==="account"&&e.jsx(xa,{accounts:I,privacyMode:j,onSelect:C,onAddNew:()=>{T(!0),n("auth")},onBack:()=>n("provider")}),a==="variant"&&e.jsx(ha,{selectedProvider:i,selectedAccount:m,variantName:l,modelName:f,isPending:M.isPending,privacyMode:j,onVariantNameChange:p,onModelChange:h,onBack:()=>I.length>0?n("account"):n("provider"),onSkip:s,onCreate:w}),a==="success"&&e.jsx(ga,{variantName:l,onClose:s})]}),e.jsx(ua,{currentProgress:F,allSteps:is})]})})}const va=3e3,ja=300*1e3,Na=3;async function Ge(t){const s=await t.text();if(!s)return{};try{return JSON.parse(s)}catch{const a=t.status>=400?`Request failed with status ${t.status}`:void 0;return a?{error:a}:{}}}const oe={provider:null,isAuthenticating:!1,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:!1};function ba(){const[t,s]=o.useState(oe),a=o.useRef(oe),n=o.useRef(0),i=o.useRef(null),d=o.useRef(null),m=o.useRef(0),c=o.useRef(0),l=o.useRef(!1),p=st(),f=o.useCallback(k=>k===n.current,[]),h=o.useCallback(()=>{d.current&&(clearInterval(d.current),d.current=null),c.current=0},[]);o.useEffect(()=>()=>{i.current?.abort(),h(),l.current=!1},[h]),o.useEffect(()=>{a.current=t},[t]);const g=o.useCallback(async(k,y,M)=>{if(f(M)){if(Date.now()-m.current>ja){h(),f(M)&&s(r=>({...r,isAuthenticating:!1,error:"Authentication timed out. Please try again."}));return}try{const r=await fetch(`/api/cliproxy/auth/${k}/status?state=${encodeURIComponent(y)}`);if(!f(M))return;const b=await r.json();if(c.current=0,b.status==="ok"){if(!(typeof b.account=="object"&&b.account!==null)){h();const A="Authenticated account could not be registered";H.error(A),s(I=>({...I,isAuthenticating:!1,error:A}));return}h(),p.invalidateQueries({queryKey:["cliproxy-auth"]}),p.invalidateQueries({queryKey:["cliproxy-accounts"]}),p.invalidateQueries({queryKey:["account-quota"]}),H.success(`${k} authentication successful`),l.current=!1,s(oe)}else if(b.status==="auth_url"){const j=b.url||b.auth_url;j&&(s(A=>({...A,authUrl:j})),l.current||(l.current=!0,window.open(j,"_blank")))}else if(b.status==="device_code"){h();const j=b.user_code&&b.verification_url?`Open ${b.verification_url} and enter code: ${b.user_code}`:"Switch to Device Code method and try again.";H.error("Provider returned Device Code flow in callback mode"),s(A=>({...A,isAuthenticating:!1,error:j}))}else if(b.status==="error"){h();const j=b.error||"Authentication failed";H.error(j),s(A=>({...A,isAuthenticating:!1,error:j}))}}catch(r){if(!f(M)||(c.current+=1,c.current<Na))return;h();const b=r instanceof Error&&r.message.trim().length>0?r.message:"Lost contact with the auth status endpoint";H.error(b),s(j=>({...j,isAuthenticating:!1,error:b}))}}},[f,p,h]),_=o.useCallback(async(k,y)=>{if(!Je(k)){s({...oe,error:`Unknown provider: ${k}`});return}i.current?.abort(),h(),l.current=!1,c.current=0;const M=new AbortController,r=n.current+1;n.current=r,i.current=M;const j=(y?.flowType||(Lt(k)?"device_code":"authorization_code"))==="device_code",A=y?.startEndpoint||(j?"start":"start-url"),I={nickname:y?.nickname,kiroMethod:y?.kiroMethod,kiroIDCStartUrl:y?.kiroIDCStartUrl,kiroIDCRegion:y?.kiroIDCRegion,kiroIDCFlow:y?.kiroIDCFlow,riskAcknowledgement:y?.riskAcknowledgement};s({provider:k,isAuthenticating:!0,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:j});try{if(A==="start")fetch(`/api/cliproxy/auth/${k}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I),signal:M.signal}).then(async D=>{if(!f(r))return;const P=await Ge(D);if(!f(r))return;const U=P.success===!0,C=typeof P.account=="object"&&P.account!==null;if(D.ok&&U&&C)p.invalidateQueries({queryKey:["cliproxy-auth"]}),p.invalidateQueries({queryKey:["cliproxy-accounts"]}),p.invalidateQueries({queryKey:["account-quota"]}),l.current=!1,s(oe);else{const w=typeof P.error=="string"?P.error:U?"Authenticated account could not be registered":"Authentication failed";H.error(w),s(u=>({...u,isAuthenticating:!1,error:w}))}}).catch(D=>{if(!f(r)||D instanceof Error&&D.name==="AbortError")return;const P=D instanceof Error?D.message:"Authentication failed";H.error(P),s(U=>({...U,isAuthenticating:!1,error:P}))});else{const D=await fetch(`/api/cliproxy/auth/${k}/start-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I),signal:M.signal});if(!f(r))return;const P=await Ge(D);if(!f(r))return;const U=P.success===!0;if(!D.ok||!U){const u=typeof P.error=="string"?P.error:"Failed to start OAuth";throw new Error(u)}const C=typeof P.authUrl=="string"?P.authUrl:null,w=typeof P.state=="string"?P.state:null;if(s(u=>({...u,authUrl:C,oauthState:w})),C&&(l.current=!0,window.open(C,"_blank")),w){if(m.current=Date.now(),!C){if(await g(k,w,r),!f(r))return;const u=a.current;if(!u.isAuthenticating||u.provider!==k)return}d.current=setInterval(()=>{g(k,w,r)},va)}}}catch(D){if(!f(r))return;if(D instanceof Error&&D.name==="AbortError"){l.current=!1,s(oe);return}const P=D instanceof Error?D.message:"Authentication failed";H.error(P),s(U=>({...U,isAuthenticating:!1,error:P}))}},[f,g,h,p]),v=o.useCallback(()=>{const k=t.provider;n.current+=1,i.current?.abort(),h(),l.current=!1,s(oe),k&&Re.cliproxy.auth.cancel(k).catch(()=>{})},[t.provider,h]),T=o.useCallback(async k=>{if(!t.provider)return;const y=n.current,M=t.provider;s(r=>({...r,isSubmittingCallback:!0,error:null}));try{const r=await fetch(`/api/cliproxy/auth/${M}/submit-callback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirectUrl:k})});if(!f(y))return;const b=await Ge(r);if(!f(y))return;const j=b.success===!0,A=b.status==="wait",I=typeof b.account=="object"&&b.account!==null;if(r.ok&&A)s(D=>({...D,isSubmittingCallback:!1,error:null}));else if(r.ok&&j&&I)h(),p.invalidateQueries({queryKey:["cliproxy-auth"]}),p.invalidateQueries({queryKey:["cliproxy-accounts"]}),p.invalidateQueries({queryKey:["account-quota"]}),H.success(`${M} authentication successful`),s(oe);else{const D=typeof b.error=="string"?b.error:j?"Authenticated account could not be registered":"Callback submission failed";throw new Error(D)}}catch(r){if(!f(y))return;const b=r instanceof Error?r.message:"Failed to submit callback";H.error(b),s(j=>({...j,isSubmittingCallback:!1,error:b}))}},[f,t.provider,p,h]);return o.useMemo(()=>({...t,startAuth:_,cancelAuth:v,submitCallback:T}),[t,_,v,T])}function Zt({className:t,showAcknowledgement:s=!1,acknowledgementPhrase:a=Oe,acknowledgementText:n="",onAcknowledgementTextChange:i,disabled:d=!1,showProxySettingsLink:m=!1}){const{t:c}=ae(),l=c("accountSafetyWarning.title"),p=c("accountSafetyWarning.subtitle"),f=c("accountSafetyWarning.firstLine"),h=c("accountSafetyWarning.secondLine"),g="https://github.com/kaitranntt/ccs/issues/509",_=c("accountSafetyWarning.issueLabel"),v=c("accountSafetyWarning.proxySettingsLabel");return e.jsxs("section",{role:"alert",className:$("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",t),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(mt,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:l}),e.jsx("p",{className:"text-xs text-muted-foreground",children:p})]})]}),e.jsx(G,{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:f}),e.jsx("p",{className:"font-medium text-amber-900 dark:text-amber-200",children:h}),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:g,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:[_,e.jsx(he,{className:"h-3.5 w-3.5"})]}),m&&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(zs,{className:"h-3.5 w-3.5"}),v]}),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"})]}),s&&i&&e.jsxs("div",{className:"rounded-lg border border-amber-500/25 bg-amber-500/5 p-2.5",children:[e.jsxs(z,{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:a})]}),e.jsx(re,{id:"account-risk-ack-text",value:n,onChange:T=>i(T.target.value),placeholder:a,disabled:d,className:"mt-2 font-mono text-xs"})]})]})]})}function ya({className:t,value:s,onChange:a,disabled:n=!1}){const{t:i}=ae(),d=[s.reviewedIssue509,s.understandsBanRisk,s.acceptsFullResponsibility,s.typedPhrase.trim().replace(/\s+/g," ").toUpperCase()===Ct].filter(Boolean).length,m=d/4*100,c=l=>{a({...s,...l})};return e.jsxs("section",{role:"alert",className:$("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",t),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(mt,{className:"h-4 w-4"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:i("antigravityChecklist.title")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i("antigravityChecklist.subtitle")})]})]}),e.jsx(G,{variant:"outline",className:"border-rose-500/40 text-rose-700 dark:text-rose-300",children:i("antigravityChecklist.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:i("antigravityChecklist.completion")}),e.jsx("span",{children:i("antigravityChecklist.stepsCount",{current:d})})]}),e.jsx(os,{value:m,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(Le,{id:"agy-step-reviewed-issue",checked:s.reviewedIssue509,onCheckedChange:l=>c({reviewedIssue509:!!l}),disabled:n}),e.jsx(z,{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(Le,{id:"agy-step-understands-risk",checked:s.understandsBanRisk,onCheckedChange:l=>c({understandsBanRisk:!!l}),disabled:n}),e.jsx(z,{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(Le,{id:"agy-step-accept-responsibility",checked:s.acceptsFullResponsibility,onCheckedChange:l=>c({acceptsFullResponsibility:!!l}),disabled:n}),e.jsx(z,{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(qt,{className:"h-3.5 w-3.5"}),"Step 4: Type exact phrase to continue"]}),e.jsx(re,{value:s.typedPhrase,onChange:l=>c({typedPhrase:l.target.value}),placeholder:Ct,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(he,{className:"h-3.5 w-3.5"})]})})]})]})}function wa(t){return t.trim().replace(/\s+/g," ").toUpperCase()}function Ca({open:t,onClose:s,provider:a,displayName:n,isFirstAccount:i=!1}){const[d,m]=o.useState(""),[c,l]=o.useState(""),[p,f]=o.useState(!1),[h,g]=o.useState(null),[_,v]=o.useState(""),[T,k]=o.useState(He),[y,M]=o.useState(!1),[r,b]=o.useState(!1),[j,A]=o.useState(ft),[I,D]=o.useState(""),[P,U]=o.useState(""),[C,w]=o.useState(vt),{t:u}=ae(),F=o.useRef(!1),V=o.useRef(0),R=o.useRef(!1),N=ba(),K=ls(),q=a==="kiro",Q=a==="agy"||a==="gemini",Y=a==="gemini"&&!y,J=a==="agy"&&!y,ne=Q&&r,x=ea(T),E=wa(_)===Oe,W=Lt(a),xe=cs(j),de=q&&j==="idc",ue=q&&us(j),Ae=q?ds(j,C):void 0,Fe=q?ps(j):void 0,Se=q?Ae==="device_code":W,Z=N.isAuthenticating||K.isPending,Ue=d.trim(),fe=I.trim(),Pe=P.trim(),Me=h||N.error,De=o.useCallback(async()=>{const S=await fetch("/api/settings/auth/antigravity-risk");if(!S.ok)throw new Error("Failed to load power user mode setting");return(await S.json()).antigravityAckBypass===!0},[]),me=o.useCallback(async({pendingMessage:S=null,disabledMessage:ie=null}={})=>{const qe=++V.current;b(!0),S!==null&&g(S);try{const Ie=await De();return V.current!==qe||(M(Ie),ie?g(Ie?null:ie):S!==null&&g(null)),Ie}catch{return V.current!==qe||(M(!1),g(ie??u("addAccountDialog.powerUserLoadFailed")),R.current||(R.current=!0,H.error(u("addAccountDialog.powerUserLoadFailed")))),!1}finally{V.current===qe&&b(!1)}},[De,u]),ve=()=>{m(""),l(""),f(!1),g(null),v(""),k(He),M(!1),b(!1),A(ft),D(""),U(""),w(vt),V.current+=1,R.current=!1,F.current=!1,s()};o.useEffect(()=>{t&&(v(""),k(He),g(null))},[a,t]),o.useEffect(()=>()=>{V.current+=1},[]),o.useEffect(()=>{if(!t||!Q){V.current+=1,M(!1),b(!1);return}me()},[t,a,Q,me]),o.useEffect(()=>{if(!t||a!=="agy"||!N.error||!y)return;const S=N.error.toLowerCase();(S.includes("agy_risk_ack_required")||S.includes("responsibility acknowledgement")||S.includes("responsibility checklist"))&&me({pendingMessage:u("addAccountDialog.powerUserLoading"),disabledMessage:u("addAccountDialog.powerUserUnavailableRetry")})},[N.error,t,y,a,me,u]),o.useEffect(()=>{!N.isAuthenticating&&!N.error&&N.provider===null&&t&&F.current&&(F.current=!1,(async()=>{try{const ie=await tt(a);ie.success&&ie.presetName&&i&&H.success(`Applied "${ie.presetName}" preset`)}catch{}ve()})())},[N.isAuthenticating,N.error,N.provider]);const Te=()=>{N.cancelAuth(),ve()},Ke=async()=>{N.authUrl&&(await navigator.clipboard.writeText(N.authUrl),f(!0),setTimeout(()=>f(!1),2e3))},O=()=>{c.trim()&&N.submitCallback(c.trim())},B=()=>{if(ne){g(u("addAccountDialog.powerUserLoading"));return}if(J&&!x){g("Complete all Antigravity responsibility steps before authenticating this provider.");return}if(Y&&!E){g(`Type "${Oe}" to acknowledge the account safety warning before authenticating this provider.`);return}if(g(null),de&&!fe){g("IDC Start URL is required for Kiro IAM Identity Center login.");return}F.current=!0,N.startAuth(a,{nickname:Ue||void 0,kiroMethod:q?j:void 0,kiroIDCStartUrl:de?fe:void 0,kiroIDCRegion:de&&Pe?Pe:void 0,kiroIDCFlow:de?C:void 0,flowType:q?Ae:void 0,startEndpoint:q?Fe:void 0,riskAcknowledgement:J?{version:ta,reviewedIssue509:T.reviewedIssue509,understandsBanRisk:T.understandsBanRisk,acceptsFullResponsibility:T.acceptsFullResponsibility,typedPhrase:T.typedPhrase}:void 0})},ee=()=>{F.current=!0,K.mutate(void 0,{onSuccess:async()=>{const S=await tt("kiro");S.success&&S.presetName&&i&&H.success(`Applied "${S.presetName}" preset`),ve()}})},je=S=>{S||Te()},te=N.isAuthenticating;return e.jsx(nt,{open:t,onOpenChange:je,children:e.jsxs(it,{className:"sm:max-w-md",onInteractOutside:S=>{te&&S.preventDefault()},children:[e.jsxs(rt,{children:[e.jsx(ot,{children:u("addAccountDialog.title",{displayName:n})}),e.jsx(Rt,{children:u(q?"addAccountDialog.descKiro":Se?"addAccountDialog.descDeviceCode":"addAccountDialog.descOauth")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[J&&!te&&e.jsx(ya,{value:T,onChange:S=>{k(S),g(null)},disabled:Z}),Q&&y&&!te&&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(qt,{className:"h-3.5 w-3.5"}),u("addAccountDialog.powerUserEnabled")]}),u("addAccountDialog.powerUserSkipped")]}),Y&&!te&&e.jsx(Zt,{showAcknowledgement:!0,acknowledgementPhrase:Oe,acknowledgementText:_,onAcknowledgementTextChange:S=>{v(S),g(null)},disabled:Z}),q&&!te&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"kiro-auth-method",children:u("addAccountDialog.authMethod")}),e.jsxs(Be,{value:j,onValueChange:S=>{A(S),g(null)},children:[e.jsx(ze,{id:"kiro-auth-method",children:e.jsx($e,{placeholder:u("addAccountDialog.selectKiroAuthMethod")})}),e.jsx(Qe,{children:ms.map(S=>e.jsx(be,{value:S.id,children:S.label},S.id))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:xe.description}),ue&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["If your browser does not return automatically after login, CCS can accept the final",e.jsx("span",{className:"mx-1 rounded bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"kiro://..."}),"callback URL in the next step."]})]}),de&&!te&&e.jsxs("div",{className:"space-y-4 rounded-lg border border-border/60 bg-muted/20 p-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"kiro-idc-start-url",children:"IDC Start URL"}),e.jsx(re,{id:"kiro-idc-start-url",value:I,onChange:S=>{D(S.target.value),g(null)},placeholder:"https://d-xxx.awsapps.com/start",disabled:Z}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Required for organization IAM Identity Center login."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"kiro-idc-region",children:"IDC Region"}),e.jsx(re,{id:"kiro-idc-region",value:P,onChange:S=>{U(S.target.value),g(null)},placeholder:"us-east-1",disabled:Z}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Leave blank to use the upstream default region."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"kiro-idc-flow",children:"IDC Flow"}),e.jsxs(Be,{value:C,onValueChange:S=>{w(S),g(null)},children:[e.jsx(ze,{id:"kiro-idc-flow",children:e.jsx($e,{placeholder:"Select IDC flow"})}),e.jsxs(Qe,{children:[e.jsx(be,{value:"authcode",children:"Authorization Code"}),e.jsx(be,{value:"device",children:"Device Code"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Auth Code opens a browser and may need the final callback URL pasted back. Device Code shows a verification code instead."})]})]}),!te&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"nickname",children:u("addAccountDialog.nicknameOptional")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ye,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(re,{id:"nickname",value:d,onChange:S=>{m(S.target.value),g(null)},placeholder:u("addAccountDialog.nicknamePlaceholder"),disabled:Z,className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:u("addAccountDialog.nicknameOptionalHint")})]}),te&&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(X,{className:"w-4 h-4 inline mr-2 animate-spin"}),u("addAccountDialog.waitingForAuth")]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:N.isDeviceCodeFlow?u("addAccountDialog.deviceCodeHint"):ue?"Complete sign-in in your browser. If it does not return automatically, paste the final kiro:// callback URL below.":u("addAccountDialog.browserHint")})]}),N.authUrl&&!N.isDeviceCodeFlow&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{className:"text-xs",children:u("addAccountDialog.openUrlLabel")}),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(L,{variant:"outline",size:"sm",onClick:Ke,children:p?e.jsxs(e.Fragment,{children:[e.jsx(pe,{className:"w-3 h-3 mr-1"}),u("addAccountDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{className:"w-3 h-3 mr-1"}),u("addAccountDialog.copy")]})}),e.jsxs(L,{variant:"outline",size:"sm",onClick:()=>{if(!N.authUrl)return;const S=window.open(N.authUrl,"_blank");(!S||S.closed||typeof S.closed>"u")&&H.warning(u("addAccountDialog.popupBlocked"),{duration:5e3})},children:[e.jsx(he,{className:"w-3 h-3 mr-1"}),u("addAccountDialog.open")]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"callback-url",className:"text-xs",children:ue?"Browser did not return? Paste the final kiro:// callback URL:":u("addAccountDialog.redirectPasteLabel")}),e.jsx(re,{id:"callback-url",value:c,onChange:S=>l(S.target.value),placeholder:ue?"kiro://kiro.kiroAgent/authenticate-success?code=...&state=...":u("addAccountDialog.callbackPlaceholder"),className:"font-mono text-xs"}),e.jsx(L,{variant:"secondary",size:"sm",onClick:O,disabled:!c.trim()||N.isSubmittingCallback,children:N.isSubmittingCallback?e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"w-3 h-3 mr-1 animate-spin"}),u("addAccountDialog.submitting")]}):u("addAccountDialog.submitCallback")})]})]}),!N.authUrl&&!N.isDeviceCodeFlow&&e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:ue?"Preparing the Kiro sign-in URL. If it does not open automatically, it will appear here shortly.":u("addAccountDialog.preparingUrl")})]}),Me&&e.jsx("p",{className:"text-xs text-center text-destructive",children:Me}),K.isPending&&e.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[e.jsx(X,{className:"w-4 h-4 inline mr-2 animate-spin"}),u("addAccountDialog.importingToken")]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[e.jsx(L,{variant:"ghost",onClick:Te,children:u("addAccountDialog.cancel")}),q&&!te&&e.jsx(L,{variant:"outline",onClick:ee,disabled:Z,children:K.isPending?e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"w-4 h-4 mr-2 animate-spin"}),u("addAccountDialog.importing")]}):e.jsxs(e.Fragment,{children:[e.jsx($s,{className:"w-4 h-4 mr-2"}),u("addAccountDialog.importFromIde")]})}),!te&&e.jsxs(L,{onClick:B,disabled:Z||ne||J&&!x||Y&&!E,children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),u("addAccountDialog.authenticate")]})]})]})]})})}const ka=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"];function Aa(t){const s=t?.env||{};return ka.filter(a=>!s[a]?.trim())}function Sa(t){const[s,a]=o.useState(null),[n,i]=o.useState(!1),d=st(),{data:m,isLoading:c,refetch:l}=Pt({queryKey:["settings",t],queryFn:async()=>{const C=await fetch(`/api/settings/${t}/raw`);return C.ok?C.json():{profile:t,settings:{env:{}},mtime:Date.now(),path:`~/.ccs/profiles/${t}/settings.json`}}}),p=m?.settings,f=o.useMemo(()=>s!==null?s:p?JSON.stringify(p,null,2):`{
2
- "env": {}
3
- }`,[s,p]),h=o.useCallback(C=>{a(C)},[]),g=o.useMemo(()=>{try{return JSON.parse(f)}catch{return p||{env:{}}}},[f,p]),_=g?.env?.ANTHROPIC_MODEL,v=g?.env?.ANTHROPIC_DEFAULT_OPUS_MODEL,T=g?.env?.ANTHROPIC_DEFAULT_SONNET_MODEL,k=g?.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL,y=o.useMemo(()=>xs(g?.env||{}),[g]),M=o.useCallback((C,w)=>hs(C,w,{supportsExtendedContext:u=>ca(t,u)}),[t]),r=o.useCallback((C,w)=>{const u={...g?.env||{},[C]:w},F=jt(C)?M(u,y):u;delete F.CCS_EXTENDED_CONTEXT;const V={...g,env:F};a(JSON.stringify(V,null,2))},[M,g,y]),b=o.useCallback(C=>{const w=g?.env||{},u=M(w,C);delete u.CCS_EXTENDED_CONTEXT;const F={...g,env:u};a(JSON.stringify(F,null,2))},[M,g]),j=o.useCallback(C=>{const w={...g?.env||{},...C},F=Object.keys(C).some(jt)?M(w,y):w;delete F.CCS_EXTENDED_CONTEXT;const V={...g,env:F};a(JSON.stringify(V,null,2))},[M,g,y]),A=o.useMemo(()=>{try{return JSON.parse(f),!0}catch{return!1}},[f]),I=o.useMemo(()=>s===null?!1:s!==JSON.stringify(p,null,2),[s,p]),D=o.useMemo(()=>Aa(g),[g]),P=es({mutationFn:async()=>{const C=JSON.parse(f),w=await fetch(`/api/settings/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:C,expectedMtime:m?.mtime})});if(w.status===409)throw new Error("CONFLICT");if(!w.ok)throw new Error("Failed to save");return w.json()},onSuccess:C=>{d.invalidateQueries({queryKey:["settings",t]}),a(null),C?.warning?H.success("Settings saved",{description:C.warning}):H.success("Settings saved")},onError:C=>{C.message==="CONFLICT"?i(!0):H.error(C.message)}}),U=async C=>{i(!1),C?(await l(),P.mutate()):a(null)};return{data:m,isLoading:c,refetch:l,rawJsonContent:f,rawJsonEdits:s,isRawJsonValid:A,hasChanges:I,currentSettings:g,currentModel:_,opusModel:v,sonnetModel:T,haikuModel:k,extendedContextEnabled:y,toggleExtendedContext:b,handleRawJsonChange:h,updateEnvValue:r,updateEnvValues:j,saveMutation:{mutate:()=>P.mutate(),isPending:P.isPending},conflictDialog:n,setConflictDialog:i,handleConflictResolve:U,missingRequiredFields:D}}const Pa=/-(medium|high|xhigh)$/i;function Ma(t){if(!t)return;const s=t.trim().match(Pa);if(s?.[1])return s[1].toLowerCase()}function Da(t){if(!t)return null;const s=Ma(t);return s?{label:`Pinned ${s}`,explicit:!0}:{label:"Auto effort",explicit:!1}}function Ta({label:t}){return e.jsx(G,{variant:"outline",className:"text-[9px] h-4 px-1",children:t})}function Ee({modelId:t}){const s=Da(t);return s?e.jsx(G,{variant:s.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:s.label}):null}function ce({label:t,description:s,value:a,onChange:n,catalog:i,allModels:d,disabled:m}){const{t:c}=ae(),l=i?.provider==="codex",p=o.useMemo(()=>Yt(i,d),[d,i]),f=new Set(p.map(v=>v.id)),h=p.map(v=>({value:v.id,groupKey:"recommended",searchText:`${v.id} ${v.name}`,keywords:[v.tier??"",i?.provider??""],triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:v.id}),l&&e.jsx(Ee,{modelId:v.id})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:v.id}),v.tier==="paid"&&e.jsx(Ta,{label:c("providerModelSelector.paid")}),l&&e.jsx(Ee,{modelId:v.id})]})})),g=d.filter(v=>!f.has(v.id)).map(v=>({value:v.id,groupKey:"all",searchText:v.id,keywords:[v.owned_by],triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:v.id}),l&&e.jsx(Ee,{modelId:v.id})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:v.id}),l&&e.jsx(Ee,{modelId:v.id})]})})),_=h.length+g.length>0;return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium",children:t}),s&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:s})]}),e.jsx(aa,{value:a||void 0,onChange:n,disabled:m,placeholder:c("providerModelSelector.selectModel"),searchPlaceholder:c("searchableSelect.searchModels"),emptyText:c(_?"searchableSelect.noResults":"providerModelSelector.noModelsAvailable"),triggerClassName:"h-9",groups:[{key:"recommended",label:e.jsx("span",{className:"text-xs text-primary",children:c("providerModelSelector.recommended")})},{key:"all",label:e.jsx("span",{className:"text-xs text-muted-foreground",children:c("providerModelSelector.allModelsCount",{count:d.length})})}],options:[...h,...g]})]})}function Ia({open:t,onClose:s,currentValues:a,onApply:n,onSave:i,isSaving:d,catalog:m,allModels:c}){const{t:l}=ae(),[p,f]=o.useState(a),[h,g]=o.useState(""),_=v=>{v?(f(a),g("")):s()};return e.jsx(nt,{open:t,onOpenChange:_,children:e.jsxs(it,{className:"sm:max-w-md",children:[e.jsx(rt,{children:e.jsxs(ot,{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:"w-4 h-4"}),l("customPresetDialog.title")]})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(z,{htmlFor:"preset-name",children:l("customPresetDialog.presetNameOptional")}),e.jsx(re,{id:"preset-name",value:h,onChange:v=>g(v.target.value),placeholder:l("customPresetDialog.presetNamePlaceholder"),className:"text-sm"})]}),e.jsx(ht,{}),m?.provider==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground rounded-md border bg-muted/30 px-2.5 py-2",children:[l("customPresetDialog.codexTipPrefix")," ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and"," ",e.jsx("code",{children:"-xhigh"})," ",l("customPresetDialog.codexTipSuffix")]}),e.jsx(ce,{label:l("customPresetDialog.defaultModel"),description:l("customPresetDialog.defaultModelDesc"),value:p.default,onChange:v=>f({...p,default:v}),catalog:m,allModels:c}),e.jsx(ce,{label:l("customPresetDialog.opusModel"),description:l("customPresetDialog.opusModelDesc"),value:p.opus,onChange:v=>f({...p,opus:v}),catalog:m,allModels:c}),e.jsx(ce,{label:l("customPresetDialog.sonnetModel"),description:l("customPresetDialog.sonnetModelDesc"),value:p.sonnet,onChange:v=>f({...p,sonnet:v}),catalog:m,allModels:c}),e.jsx(ce,{label:l("customPresetDialog.haikuModel"),description:l("customPresetDialog.haikuModelDesc"),value:p.haiku,onChange:v=>f({...p,haiku:v}),catalog:m,allModels:c})]}),e.jsxs(gs,{className:"gap-2 sm:gap-0",children:[e.jsx(L,{variant:"outline",onClick:s,children:l("customPresetDialog.cancel")}),i&&e.jsxs(L,{variant:"secondary",onClick:()=>i(p,h||void 0),disabled:d||!h.trim(),children:[d?e.jsx(X,{className:"w-4 h-4 mr-1 animate-spin"}):e.jsx(pt,{className:"w-4 h-4 mr-1"}),l("customPresetDialog.savePreset")]}),e.jsxs(L,{onClick:()=>n(p,h||void 0),children:[e.jsx(ke,{className:"w-4 h-4 mr-1"}),l("customPresetDialog.applyPreset")]})]})]})})}function le({label:t,command:s}){return e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:t}),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:s}),e.jsx(_t,{value:s,size:"icon",className:"h-6 w-6"})]})]})}function Ea({provider:t,displayName:s,defaultTarget:a,data:n,authStatus:i,supportsModelConfig:d=!1}){const m=a||"claude",c=m==="droid",l=t==="codex",p=m==="claude"?`ccs ${t}`:`ccs ${t} --target claude`,f=`${p} --config`,h=`${p} --auth --add`,g=`${p} --accounts`;return e.jsx(lt,{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(Ht,{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:s})]}),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(_t,{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(G,{variant:"outline",className:"w-fit text-green-600 border-green-200 bg-green-50",children:[e.jsx(Qs,{className:"w-3 h-3 mr-1"}),"Authenticated"]}):e.jsx(G,{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:m})]})]})]}),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(le,{label:"Run with prompt",command:`ccs ${t} "your prompt"`}),l&&e.jsxs(e.Fragment,{children:[e.jsx(le,{label:"Run on native Codex (shortcut)",command:'ccsxp "your prompt"'}),e.jsx(le,{label:"Run on native Codex (--target)",command:`ccs ${t} --target codex "your prompt"`})]}),e.jsx(le,{label:c?"Droid alias (explicit)":"Run on Droid",command:`ccs-droid ${t} "your prompt"`}),e.jsx(le,{label:c?"Override to Claude":"Run on Droid (--target)",command:`ccs ${t} --target ${c?"claude":"droid"} "your prompt"`}),d&&e.jsx(le,{label:m==="claude"?"Change model":"Change model (Claude target)",command:f}),e.jsx(le,{label:m==="claude"?"Add account":"Add account (Claude target)",command:h}),e.jsx(le,{label:m==="claude"?"List accounts":"List accounts (Claude target)",command:g}),m!=="claude"&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Account and model-management flags stay on Claude target. Codex and Droid runtime launches reject those CLIProxy management commands."})]})]})]})})}function Ra({displayName:t,logoProvider:s,provider:a,data:n,isLoading:i,hasChanges:d,isRawJsonValid:m,isSaving:c,isRemoteMode:l,port:p,onRefetch:f,onSave:h}){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(ct,{provider:s||a,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:t}),l&&e.jsxs(G,{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(Vt,{className:"w-3 h-3"}),"Remote"]}),p&&e.jsxs(G,{variant:"outline",className:"text-xs gap-1 font-mono",children:[e.jsx(Js,{className:"w-3 h-3"}),":",p]}),!l&&n?.path&&e.jsx(G,{variant:"outline",className:"text-xs",children:n.path.replace(/^.*[\\/]/,"")})]}),l?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(L,{variant:"ghost",size:"sm",onClick:f,disabled:i,children:e.jsx(ut,{className:`w-4 h-4 ${i?"animate-spin":""}`})}),e.jsx(L,{size:"sm",onClick:h,disabled:c||!d||!m,children:c?e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Ws,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function Oa({models:t,provider:s,enabled:a,onToggle:n,disabled:i,className:d}){if(t.length===0)return null;const m=t.some(p=>Nt(p.id)),c=t.some(p=>!Nt(p.id));let l="Compatible mappings stay on standard context unless you turn this on.";return m&&c?l="Gemini-compatible mappings can use 1M automatically. Claude mappings stay plain unless you turn this on.":m&&(l="Gemini-compatible mappings can use 1M by default. Turn this off to keep standard context."),e.jsxs("div",{className:$("rounded-lg border p-3 space-y-2",a?"border-primary/50 bg-primary/5":"border-border bg-muted/30",d),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ke,{className:$("w-4 h-4",a?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-sm font-medium",children:"Extended Context"}),e.jsx(G,{variant:a?"default":"secondary",className:"text-[10px] h-5 px-1.5",children:"1M tokens"})]}),e.jsx(Ft,{checked:a,onCheckedChange:n,disabled:i})]}),e.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(Ht,{className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{children:["Applies the explicit ",e.jsx("code",{children:"[1m]"})," long-context suffix to compatible saved mappings."]}),e.jsx("p",{className:"text-[10px]",children:l}),e.jsxs("p",{className:"text-amber-600 dark:text-amber-500",children:["CCS only saves ",e.jsx("code",{children:"[1m]"}),". Provider pricing and entitlement are separate, and some accounts can still return 429 extra-usage errors for long-context requests."]})]})]})]})}function La(t){const s=t.presetMapping||{default:t.id,opus:t.id,sonnet:t.id,haiku:t.id};return{ANTHROPIC_MODEL:s.default,ANTHROPIC_DEFAULT_OPUS_MODEL:s.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:s.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:s.haiku}}function _a({catalog:t,savedPresets:s,currentModel:a,opusModel:n,sonnetModel:i,haikuModel:d,providerModels:m,provider:c,extendedContextEnabled:l,onExtendedContextToggle:p,onApplyPreset:f,onUpdateEnvValue:h,onOpenCustomPreset:g,onDeletePreset:_,isDeletePending:v}){const T=o.useMemo(()=>{if(!t)return[];const r=[a,n,i,d].filter(j=>!!j).map(j=>fs(j));return[...new Set(r)].map(j=>Xt(t.provider,j)).filter(j=>!!j?.extendedContext)},[t,a,n,i,d]),k=o.useMemo(()=>Yt(t,m),[t,m]),y=o.useMemo(()=>{const r=k.filter(j=>j.presetMapping);return r.length===0?[]:r.some(j=>j.tier==="paid")?[{key:"free",label:"Free Tier",description:"Available on free or paid plans",badgeClassName:"text-[10px] bg-green-100 text-green-700 border-green-200",iconClassName:"text-green-600",models:r.filter(j=>j.tier!=="paid")},{key:"paid",label:"Paid Tier",description:"Requires paid access",badgeClassName:"text-[10px] bg-amber-100 text-amber-700 border-amber-200",iconClassName:"text-amber-700",models:r.filter(j=>j.tier==="paid")}].filter(j=>j.models.length>0):[{key:"default",models:r.slice(0,4)}]},[k]),M=y.length>0||s.length>0;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(Ce,{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:"space-y-4",children:[y.map(r=>e.jsxs("div",{children:["label"in r&&r.label&&e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(G,{variant:"outline",className:r.badgeClassName,children:r.label}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:r.description})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:r.models.map(b=>e.jsxs(L,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>f(La(b)),children:[e.jsx(ke,{className:`w-3 h-3 ${"iconClassName"in r?r.iconClassName:""}`}),b.name]},b.id))})]},r.key)),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.map(r=>e.jsxs("div",{className:"group relative",children:[e.jsxs(L,{variant:"secondary",size:"sm",className:"text-xs h-7 gap-1 pr-6",onClick:()=>{f({ANTHROPIC_MODEL:r.default,ANTHROPIC_DEFAULT_OPUS_MODEL:r.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:r.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:r.haiku})},children:[e.jsx(pt,{className:"w-3 h-3 fill-current"}),r.name]}),e.jsx(L,{variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-7 w-5 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:b=>{b.stopPropagation(),_(r.name)},disabled:v,children:e.jsx(xt,{className:"w-3 h-3"})})]},r.name)),e.jsxs(L,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1 border-primary/50 text-primary hover:bg-primary/10 hover:border-primary",onClick:g,children:[e.jsx(Gt,{className:"w-3 h-3"}),"Custom"]})]})]})]}),e.jsx(ht,{}),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(ce,{label:"Default Model",description:"Used when no specific tier is requested",value:a,onChange:r=>h("ANTHROPIC_MODEL",r),catalog:t,allModels:m}),T.length>0&&p&&e.jsx(Oa,{models:T,provider:c,enabled:l??!1,onToggle:p}),e.jsx(ce,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:n,onChange:r=>h("ANTHROPIC_DEFAULT_OPUS_MODEL",r),catalog:t,allModels:m}),e.jsx(ce,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:i,onChange:r=>h("ANTHROPIC_DEFAULT_SONNET_MODEL",r),catalog:t,allModels:m}),e.jsx(ce,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:d,onChange:r=>h("ANTHROPIC_DEFAULT_HAIKU_MODEL",r),catalog:t,allModels:m})]})]})]})}function Fa(t,s){return t?e.jsx(We,{children:e.jsxs(Xe,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Ys,{className:"w-3 h-3","aria-hidden":"true"}),e.jsx("span",{className:$("font-mono max-w-[180px] truncate",s&&at),title:t,children:t})]})}),e.jsx(Ze,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:"GCP Project ID (read-only)"})})]})}):e.jsx(We,{children:e.jsxs(Xe,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-500",children:[e.jsx(mt,{className:"w-3 h-3","aria-label":"Warning"}),e.jsx("span",{children:"Project ID: N/A"})]})}),e.jsx(Ze,{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."})]})})]})})}function Ua({account:t,onSetDefault:s,onRemove:a,onPauseToggle:n,isRemoving:i,isPausingAccount:d,privacyMode:m,showQuota:c,selectable:l,selected:p,onSelectChange:f}){const h=t.provider.toLowerCase(),{data:g}=vs(c),{data:_,isLoading:v}=js(h,t.id,c),T=Ns(g,t)?.lastUsedAt,k=l||n?e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l&&e.jsx("button",{type:"button",onClick:()=>f?.(!p),className:$("flex items-center justify-center w-5 h-5 rounded border-2 transition-colors shrink-0",p?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),"aria-label":p?"Deselect account":"Select account",children:p&&e.jsx(pe,{className:"w-3 h-3"})}),n&&e.jsx(We,{children:e.jsxs(Xe,{children:[e.jsx(Ye,{asChild:!0,children:e.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>n(!t.paused),disabled:d,children:d?e.jsx(X,{className:"w-4 h-4 animate-spin"}):t.paused?e.jsx(Bt,{className:"w-4 h-4 text-emerald-500"}):e.jsx(zt,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(Ze,{side:"top",children:t.paused?"Resume account":"Pause account"})]})})]}):void 0,y=e.jsxs(bs,{children:[e.jsx(ys,{asChild:!0,children:e.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:e.jsx(Xs,{className:"w-4 h-4"})})}),e.jsxs(ws,{align:"end",children:[!t.isDefault&&e.jsxs(bt,{onClick:s,children:[e.jsx(pt,{className:"w-4 h-4 mr-2"}),"Set as default"]}),e.jsxs(bt,{className:"text-destructive focus:text-destructive",onClick:a,disabled:i,children:[e.jsx($t,{className:"w-4 h-4 mr-2"}),i?"Removing...":"Remove account"]})]})]});return e.jsx("div",{className:$("rounded-lg border p-3 transition-colors overflow-hidden",t.isDefault?"border-primary/30 bg-primary/5":"border-border hover:bg-muted/30",t.paused&&"opacity-75",p&&"ring-2 ring-primary/50 bg-primary/5"),children:e.jsx(Cs,{mode:"detailed",provider:t.provider,accountId:t.id,email:t.email,displayEmail:t.email||t.id,tokenFile:t.tokenFile,tier:t.tier,isDefault:t.isDefault,paused:t.paused,privacyMode:m,showQuota:c,quota:_,quotaLoading:v,runtimeLastUsed:T,beforeIdentity:k,headerEnd:y,bodySlot:t.provider==="agy"?Fa(t.projectId,m):null,quotaInsetClassName:"pl-11"})})}function Ka({selectedCount:t,onPauseSelected:s,onResumeSelected:a,onClearSelection:n,isPausing:i,isResuming:d}){if(t<1)return null;const m=i||d;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:[t," selected"]}),e.jsx(L,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:n,disabled:m,children:"Clear"}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(L,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:s,disabled:m,children:[i?e.jsx(X,{className:"w-3 h-3 animate-spin"}):e.jsx(zt,{className:"w-3 h-3"}),"Pause Selected"]}),e.jsxs(L,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:a,disabled:m,children:[d?e.jsx(X,{className:"w-3 h-3 animate-spin"}):e.jsx(Bt,{className:"w-3 h-3"}),"Resume Selected"]})]})]})}function qa({accounts:t,onAddAccount:s,onSetDefault:a,onRemoveAccount:n,onPauseToggle:i,onSoloMode:d,onBulkPause:m,onBulkResume:c,isRemovingAccount:l,isPausingAccount:p,isSoloingAccount:f,isBulkPausing:h,isBulkResuming:g,privacyMode:_,showQuota:v,isKiro:T,kiroNoIncognito:k,onKiroNoIncognitoChange:y,kiroSettingsLoading:M}){const[r,b]=o.useState(new Set),j=o.useMemo(()=>new Set(t.map(N=>N.id)),[t]),A=o.useMemo(()=>new Set([...r].filter(N=>j.has(N))),[r,j]),I=!!(m&&c),D=A.size,P=t.length>0&&A.size===t.length,U=A.size>0&&A.size<t.length,C=o.useCallback(N=>{b(K=>{const q=new Set(K);return q.has(N)?q.delete(N):q.add(N),q})},[]),w=o.useCallback(()=>{b(new Set(t.map(N=>N.id)))},[t]),u=o.useCallback(()=>{b(new Set)},[]),F=o.useCallback(()=>{P?u():w()},[P,w,u]),V=o.useCallback(()=>{m&&A.size>0&&(m(Array.from(A)),b(new Set))},[m,A]),R=o.useCallback(()=>{c&&A.size>0&&(c(Array.from(A)),b(new Set))},[c,A]);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:[I&&t.length>0&&e.jsx(Le,{checked:P,onCheckedChange:F,"aria-label":"Select all accounts",className:U?"data-[state=checked]:bg-primary/50":"",...U?{"data-state":"indeterminate"}:{}}),e.jsx(ye,{className:"w-4 h-4"}),"Accounts",t.length>0&&e.jsx(G,{variant:"secondary",className:"text-xs",children:t.length})]}),e.jsxs(L,{variant:"default",size:"sm",className:"h-7 text-xs gap-1",onClick:s,children:[e.jsx(Gt,{className:"w-3 h-3"}),"Add"]})]}),I&&D>0&&e.jsx(Ka,{selectedCount:D,onPauseSelected:V,onResumeSelected:R,onClearSelection:u,isPausing:!!h,isResuming:!!g}),t.length>0?e.jsx("div",{className:"space-y-2",children:t.map(N=>e.jsx(Ua,{account:N,onSetDefault:()=>a(N.id),onRemove:()=>n(N.id),onPauseToggle:i?K=>i(N.id,K):void 0,onSoloMode:d?()=>d(N.id):void 0,isRemoving:l,isPausingAccount:p,isSoloingAccount:f,privacyMode:_,showQuota:v,selectable:I,selected:A.has(N.id),onSelectChange:()=>C(N.id)},N.id))}):e.jsxs("div",{className:"py-6 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed",children:[e.jsx(ye,{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"})]}),T&&y&&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(Vt,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Use incognito"})]}),e.jsx(Ft,{checked:!k,onCheckedChange:N=>y(!N),disabled:M,className:"scale-90"})]})})]})}function Ha({provider:t,catalog:s,savedPresets:a,currentModel:n,opusModel:i,sonnetModel:d,haikuModel:m,providerModels:c,extendedContextEnabled:l,onExtendedContextToggle:p,onApplyPreset:f,onUpdateEnvValue:h,onOpenCustomPreset:g,onDeletePreset:_,isDeletePending:v,accounts:T,onAddAccount:k,onSetDefault:y,onRemoveAccount:M,onPauseToggle:r,onSoloMode:b,onBulkPause:j,onBulkResume:A,isRemovingAccount:I,isPausingAccount:D,isSoloingAccount:P,isBulkPausing:U,isBulkResuming:C,privacyMode:w,isRemoteMode:u}){const F=t.toLowerCase(),V=(ks.includes(F)||["anthropic","antigravity","gemini-cli","copilot","github-copilot"].includes(F))&&!u,R=t==="kiro",[N,K]=o.useState(!0),[q,Q]=o.useState(!0),[Y,J]=o.useState(!1),ne=o.useCallback(async()=>{if(R)try{Q(!0);const W=(await Re.config.get()).cliproxy;K(W?.kiro_no_incognito??!0)}catch{K(!0)}finally{Q(!1)}},[R]),x=o.useCallback(async E=>{K(E),J(!0);try{const W=await Re.config.get(),xe=W.cliproxy??{};await Re.config.update({...W,cliproxy:{...xe,kiro_no_incognito:E}})}catch{K(!E)}finally{J(!1)}},[]);return o.useEffect(()=>{ne()},[ne]),e.jsx(lt,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsx(_a,{catalog:s,savedPresets:a,currentModel:n,opusModel:i,sonnetModel:d,haikuModel:m,providerModels:c,provider:t,extendedContextEnabled:l,onExtendedContextToggle:p,onApplyPreset:f,onUpdateEnvValue:h,onOpenCustomPreset:g,onDeletePreset:_,isDeletePending:v}),e.jsx(ht,{}),e.jsx(qa,{accounts:T,onAddAccount:k,onSetDefault:y,onRemoveAccount:M,onPauseToggle:r,onSoloMode:b,onBulkPause:j,onBulkResume:A,isRemovingAccount:I,isPausingAccount:D,isSoloingAccount:P,isBulkPausing:U,isBulkResuming:C,privacyMode:w,showQuota:V,isKiro:R,kiroNoIncognito:N,onKiroNoIncognitoChange:x,kiroSettingsLoading:q||Y})]})})}function St({provider:t,displayName:s,authStatus:a,catalog:n,logoProvider:i,baseProvider:d,isRemoteMode:m,port:c,defaultTarget:l,onAddAccount:p,onSetDefault:f,onRemoveAccount:h,onPauseToggle:g,onSoloMode:_,onBulkPause:v,onBulkResume:T,isRemovingAccount:k,isPausingAccount:y,isSoloingAccount:M,isBulkPausing:r,isBulkResuming:b}){const[j,A]=o.useState(!1),{privacyMode:I}=Et(),{data:D}=As(),{data:P}=Ss(t),U=Ps(),C=Ms(),w=d||t,u=w.toLowerCase()==="agy",F=o.useMemo(()=>{const O=P?.presets||[];return u?O.filter(B=>!se(B.default)&&!se(B.opus)&&!se(B.sonnet)&&!se(B.haiku)):O},[u,P?.presets]),V=o.useMemo(()=>{if(!D?.models)return[];const B={gemini:["google"],agy:["antigravity"],codex:["openai"],qwen:["alibaba","qwen"],iflow:["iflow"],kiro:["kiro","aws"],ghcp:["github","copilot"],kimi:["kimi","moonshot"]}[w.toLowerCase()]||[w.toLowerCase()];return D.models.filter(ee=>B.some(je=>ee.owned_by.toLowerCase().includes(je))?u?!se(ee.id):!0:!1)},[u,D,w]),R=(d||t).toLowerCase(),{data:N,isLoading:K,refetch:q,rawJsonContent:Q,rawJsonEdits:Y,isRawJsonValid:J,hasChanges:ne,currentModel:x,opusModel:E,sonnetModel:W,haikuModel:xe,extendedContextEnabled:de,toggleExtendedContext:ue,handleRawJsonChange:Ae,updateEnvValue:Fe,updateEnvValues:Se,saveMutation:Z,conflictDialog:Ue,handleConflictResolve:fe,missingRequiredFields:Pe}=Sa(t),Me=o.useMemo(()=>(a.accounts||[]).map(O=>({...O,provider:O.provider||d||t})),[a.accounts,d,t]),{data:De}=Pt({queryKey:["auth-tokens-raw"],queryFn:async()=>{const O=await fetch("/api/settings/auth/tokens/raw");return O.ok?O.json():{apiKey:{value:"ccs-internal-managed"}}},staleTime:6e4}),me=De?.apiKey?.value??"ccs-internal-managed",ve=O=>{if(u&&[O.ANTHROPIC_MODEL,O.ANTHROPIC_DEFAULT_OPUS_MODEL,O.ANTHROPIC_DEFAULT_SONNET_MODEL,O.ANTHROPIC_DEFAULT_HAIKU_MODEL].some(ee=>typeof ee=="string"&&se(ee))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}Se({ANTHROPIC_BASE_URL:`http://127.0.0.1:${c??et}/api/provider/${R}`,ANTHROPIC_AUTH_TOKEN:me,...O}),H.success(`Applied "${O.ANTHROPIC_MODEL?.split("/").pop()||"preset"}" preset`)},Te=(O,B)=>{if(u&&[O.default,O.opus,O.sonnet,O.haiku].some(je=>se(je))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}Se({ANTHROPIC_BASE_URL:`http://127.0.0.1:${c??et}/api/provider/${R}`,ANTHROPIC_AUTH_TOKEN:me,ANTHROPIC_MODEL:O.default,ANTHROPIC_DEFAULT_OPUS_MODEL:O.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:O.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:O.haiku}),H.success(`Applied ${B?`"${B}"`:"custom"} preset`),A(!1)},Ke=(O,B)=>{if(!B){H.error(Ot.t("commonToast.enterPresetName"));return}if(u&&[O.default,O.opus,O.sonnet,O.haiku].some(ee=>se(ee))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}U.mutate({profile:t,data:{name:B,...O}}),A(!1)};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(Ra,{provider:t,displayName:s,logoProvider:i,data:N,isLoading:K,hasChanges:ne,isRawJsonValid:J,isSaving:Z.isPending,isRemoteMode:m,port:c,onRefetch:q,onSave:()=>Z.mutate()}),K?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(X,{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:"min-h-0 flex-1 grid grid-cols-[40%_60%] divide-x overflow-hidden",children:[e.jsx("div",{className:"flex min-h-0 min-w-0 flex-col overflow-hidden bg-muted/5",children:e.jsxs(Ds,{defaultValue:"config",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(Ts,{className:"w-full",children:[e.jsx(yt,{value:"config",className:"flex-1",children:"Model Config"}),e.jsx(yt,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsx(wt,{value:"config",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(Ha,{provider:t,catalog:n,savedPresets:F,currentModel:x,opusModel:E,sonnetModel:W,haikuModel:xe,providerModels:V,extendedContextEnabled:de,onExtendedContextToggle:ue,onApplyPreset:ve,onUpdateEnvValue:Fe,onOpenCustomPreset:()=>A(!0),onDeletePreset:O=>C.mutate({profile:t,name:O}),isDeletePending:C.isPending,accounts:Me,onAddAccount:p,onSetDefault:f,onRemoveAccount:h,onPauseToggle:g,onSoloMode:_,onBulkPause:v,onBulkResume:T,isRemovingAccount:k,isPausingAccount:y,isSoloingAccount:M,isBulkPausing:r,isBulkResuming:b,privacyMode:I,isRemoteMode:m})}),e.jsx(wt,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(Ea,{provider:t,displayName:s,defaultTarget:l,data:N,authStatus:a,supportsModelConfig:!!n})})]})]})}),e.jsxs("div",{className:"flex min-h-0 min-w-0 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(Zs,{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(Is,{rawJsonContent:Q,isRawJsonValid:J,rawJsonEdits:Y,onRawJsonChange:Ae,profileEnv:N?.settings?.env,missingRequiredFields:Pe})]})]}),e.jsx(sa,{open:Ue,title:"File Modified Externally",description:"This settings file was modified by another process. Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>fe(!0),onCancel:()=>fe(!1)}),e.jsx(Ia,{open:j,onClose:()=>A(!1),currentValues:{default:x||"",opus:E||"",sonnet:W||"",haiku:xe||""},onApply:Te,onSave:Ke,isSaving:U.isPending,catalog:n,allModels:V})]})}function Va({status:t,isSelected:s,onSelect:a}){const{t:n}=ae(),i=t.accounts?.length||0;return e.jsxs("button",{className:$("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors cursor-pointer text-left",s?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:a,children:[e.jsx(ct,{provider:t.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:t.displayName}),i>0&&e.jsx(G,{variant:"secondary",className:"text-[10px] h-4 px-1",children:i})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:t.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(pe,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-green-600",children:n("cliproxyPage.connected")})]}):e.jsxs(e.Fragment,{children:[e.jsx(xt,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:n("cliproxyPage.notConnected")})]})})]})]})}function Ga({variant:t,parentAuth:s,isSelected:a,onSelect:n,onDelete:i,isDeleting:d}){const{t:m}=ae(),c=()=>{n()};return e.jsxs("div",{role:"button",tabIndex:0,className:$("group w-full flex items-center gap-3 px-3 py-2 rounded-lg transition-colors cursor-pointer text-left pl-6",a?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:c,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),c())},children:[e.jsxs("div",{className:"relative",children:[e.jsx(ct,{provider:t.provider,size:"sm"}),e.jsx(Qt,{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:t.name}),e.jsx(G,{variant:"outline",className:"text-[9px] h-4 px-1",children:m("cliproxyPage.variant")}),e.jsx(G,{variant:"outline",className:"text-[9px] h-4 px-1 uppercase",children:t.target||"claude"})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:s?.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(pe,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:m("cliproxyPage.viaProvider",{provider:t.provider})})]}):e.jsxs(e.Fragment,{children:[e.jsx(xt,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:m("cliproxyPage.parentNotConnected")})]})})]}),e.jsx(L,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:l=>{l.stopPropagation(),i()},disabled:d,children:e.jsx($t,{className:"w-3 h-3"})})]})}function Ba({onSetup:t}){const{t:s}=ae();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(ke,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:s("cliproxyPage.emptyTitle")}),e.jsx("p",{className:"text-muted-foreground mb-4",children:s("cliproxyPage.emptyDesc")}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-6",children:[s("cliproxyPage.emptyControlPanelPrefix")," ",e.jsx("a",{href:"/cliproxy/control-panel",className:"text-primary hover:underline",children:s("cliproxyPage.controlPanel")}),"."]}),e.jsxs(L,{onClick:t,className:"gap-2",children:[e.jsx(Ce,{className:"w-4 h-4"}),s("cliproxyPage.quickSetup")]})]})})}function dn(){const{t}=ae(),s=st(),{data:a,isLoading:n}=It(),{data:i,isFetching:d}=Es(),{data:m}=Rs(),c=Os(),l=Ls(),p=_s(),f=Fs(),h=Us(),g=Ks(),_=qs(),v=Hs(),[T,k]=o.useState(()=>{if(typeof window<"u"){const E=new URLSearchParams(window.location.search).get("provider")?.trim().toLowerCase();return E&&Je(E)?E:localStorage.getItem("cliproxy-selected-provider")}return null}),[y,M]=o.useState(null),[r,b]=o.useState(!1),[j,A]=o.useState(()=>{if(typeof window>"u")return null;const x=new URLSearchParams(window.location.search),E=x.get("provider")?.trim().toLowerCase();return x.get("action")!=="auth"||!E||!Je(E)?null:{provider:E,displayName:Vs(E),isFirstAccount:!1}}),I=o.useMemo(()=>a?.authStatus||[],[a?.authStatus]),D=a?.source==="remote",P=o.useMemo(()=>i?.variants||[],[i?.variants]),U=x=>{k(x),x&&localStorage.setItem("cliproxy-selected-provider",x)},C=o.useMemo(()=>y?null:T&&I.some(x=>x.provider===T)?T:I.length>0&&(I.find(E=>(E.accounts?.length||0)>0)?.provider||I[0]?.provider)||null,[T,y,I]),w=I.find(x=>x.provider===C),u=P.find(x=>x.name===y),F=u?I.find(x=>x.provider===u.provider):void 0,V=(u?.provider||w?.provider||"").toLowerCase().trim(),R=V==="gemini"||V==="agy",N=()=>{s.invalidateQueries({queryKey:["cliproxy"]}),s.invalidateQueries({queryKey:["cliproxy-auth"]})},K=(x,E,W)=>{p.isPending||f.isPending||(W?p.mutate({provider:x,accountId:E}):f.mutate({provider:x,accountId:E}))},q=(x,E)=>{h.isPending||h.mutate({provider:x,accountId:E})},Q=(x,E)=>{g.isPending||g.mutate({provider:x,accountIds:E})},Y=(x,E)=>{_.isPending||_.mutate({provider:x,accountIds:E})},J=x=>{U(x),M(null)},ne=x=>{M(x),U(null)};return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",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(ke,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:m?.backendLabel??"CLIProxy"})]}),e.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:N,disabled:d,children:e.jsx(ut,{className:$("w-4 h-4",d&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:t("cliproxyPage.accountManagement")}),e.jsxs(L,{variant:"default",size:"sm",className:"w-full gap-2",onClick:()=>b(!0),children:[e.jsx(Ce,{className:"w-4 h-4"}),t("cliproxyPage.quickSetup")]})]}),e.jsx(lt,{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:t("cliproxyPage.providers")}),n?e.jsx("div",{className:"space-y-2 px-2",children:[1,2,3,4].map(x=>e.jsx(Gs,{className:"h-14 w-full rounded-lg"},x))}):e.jsx("div",{className:"space-y-1",children:I.map(x=>e.jsx(Va,{status:x,isSelected:C===x.provider,onSelect:()=>J(x.provider)},x.provider))}),P.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(Qt,{className:"w-3 h-3"}),t("cliproxyPage.variants")]}),e.jsx("div",{className:"space-y-1",children:P.map(x=>e.jsx(Ga,{variant:x,parentAuth:I.find(E=>E.provider===x.provider),isSelected:y===x.name,onSelect:()=>ne(x.name),onDelete:()=>v.mutate(x.name),isDeleting:v.isPending},x.name))})]})]})}),e.jsx("div",{className:"p-3 border-t",children:e.jsx(na,{})}),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.jsx("span",{children:t("cliproxyPage.providerCount",{count:I.length})}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(pe,{className:"w-3 h-3 text-green-600"}),t("cliproxyPage.connectedCount",{count:I.filter(x=>x.authenticated).length})]})]})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background",children:[R&&e.jsx(Zt,{showProxySettingsLink:!0,className:"mx-4 mt-4"}),u&&F?e.jsx(e.Fragment,{children:e.jsx(St,{provider:u.name,displayName:t("cliproxyPage.variantDisplay",{name:u.name,provider:u.provider}),authStatus:F,catalog:ge[u.provider],logoProvider:u.provider,baseProvider:u.provider,defaultTarget:u.target,isRemoteMode:D,port:u.port,onAddAccount:()=>A({provider:u.provider,displayName:F.displayName,isFirstAccount:(F.accounts?.length||0)===0}),onSetDefault:x=>c.mutate({provider:u.provider,accountId:x}),onRemoveAccount:x=>l.mutate({provider:u.provider,accountId:x}),onPauseToggle:(x,E)=>K(u.provider,x,E),onSoloMode:x=>q(u.provider,x),onBulkPause:x=>Q(u.provider,x),onBulkResume:x=>Y(u.provider,x),isRemovingAccount:l.isPending,isPausingAccount:p.isPending||f.isPending,isSoloingAccount:h.isPending,isBulkPausing:g.isPending,isBulkResuming:_.isPending})}):w?e.jsx(e.Fragment,{children:e.jsx(St,{provider:w.provider,displayName:w.displayName,authStatus:w,catalog:ge[w.provider],isRemoteMode:D,onAddAccount:()=>A({provider:w.provider,displayName:w.displayName,isFirstAccount:(w.accounts?.length||0)===0}),onSetDefault:x=>c.mutate({provider:w.provider,accountId:x}),onRemoveAccount:x=>l.mutate({provider:w.provider,accountId:x}),onPauseToggle:(x,E)=>K(w.provider,x,E),onSoloMode:x=>q(w.provider,x),onBulkPause:x=>Q(w.provider,x),onBulkResume:x=>Y(w.provider,x),isRemovingAccount:l.isPending,isPausingAccount:p.isPending||f.isPending,isSoloingAccount:h.isPending,isBulkPausing:g.isPending,isBulkResuming:_.isPending})}):e.jsx(Ba,{onSetup:()=>b(!0)})]}),e.jsx(fa,{open:r,onClose:()=>b(!1)}),e.jsx(Ca,{open:j!==null,onClose:()=>A(null),provider:j?.provider||"",displayName:j?.displayName||"",isFirstAccount:j?.isFirstAccount||!1})]})}export{dn 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(),m=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var v={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 x=d.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:n="",children:h,iconNode:p,...y},r)=>d.createElement("svg",{ref:r,...v,width:e,height:e,stroke:t,strokeWidth:o?Number(c)*24/Number(e):c,className:k("lucide",n),...!h&&!m(y)&&{"aria-hidden":"true"},...y},[...p.map(([i,l])=>d.createElement(i,l)),...Array.isArray(h)?h:[h]]));const a=(t,e)=>{const c=d.forwardRef(({className:o,...n},h)=>d.createElement(x,{ref:h,iconNode:e,className:k(`lucide-${M(s(t))}`,`lucide-${t}`,o),...n}));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"}]],E2=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"}]],W2=a("archive",f);const w=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],O2=a("arrow-down-left",w);const $=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],G2=a("arrow-down-right",$);const N=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],T2=a("arrow-down",N);const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],I2=a("arrow-left",u);const z=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],K2=a("arrow-right",z);const b=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],X2=a("arrow-up-right",b);const q=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Q2=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 j=[["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"}]],Y2=a("bot",j);const A=[["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"}]],a0=a("box",A);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"}]],e0=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"}]],t0=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"}]],c0=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"}]],o0=a("calendar-clock",S);const P=[["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"}]],h0=a("calendar",P);const B=[["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"}]],d0=a("chart-column",B);const F=[["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"}]],n0=a("chart-pie",F);const R=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],y0=a("check-check",R);const U=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],s0=a("check",U);const Z=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],k0=a("chevron-down",Z);const D=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],p0=a("chevron-left",D);const E=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],r0=a("chevron-right",E);const W=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],i0=a("chevron-up",W);const O=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],l0=a("chevrons-up-down",O);const G=[["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"}]],M0=a("circle-alert",G);const T=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],_0=a("circle-check-big",T);const I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],m0=a("circle-check",I);const K=[["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"}]],v0=a("circle-question-mark",K);const X=[["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"}]],x0=a("circle-x",X);const Q=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],g0=a("circle",Q);const J=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],f0=a("clock",J);const Y=[["path",{d:"m10.852 19.772-.383.924",key:"r7sl7d"}],["path",{d:"m13.148 14.228.383-.923",key:"1d5zpm"}],["path",{d:"M13.148 19.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1ydik7"}],["path",{d:"m13.53 20.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1m1vsf"}],["path",{d:"m14.772 15.852.923-.383",key:"660p6e"}],["path",{d:"m14.772 18.148.923.383",key:"hrcpis"}],["path",{d:"M4.2 15.1a7 7 0 1 1 9.93-9.858A7 7 0 0 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.2",key:"j2q98n"}],["path",{d:"m9.228 15.852-.923-.383",key:"1p9ong"}],["path",{d:"m9.228 18.148-.923.383",key:"6558rz"}]],w0=a("cloud-cog",Y);const a1=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],$0=a("cloud",a1);const e1=[["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"}]],N0=a("code-xml",e1);const t1=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],u0=a("code",t1);const c1=[["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"}]],z0=a("coins",c1);const o1=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],b0=a("command",o1);const h1=[["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"}]],q0=a("copy",h1);const d1=[["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"}]],C0=a("cpu",d1);const n1=[["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"}]],j0=a("database",n1);const y1=[["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"}]],A0=a("dollar-sign",y1);const s1=[["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"}]],H0=a("download",s1);const k1=[["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"}]],V0=a("ellipsis",k1);const p1=[["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"}]],L0=a("external-link",p1);const r1=[["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"}]],S0=a("eye-off",r1);const i1=[["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"}]],P0=a("eye",i1);const l1=[["path",{d:"M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6",key:"14cnrg"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1",key:"sr0ebq"}],["path",{d:"M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1",key:"w793db"}]],B0=a("file-braces-corner",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 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"}]],F0=a("file-braces",M1);const _1=[["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"}]],R0=a("file-code-corner",_1);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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],U0=a("file-code",m1);const v1=[["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"}]],Z0=a("file-down",v1);const x1=[["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"}]],D0=a("file-exclamation-point",x1);const g1=[["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"}]],E0=a("file-text",g1);const f1=[["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"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]],W0=a("folder-check",f1);const w1=[["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"}]],O0=a("folder-code",w1);const $1=[["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"}]],G0=a("folder-open",$1);const N1=[["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"}]],T0=a("folder",N1);const u1=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],I0=a("gauge",u1);const z1=[["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"}]],K0=a("git-branch",z1);const b1=[["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"}]],X0=a("github",b1);const q1=[["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"}]],Q0=a("globe",q1);const C1=[["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"}]],J0=a("grip-horizontal",C1);const j1=[["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"}]],Y0=a("grip-vertical",j1);const A1=[["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"}]],aa=a("heart",A1);const H1=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ea=a("history",H1);const V1=[["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"}]],ta=a("house",V1);const L1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],ca=a("image",L1);const S1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],oa=a("info",S1);const P1=[["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"}]],ha=a("key-round",P1);const B1=[["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"}]],da=a("key",B1);const F1=[["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"}]],na=a("laptop",F1);const R1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],ya=a("layers",R1);const U1=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],sa=a("link-2",U1);const Z1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],ka=a("list-filter",Z1);const D1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pa=a("loader-circle",D1);const E1=[["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"}]],ra=a("lock",E1);const W1=[["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"}]],ia=a("log-out",W1);const O1=[["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"}]],la=a("megaphone",O1);const G1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Ma=a("message-square",G1);const T1=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],_a=a("monitor-smartphone",T1);const I1=[["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"}]],ma=a("monitor",I1);const K1=[["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"}]],va=a("moon",K1);const X1=[["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"}]],xa=a("network",X1);const Q1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ga=a("panel-left",Q1);const J1=[["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"}]],fa=a("pause",J1);const Y1=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],wa=a("pen-line",Y1);const a2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],$a=a("pencil",a2);const e2=[["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"}]],Na=a("play",e2);const t2=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],ua=a("plug-zap",t2);const c2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],za=a("plus",c2);const o2=[["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"}]],ba=a("power-off",o2);const h2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],qa=a("power",h2);const d2=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Ca=a("puzzle",d2);const n2=[["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"}]],ja=a("radio",n2);const y2=[["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"}]],Aa=a("refresh-cw",y2);const s2=[["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"}]],Ha=a("rotate-ccw",s2);const k2=[["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"}]],Va=a("rotate-cw",k2);const p2=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],La=a("route",p2);const r2=[["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"}]],Sa=a("save",r2);const i2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pa=a("search",i2);const l2=[["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"}]],Ba=a("server",l2);const M2=[["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"}]],Fa=a("settings-2",M2);const _2=[["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"}]],Ra=a("settings",_2);const m2=[["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"}]],Ua=a("shield-alert",m2);const v2=[["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"}]],Za=a("shield-check",v2);const x2=[["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"}]],Da=a("shield",x2);const g2=[["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"}]],Ea=a("sliders-horizontal",g2);const f2=[["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"}]],Wa=a("sparkles",f2);const w2=[["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"}]],Oa=a("square-terminal",w2);const $2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ga=a("square",$2);const N2=[["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"}]],Ta=a("star",N2);const u2=[["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"}]],Ia=a("sun",u2);const z2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ka=a("terminal",z2);const b2=[["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"}]],Xa=a("trash-2",b2);const q2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Qa=a("trending-up",q2);const C2=[["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"}]],Ja=a("triangle-alert",C2);const j2=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],Ya=a("unlink",j2);const A2=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ae=a("upload",A2);const H2=[["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"}]],ee=a("user",H2);const V2=[["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"}]],te=a("users",V2);const L2=[["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"}]],ce=a("wand-sparkles",L2);const S2=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],oe=a("waves",S2);const P2=[["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"}]],he=a("wifi-off",P2);const B2=[["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"}]],de=a("wifi",B2);const F2=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],ne=a("workflow",F2);const R2=[["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"}]],ye=a("wrench",R2);const U2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],se=a("x",U2);const Z2=[["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"}]],ke=a("zap",Z2);export{X2 as $,E2 as A,J2 as B,r0 as C,x0 as D,S0 as E,G0 as F,I0 as G,ta as H,Na as I,Y0 as J,da as K,pa as L,va as M,Ha as N,ja as O,ga as P,C0 as Q,Aa as R,Oa as S,Ja as T,te as U,oa as V,he as W,se as X,Ka as Y,ke as Z,u0 as _,d0 as a,ma as a$,O2 as a0,E0 as a1,D0 as a2,J0 as a3,Fa as a4,ca as a5,za as a6,Wa as a7,Ma as a8,t0 as a9,I2 as aA,Ua as aB,xa as aC,V0 as aD,O0 as aE,K0 as aF,ka as aG,ne as aH,La as aI,B0 as aJ,qa as aK,ba as aL,l0 as aM,ua as aN,ya as aO,W0 as aP,wa as aQ,ea as aR,R0 as aS,T0 as aT,e0 as aU,Ya as aV,sa as aW,oe as aX,$a as aY,y0 as aZ,ye as a_,Ba as aa,W2 as ab,U0 as ac,p0 as ad,Za as ae,_a as af,ra as ag,b0 as ah,A0 as ai,j0 as aj,G2 as ak,h0 as al,z0 as am,Qa as an,n0 as ao,Xa as ap,Sa as aq,Pa as ar,ce as as,N0 as at,Ea as au,w0 as av,K2 as aw,ae as ax,F0 as ay,H0 as az,X0 as b,Y2 as b0,o0 as b1,la as b2,$0 as b3,na as b4,a0 as b5,c0 as b6,Z0 as b7,Va as b8,Ga as b9,T2 as ba,Q2 as bb,Ca as c,Ra as d,Ia as e,P0 as f,de as g,Da as h,aa as i,_0 as j,g0 as k,s0 as l,ha as m,q0 as n,L0 as o,ee as p,ia as q,k0 as r,i0 as s,Q0 as t,f0 as u,M0 as v,m0 as w,v0 as x,Ta as y,fa as z};