@kaitranntt/ccs 7.67.0-dev.2 → 7.67.0-dev.4

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 (83) hide show
  1. package/dist/api/services/index.d.ts +1 -0
  2. package/dist/api/services/index.d.ts.map +1 -1
  3. package/dist/api/services/index.js +3 -1
  4. package/dist/api/services/index.js.map +1 -1
  5. package/dist/api/services/local-runtime-readiness.d.ts +14 -0
  6. package/dist/api/services/local-runtime-readiness.d.ts.map +1 -0
  7. package/dist/api/services/local-runtime-readiness.js +89 -0
  8. package/dist/api/services/local-runtime-readiness.js.map +1 -0
  9. package/dist/cliproxy/catalog-routing.d.ts +12 -0
  10. package/dist/cliproxy/catalog-routing.d.ts.map +1 -0
  11. package/dist/cliproxy/catalog-routing.js +19 -0
  12. package/dist/cliproxy/catalog-routing.js.map +1 -0
  13. package/dist/cliproxy/managed-model-prefixes.d.ts +7 -0
  14. package/dist/cliproxy/managed-model-prefixes.d.ts.map +1 -0
  15. package/dist/cliproxy/managed-model-prefixes.js +116 -0
  16. package/dist/cliproxy/managed-model-prefixes.js.map +1 -0
  17. package/dist/commands/cliproxy/catalog-subcommand.d.ts.map +1 -1
  18. package/dist/commands/cliproxy/catalog-subcommand.js +60 -6
  19. package/dist/commands/cliproxy/catalog-subcommand.js.map +1 -1
  20. package/dist/commands/cliproxy/help-subcommand.d.ts.map +1 -1
  21. package/dist/commands/cliproxy/help-subcommand.js +3 -2
  22. package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
  23. package/dist/commands/cliproxy/variant-subcommand.d.ts.map +1 -1
  24. package/dist/commands/cliproxy/variant-subcommand.js +44 -3
  25. package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
  26. package/dist/shared/cliproxy-model-routing.d.ts +45 -0
  27. package/dist/shared/cliproxy-model-routing.d.ts.map +1 -0
  28. package/dist/shared/cliproxy-model-routing.js +144 -0
  29. package/dist/shared/cliproxy-model-routing.js.map +1 -0
  30. package/dist/ui/assets/{accounts-ls0hXYZ9.js → accounts-Db3fdubh.js} +1 -1
  31. package/dist/ui/assets/{alert-dialog-DJMw_zyc.js → alert-dialog-CCBNN27x.js} +1 -1
  32. package/dist/ui/assets/api-bpaccUPS.js +4 -0
  33. package/dist/ui/assets/{auth-section-BD8XqTiz.js → auth-section-Fc79zkWo.js} +1 -1
  34. package/dist/ui/assets/{backups-section-COOSGu9k.js → backups-section-EfrBLM-L.js} +1 -1
  35. package/dist/ui/assets/{channels-AGHzxMPw.js → channels-B9zb0Dlc.js} +1 -1
  36. package/dist/ui/assets/{checkbox-pojB3pE7.js → checkbox-Bi0MadiP.js} +1 -1
  37. package/dist/ui/assets/{claude-extension-4b8gXOo_.js → claude-extension-ChmPBz0E.js} +1 -1
  38. package/dist/ui/assets/cliproxy-CPpBCjTm.js +3 -0
  39. package/dist/ui/assets/{cliproxy-ai-providers-BXE0HGLt.js → cliproxy-ai-providers-xg_m_dRA.js} +6 -6
  40. package/dist/ui/assets/{cliproxy-control-panel-ZnCfRS9l.js → cliproxy-control-panel-D0YVnrQ9.js} +1 -1
  41. package/dist/ui/assets/{codex-B9uBYmnm.js → codex-B10sfnEg.js} +8 -8
  42. package/dist/ui/assets/{confirm-dialog-DwPqRjyW.js → confirm-dialog-D3uXTjUv.js} +1 -1
  43. package/dist/ui/assets/{copilot-CSWApqyO.js → copilot-CGdcSf3A.js} +1 -1
  44. package/dist/ui/assets/{cursor-DYbVB4gp.js → cursor-D6jaTpy9.js} +1 -1
  45. package/dist/ui/assets/{droid-BAovZe7o.js → droid-o0MWnf8I.js} +2 -2
  46. package/dist/ui/assets/{globalenv-section-CHHZbjD8.js → globalenv-section-rYo_EloK.js} +1 -1
  47. package/dist/ui/assets/{health-Jp7o0exN.js → health-B2tGoxnE.js} +1 -1
  48. package/dist/ui/assets/icons-KVCk4_U8.js +1 -0
  49. package/dist/ui/assets/{index--j-jJwzV.js → index-B3vorwLO.js} +1 -1
  50. package/dist/ui/assets/{index-C5iouJJ2.js → index-BOSvoysw.js} +1 -1
  51. package/dist/ui/assets/index-BXGpQZsS.js +69 -0
  52. package/dist/ui/assets/{index-C5uQdep3.js → index-CKkizStT.js} +1 -1
  53. package/dist/ui/assets/{index-VluKB6dO.js → index-Cod7uEXt.js} +1 -1
  54. package/dist/ui/assets/{index-CpkWv5tW.js → index-D3LLDLip.js} +1 -1
  55. package/dist/ui/assets/index-teLjoh2T.css +1 -0
  56. package/dist/ui/assets/{logs-BDbHSujh.js → logs-gMnQJZFy.js} +1 -1
  57. package/dist/ui/assets/{masked-input-BcJDHDE6.js → masked-input-B17xLQJL.js} +1 -1
  58. package/dist/ui/assets/{proxy-status-widget-DQWsa532.js → proxy-status-widget-TFWnQJdK.js} +1 -1
  59. package/dist/ui/assets/{raw-json-settings-editor-panel-Cbn2O4rk.js → raw-json-settings-editor-panel-OjocyAlt.js} +1 -1
  60. package/dist/ui/assets/{searchable-select-fldXYfY4.js → searchable-select-B7p9UjfE.js} +1 -1
  61. package/dist/ui/assets/{separator-Dd3ktLxa.js → separator-CTC3KGB8.js} +1 -1
  62. package/dist/ui/assets/{shared-CdAn8E3x.js → shared-MvrJ7m00.js} +1 -1
  63. package/dist/ui/assets/{table-CCf__Q_I.js → table-DIhbLeO-.js} +1 -1
  64. package/dist/ui/assets/{updates-DfoGG8Jl.js → updates-CV6NXvMe.js} +1 -1
  65. package/dist/ui/index.html +3 -3
  66. package/dist/web-server/index.d.ts.map +1 -1
  67. package/dist/web-server/index.js +9 -0
  68. package/dist/web-server/index.js.map +1 -1
  69. package/dist/web-server/routes/catalog-routes.d.ts.map +1 -1
  70. package/dist/web-server/routes/catalog-routes.js +3 -2
  71. package/dist/web-server/routes/catalog-routes.js.map +1 -1
  72. package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
  73. package/dist/web-server/routes/cliproxy-auth-routes.js +23 -2
  74. package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
  75. package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
  76. package/dist/web-server/routes/profile-routes.js +8 -0
  77. package/dist/web-server/routes/profile-routes.js.map +1 -1
  78. package/package.json +1 -1
  79. package/dist/ui/assets/api-Dz2nP1bN.js +0 -4
  80. package/dist/ui/assets/cliproxy-BFEBo-pc.js +0 -3
  81. package/dist/ui/assets/icons-DfENUzBo.js +0 -1
  82. package/dist/ui/assets/index-DFifef9c.css +0 -1
  83. package/dist/ui/assets/index-Du97tqVQ.js +0 -69
@@ -1,4 +0,0 @@
1
- import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as u,h as Ke}from"./react-vendor-CNOkPC89.js";import{B as L,c as D,T as Je,p as Be,q as qe,r as Ye,s as Ve,t as We,v as Ge,w as me,d as v,a as B,n as ae,L as R,I as U,x as J,y as Oe,z as Xe,A as Ze,D as es,E as ss,S as je,F as Z,G as xe,H as Te,J as ts,K as as,M as Ee,N as Ae,O as _e,Q as rs,R as ns,U as Ne,V as ve,W as ee,X as is,Y as os,Z as ge,C as Re,b as Me,j as ls,k as cs,_ as ds,$ as ms,a0 as us,a1 as xs,a2 as hs,a3 as ps,a4 as gs,a5 as fs,a6 as js,a7 as Ns}from"./index-Du97tqVQ.js";import{a as vs,u as be,b as we}from"./tanstack-CrmUhA7Z.js";import{C as he}from"./confirm-dialog-DwPqRjyW.js";import{t as T}from"./notifications-B2HqRBj7.js";import{L as se,R as G,as as De,at as bs,a9 as te,_ as ws,au as Le,aa as fe,C as Ie,av as Cs,a7 as ys,aw as Ps,p as pe,X as ks,Z as Fe,ax as Ce,n as ye,ay as Ue,a6 as Ss,ad as Os,az as Ts,w as He,aA as Es,x as Qe,o as As,aB as _s}from"./icons-DfENUzBo.js";import{M as $e}from"./masked-input-BcJDHDE6.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-DJMw_zyc.js";function Rs({className:s,showTooltip:r=!0}){const n=e.jsxs(L,{variant:"outline",className:D("bg-accent/10 border-accent/30 text-accent","dark:bg-accent/20 dark:border-accent/40 dark:text-accent-foreground",s),children:[e.jsx("img",{src:"/icons/openrouter.svg",alt:"OpenRouter",className:"mr-1 h-3 w-3"}),"OpenRouter"]});return r?e.jsxs(Je,{children:[e.jsx(Be,{asChild:!0,children:n}),e.jsx(qe,{children:e.jsx("p",{children:"Access 349+ models via OpenRouter"})})]}):n}function Pe(s){return[/^ANTHROPIC_AUTH_TOKEN$/,/_API_KEY$/,/_AUTH_TOKEN$/,/^API_KEY$/,/^AUTH_TOKEN$/,/_SECRET$/,/^SECRET$/].some(n=>n.test(s))}function ze(s){return s?.env?(s.env.ANTHROPIC_BASE_URL||"").toLowerCase().includes("openrouter.ai"):!1}function Ms(s){return{opus:s.ANTHROPIC_DEFAULT_OPUS_MODEL||void 0,sonnet:s.ANTHROPIC_DEFAULT_SONNET_MODEL||void 0,haiku:s.ANTHROPIC_DEFAULT_HAIKU_MODEL||void 0}}function Ds(s,r){const n={...s};return r.opus?n.ANTHROPIC_DEFAULT_OPUS_MODEL=r.opus:delete n.ANTHROPIC_DEFAULT_OPUS_MODEL,r.sonnet?n.ANTHROPIC_DEFAULT_SONNET_MODEL=r.sonnet:delete n.ANTHROPIC_DEFAULT_SONNET_MODEL,r.haiku?n.ANTHROPIC_DEFAULT_HAIKU_MODEL=r.haiku:delete n.ANTHROPIC_DEFAULT_HAIKU_MODEL,n}function Ls({profileName:s,target:r,data:n,settings:m,isLoading:c,isSaving:g,isTargetSaving:a,hasChanges:f,isRawJsonValid:t,onTargetChange:p,onRefresh:h,onDelete:b,onSave:w}){const k=g||a,j=c||k;return e.jsxs("div",{className:"px-6 py-4 border-b bg-background flex items-center justify-between shrink-0",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),n?.path&&e.jsx(L,{variant:"outline",className:"text-xs",children:n.path.replace(/^.*\//,"")}),ze(m)&&e.jsx(Rs,{className:"ml-1"})]}),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:"mt-2 flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Default target:"}),e.jsxs(Ye,{value:r,onValueChange:S=>{j||p(S)},disabled:j,children:[e.jsx(Ve,{className:"h-7 w-[170px] text-xs",disabled:j,children:e.jsx(We,{})}),e.jsxs(Ge,{children:[e.jsx(me,{value:"claude",children:"Claude Code"}),e.jsx(me,{value:"droid",children:"Factory Droid"}),e.jsx(me,{value:"codex",children:"Codex CLI"})]})]}),a&&e.jsx(se,{className:"w-3.5 h-3.5 animate-spin text-muted-foreground"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{variant:"ghost",size:"sm",onClick:h,disabled:j,children:e.jsx(G,{className:`w-4 h-4 ${c?"animate-spin":""}`})}),b&&e.jsx(v,{variant:"ghost",size:"sm",onClick:b,disabled:k,children:e.jsx(De,{className:"w-4 h-4 text-destructive"})}),e.jsx(v,{size:"sm",onClick:w,disabled:k||!f||!t,children:g?e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(bs,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function Is({currentSettings:s,newEnvKey:r,newEnvValue:n,onNewEnvKeyChange:m,onNewEnvValueChange:c,onEnvValueChange:g,onAddEnvVar:a}){const{t:f}=B();return e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"flex-1",children:e.jsx("div",{className:"p-4 space-y-4",children:s?.env&&Object.keys(s.env).length>0?e.jsx(e.Fragment,{children:Object.entries(s.env).map(([t,p])=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(R,{className:"text-xs font-medium flex items-center gap-2 text-muted-foreground",children:[t,Pe(t)&&e.jsx(L,{variant:"secondary",className:"text-[10px] px-1 py-0 h-4",children:f("envEditor.sensitive")})]}),Pe(t)?e.jsx($e,{value:p,onChange:h=>g(t,h.target.value),className:"font-mono text-sm h-8"}):e.jsx(U,{value:p,onChange:h=>g(t,h.target.value),className:"font-mono text-sm h-8"})]},t))}):e.jsxs("div",{className:"py-8 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed text-sm",children:[e.jsx("p",{children:f("envEditor.none")}),e.jsx("p",{className:"text-xs mt-1 opacity-70",children:f("envEditor.noneHint")})]})})}),e.jsxs("div",{className:"p-4 border-t bg-background shrink-0",children:[e.jsx(R,{className:"text-xs font-medium text-muted-foreground",children:f("envEditor.addVariable")}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(U,{placeholder:f("envEditor.keyPlaceholder"),value:r,onChange:t=>m(t.target.value.toUpperCase()),className:"font-mono text-sm h-8 w-2/5",onKeyDown:t=>t.key==="Enter"&&r.trim()&&a()}),e.jsx(U,{placeholder:f("envEditor.valuePlaceholder"),value:n,onChange:t=>c(t.target.value),className:"font-mono text-sm h-8 flex-1",onKeyDown:t=>t.key==="Enter"&&r.trim()&&a()}),e.jsx(v,{variant:"outline",size:"sm",className:"h-8",onClick:a,disabled:!r.trim(),children:e.jsx(te,{className:"w-4 h-4"})})]})]})]})}function Fs({profileName:s,target:r,data:n}){const{t:m}=B(),c=r==="droid";return e.jsx(ae,{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(ws,{className:"w-4 h-4"}),m("profileEditor.profileInfo")]}),e.jsx("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children: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:m("profileEditor.profileName")}),e.jsx("span",{className:"font-mono",children:n.profile})]}),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:m("profileEditor.filePath")}),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(J,{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:m("profileEditor.lastModified")}),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:m("profileEditor.defaultTarget")}),e.jsx("span",{className:"font-mono",children:r})]})]})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:m("profileEditor.quickUsage")}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{children:[e.jsx(R,{className:"text-xs text-muted-foreground",children:m("profileEditor.runWithProfile")}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs ",s,' "prompt"']}),e.jsx(J,{value:`ccs ${s} "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(R,{className:"text-xs text-muted-foreground",children:m(c?"profileEditor.droidAliasExplicit":"profileEditor.runOnDroid")}),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:`ccs-droid ${s} "prompt"`}),e.jsx(J,{value:`ccs-droid ${s} "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(R,{className:"text-xs text-muted-foreground",children:m(c?"profileEditor.overrideToClaude":"profileEditor.runOnDroidWithFlag")}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs ",s," --target ",c?"claude":"droid",' "prompt"']}),e.jsx(J,{value:`ccs ${s} --target ${c?"claude":"droid"} "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(R,{className:"text-xs text-muted-foreground",children:m("profileEditor.setAsDefault")}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs default ",s]}),e.jsx(J,{value:`ccs default ${s}`,size:"icon",className:"h-6 w-6"})]})]})]})]})]})})}function Us({value:s,onChange:r,placeholder:n="Search models...",className:m}){const[c,g]=u.useState(""),[a,f]=u.useState(null),{models:t,isLoading:p,isError:h,isFetching:b}=Oe(),w=Xe(),k=u.useMemo(()=>Ze(t,c,{category:a??void 0}),[t,c,a]),j=u.useMemo(()=>es(t,2),[t]),S=!c.trim()&&!a,H=u.useMemo(()=>{const d={anthropic:[],openai:[],google:[],meta:[],mistral:[],opensource:[],other:[]};k.forEach(x=>{d[x.category].push(x)});for(const x of Object.keys(d))d[x]=ss(d[x]);return d},[k]),C=u.useCallback(()=>{w()},[w]),M=t.find(d=>d.id===s);return p&&t.length===0?e.jsxs("div",{className:D("space-y-2",m),children:[e.jsx(je,{className:"h-10 w-full"}),e.jsx(je,{className:"h-32 w-full"})]}):e.jsxs("div",{className:D("space-y-2 w-full min-w-0 overflow-hidden",m),children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Le,{className:"text-muted-foreground absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2"}),e.jsx(U,{value:c,onChange:d=>g(d.target.value),placeholder:n,className:"pl-9"})]}),e.jsx(v,{variant:"outline",size:"icon",onClick:C,disabled:b,title:"Refresh models",children:b?e.jsx(se,{className:"h-4 w-4 animate-spin"}):e.jsx(G,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsxs(L,{variant:a===null?"default":"outline",className:"cursor-pointer",onClick:()=>f(null),children:["All (",t.length,")"]}),Object.keys(Z).map(d=>{const x=H[d].length;return x===0?null:e.jsxs(L,{variant:a===d?"default":"outline",className:"cursor-pointer",onClick:()=>f(d),children:[Z[d]," (",x,")"]},d)})]}),M&&e.jsxs("div",{className:"bg-muted rounded-md p-2 text-sm",children:[e.jsx("span",{className:"font-medium",children:M.name}),e.jsxs("span",{className:"text-muted-foreground ml-2",children:[xe(M.pricing)," |"," ",Te(M.context_length)]})]}),e.jsx(ae,{className:"h-72 w-full rounded-md border",children:h?e.jsxs("div",{className:"text-destructive p-4 text-center",children:["Failed to load models."," ",e.jsx(v,{variant:"link",onClick:C,children:"Retry"})]}):k.length===0?e.jsxs("div",{className:"text-muted-foreground p-4 text-center",children:['No models found matching "',c,'"']}):e.jsxs("div",{className:"space-y-6 p-3",children:[S&&j.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-muted-foreground bg-background sticky top-0 mb-2 flex items-center gap-1.5 py-1.5 text-xs font-semibold border-b pb-2",children:[e.jsx(fe,{className:"h-3 w-3 text-accent"}),e.jsx("span",{children:"Newest Models"})]}),e.jsx("div",{className:"space-y-1",children:j.map(d=>e.jsx(ke,{model:d,isSelected:d.id===s,onClick:()=>r(d.id),showAge:!0},d.id))})]}),Object.keys(Z).map(d=>{const x=H[d];return x.length===0?null:e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground bg-background sticky top-0 mb-2 py-1.5 text-xs font-semibold border-b pb-2",children:Z[d]}),e.jsx("div",{className:"space-y-1",children:x.map(l=>e.jsx(ke,{model:l,isSelected:l.id===s,onClick:()=>r(l.id)},l.id))})]},d)})]})})]})}function ke({model:s,isSelected:r,onClick:n,showAge:m=!1}){return e.jsxs("button",{type:"button",onClick:n,className:D("group flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent text-accent-foreground"),children:[e.jsx("span",{className:"flex-1 min-w-0 truncate font-medium",children:s.name}),e.jsxs("span",{className:D("flex shrink-0 items-center gap-1 text-xs whitespace-nowrap",r?"text-accent-foreground/80":"text-muted-foreground group-hover:text-accent-foreground/80"),children:[m&&s.created&&e.jsx(L,{variant:"outline",className:D("text-[10px] px-1",r?"border-accent-foreground/30 text-accent-foreground/80":"text-accent border-accent/30 group-hover:text-accent-foreground/80 group-hover:border-accent-foreground/30"),children:ts(s.created)}),s.isFree?e.jsx(L,{variant:"secondary",className:D("text-[10px] px-1",r?"bg-accent-foreground/20 text-accent-foreground":"group-hover:bg-accent-foreground/20 group-hover:text-accent-foreground"),children:"Free"}):s.isExacto?e.jsxs(e.Fragment,{children:[e.jsx(L,{variant:"outline",className:D("text-[10px] px-1 border-emerald-500/50 text-emerald-600",r?"border-accent-foreground/30 text-accent-foreground/80":"group-hover:border-accent-foreground/30 group-hover:text-accent-foreground/80"),children:"Exacto"}),e.jsx("span",{className:"tabular-nums",children:xe(s.pricing)})]}):e.jsx("span",{className:"tabular-nums",children:xe(s.pricing)}),e.jsx("span",{className:"tabular-nums",children:Te(s.context_length)})]})]})}function Hs({selectedModel:s,value:r,onChange:n,className:m}){const{t:c}=B(),{models:g}=Oe(),a=u.useMemo(()=>s?as(s,g):{},[s,g]),f=()=>{n(a)},t=(h,b)=>{n({...r,[h]:b||void 0})},p=s&&Object.keys(a).length>0;return e.jsxs(Ee,{className:D("group",m),children:[e.jsxs(Ae,{className:"flex items-center gap-2 text-sm font-medium hover:underline",children:[e.jsx(Ie,{className:"h-4 w-4 transition-transform group-data-[state=open]:rotate-90"}),c("modelTierMapping.title"),e.jsxs("span",{className:"text-muted-foreground font-normal",children:["(",c("modelTierMapping.advanced"),")"]})]}),e.jsxs(_e,{className:"space-y-3 pt-3",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:c("modelTierMapping.description")}),p&&e.jsxs(v,{type:"button",variant:"outline",size:"sm",onClick:f,children:[e.jsx(Cs,{className:"mr-1 h-4 w-4"}),c("modelTierMapping.autoSuggest",{provider:s?.split("/")[0]})]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(R,{htmlFor:"tier-opus",className:"text-right",children:"Opus"}),e.jsx(U,{id:"tier-opus",value:r.opus??"",onChange:h=>t("opus",h.target.value),placeholder:c("modelTierMapping.opusPlaceholder")})]}),e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(R,{htmlFor:"tier-sonnet",className:"text-right",children:"Sonnet"}),e.jsx(U,{id:"tier-sonnet",value:r.sonnet??"",onChange:h=>t("sonnet",h.target.value),placeholder:c("modelTierMapping.sonnetPlaceholder")})]}),e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(R,{htmlFor:"tier-haiku",className:"text-right",children:"Haiku"}),e.jsx(U,{id:"tier-haiku",value:r.haiku??"",onChange:h=>t("haiku",h.target.value),placeholder:c("modelTierMapping.haikuPlaceholder")})]})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:c("modelTierMapping.footer")})]})]})}function Qs({profileName:s,target:r,data:n,currentSettings:m,newEnvKey:c,newEnvValue:g,onNewEnvKeyChange:a,onNewEnvValueChange:f,onEnvValueChange:t,onAddEnvVar:p,onEnvBulkChange:h}){const b=ze(m),w=m?.env,k=u.useMemo(()=>Ms(w??{}),[w]),j=w??{},S=l=>{if(h){const Q={...j,ANTHROPIC_MODEL:l,ANTHROPIC_DEFAULT_OPUS_MODEL:l,ANTHROPIC_DEFAULT_SONNET_MODEL:l,ANTHROPIC_DEFAULT_HAIKU_MODEL:l};h(Q)}else t("ANTHROPIC_MODEL",l),t("ANTHROPIC_DEFAULT_OPUS_MODEL",l),t("ANTHROPIC_DEFAULT_SONNET_MODEL",l),t("ANTHROPIC_DEFAULT_HAIKU_MODEL",l);T.success(ee.t("commonToast.appliedModelAllTiers"),{duration:2e3})},H=l=>{if(h){const Q=Ds(j,l);h(Q)}else l.opus!==void 0&&t("ANTHROPIC_DEFAULT_OPUS_MODEL",l.opus||""),l.sonnet!==void 0&&t("ANTHROPIC_DEFAULT_SONNET_MODEL",l.sonnet||""),l.haiku!==void 0&&t("ANTHROPIC_DEFAULT_HAIKU_MODEL",l.haiku||"")},[C,M]=u.useState(!1),d=new Set(["ANTHROPIC_AUTH_TOKEN"]),x=Object.entries(j).filter(([l])=>!d.has(l));return e.jsx("div",{className:"h-full w-full min-w-0 flex flex-col",children:e.jsxs(rs,{defaultValue:"env",className:"h-full w-full min-w-0 flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(ns,{className:"w-full",children:[e.jsx(Ne,{value:"env",className:"flex-1",children:b?"Configuration":"Environment Variables"}),e.jsx(Ne,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:[e.jsx(ve,{value:"env",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden min-w-0",children:b?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsxs("div",{className:"h-full overflow-y-auto overflow-x-hidden p-4 space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(R,{className:"text-sm font-medium",children:"Model Selection"}),e.jsx(Us,{value:j.ANTHROPIC_MODEL,onChange:S,placeholder:"Search OpenRouter models..."})]}),e.jsx(Hs,{selectedModel:j.ANTHROPIC_MODEL,value:k,onChange:H}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{className:"text-sm font-medium",children:"API Key"}),e.jsx($e,{value:j.ANTHROPIC_AUTH_TOKEN||"",onChange:l=>t("ANTHROPIC_AUTH_TOKEN",l.target.value),placeholder:"sk-or-v1-...",className:"font-mono text-sm"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",e.jsx("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"openrouter.ai/keys"})]})]}),x.length>0&&e.jsxs(Ee,{open:C,onOpenChange:M,children:[e.jsxs(Ae,{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors group",children:[e.jsx(Ie,{className:D("h-4 w-4 transition-transform",C&&"rotate-90")}),e.jsx(ys,{className:"h-4 w-4"}),e.jsx("span",{children:"Additional Variables"}),e.jsxs("span",{className:"text-xs font-normal opacity-70",children:["(",x.length,")"]})]}),e.jsx(_e,{className:"pt-4",children:e.jsx("div",{className:"space-y-3 border rounded-lg p-3 bg-muted/30",children:x.map(([l,Q])=>e.jsxs("div",{className:"space-y-1",children:[e.jsx(R,{className:"text-xs text-muted-foreground",children:l}),e.jsx(U,{value:Q,onChange:$=>t(l,$.target.value),className:"font-mono text-xs h-8"})]},l))})})]})]})}),e.jsxs("div",{className:"p-4 border-t bg-background shrink-0",children:[e.jsx(R,{className:"text-xs font-medium text-muted-foreground",children:"Add Environment Variable"}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(U,{placeholder:"VARIABLE_NAME",value:c,onChange:l=>a(l.target.value.toUpperCase()),className:"font-mono text-sm h-8 w-2/5",onKeyDown:l=>l.key==="Enter"&&c.trim()&&p()}),e.jsx(U,{placeholder:"value",value:g,onChange:l=>f(l.target.value),className:"font-mono text-sm h-8 flex-1",onKeyDown:l=>l.key==="Enter"&&c.trim()&&p()}),e.jsx(v,{variant:"outline",size:"sm",className:"h-8",onClick:p,disabled:!c.trim(),children:e.jsx(te,{className:"w-4 h-4"})})]})]})]}):e.jsx(Is,{currentSettings:m,newEnvKey:c,newEnvValue:g,onNewEnvKeyChange:a,onNewEnvValueChange:f,onEnvValueChange:t,onAddEnvVar:p})}),e.jsx(ve,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(Fs,{profileName:s,target:r,data:n})})]})]})})}function $s({profileName:s,profileTarget:r,onDelete:n,onHasChangesUpdate:m}){const[c,g]=u.useState({}),[a,f]=u.useState(!1),[t,p]=u.useState(null),[h,b]=u.useState(""),[w,k]=u.useState(""),j=vs(),{data:S,isLoading:H,isError:C,refetch:M}=be({queryKey:["settings",s],queryFn:async()=>{const o=await fetch(`/api/settings/${s}/raw`);if(!o.ok)throw new Error(`Failed to load settings: ${o.status}`);return o.json()}}),d=S?.settings,x=u.useMemo(()=>{if(t!==null)try{return JSON.parse(t)}catch{}if(d)return{...d,env:{...d.env,...c}}},[d,c,t]),l=u.useMemo(()=>t!==null?t:d?JSON.stringify(d,null,2):"",[t,d]),Q=u.useCallback(o=>{p(o)},[]),$=u.useCallback(o=>{const N={...x??{}},A=N.ccs_image&&typeof N.ccs_image=="object"?{...N.ccs_image}:{};o?A.native_read=!0:delete A.native_read,Object.keys(A).length>0?N.ccs_image=A:delete N.ccs_image,p(JSON.stringify(N,null,2))},[x]),q=(o,N)=>{const A={...x?.env||{},[o]:N};g(W=>({...W,[o]:N})),p(JSON.stringify({...x,env:A},null,2))},K=o=>{const N={...x?.env||{},...o};g(A=>({...A,...o})),p(JSON.stringify({...x,env:N},null,2))},X=()=>{if(!h.trim())return;const o=h.trim(),N=w,A={...x?.env||{},[o]:N};g(W=>({...W,[o]:N})),p(JSON.stringify({...x,env:A},null,2)),b(""),k("")},y=u.useMemo(()=>{try{return JSON.parse(l),!0}catch{return!1}},[l]),I=u.useMemo(()=>t!==null?t!==JSON.stringify(d,null,2):Object.keys(c).length>0,[t,c,d]),O=u.useDeferredValue(l),z=u.useMemo(()=>{if(!I||!y)return null;try{return JSON.parse(O)}catch{return null}},[I,y,O]),{data:Y,isFetching:re,isError:V,isPlaceholderData:ne}=be({queryKey:["settings",s,"image-analysis-status-preview",O],enabled:z!==null,placeholderData:o=>o,queryFn:async()=>{const o=await fetch(`/api/settings/${s}/image-analysis-status`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:z})});if(!o.ok)throw new Error(`Failed to preview image-analysis status: ${o.status}`);return o.json()}}),ie=I&&y&&!V?Y?.imageAnalysisStatus??S?.imageAnalysisStatus:S?.imageAnalysisStatus,oe=I&&y&&!V&&Y?.imageAnalysisStatus?"editor":"saved",le=I?y?V?"saved":re&&(!Y?.imageAnalysisStatus||ne)?"refreshing":"preview":"invalid":"saved",ce=x?.ccs_image?.native_read===!0,de=u.useMemo(()=>{const o=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"],N=x?.env||{};return o.filter(A=>!N[A]?.trim())},[x]);u.useEffect(()=>{m?.(I)},[I,m]);const i=we({mutationFn:async()=>{let o;try{o=JSON.parse(l)}catch{o={...S?.settings,env:{...S?.settings?.env,...c}}}const N=await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:o,expectedMtime:S?.mtime})});if(N.status===409)throw new Error("CONFLICT");if(!N.ok)throw new Error("Failed to save");return N.json()},onSuccess:()=>{j.invalidateQueries({queryKey:["settings",s]}),j.invalidateQueries({queryKey:["profiles"]}),g({}),p(null),T.success(ee.t("commonToast.settingsSaved"))},onError:o=>{o.message==="CONFLICT"?f(!0):T.error(o.message)}}),E=we({mutationFn:async o=>(await os.profiles.update(s,{target:o}),o),onSuccess:()=>{j.invalidateQueries({queryKey:["profiles"]}),T.success(ee.t("commonToast.defaultTargetUpdated"))},onError:(o,N)=>{const A=N==="droid"?"Factory Droid":N==="codex"?"Codex CLI":"Claude Code",W=o.message.trim()?`: ${o.message}`:"";T.error(ee.t("commonToast.failedUpdateDefaultTarget",{target:A,suffix:W}))}}),P=r||"claude",F=i.isPending||E.isPending,_=async o=>{f(!1),o?(await M(),i.mutate()):(g({}),p(null))};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(Ls,{profileName:s,target:P,data:S,settings:x,isLoading:H,isSaving:i.isPending,isTargetSaving:E.isPending,hasChanges:I,isRawJsonValid:y,onTargetChange:o=>{F||o!==P&&E.mutate(o)},onRefresh:()=>{F||M()},onDelete:n,onSave:()=>{F||i.mutate()}}),H?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(se,{className:"w-8 h-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading settings..."})]}):C?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Failed to load settings."}),e.jsxs(v,{variant:"outline",size:"sm",onClick:()=>M(),children:[e.jsx(G,{className:"w-4 h-4 mr-1"}),"Retry"]})]})}):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.jsx(Qs,{profileName:s,target:P,data:S,currentSettings:x,newEnvKey:h,newEnvValue:w,onNewEnvKeyChange:b,onNewEnvValueChange:k,onEnvValueChange:q,onEnvBulkChange:K,onAddEnvVar:X})}),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(Ps,{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:l,isRawJsonValid:y,rawJsonEdits:t,settings:d,profileTarget:P,imageAnalysisStatus:ie,imageAnalysisStatusSource:oe,imageAnalysisStatusPreviewState:le,nativeReadPreferenceOverride:ce,onToggleNativeRead:$,onChange:Q,missingRequiredFields:de})]})]}),e.jsx(he,{open:a,title:"File Modified Externally",description:"Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>_(!0),onCancel:()=>_(!1)})]},s)}const Se="ccs:openrouter-banner-dismissed";function zs({onCreateClick:s}){const[r,n]=u.useState(!0),{modelCount:m,isLoading:c}=ge();u.useEffect(()=>{const a=localStorage.getItem(Se)==="true";n(a)},[]);const g=()=>{localStorage.setItem(Se,"true"),n(!0)};return r?null:e.jsx("div",{className:"bg-gradient-to-r from-accent to-accent/90 text-white px-4 py-3 relative shrink-0",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 max-w-screen-xl mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"p-1.5 bg-white/20 rounded-md shrink-0",children:e.jsx(fe,{className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-sm",children:"NEW: OpenRouter Integration"}),e.jsxs("p",{className:"text-xs text-white/80 truncate",children:["Browse ",c?"300+":`${m}+`," models from OpenAI, Anthropic, Google, Meta and more."]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s&&e.jsx(v,{size:"sm",variant:"secondary",onClick:s,className:"bg-white text-accent hover:bg-white/90 h-8",children:"Try it now"}),e.jsxs("a",{href:"https://openrouter.ai",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-white/80 hover:text-white hidden sm:flex items-center gap-1",children:["Learn more",e.jsx(pe,{className:"w-3 h-3"})]}),e.jsxs(v,{size:"icon",variant:"ghost",onClick:g,className:"h-7 w-7 text-white/70 hover:text-white hover:bg-white/20",children:[e.jsx(ks,{className:"w-4 h-4"}),e.jsx("span",{className:"sr-only",children:"Dismiss"})]})]})]})})}function ue({badge:s,badgeClassName:r,className:n,title:m,description:c,visual:g,highlights:a,actionLabel:f,actionClassName:t,onAction:p,footer:h}){return e.jsxs(Re,{className:D("flex h-full flex-col border shadow-sm",n),children:[e.jsxs(ls,{className:"space-y-3 pb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[g,e.jsx(L,{variant:"secondary",className:r,children:s})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(cs,{className:"text-base",children:m}),e.jsx(ds,{className:"text-sm leading-6",children:c})]})]}),e.jsxs(Me,{className:"mt-auto flex flex-1 flex-col gap-4 pt-0",children:[e.jsx("div",{className:"space-y-2 text-xs text-muted-foreground",children:a.map(b=>e.jsxs("div",{className:"flex items-center gap-2",children:[b.icon,e.jsx("span",{children:b.label})]},b.label))}),e.jsxs(v,{onClick:p,className:t,children:[f,e.jsx(Ss,{className:"ml-2 h-4 w-4"})]}),h?e.jsx("div",{className:"text-xs text-muted-foreground",children:h}):null]})]})}function Ks({hasProfiles:s,profileCount:r,onOpenRouterClick:n,onAlibabaCodingPlanClick:m,onCliproxyClick:c,onCustomClick:g}){const{t:a}=B(),{modelCount:f,isLoading:t}=ge(),p=t?"300+":`${f}+`,h=s?a("openrouterQuickStart.profileCount",{count:r}):a("openrouterQuickStart.recommended"),b=a(s?"openrouterQuickStart.selectProfileTitle":"apiProfiles.noProfilesYet"),w=s?a("openrouterQuickStart.summaryDescriptionWithProfiles",{count:r}):a("openrouterQuickStart.summaryDescriptionNoProfiles");return e.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto bg-muted/20 p-4 sm:p-6",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-7xl flex-col gap-4",children:[e.jsx(Re,{className:"border-dashed bg-background/90 shadow-sm",children:e.jsxs(Me,{className:"flex flex-col gap-4 p-5 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(L,{variant:"secondary",children:h}),e.jsx(L,{variant:"outline",children:a("openrouterQuickStart.openrouterModelsBadge",{modelCountLabel:p})})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-xl font-semibold",children:b}),e.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:w})]})]}),e.jsx(v,{variant:"outline",onClick:g,className:"shrink-0",children:a("openrouterQuickStart.createCustomProfile")})]})}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsx(ue,{badge:a("openrouterQuickStart.recommended"),title:a("openrouterQuickStart.title"),description:a("openrouterQuickStart.description",{modelCountLabel:p}),visual:e.jsx("div",{className:"rounded-lg bg-accent/10 p-2",children:e.jsx("img",{src:"/icons/openrouter.svg",alt:"OpenRouter",className:"h-5 w-5"})}),highlights:[{icon:e.jsx(Fe,{className:"h-3.5 w-3.5 text-accent"}),label:a("openrouterQuickStart.featureOneApi")},{icon:e.jsx(fe,{className:"h-3.5 w-3.5 text-accent"}),label:a("openrouterQuickStart.featureTierMapping")}],actionLabel:a("openrouterQuickStart.createOpenRouterProfile"),actionClassName:"w-full bg-accent text-white hover:bg-accent/90",onAction:n,footer:e.jsxs(e.Fragment,{children:[a("openrouterQuickStart.getApiKeyAt")," ",e.jsxs("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-accent hover:underline",children:["openrouter.ai/keys",e.jsx(pe,{className:"h-3 w-3"})]})]})}),e.jsx(ue,{badge:a("openrouterQuickStart.runtimeProviderBadge"),badgeClassName:"bg-emerald-500/10 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200",title:a("openrouterQuickStart.runtimeProviderTitle"),description:a("openrouterQuickStart.runtimeProviderDescription"),visual:e.jsx("div",{className:"rounded-lg bg-emerald-500/10 p-2",children:e.jsx(Ce,{className:"h-5 w-5 text-emerald-700 dark:text-emerald-300"})}),highlights:[{icon:e.jsx(Ce,{className:"h-3.5 w-3.5 text-emerald-600"}),label:a("openrouterQuickStart.runtimeProviderFeatureConnectors")},{icon:e.jsx(ye,{className:"h-3.5 w-3.5 text-emerald-600"}),label:a("openrouterQuickStart.runtimeProviderFeatureSecrets")}],actionLabel:a("openrouterQuickStart.runtimeProviderTitle"),actionClassName:"w-full bg-emerald-600 text-white hover:bg-emerald-600/90",onAction:c,footer:e.jsx("span",{children:a("openrouterQuickStart.runtimeProviderFooter")})}),e.jsx(ue,{badge:a("alibabaCodingPlanQuickStart.recommended"),badgeClassName:"bg-orange-500/10 text-orange-700 dark:bg-orange-500/20 dark:text-orange-200",className:"lg:col-span-2",title:a("alibabaCodingPlanQuickStart.title"),description:a("alibabaCodingPlanQuickStart.description"),visual:e.jsx("div",{className:"rounded-lg bg-orange-500/10 p-2",children:e.jsx("img",{src:"/assets/providers/alibabacloud-color.svg",alt:"Alibaba Coding Plan",className:"h-5 w-5"})}),highlights:[{icon:e.jsx(Ue,{className:"h-3.5 w-3.5 text-orange-600"}),label:a("alibabaCodingPlanQuickStart.featureEndpoint")},{icon:e.jsx(ye,{className:"h-3.5 w-3.5 text-orange-600"}),label:a("alibabaCodingPlanQuickStart.featureKeyFormat")}],actionLabel:a("alibabaCodingPlanQuickStart.createAlibabaProfile"),actionClassName:"w-full bg-orange-600 text-white hover:bg-orange-600/90",onAction:m,footer:e.jsxs(e.Fragment,{children:[a("alibabaCodingPlanQuickStart.readGuideAt")," ",e.jsxs("a",{href:"https://www.alibabacloud.com/help/en/model-studio/coding-plan",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-orange-700 hover:underline dark:text-orange-400",children:["Alibaba Cloud Model Studio",e.jsx(pe,{className:"h-3 w-3"})]})]})})]})]})})}function Js({onCreateClick:s}){const{modelCount:r,isLoading:n}=ge();return e.jsx("div",{className:"p-3 border-t bg-gradient-to-r from-accent/5 to-accent/10 dark:from-accent/10 dark:to-accent/15",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1.5 bg-accent/10 dark:bg-accent/20 rounded shrink-0",children:e.jsx("img",{src:"/icons/openrouter.svg",alt:"",className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-accent dark:text-accent-foreground",children:"OpenRouter"}),e.jsxs("p",{className:"text-[10px] text-muted-foreground truncate",children:[n?"300+":`${r}+`," models available"]})]}),e.jsxs(v,{size:"sm",variant:"ghost",onClick:s,className:"h-7 px-2 text-accent hover:text-accent hover:bg-accent/10 dark:hover:bg-accent/20",children:[e.jsx(Fe,{className:"w-3 h-3 mr-1"}),e.jsx("span",{className:"text-xs",children:"Add"})]})]})})}function Bs({onCreateClick:s}){const{t:r}=B();return e.jsx("div",{className:"p-3 border-t bg-gradient-to-r from-orange-500/5 to-orange-500/10 dark:from-orange-500/10 dark:to-orange-500/15",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1.5 bg-orange-500/10 dark:bg-orange-500/20 rounded shrink-0",children:e.jsx("img",{src:"/assets/providers/alibabacloud-color.svg",alt:"",className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-orange-700 dark:text-orange-300",children:r("alibabaCodingPlanPromo.title")}),e.jsx("p",{className:"text-[10px] text-muted-foreground truncate",children:r("alibabaCodingPlanPromo.subtitle")})]}),e.jsxs(v,{size:"sm",variant:"ghost",onClick:s,className:"h-7 px-2 text-orange-700 dark:text-orange-300 hover:text-orange-700 hover:bg-orange-500/10 dark:hover:bg-orange-500/20",children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),e.jsx("span",{className:"text-xs",children:r("alibabaCodingPlanPromo.add")})]})]})})}function it(){const{t:s}=B(),r=Ke(),{data:n,isLoading:m,isError:c,refetch:g}=ms(),a=us(),f=xs(),t=hs(),p=ps(),h=gs(),b=fs(),[w,k]=u.useState(null),[j,S]=u.useState(""),[H,C]=u.useState(!1),[M,d]=u.useState("normal"),[x,l]=u.useState(null),[Q,$]=u.useState(!1),[q,K]=u.useState(null),X=u.useRef(null);js();const y=u.useMemo(()=>n?.profiles||[],[n?.profiles]),I=u.useMemo(()=>y.filter(i=>i.name.toLowerCase().includes(j.toLowerCase())),[y,j]),O=w?y.find(i=>i.name===w):null,z=i=>{Q&&w!==i?K(i):k(i)},Y=i=>{a.mutate(i,{onSuccess:()=>{w===i&&(k(null),$(!1),K(null)),l(null)}})},re=i=>{C(!1),z(i)},V=i=>{z(i)},ne=(i,E)=>{const P=JSON.stringify(E,null,2)+`
2
- `,F=new Blob([P],{type:"application/json"}),_=URL.createObjectURL(F),o=document.createElement("a");o.href=_,o.download=i,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(_)},ie=async()=>{try{const i=await f.mutateAsync();if(i.orphans.length===0){T.success("No orphan profile settings found");return}const E=i.orphans.filter(o=>o.validation.valid).length;if(!window.confirm(`Found ${i.orphans.length} orphan settings file(s). Register ${E} valid profile(s) now?`))return;const F=await t.mutateAsync({}),_=F.skipped.length>0?`, skipped ${F.skipped.length}`:"";T.success(`Registered ${F.registered.length} profile(s)${_}`)}catch(i){T.error(i.message)}},oe=async()=>{if(!O)return;const i=window.prompt(`Copy profile "${O.name}" to new profile name:`,`${O.name}-copy`);if(!i)return;const E=i.trim();if(!E){T.error("Destination profile name cannot be empty");return}try{const P=await p.mutateAsync({name:O.name,data:{destination:E}});z(E),P.warnings&&P.warnings.length>0&&T.info(P.warnings.join(`
3
- `))}catch(P){T.error(P.message)}},le=async()=>{if(O)try{const i=await h.mutateAsync({name:O.name});ne(`${O.name}.ccs-profile.json`,i.bundle),i.redacted?T.info("Export created with redacted token. Use include-secrets flow in CLI if needed."):T.success("Profile export downloaded")}catch(i){T.error(i.message)}},ce=()=>{X.current?.click()},de=async i=>{const E=i.target.files?.[0];if(i.target.value="",!!E)try{const P=await E.text(),F=JSON.parse(P),_=await b.mutateAsync({bundle:F});_.name&&z(_.name),_.warnings&&_.warnings.length>0&&T.info(_.warnings.join(`
4
- `))}catch(P){T.error(P.message||"Failed to import profile bundle")}};return e.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[e.jsx(zs,{onCreateClick:()=>C(!0)}),e.jsxs("div",{className:"flex-1 flex 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-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Os,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:s("apiProfiles.title")})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(v,{size:"sm",variant:"outline",onClick:()=>void ie(),disabled:f.isPending||t.isPending,"aria-label":"Discover orphan profiles",title:"Discover orphan profiles",children:e.jsx(G,{className:`w-4 h-4 ${f.isPending?"animate-spin":""}`})}),e.jsx(v,{size:"sm",variant:"outline",onClick:ce,disabled:b.isPending,"aria-label":"Import profile bundle",title:"Import profile bundle",children:e.jsx(Ts,{className:"w-4 h-4"})}),e.jsxs(v,{size:"sm",onClick:()=>{C(!0)},children:[e.jsx(te,{className:"w-4 h-4 mr-1"}),s("apiProfiles.new")]})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(Le,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(U,{placeholder:s("apiProfiles.searchPlaceholder"),className:"pl-8 h-9",value:j,onChange:i=>S(i.target.value)})]})]}),e.jsx(ae,{className:"flex-1 min-h-0",children:m?e.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:s("apiProfiles.loadingProfiles")}):c?e.jsx("div",{className:"p-4 text-center",children:e.jsxs("div",{className:"space-y-3 py-8",children:[e.jsx(He,{className:"w-12 h-12 mx-auto text-destructive/50"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:s("apiProfiles.failedLoadTitle")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s("apiProfiles.failedLoadDesc")})]}),e.jsxs(v,{size:"sm",variant:"outline",onClick:()=>g(),children:[e.jsx(G,{className:"w-4 h-4 mr-1"}),s("apiProfiles.retry")]})]})}):I.length===0?e.jsx("div",{className:"p-4 text-center",children:y.length===0?e.jsxs("div",{className:"space-y-3 py-8",children:[e.jsx(Es,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:s("apiProfiles.noProfilesYet")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s("apiProfiles.noProfilesDesc")})]}),e.jsxs(v,{size:"sm",variant:"outline",onClick:()=>{C(!0)},children:[e.jsx(te,{className:"w-4 h-4 mr-1"}),s("apiProfiles.createProfile")]})]}):e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:s("apiProfiles.noProfileMatch",{query:j})})}):e.jsx("div",{className:"p-2 space-y-1",children:I.map(i=>e.jsx(qs,{profile:i,isSelected:w===i.name,onSelect:()=>V(i.name),onDelete:()=>l(i.name)},i.name))})}),y.length>0&&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:s("apiProfiles.profileCount",{count:y.length})}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Qe,{className:"w-3 h-3 text-green-600"}),s("apiProfiles.configuredCount",{count:y.filter(i=>i.configured).length})]})]})}),e.jsx(Js,{onCreateClick:()=>{d("openrouter"),C(!0)}}),e.jsx(Bs,{onCreateClick:()=>{d("alibaba-coding-plan"),C(!0)}})]}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col min-w-0 overflow-hidden",children:O?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-4 py-2 border-b bg-background flex items-center justify-end gap-2",children:[e.jsxs(v,{size:"sm",variant:"outline",onClick:()=>void oe(),disabled:p.isPending,children:[e.jsx(As,{className:"w-4 h-4 mr-1"}),"Copy"]}),e.jsxs(v,{size:"sm",variant:"outline",onClick:()=>void le(),disabled:h.isPending,children:[e.jsx(_s,{className:"w-4 h-4 mr-1"}),"Export"]})]}),e.jsx($s,{profileName:O.name,profileTarget:O.target,onDelete:()=>l(O.name),onHasChangesUpdate:$},O.name)]}):e.jsx(Ks,{hasProfiles:y.length>0,profileCount:y.length,onCliproxyClick:()=>{r("/cliproxy/ai-providers")},onOpenRouterClick:()=>{d("openrouter"),C(!0)},onAlibabaCodingPlanClick:()=>{d("alibaba-coding-plan"),C(!0)},onCustomClick:()=>{d("normal"),C(!0)}})})]}),e.jsx("input",{ref:X,type:"file",accept:".json,application/json",className:"hidden",onChange:i=>void de(i)}),e.jsx(Ns,{open:H,onOpenChange:C,onSuccess:re,initialMode:M}),e.jsx(he,{open:!!x,title:s("apiProfiles.deleteProfileTitle"),description:s("apiProfiles.deleteProfileDesc",{name:x??""}),confirmText:s("apiProfiles.delete"),variant:"destructive",onConfirm:()=>x&&Y(x),onCancel:()=>l(null)}),e.jsx(he,{open:!!q,title:s("apiProfiles.unsavedChangesTitle"),description:s("apiProfiles.unsavedChangesDesc",{current:w??"",next:q??""}),confirmText:s("apiProfiles.discardSwitch"),variant:"destructive",onConfirm:()=>{$(!1),k(q),K(null)},onCancel:()=>K(null)})]})}function qs({profile:s,isSelected:r,onSelect:n,onDelete:m}){return e.jsxs("div",{className:D("group flex items-center gap-2 px-3 py-2.5 rounded-md cursor-pointer transition-colors",r?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:n,children:[s.configured?e.jsx(Qe,{className:"w-4 h-4 text-green-600 shrink-0"}):e.jsx(He,{className:"w-4 h-4 text-yellow-600 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("div",{className:"font-medium text-sm truncate",children:s.name}),e.jsx(L,{variant:"outline",className:"text-[10px] h-4 px-1.5 uppercase",children:s.target||"claude"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx("div",{className:"text-xs text-muted-foreground truncate flex-1",children:s.settingsPath}),e.jsx(J,{value:s.settingsPath,size:"icon",className:"h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity"})]})]}),e.jsx(v,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),m()},children:e.jsx(De,{className:"w-3.5 h-3.5 text-destructive"})})]})}export{it as ApiPage};
@@ -1,3 +0,0 @@
1
- import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{a as rt,u as Rt,b as is}from"./tanstack-CrmUhA7Z.js";import{a8 as rs,d as _,C as Et,b as Ot,a9 as Lt,c as Q,P as ot,B,a as re,aa as ie,L as J,I as ce,r as $e,s as Qe,t as Je,v as We,w as we,ab as _t,ac as Ft,ad as os,ae as ls,af as cs,u as Ut,ag as lt,ah as ct,ai as dt,aj as ut,ak as Kt,al as bt,am as ds,an as us,W as qt,ao as Xe,ap as Ht,Y as Oe,aq as ms,ar as Nt,as as yt,at as ps,au as xs,av as hs,aw as gs,ax as fs,ay as vs,az as js,aA as bs,aB as wt,aC as Ns,x as Gt,n as mt,aD as pt,aE as kt,aF as Vt,aG as ys,m as ws,aH as ks,aI as Cs,aJ as Ye,T as Ze,p as et,q as tt,aK as As,aL as Ss,aM as Ps,aN as Ct,aO as Ms,aP as Ds,aQ as Ts,aR as Is,aS as Rs,aT as Es,Q as Os,R as Ls,U as At,V as St,aU as _s,aV as Fs,aW as Us,aX as Ks,aY as qs,aZ as Hs,a_ as Gs,a$ as Vs,b0 as Bs,b1 as zs,b2 as $s,b3 as Qs,S as Js}from"./index-Du97tqVQ.js";import{C as st}from"./default-ports-1QQSffYX.js";import{t as H}from"./notifications-B2HqRBj7.js";import{C as Bt,L as ee,p as ge,$ as Ws,m as ve,o as zt,aC as xt,R as ht,q as ke,aa as Ce,T as Fe,a7 as Pt,aD as $t,aB as Xs,z as gt,Z as Ae,_ as Qt,i as Ys,u as Jt,aE as Zs,at as ea,X as ft,a9 as Wt,J as Xt,D as Yt,aF as ta,as as Zt,aG as sa,aw as aa,aH as es}from"./icons-DfENUzBo.js";import{R as Le,A as Mt,D as Ve,i as na,a as ia}from"./antigravity-responsibility-constants-Bvh4Ybz0.js";import{C as _e}from"./checkbox-pojB3pE7.js";import{C as ra}from"./confirm-dialog-DwPqRjyW.js";import{S as vt}from"./separator-Dd3ktLxa.js";import{S as oa}from"./searchable-select-fldXYfY4.js";import{P as la}from"./proxy-status-widget-DQWsa532.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-DJMw_zyc.js";const ts=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"}),ca=/^gemini-(\d+(?:[.-]\d+)*)-(pro|flash)-preview(-customtools)?$/i;function fe(t){return rs(t).toLowerCase()}function Ue(t){const s=fe(t),a=s.match(ca);if(!a)return null;const[,n,i,o]=a;return{normalizedId:s,version:n.split(/[.-]/).map(c=>Number(c)),family:i,customtools:!!o,dottedVersion:n.includes(".")}}function ss(t,s){const a=Math.max(t.length,s.length);for(let n=0;n<a;n+=1){const i=t[n]??0,o=s[n]??0;if(i!==o)return i>o?1:-1}return 0}function da(t,s,a){if(t.customtools!==s.customtools)return t.customtools?1:-1;const n=ss(t.version,s.version);if(n!==0)return n>0?-1:1;const i=+(t.dottedVersion===a.dottedVersion),o=+(s.dottedVersion===a.dottedVersion);return i!==o?o-i:t.normalizedId.localeCompare(s.normalizedId)}function Dt(t,s){const a=fe(s);return t.find(n=>fe(n.id)===a)?.id}function ua(t,s){const a=Ue(t);return!a||s.length===0?void 0:s.map(i=>{const o=Ue(i.id);return!o||o.family!==a.family?null:{id:i.id,info:o}}).filter(i=>!!i).sort((i,o)=>da(i.info,o.info,a))[0]?.id}const he={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 at(t,s){if(!t)return;const a=fe(s),n=ts[a.toLowerCase()],i=t.models.find(c=>c.id===a||c.id===n);if(i)return i;const o=Ue(a);if(o)return t.models.map(c=>({model:c,info:Ue(c.id)})).filter(c=>!!(c.info&&c.info.family===o.family)).sort((c,u)=>ss(u.info.version,c.info.version))[0]?.model}function ma(t){if(t==="free")return"free";if(typeof t=="string"&&t.trim().length>0)return"paid"}function pa(t,s){const a=he[t.toLowerCase()];if(!s||s.models.length===0)return a;const n=s.models.map(u=>({id:u.id,owned_by:s.provider})),i=s.models.map(u=>{const r=at(a,u.id);return{...u,name:u.name||r?.name||u.id,tier:r?.tier??ma(u.tier),description:u.description??r?.description,broken:r?.broken,issueUrl:r?.issueUrl,deprecated:r?.deprecated,deprecationReason:r?.deprecationReason,extendedContext:u.extendedContext??r?.extendedContext,presetMapping:r?.presetMapping}}),o=a?.defaultModel?je(a.defaultModel,n):void 0,c=typeof o=="string"&&n.some(u=>fe(u.id)===fe(o));return{provider:s.provider,displayName:s.displayName||a?.displayName||t,defaultModel:c?o:s.defaultModel,models:i}}function jt(t){const s={},a=new Set([...Object.keys(he),...Object.keys(t??{})]);for(const n of a){const i=pa(n,t?.[n]);i&&(s[n]=i)}return s}function as(t,s,a){const n=at(a,s);return n||at(he[t.toLowerCase()],s)}function je(t,s=[]){const a=fe(t),n=ua(a,s);if(n)return n;const i=Dt(s,a);if(i)return i;const o=ts[a];return(o?Dt(s,o):void 0)??a}function xa(t,s=[]){return{default:je(t.default,s),opus:je(t.opus,s),sonnet:je(t.sonnet,s),haiku:je(t.haiku,s)}}function ns(t,s=[]){if(!t)return[];const a=new Set;return t.models.map(n=>{const i=je(n.id,s),o=n.presetMapping?xa(n.presetMapping,s):void 0;return{...n,id:i,presetMapping:o}}).filter(n=>a.has(n.id)?!1:(a.add(n.id),!0))}function ha(t,s,a){return as(t,s,a)?.extendedContext===!0}const Be="ccs-internal-managed";async function ga(){try{const t=await fetch("/api/settings/auth/tokens/raw");return t.ok?(await t.json())?.apiKey?.value??Be:Be}catch{return Be}}async function fa(t,s){if(s)return s;try{const a=await fetch("/api/cliproxy/catalog");if(!a.ok)return he[t];const n=await a.json();return jt(n.catalogs)[t]??he[t]}catch{return he[t]}}async function nt(t,s,a){const n=await fa(t,a);if(!n)return{success:!1};const i=n.models.find(m=>m.id===n.defaultModel)||n.models[0],o=i?.presetMapping||{default:n.defaultModel,opus:n.defaultModel,sonnet:n.defaultModel,haiku:n.defaultModel},c=await ga(),r={env:{ANTHROPIC_BASE_URL:`http://127.0.0.1:${st}/api/provider/${t}`,ANTHROPIC_AUTH_TOKEN:c,ANTHROPIC_MODEL:o.default,ANTHROPIC_DEFAULT_OPUS_MODEL:o.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:o.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:o.haiku}};try{return{success:(await fetch(`/api/settings/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:r})})).ok,presetName:i?.name||n.defaultModel}}catch{return{success:!1}}}function va({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 ja({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(Bt,{className:"w-4 h-4 text-muted-foreground"})]},a.id))})}function ba({selectedProvider:t,providers:s,authCommand:a,isRefreshing:n,isPending:i,onBack:o,onStartAuth:c,onRefresh:u}){const[r,m]=l.useState(!1),v=async h=>{await navigator.clipboard.writeText(h),m(!0),setTimeout(()=>m(!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(_,{onClick:c,disabled:i,className:"w-full gap-2",size:"lg",children:i?e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-4 h-4 animate-spin"}),"Authenticating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ge,{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(Et,{children:e.jsxs(Ot,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Ws,{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(_,{variant:"outline",size:"icon",onClick:()=>v(a),children:r?e.jsx(ve,{className:"w-4 h-4 text-green-500"}):e.jsx(zt,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(_,{variant:"ghost",onClick:o,disabled:i,children:[e.jsx(xt,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs(_,{variant:"outline",onClick:u,disabled:n||i,children:[e.jsx(ht,{className:`w-4 h-4 mr-2 ${n?"animate-spin":""}`}),n?"Checking...":"Refresh Status"]})]})]})}function Na({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(o=>{const c=Lt(o.id,o.email,o.tokenFile);return e.jsxs("button",{type:"button",onClick:()=>a(o),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center",children:e.jsx(ke,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:Q("font-medium",s&&ot),children:c.email}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[c.audienceLabel&&e.jsx(B,{variant:"outline",className:Q("text-[10px] h-4 px-1.5 border-transparent",c.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:c.audienceLabel}),c.detailLabel&&e.jsx(B,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:c.detailLabel}),o.isDefault&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Default account"})]})]})]}),e.jsx(Bt,{className:"w-4 h-4 text-muted-foreground"})]},o.id)})}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or"})})]}),e.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 p-3 border-2 border-dashed border-primary/50 rounded-lg hover:border-primary hover:bg-primary/5 transition-colors text-left",onClick:n,children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(ge,{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(_,{variant:"ghost",onClick:i,children:[e.jsx(xt,{className:"w-4 h-4 mr-2"}),"Back"]})})]})}const Tt="__custom__";function ya({selectedProvider:t,catalog:s,selectedAccount:a,variantName:n,modelName:i,isPending:o,privacyMode:c,onVariantNameChange:u,onModelChange:r,onBack:m,onSkip:v,onCreate:h}){const{t:N}=re(),g=s||he[t],f=g?.models||[],F=i&&!f.some(x=>x.id===i),[y,D]=l.useState(F),S=t==="agy"&&i.trim().length>0?ie(i):!1,d=a?Lt(a.id,a.email,a.tokenFile):null,b=x=>{x===Tt?(D(!0),r("")):(D(!1),r(x))};return e.jsxs("div",{className:"space-y-4",children:[a&&e.jsxs("div",{className:"flex items-start gap-2 p-2 bg-muted/50 rounded-md text-sm",children:[e.jsx(ke,{className:"w-4 h-4"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("span",{children:[N("setupVariant.using")," ",e.jsx("span",{className:Q(c&&ot),children:d?.email})]}),(d?.audienceLabel||d?.detailLabel)&&e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[d?.audienceLabel&&e.jsx(B,{variant:"outline",className:Q("text-[10px] h-4 px-1.5 border-transparent",d.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:d.audienceLabel}),d?.detailLabel&&e.jsx(B,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:d.detailLabel})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(J,{htmlFor:"variant-name",children:N("setupVariant.variantNameRequired")}),e.jsx(ce,{id:"variant-name",value:n,onChange:x=>u(x.target.value),placeholder:N("setupVariant.variantNamePlaceholder")}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[N("setupVariant.invokeHintPrefix")," ccs ",n||"<name>",' "prompt"']})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(J,{children:N("setupVariant.model")}),y?e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{value:i,onChange:x=>r(x.target.value),placeholder:N("setupVariant.modelPlaceholder")}),S&&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:()=>{D(!1),t==="agy"&&ie(i)&&r("")},children:N("setupVariant.choosePresetInstead")})]}):e.jsxs($e,{value:f.some(x=>x.id===i)?i:"",onValueChange:b,children:[e.jsx(Qe,{children:e.jsx(Je,{placeholder:N("setupVariant.selectModel")})}),e.jsxs(We,{children:[f.map(x=>e.jsx(we,{value:x.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:x.name}),x.description&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["- ",x.description]})]})},x.id)),e.jsx(we,{value:Tt,children:e.jsx("span",{className:"text-primary",children:N("setupVariant.customModelName")})})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:y?N("setupVariant.enterAnyModel"):N("setupVariant.defaultModel",{model:g?.defaultModel||N("setupVariant.providerDefault")})})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs(_,{variant:"ghost",onClick:m,children:[e.jsx(xt,{className:"w-4 h-4 mr-2"}),N("setupVariant.back")]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"ghost",onClick:v,children:N("setupVariant.skip")}),e.jsx(_,{onClick:h,disabled:!n||o||S,children:N(o?"setupVariant.creating":"setupVariant.createVariant")})]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:N("setupVariant.skipHint")})]})}function wa({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(ve,{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(Et,{children:e.jsxs(Ot,{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(_,{onClick:s,className:"w-full",children:"Done"})]})}function ka({open:t,onClose:s}){const[a,n]=l.useState("provider"),[i,o]=l.useState(""),[c,u]=l.useState(null),[r,m]=l.useState(""),[v,h]=l.useState(""),[N,g]=l.useState(!1),[f,F]=l.useState(!1),{data:y,refetch:D}=_t(),{data:S}=Ft(),d=os(),b=ls(),x=cs(),{privacyMode:w}=Ut(),U=y?.authStatus.find(R=>R.provider===i),k=l.useMemo(()=>U?.accounts||[],[U?.accounts]),T=l.useMemo(()=>jt(S?.catalogs),[S?.catalogs]),q=!!S;l.useEffect(()=>{if(!t){const R=setTimeout(()=>{n("provider"),o(""),u(null),m(""),h(""),F(!1)},0);return()=>clearTimeout(R)}},[t]),l.useEffect(()=>{if(a==="auth"&&k.length>0&&!f){const R=setTimeout(()=>{n("account")},0);return()=>clearTimeout(R)}},[a,k,f]);const G=async()=>{g(!0),await D(),g(!1)},C=()=>{const R=(U?.accounts?.length||0)===0;b.mutate({provider:i},{onSuccess:async V=>{if(R){const z=await nt(i,void 0,q?T[i]:void 0);z.success&&z.presetName?H.success(`Applied "${z.presetName}" preset`):z.success||H.warning(qt.t("commonToast.accountAddedPresetFailed"))}V.account&&(u(V.account),n("variant")),D()}})},I=R=>{o(R),(y?.authStatus.find(W=>W.provider===R)?.accounts||[]).length===0?n("auth"):n("account")},j=R=>{u(R),n("variant")},E=async()=>{if(!(!r||!i))try{await d.mutateAsync({name:r,provider:i,model:v||void 0,account:c?.id}),n("success")}catch(R){console.error("Failed to create variant:",R)}},M=`ccs ${i} --auth --add`,O=us(a),A=R=>{if(!R&&(b.isPending&&i&&x.mutate(i),a==="success"||a==="provider")){s();return}};return e.jsx(lt,{open:t,onOpenChange:A,children:e.jsxs(ct,{className:"sm:max-w-lg",onPointerDownOutside:R=>{a!=="success"&&a!=="provider"&&R.preventDefault()},onEscapeKeyDown:R=>{(b.isPending||d.isPending)&&R.preventDefault()},children:[e.jsxs(dt,{children:[e.jsxs(ut,{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:"w-5 h-5 text-primary"}),"Quick Setup Wizard"]}),e.jsxs(Kt,{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(ja,{providers:bt,onSelect:I}),a==="auth"&&e.jsx(ba,{selectedProvider:i,providers:bt,authCommand:M,isRefreshing:N,isPending:b.isPending,onBack:()=>n("provider"),onStartAuth:C,onRefresh:G}),a==="account"&&e.jsx(Na,{accounts:k,privacyMode:w,onSelect:j,onAddNew:()=>{F(!0),n("auth")},onBack:()=>n("provider")}),a==="variant"&&e.jsx(ya,{selectedProvider:i,catalog:T[i],selectedAccount:c,variantName:r,modelName:v,isPending:d.isPending,privacyMode:w,onVariantNameChange:m,onModelChange:h,onBack:()=>k.length>0?n("account"):n("provider"),onSkip:s,onCreate:E}),a==="success"&&e.jsx(wa,{variantName:r,onClose:s})]}),e.jsx(va,{currentProgress:O,allSteps:ds})]})})}const Ca=3e3,Aa=300*1e3,Sa=3;async function ze(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 de={provider:null,isAuthenticating:!1,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:!1};function Pa(){const[t,s]=l.useState(de),a=l.useRef(de),n=l.useRef(0),i=l.useRef(null),o=l.useRef(null),c=l.useRef(0),u=l.useRef(0),r=l.useRef(!1),m=rt(),v=l.useCallback(y=>y===n.current,[]),h=l.useCallback(()=>{o.current&&(clearInterval(o.current),o.current=null),u.current=0},[]);l.useEffect(()=>()=>{i.current?.abort(),h(),r.current=!1},[h]),l.useEffect(()=>{a.current=t},[t]);const N=l.useCallback(async(y,D,S)=>{if(v(S)){if(Date.now()-c.current>Aa){h(),v(S)&&s(d=>({...d,isAuthenticating:!1,error:"Authentication timed out. Please try again."}));return}try{const d=await fetch(`/api/cliproxy/auth/${y}/status?state=${encodeURIComponent(D)}`);if(!v(S))return;const b=await d.json();if(u.current=0,b.status==="ok"){if(!(typeof b.account=="object"&&b.account!==null)){h();const w="Authenticated account could not be registered";H.error(w),s(U=>({...U,isAuthenticating:!1,error:w}));return}h(),m.invalidateQueries({queryKey:["cliproxy-auth"]}),m.invalidateQueries({queryKey:["cliproxy-accounts"]}),m.invalidateQueries({queryKey:["account-quota"]}),H.success(`${y} authentication successful`),r.current=!1,s(de)}else if(b.status==="auth_url"){const x=b.url||b.auth_url;x&&(s(w=>({...w,authUrl:x})),r.current||(r.current=!0,window.open(x,"_blank")))}else if(b.status==="device_code"){h();const x=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(w=>({...w,isAuthenticating:!1,error:x}))}else if(b.status==="error"){h();const x=b.error||"Authentication failed";H.error(x),s(w=>({...w,isAuthenticating:!1,error:x}))}}catch(d){if(!v(S)||(u.current+=1,u.current<Sa))return;h();const b=d instanceof Error&&d.message.trim().length>0?d.message:"Lost contact with the auth status endpoint";H.error(b),s(x=>({...x,isAuthenticating:!1,error:b}))}}},[v,m,h]),g=l.useCallback(async(y,D)=>{if(!Xe(y)){s({...de,error:`Unknown provider: ${y}`});return}i.current?.abort(),h(),r.current=!1,u.current=0;const S=new AbortController,d=n.current+1;n.current=d,i.current=S;const x=(D?.flowType||(Ht(y)?"device_code":"authorization_code"))==="device_code",w=D?.startEndpoint||(x?"start":"start-url"),U={nickname:D?.nickname,kiroMethod:D?.kiroMethod,kiroIDCStartUrl:D?.kiroIDCStartUrl,kiroIDCRegion:D?.kiroIDCRegion,kiroIDCFlow:D?.kiroIDCFlow,riskAcknowledgement:D?.riskAcknowledgement};s({provider:y,isAuthenticating:!0,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:x});try{if(w==="start")fetch(`/api/cliproxy/auth/${y}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U),signal:S.signal}).then(async k=>{if(!v(d))return;const T=await ze(k);if(!v(d))return;const q=T.success===!0,G=typeof T.account=="object"&&T.account!==null;if(k.ok&&q&&G)m.invalidateQueries({queryKey:["cliproxy-auth"]}),m.invalidateQueries({queryKey:["cliproxy-accounts"]}),m.invalidateQueries({queryKey:["account-quota"]}),r.current=!1,s(de);else{const C=typeof T.error=="string"?T.error:q?"Authenticated account could not be registered":"Authentication failed";H.error(C),s(I=>({...I,isAuthenticating:!1,error:C}))}}).catch(k=>{if(!v(d)||k instanceof Error&&k.name==="AbortError")return;const T=k instanceof Error?k.message:"Authentication failed";H.error(T),s(q=>({...q,isAuthenticating:!1,error:T}))});else{const k=await fetch(`/api/cliproxy/auth/${y}/start-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U),signal:S.signal});if(!v(d))return;const T=await ze(k);if(!v(d))return;const q=T.success===!0;if(!k.ok||!q){const I=typeof T.error=="string"?T.error:"Failed to start OAuth";throw new Error(I)}const G=typeof T.authUrl=="string"?T.authUrl:null,C=typeof T.state=="string"?T.state:null;if(s(I=>({...I,authUrl:G,oauthState:C})),G&&(r.current=!0,window.open(G,"_blank")),C){if(c.current=Date.now(),!G){if(await N(y,C,d),!v(d))return;const I=a.current;if(!I.isAuthenticating||I.provider!==y)return}o.current=setInterval(()=>{N(y,C,d)},Ca)}}}catch(k){if(!v(d))return;if(k instanceof Error&&k.name==="AbortError"){r.current=!1,s(de);return}const T=k instanceof Error?k.message:"Authentication failed";H.error(T),s(q=>({...q,isAuthenticating:!1,error:T}))}},[v,N,h,m]),f=l.useCallback(()=>{const y=t.provider;n.current+=1,i.current?.abort(),h(),r.current=!1,s(de),y&&Oe.cliproxy.auth.cancel(y).catch(()=>{})},[t.provider,h]),F=l.useCallback(async y=>{if(!t.provider)return;const D=n.current,S=t.provider;s(d=>({...d,isSubmittingCallback:!0,error:null}));try{const d=await fetch(`/api/cliproxy/auth/${S}/submit-callback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirectUrl:y})});if(!v(D))return;const b=await ze(d);if(!v(D))return;const x=b.success===!0,w=b.status==="wait",U=typeof b.account=="object"&&b.account!==null;if(d.ok&&w)s(k=>({...k,isSubmittingCallback:!1,error:null}));else if(d.ok&&x&&U)h(),m.invalidateQueries({queryKey:["cliproxy-auth"]}),m.invalidateQueries({queryKey:["cliproxy-accounts"]}),m.invalidateQueries({queryKey:["account-quota"]}),H.success(`${S} authentication successful`),s(de);else{const k=typeof b.error=="string"?b.error:x?"Authenticated account could not be registered":"Callback submission failed";throw new Error(k)}}catch(d){if(!v(D))return;const b=d instanceof Error?d.message:"Failed to submit callback";H.error(b),s(x=>({...x,isSubmittingCallback:!1,error:b}))}},[v,t.provider,m,h]);return l.useMemo(()=>({...t,startAuth:g,cancelAuth:f,submitCallback:F}),[t,g,f,F])}function it({className:t,compact:s=!1,showAcknowledgement:a=!1,acknowledgementPhrase:n=Le,acknowledgementText:i="",onAcknowledgementTextChange:o,disabled:c=!1,showProxySettingsLink:u=!1}){const{t:r}=re(),m=r("accountSafetyWarning.title"),v=r("accountSafetyWarning.subtitle"),h=r("accountSafetyWarning.firstLine"),N=r("accountSafetyWarning.secondLine"),g="https://github.com/kaitranntt/ccs/issues/509",f=r("accountSafetyWarning.issueLabel"),F=r("accountSafetyWarning.proxySettingsLabel");return s?e.jsx("section",{role:"alert",className:Q("border-b border-amber-200/70 bg-amber-50/45 dark:bg-amber-950/5",t),children:e.jsxs("div",{className:"flex flex-col gap-3 px-6 py-3 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{className:"min-w-0 flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 inline-flex h-6 w-6 items-center justify-center rounded-md bg-amber-500/12 text-amber-700 dark:text-amber-300",children:e.jsx(Fe,{className:"h-3.5 w-3.5"})}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-xs font-semibold leading-5",children:m}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:v})]}),e.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:h}),e.jsx("p",{className:"text-xs font-medium leading-5 text-amber-900 dark:text-amber-200",children:N})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[e.jsxs("a",{href:g,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-amber-500/25 bg-background/90 px-2 py-1 text-[11px] font-medium text-amber-800 transition-colors hover:bg-amber-500/10 dark:text-amber-200",children:[f,e.jsx(ge,{className:"h-3 w-3"})]}),u?e.jsxs("a",{href:"/settings?tab=proxy",className:"inline-flex items-center gap-1 rounded-md border border-amber-500/25 bg-background/90 px-2 py-1 text-[11px] font-medium text-amber-800 transition-colors hover:bg-amber-500/10 dark:text-amber-200",children:[e.jsx(Pt,{className:"h-3 w-3"}),F]}):null,e.jsx(B,{variant:"outline",className:"border-amber-500/40 text-[10px] text-amber-700 dark:text-amber-300",children:"High Risk"})]})]})}):e.jsxs("section",{role:"alert",className:Q("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(Fe,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:m}),e.jsx("p",{className:"text-xs text-muted-foreground",children:v})]})]}),e.jsx(B,{variant:"outline",className:"border-amber-500/40 text-amber-700 dark:text-amber-300",children:"High Risk"})]}),e.jsxs("div",{className:"space-y-2 text-sm leading-relaxed",children:[e.jsx("p",{children:h}),e.jsx("p",{className:"font-medium text-amber-900 dark:text-amber-200",children:N}),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:[f,e.jsx(ge,{className:"h-3.5 w-3.5"})]}),u&&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(Pt,{className:"h-3.5 w-3.5"}),F]}),e.jsx("span",{className:"rounded-md border border-border/70 bg-muted/60 px-2.5 py-1 text-xs text-muted-foreground",children:"Applies to CLI and dashboard auth"})]}),a&&o&&e.jsxs("div",{className:"rounded-lg border border-amber-500/25 bg-amber-500/5 p-2.5",children:[e.jsxs(J,{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:n})]}),e.jsx(ce,{id:"account-risk-ack-text",value:i,onChange:y=>o(y.target.value),placeholder:n,disabled:c,className:"mt-2 font-mono text-xs"})]})]})]})}function Ma({className:t,value:s,onChange:a,disabled:n=!1}){const{t:i}=re(),o=[s.reviewedIssue509,s.understandsBanRisk,s.acceptsFullResponsibility,s.typedPhrase.trim().replace(/\s+/g," ").toUpperCase()===Mt].filter(Boolean).length,c=o/4*100,u=r=>{a({...s,...r})};return e.jsxs("section",{role:"alert",className:Q("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(Fe,{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(B,{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:o})})]}),e.jsx(ms,{value:c,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(_e,{id:"agy-step-reviewed-issue",checked:s.reviewedIssue509,onCheckedChange:r=>u({reviewedIssue509:!!r}),disabled:n}),e.jsx(J,{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(_e,{id:"agy-step-understands-risk",checked:s.understandsBanRisk,onCheckedChange:r=>u({understandsBanRisk:!!r}),disabled:n}),e.jsx(J,{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(_e,{id:"agy-step-accept-responsibility",checked:s.acceptsFullResponsibility,onCheckedChange:r=>u({acceptsFullResponsibility:!!r}),disabled:n}),e.jsx(J,{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($t,{className:"h-3.5 w-3.5"}),"Step 4: Type exact phrase to continue"]}),e.jsx(ce,{value:s.typedPhrase,onChange:r=>u({typedPhrase:r.target.value}),placeholder:Mt,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(ge,{className:"h-3.5 w-3.5"})]})})]})]})}function Da(t){return t.trim().replace(/\s+/g," ").toUpperCase()}function Ta({open:t,onClose:s,provider:a,displayName:n,catalog:i,isFirstAccount:o=!1}){const[c,u]=l.useState(""),[r,m]=l.useState(""),[v,h]=l.useState(!1),[N,g]=l.useState(null),[f,F]=l.useState(""),[y,D]=l.useState(Ve),[S,d]=l.useState(!1),[b,x]=l.useState(!1),[w,U]=l.useState(Nt),[k,T]=l.useState(""),[q,G]=l.useState(""),[C,I]=l.useState(yt),{t:j}=re(),E=l.useRef(!1),M=l.useRef(0),O=l.useRef(!1),A=Pa(),R=ps(),V=a==="kiro",z=a==="agy"||a==="gemini",W=a==="gemini"&&!S,X=a==="agy"&&!S,oe=z&&b,Y=na(y),Z=Da(f)===Le,p=Ht(a),K=xs(w),te=V&&w==="idc",pe=V&&gs(w),Se=V?hs(w,C):void 0,Ke=V?vs(w):void 0,Pe=V?Se==="device_code":p,se=A.isAuthenticating||R.isPending,qe=c.trim(),be=k.trim(),Me=q.trim(),De=N||A.error,Te=l.useCallback(async()=>{const P=await fetch("/api/settings/auth/antigravity-risk");if(!P.ok)throw new Error("Failed to load power user mode setting");return(await P.json()).antigravityAckBypass===!0},[]),xe=l.useCallback(async({pendingMessage:P=null,disabledMessage:le=null}={})=>{const Ge=++M.current;x(!0),P!==null&&g(P);try{const Re=await Te();return M.current!==Ge||(d(Re),le?g(Re?null:le):P!==null&&g(null)),Re}catch{return M.current!==Ge||(d(!1),g(le??j("addAccountDialog.powerUserLoadFailed")),O.current||(O.current=!0,H.error(j("addAccountDialog.powerUserLoadFailed")))),!1}finally{M.current===Ge&&x(!1)}},[Te,j]),Ne=()=>{u(""),m(""),h(!1),g(null),F(""),D(Ve),d(!1),x(!1),U(Nt),T(""),G(""),I(yt),M.current+=1,O.current=!1,E.current=!1,s()};l.useEffect(()=>{t&&(F(""),D(Ve),g(null))},[a,t]),l.useEffect(()=>()=>{M.current+=1},[]),l.useEffect(()=>{if(!t||!z){M.current+=1,d(!1),x(!1);return}xe()},[t,a,z,xe]),l.useEffect(()=>{if(!t||a!=="agy"||!A.error||!S)return;const P=A.error.toLowerCase();(P.includes("agy_risk_ack_required")||P.includes("responsibility acknowledgement")||P.includes("responsibility checklist"))&&xe({pendingMessage:j("addAccountDialog.powerUserLoading"),disabledMessage:j("addAccountDialog.powerUserUnavailableRetry")})},[A.error,t,S,a,xe,j]),l.useEffect(()=>{!A.isAuthenticating&&!A.error&&A.provider===null&&t&&E.current&&(E.current=!1,(async()=>{try{const le=await nt(a,void 0,i);le.success&&le.presetName&&o&&H.success(`Applied "${le.presetName}" preset`)}catch{}Ne()})())},[A.isAuthenticating,A.error,A.provider]);const Ie=()=>{A.cancelAuth(),Ne()},He=async()=>{A.authUrl&&(await navigator.clipboard.writeText(A.authUrl),h(!0),setTimeout(()=>h(!1),2e3))},L=()=>{r.trim()&&A.submitCallback(r.trim())},$=()=>{if(oe){g(j("addAccountDialog.powerUserLoading"));return}if(X&&!Y){g("Complete all Antigravity responsibility steps before authenticating this provider.");return}if(W&&!Z){g(`Type "${Le}" to acknowledge the account safety warning before authenticating this provider.`);return}if(g(null),te&&!be){g("IDC Start URL is required for Kiro IAM Identity Center login.");return}E.current=!0,A.startAuth(a,{nickname:qe||void 0,kiroMethod:V?w:void 0,kiroIDCStartUrl:te?be:void 0,kiroIDCRegion:te&&Me?Me:void 0,kiroIDCFlow:te?C:void 0,flowType:V?Se:void 0,startEndpoint:V?Ke:void 0,riskAcknowledgement:X?{version:ia,reviewedIssue509:y.reviewedIssue509,understandsBanRisk:y.understandsBanRisk,acceptsFullResponsibility:y.acceptsFullResponsibility,typedPhrase:y.typedPhrase}:void 0})},ae=()=>{E.current=!0,R.mutate(void 0,{onSuccess:async()=>{const P=await nt("kiro",void 0,i);P.success&&P.presetName&&o&&H.success(`Applied "${P.presetName}" preset`),Ne()}})},ye=P=>{P||Ie()},ne=A.isAuthenticating;return e.jsx(lt,{open:t,onOpenChange:ye,children:e.jsxs(ct,{className:"sm:max-w-md",onInteractOutside:P=>{ne&&P.preventDefault()},children:[e.jsxs(dt,{children:[e.jsx(ut,{children:j("addAccountDialog.title",{displayName:n})}),e.jsx(Kt,{children:j(V?"addAccountDialog.descKiro":Pe?"addAccountDialog.descDeviceCode":"addAccountDialog.descOauth")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[X&&!ne&&e.jsx(Ma,{value:y,onChange:P=>{D(P),g(null)},disabled:se}),z&&S&&!ne&&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($t,{className:"h-3.5 w-3.5"}),j("addAccountDialog.powerUserEnabled")]}),j("addAccountDialog.powerUserSkipped")]}),W&&!ne&&e.jsx(it,{showAcknowledgement:!0,acknowledgementPhrase:Le,acknowledgementText:f,onAcknowledgementTextChange:P=>{F(P),g(null)},disabled:se}),V&&!ne&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(J,{htmlFor:"kiro-auth-method",children:j("addAccountDialog.authMethod")}),e.jsxs($e,{value:w,onValueChange:P=>{U(P),g(null)},children:[e.jsx(Qe,{id:"kiro-auth-method",children:e.jsx(Je,{placeholder:j("addAccountDialog.selectKiroAuthMethod")})}),e.jsx(We,{children:fs.map(P=>e.jsx(we,{value:P.id,children:P.label},P.id))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),pe&&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."]})]}),te&&!ne&&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(J,{htmlFor:"kiro-idc-start-url",children:"IDC Start URL"}),e.jsx(ce,{id:"kiro-idc-start-url",value:k,onChange:P=>{T(P.target.value),g(null)},placeholder:"https://d-xxx.awsapps.com/start",disabled:se}),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(J,{htmlFor:"kiro-idc-region",children:"IDC Region"}),e.jsx(ce,{id:"kiro-idc-region",value:q,onChange:P=>{G(P.target.value),g(null)},placeholder:"us-east-1",disabled:se}),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(J,{htmlFor:"kiro-idc-flow",children:"IDC Flow"}),e.jsxs($e,{value:C,onValueChange:P=>{I(P),g(null)},children:[e.jsx(Qe,{id:"kiro-idc-flow",children:e.jsx(Je,{placeholder:"Select IDC flow"})}),e.jsxs(We,{children:[e.jsx(we,{value:"authcode",children:"Authorization Code"}),e.jsx(we,{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."})]})]}),!ne&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(J,{htmlFor:"nickname",children:j("addAccountDialog.nicknameOptional")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ke,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(ce,{id:"nickname",value:c,onChange:P=>{u(P.target.value),g(null)},placeholder:j("addAccountDialog.nicknamePlaceholder"),disabled:se,className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:j("addAccountDialog.nicknameOptionalHint")})]}),ne&&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(ee,{className:"w-4 h-4 inline mr-2 animate-spin"}),j("addAccountDialog.waitingForAuth")]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:A.isDeviceCodeFlow?j("addAccountDialog.deviceCodeHint"):pe?"Complete sign-in in your browser. If it does not return automatically, paste the final kiro:// callback URL below.":j("addAccountDialog.browserHint")})]}),A.authUrl&&!A.isDeviceCodeFlow&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(J,{className:"text-xs",children:j("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:A.authUrl}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:He,children:v?e.jsxs(e.Fragment,{children:[e.jsx(ve,{className:"w-3 h-3 mr-1"}),j("addAccountDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(zt,{className:"w-3 h-3 mr-1"}),j("addAccountDialog.copy")]})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>{if(!A.authUrl)return;const P=window.open(A.authUrl,"_blank");(!P||P.closed||typeof P.closed>"u")&&H.warning(j("addAccountDialog.popupBlocked"),{duration:5e3})},children:[e.jsx(ge,{className:"w-3 h-3 mr-1"}),j("addAccountDialog.open")]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(J,{htmlFor:"callback-url",className:"text-xs",children:pe?"Browser did not return? Paste the final kiro:// callback URL:":j("addAccountDialog.redirectPasteLabel")}),e.jsx(ce,{id:"callback-url",value:r,onChange:P=>m(P.target.value),placeholder:pe?"kiro://kiro.kiroAgent/authenticate-success?code=...&state=...":j("addAccountDialog.callbackPlaceholder"),className:"font-mono text-xs"}),e.jsx(_,{variant:"secondary",size:"sm",onClick:L,disabled:!r.trim()||A.isSubmittingCallback,children:A.isSubmittingCallback?e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-3 h-3 mr-1 animate-spin"}),j("addAccountDialog.submitting")]}):j("addAccountDialog.submitCallback")})]})]}),!A.authUrl&&!A.isDeviceCodeFlow&&e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:pe?"Preparing the Kiro sign-in URL. If it does not open automatically, it will appear here shortly.":j("addAccountDialog.preparingUrl")})]}),De&&e.jsx("p",{className:"text-xs text-center text-destructive",children:De}),R.isPending&&e.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[e.jsx(ee,{className:"w-4 h-4 inline mr-2 animate-spin"}),j("addAccountDialog.importingToken")]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[e.jsx(_,{variant:"ghost",onClick:Ie,children:j("addAccountDialog.cancel")}),V&&!ne&&e.jsx(_,{variant:"outline",onClick:ae,disabled:se,children:R.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-4 h-4 mr-2 animate-spin"}),j("addAccountDialog.importing")]}):e.jsxs(e.Fragment,{children:[e.jsx(Xs,{className:"w-4 h-4 mr-2"}),j("addAccountDialog.importFromIde")]})}),!ne&&e.jsxs(_,{onClick:$,disabled:se||oe||X&&!Y||W&&!Z,children:[e.jsx(ge,{className:"w-4 h-4 mr-2"}),j("addAccountDialog.authenticate")]})]})]})]})})}const Ia=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"];function Ra(t){const s=t?.env||{};return Ia.filter(a=>!s[a]?.trim())}function Ea(t,s){const[a,n]=l.useState(null),[i,o]=l.useState(!1),c=rt(),{data:u,isLoading:r,refetch:m}=Rt({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`}}}),v=u?.settings,h=l.useMemo(()=>a!==null?a:v?JSON.stringify(v,null,2):`{
2
- "env": {}
3
- }`,[a,v]),N=l.useCallback(C=>{n(C)},[]),g=l.useMemo(()=>{try{return JSON.parse(h)}catch{return v||{env:{}}}},[h,v]),f=g?.env?.ANTHROPIC_MODEL,F=g?.env?.ANTHROPIC_DEFAULT_OPUS_MODEL,y=g?.env?.ANTHROPIC_DEFAULT_SONNET_MODEL,D=g?.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL,S=l.useMemo(()=>js(g?.env||{}),[g]),d=l.useCallback((C,I)=>bs(C,I,{supportsExtendedContext:j=>ha(t,j,s)}),[s,t]),b=l.useCallback((C,I)=>{const j={...g?.env||{},[C]:I},E=wt(C)?d(j,S):j;delete E.CCS_EXTENDED_CONTEXT;const M={...g,env:E};n(JSON.stringify(M,null,2))},[d,g,S]),x=l.useCallback(C=>{const I=g?.env||{},j=d(I,C);delete j.CCS_EXTENDED_CONTEXT;const E={...g,env:j};n(JSON.stringify(E,null,2))},[d,g]),w=l.useCallback(C=>{const I={...g?.env||{},...C},E=Object.keys(C).some(wt)?d(I,S):I;delete E.CCS_EXTENDED_CONTEXT;const M={...g,env:E};n(JSON.stringify(M,null,2))},[d,g,S]),U=l.useMemo(()=>{try{return JSON.parse(h),!0}catch{return!1}},[h]),k=l.useMemo(()=>a===null?!1:a!==JSON.stringify(v,null,2),[a,v]),T=l.useMemo(()=>Ra(g),[g]),q=is({mutationFn:async()=>{const C=JSON.parse(h),I=await fetch(`/api/settings/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:C,expectedMtime:u?.mtime})});if(I.status===409)throw new Error("CONFLICT");if(!I.ok)throw new Error("Failed to save");return I.json()},onSuccess:C=>{c.invalidateQueries({queryKey:["settings",t]}),n(null),C?.warning?H.success("Settings saved",{description:C.warning}):H.success("Settings saved")},onError:C=>{C.message==="CONFLICT"?o(!0):H.error(C.message)}}),G=async C=>{o(!1),C?(await m(),q.mutate()):n(null)};return{data:u,isLoading:r,refetch:m,rawJsonContent:h,rawJsonEdits:a,isRawJsonValid:U,hasChanges:k,currentSettings:g,currentModel:f,opusModel:F,sonnetModel:y,haikuModel:D,extendedContextEnabled:S,toggleExtendedContext:x,handleRawJsonChange:N,updateEnvValue:b,updateEnvValues:w,saveMutation:{mutate:()=>q.mutate(),isPending:q.isPending},conflictDialog:i,setConflictDialog:o,handleConflictResolve:G,missingRequiredFields:T}}const Oa=/-(medium|high|xhigh)$/i;function La(t){if(!t)return;const s=t.trim().match(Oa);if(s?.[1])return s[1].toLowerCase()}function _a(t){if(!t)return null;const s=La(t);return s?{label:`Pinned ${s}`,explicit:!0}:{label:"Auto effort",explicit:!1}}function Fa({label:t}){return e.jsx(B,{variant:"outline",className:"text-[9px] h-4 px-1",children:t})}function Ee({modelId:t}){const s=_a(t);return s?e.jsx(B,{variant:s.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:s.label}):null}function me({label:t,description:s,value:a,onChange:n,catalog:i,allModels:o,disabled:c}){const{t:u}=re(),r=i?.provider==="codex",m=l.useMemo(()=>ns(i,o),[o,i]),v=new Set(m.map(f=>f.id)),h=m.map(f=>({value:f.id,groupKey:"recommended",searchText:`${f.id} ${f.name}`,keywords:[f.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:f.id}),r&&e.jsx(Ee,{modelId:f.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:f.id}),f.tier==="paid"&&e.jsx(Fa,{label:u("providerModelSelector.paid")}),r&&e.jsx(Ee,{modelId:f.id})]})})),N=o.filter(f=>!v.has(f.id)).map(f=>({value:f.id,groupKey:"all",searchText:f.id,keywords:[f.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:f.id}),r&&e.jsx(Ee,{modelId:f.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:f.id}),r&&e.jsx(Ee,{modelId:f.id})]})})),g=h.length+N.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(oa,{value:a||void 0,onChange:n,disabled:c,placeholder:u("providerModelSelector.selectModel"),searchPlaceholder:u("searchableSelect.searchModels"),emptyText:u(g?"searchableSelect.noResults":"providerModelSelector.noModelsAvailable"),triggerClassName:"h-9",groups:[{key:"recommended",label:e.jsx("span",{className:"text-xs text-primary",children:u("providerModelSelector.recommended")})},{key:"all",label:e.jsx("span",{className:"text-xs text-muted-foreground",children:u("providerModelSelector.allModelsCount",{count:o.length})})}],options:[...h,...N]})]})}function Ua({open:t,onClose:s,currentValues:a,onApply:n,onSave:i,isSaving:o,catalog:c,allModels:u}){const{t:r}=re(),[m,v]=l.useState(a),[h,N]=l.useState(""),g=f=>{f?(v(a),N("")):s()};return e.jsx(lt,{open:t,onOpenChange:g,children:e.jsxs(ct,{className:"sm:max-w-md",children:[e.jsx(dt,{children:e.jsxs(ut,{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:"w-4 h-4"}),r("customPresetDialog.title")]})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(J,{htmlFor:"preset-name",children:r("customPresetDialog.presetNameOptional")}),e.jsx(ce,{id:"preset-name",value:h,onChange:f=>N(f.target.value),placeholder:r("customPresetDialog.presetNamePlaceholder"),className:"text-sm"})]}),e.jsx(vt,{}),c?.provider==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground rounded-md border bg-muted/30 px-2.5 py-2",children:[r("customPresetDialog.codexTipPrefix")," ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and"," ",e.jsx("code",{children:"-xhigh"})," ",r("customPresetDialog.codexTipSuffix")]}),e.jsx(me,{label:r("customPresetDialog.defaultModel"),description:r("customPresetDialog.defaultModelDesc"),value:m.default,onChange:f=>v({...m,default:f}),catalog:c,allModels:u}),e.jsx(me,{label:r("customPresetDialog.opusModel"),description:r("customPresetDialog.opusModelDesc"),value:m.opus,onChange:f=>v({...m,opus:f}),catalog:c,allModels:u}),e.jsx(me,{label:r("customPresetDialog.sonnetModel"),description:r("customPresetDialog.sonnetModelDesc"),value:m.sonnet,onChange:f=>v({...m,sonnet:f}),catalog:c,allModels:u}),e.jsx(me,{label:r("customPresetDialog.haikuModel"),description:r("customPresetDialog.haikuModelDesc"),value:m.haiku,onChange:f=>v({...m,haiku:f}),catalog:c,allModels:u})]}),e.jsxs(Ns,{className:"gap-2 sm:gap-0",children:[e.jsx(_,{variant:"outline",onClick:s,children:r("customPresetDialog.cancel")}),i&&e.jsxs(_,{variant:"secondary",onClick:()=>i(m,h||void 0),disabled:o||!h.trim(),children:[o?e.jsx(ee,{className:"w-4 h-4 mr-1 animate-spin"}):e.jsx(gt,{className:"w-4 h-4 mr-1"}),r("customPresetDialog.savePreset")]}),e.jsxs(_,{onClick:()=>n(m,h||void 0),children:[e.jsx(Ae,{className:"w-4 h-4 mr-1"}),r("customPresetDialog.applyPreset")]})]})]})})}function ue({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(Gt,{value:s,size:"icon",className:"h-6 w-6"})]})]})}function Ka({provider:t,displayName:s,defaultTarget:a,data:n,authStatus:i,supportsModelConfig:o=!1}){const c=a||"claude",u=c==="droid",r=t==="codex",m=c==="claude"?`ccs ${t}`:`ccs ${t} --target claude`,v=`${m} --config`,h=`${m} --auth --add`,N=`${m} --accounts`;return e.jsx(mt,{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(Qt,{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(Gt,{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(B,{variant:"outline",className:"w-fit text-green-600 border-green-200 bg-green-50",children:[e.jsx(Ys,{className:"w-3 h-3 mr-1"}),"Authenticated"]}):e.jsx(B,{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:c})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:"Quick Usage"}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsx(ue,{label:"Run with prompt",command:`ccs ${t} "your prompt"`}),r&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{label:"Run on native Codex (shortcut)",command:'ccsxp "your prompt"'}),e.jsx(ue,{label:"Run on native Codex (--target)",command:`ccs ${t} --target codex "your prompt"`})]}),e.jsx(ue,{label:u?"Droid alias (explicit)":"Run on Droid",command:`ccs-droid ${t} "your prompt"`}),e.jsx(ue,{label:u?"Override to Claude":"Run on Droid (--target)",command:`ccs ${t} --target ${u?"claude":"droid"} "your prompt"`}),o&&e.jsx(ue,{label:c==="claude"?"Change model":"Change model (Claude target)",command:v}),e.jsx(ue,{label:c==="claude"?"Add account":"Add account (Claude target)",command:h}),e.jsx(ue,{label:c==="claude"?"List accounts":"List accounts (Claude target)",command:N}),c!=="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 qa({displayName:t,logoProvider:s,provider:a,data:n,isLoading:i,hasChanges:o,isRawJsonValid:c,isSaving:u,isRemoteMode:r,port:m,onRefetch:v,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(pt,{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}),r&&e.jsxs(B,{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(Jt,{className:"w-3 h-3"}),"Remote"]}),m&&e.jsxs(B,{variant:"outline",className:"text-xs gap-1 font-mono",children:[e.jsx(Zs,{className:"w-3 h-3"}),":",m]}),!r&&n?.path&&e.jsx(B,{variant:"outline",className:"text-xs",children:n.path.replace(/^.*[\\/]/,"")})]}),r?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(_,{variant:"ghost",size:"sm",onClick:v,disabled:i,children:e.jsx(ht,{className:`w-4 h-4 ${i?"animate-spin":""}`})}),e.jsx(_,{size:"sm",onClick:h,disabled:u||!o||!c,children:u?e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ea,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function Ha({models:t,provider:s,enabled:a,onToggle:n,disabled:i,className:o}){if(t.length===0)return null;const c=t.some(m=>kt(m.id)),u=t.some(m=>!kt(m.id));let r="Compatible mappings stay on standard context unless you turn this on.";return c&&u?r="Gemini-compatible mappings can use 1M automatically. Claude mappings stay plain unless you turn this on.":c&&(r="Gemini-compatible mappings can use 1M by default. Turn this off to keep standard context."),e.jsxs("div",{className:Q("rounded-lg border p-3 space-y-2",a?"border-primary/50 bg-primary/5":"border-border bg-muted/30",o),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ae,{className:Q("w-4 h-4",a?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-sm font-medium",children:"Extended Context"}),e.jsx(B,{variant:a?"default":"secondary",className:"text-[10px] h-5 px-1.5",children:"1M tokens"})]}),e.jsx(Vt,{checked:a,onCheckedChange:n,disabled:i})]}),e.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(Qt,{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:r}),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 Ga(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 Va({catalog:t,savedPresets:s,currentModel:a,opusModel:n,sonnetModel:i,haikuModel:o,providerModels:c,provider:u,extendedContextEnabled:r,onExtendedContextToggle:m,onApplyPreset:v,onUpdateEnvValue:h,onOpenCustomPreset:N,onDeletePreset:g,isDeletePending:f}){const F=l.useMemo(()=>{if(!t)return[];const d=[a,n,i,o].filter(x=>!!x).map(x=>ys(x));return[...new Set(d)].map(x=>as(t.provider,x,t)).filter(x=>!!x?.extendedContext)},[t,a,n,i,o]),y=l.useMemo(()=>ns(t,c),[t,c]),D=l.useMemo(()=>{const d=y.filter(x=>x.presetMapping);return d.length===0?[]:d.some(x=>x.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:d.filter(x=>x.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:d.filter(x=>x.tier==="paid")}].filter(x=>x.models.length>0):[{key:"default",models:d.slice(0,4)}]},[y]),S=D.length>0||s.length>0;return e.jsxs(e.Fragment,{children:[S&&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:[D.map(d=>e.jsxs("div",{children:["label"in d&&d.label&&e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(B,{variant:"outline",className:d.badgeClassName,children:d.label}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:d.description})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:d.models.map(b=>e.jsxs(_,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>v(Ga(b)),children:[e.jsx(Ae,{className:`w-3 h-3 ${"iconClassName"in d?d.iconClassName:""}`}),b.name]},b.id))})]},d.key)),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.map(d=>e.jsxs("div",{className:"group relative",children:[e.jsxs(_,{variant:"secondary",size:"sm",className:"text-xs h-7 gap-1 pr-6",onClick:()=>{v({ANTHROPIC_MODEL:d.default,ANTHROPIC_DEFAULT_OPUS_MODEL:d.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:d.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:d.haiku})},children:[e.jsx(gt,{className:"w-3 h-3 fill-current"}),d.name]}),e.jsx(_,{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(),g(d.name)},disabled:f,children:e.jsx(ft,{className:"w-3 h-3"})})]},d.name)),e.jsxs(_,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1 border-primary/50 text-primary hover:bg-primary/10 hover:border-primary",onClick:N,children:[e.jsx(Wt,{className:"w-3 h-3"}),"Custom"]})]})]})]}),e.jsx(vt,{}),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"}),u==="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(me,{label:"Default Model",description:"Used when no specific tier is requested",value:a,onChange:d=>h("ANTHROPIC_MODEL",d),catalog:t,allModels:c}),F.length>0&&m&&e.jsx(Ha,{models:F,provider:u,enabled:r??!1,onToggle:m}),e.jsx(me,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:n,onChange:d=>h("ANTHROPIC_DEFAULT_OPUS_MODEL",d),catalog:t,allModels:c}),e.jsx(me,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:i,onChange:d=>h("ANTHROPIC_DEFAULT_SONNET_MODEL",d),catalog:t,allModels:c}),e.jsx(me,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:o,onChange:d=>h("ANTHROPIC_DEFAULT_HAIKU_MODEL",d),catalog:t,allModels:c})]})]})]})}function Ba(t,s){return t?e.jsx(Ye,{children:e.jsxs(Ze,{children:[e.jsx(et,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(sa,{className:"w-3 h-3","aria-hidden":"true"}),e.jsx("span",{className:Q("font-mono max-w-[180px] truncate",s&&ot),title:t,children:t})]})}),e.jsx(tt,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:"GCP Project ID (read-only)"})})]})}):e.jsx(Ye,{children:e.jsxs(Ze,{children:[e.jsx(et,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-500",children:[e.jsx(Fe,{className:"w-3 h-3","aria-label":"Warning"}),e.jsx("span",{children:"Project ID: N/A"})]})}),e.jsx(tt,{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 za({account:t,onSetDefault:s,onRemove:a,onPauseToggle:n,isRemoving:i,isPausingAccount:o,privacyMode:c,showQuota:u,selectable:r,selected:m,onSelectChange:v}){const h=t.provider.toLowerCase(),{data:N}=ws(u),{data:g,isLoading:f}=ks(h,t.id,u),F=Cs(N,t)?.lastUsedAt,y=r||n?e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[r&&e.jsx("button",{type:"button",onClick:()=>v?.(!m),className:Q("flex items-center justify-center w-5 h-5 rounded border-2 transition-colors shrink-0",m?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),"aria-label":m?"Deselect account":"Select account",children:m&&e.jsx(ve,{className:"w-3 h-3"})}),n&&e.jsx(Ye,{children:e.jsxs(Ze,{children:[e.jsx(et,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>n(!t.paused),disabled:o,children:o?e.jsx(ee,{className:"w-4 h-4 animate-spin"}):t.paused?e.jsx(Xt,{className:"w-4 h-4 text-emerald-500"}):e.jsx(Yt,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(tt,{side:"top",children:t.paused?"Resume account":"Pause account"})]})})]}):void 0,D=e.jsxs(As,{children:[e.jsx(Ss,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:e.jsx(ta,{className:"w-4 h-4"})})}),e.jsxs(Ps,{align:"end",children:[!t.isDefault&&e.jsxs(Ct,{onClick:s,children:[e.jsx(gt,{className:"w-4 h-4 mr-2"}),"Set as default"]}),e.jsxs(Ct,{className:"text-destructive focus:text-destructive",onClick:a,disabled:i,children:[e.jsx(Zt,{className:"w-4 h-4 mr-2"}),i?"Removing...":"Remove account"]})]})]});return e.jsx("div",{className:Q("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",m&&"ring-2 ring-primary/50 bg-primary/5"),children:e.jsx(Ms,{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:c,showQuota:u,quota:g,quotaLoading:f,runtimeLastUsed:F,beforeIdentity:y,headerEnd:D,bodySlot:t.provider==="agy"?Ba(t.projectId,c):null,quotaInsetClassName:"pl-11"})})}function $a({selectedCount:t,onPauseSelected:s,onResumeSelected:a,onClearSelection:n,isPausing:i,isResuming:o}){if(t<1)return null;const c=i||o;return e.jsxs("div",{className:"flex items-center gap-3 p-2 bg-muted/50 rounded-lg border mt-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[t," selected"]}),e.jsx(_,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:n,disabled:c,children:"Clear"}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(_,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:s,disabled:c,children:[i?e.jsx(ee,{className:"w-3 h-3 animate-spin"}):e.jsx(Yt,{className:"w-3 h-3"}),"Pause Selected"]}),e.jsxs(_,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:a,disabled:c,children:[o?e.jsx(ee,{className:"w-3 h-3 animate-spin"}):e.jsx(Xt,{className:"w-3 h-3"}),"Resume Selected"]})]})]})}function Qa({accounts:t,onAddAccount:s,onSetDefault:a,onRemoveAccount:n,onPauseToggle:i,onSoloMode:o,onBulkPause:c,onBulkResume:u,isRemovingAccount:r,isPausingAccount:m,isSoloingAccount:v,isBulkPausing:h,isBulkResuming:N,privacyMode:g,showQuota:f,isKiro:F,kiroNoIncognito:y,onKiroNoIncognitoChange:D,kiroSettingsLoading:S}){const[d,b]=l.useState(new Set),x=l.useMemo(()=>new Set(t.map(O=>O.id)),[t]),w=l.useMemo(()=>new Set([...d].filter(O=>x.has(O))),[d,x]),U=!!(c&&u),k=w.size,T=t.length>0&&w.size===t.length,q=w.size>0&&w.size<t.length,G=l.useCallback(O=>{b(A=>{const R=new Set(A);return R.has(O)?R.delete(O):R.add(O),R})},[]),C=l.useCallback(()=>{b(new Set(t.map(O=>O.id)))},[t]),I=l.useCallback(()=>{b(new Set)},[]),j=l.useCallback(()=>{T?I():C()},[T,C,I]),E=l.useCallback(()=>{c&&w.size>0&&(c(Array.from(w)),b(new Set))},[c,w]),M=l.useCallback(()=>{u&&w.size>0&&(u(Array.from(w)),b(new Set))},[u,w]);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[U&&t.length>0&&e.jsx(_e,{checked:T,onCheckedChange:j,"aria-label":"Select all accounts",className:q?"data-[state=checked]:bg-primary/50":"",...q?{"data-state":"indeterminate"}:{}}),e.jsx(ke,{className:"w-4 h-4"}),"Accounts",t.length>0&&e.jsx(B,{variant:"secondary",className:"text-xs",children:t.length})]}),e.jsxs(_,{variant:"default",size:"sm",className:"h-7 text-xs gap-1",onClick:s,children:[e.jsx(Wt,{className:"w-3 h-3"}),"Add"]})]}),U&&k>0&&e.jsx($a,{selectedCount:k,onPauseSelected:E,onResumeSelected:M,onClearSelection:I,isPausing:!!h,isResuming:!!N}),t.length>0?e.jsx("div",{className:"space-y-2",children:t.map(O=>e.jsx(za,{account:O,onSetDefault:()=>a(O.id),onRemove:()=>n(O.id),onPauseToggle:i?A=>i(O.id,A):void 0,onSoloMode:o?()=>o(O.id):void 0,isRemoving:r,isPausingAccount:m,isSoloingAccount:v,privacyMode:g,showQuota:f,selectable:U,selected:w.has(O.id),onSelectChange:()=>G(O.id)},O.id))}):e.jsxs("div",{className:"py-6 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed",children:[e.jsx(ke,{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"})]}),F&&D&&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(Jt,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Use incognito"})]}),e.jsx(Vt,{checked:!y,onCheckedChange:O=>D(!O),disabled:S,className:"scale-90"})]})})]})}function Ja({provider:t,catalog:s,savedPresets:a,currentModel:n,opusModel:i,sonnetModel:o,haikuModel:c,providerModels:u,extendedContextEnabled:r,onExtendedContextToggle:m,onApplyPreset:v,onUpdateEnvValue:h,onOpenCustomPreset:N,onDeletePreset:g,isDeletePending:f,accounts:F,onAddAccount:y,onSetDefault:D,onRemoveAccount:S,onPauseToggle:d,onSoloMode:b,onBulkPause:x,onBulkResume:w,isRemovingAccount:U,isPausingAccount:k,isSoloingAccount:T,isBulkPausing:q,isBulkResuming:G,privacyMode:C,isRemoteMode:I}){const j=t.toLowerCase(),E=(Ds.includes(j)||["anthropic","antigravity","gemini-cli","copilot","github-copilot"].includes(j))&&!I,M=t==="kiro",[O,A]=l.useState(!0),[R,V]=l.useState(!0),[z,W]=l.useState(!1),X=l.useCallback(async()=>{if(M)try{V(!0);const Z=(await Oe.config.get()).cliproxy;A(Z?.kiro_no_incognito??!0)}catch{A(!0)}finally{V(!1)}},[M]),oe=l.useCallback(async Y=>{A(Y),W(!0);try{const Z=await Oe.config.get(),p=Z.cliproxy??{};await Oe.config.update({...Z,cliproxy:{...p,kiro_no_incognito:Y}})}catch{A(!Y)}finally{W(!1)}},[]);return l.useEffect(()=>{X()},[X]),e.jsx(mt,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsx(Va,{catalog:s,savedPresets:a,currentModel:n,opusModel:i,sonnetModel:o,haikuModel:c,providerModels:u,provider:t,extendedContextEnabled:r,onExtendedContextToggle:m,onApplyPreset:v,onUpdateEnvValue:h,onOpenCustomPreset:N,onDeletePreset:g,isDeletePending:f}),e.jsx(vt,{}),e.jsx(Qa,{accounts:F,onAddAccount:y,onSetDefault:D,onRemoveAccount:S,onPauseToggle:d,onSoloMode:b,onBulkPause:x,onBulkResume:w,isRemovingAccount:U,isPausingAccount:k,isSoloingAccount:T,isBulkPausing:q,isBulkResuming:G,privacyMode:C,showQuota:E,isKiro:M,kiroNoIncognito:O,onKiroNoIncognitoChange:oe,kiroSettingsLoading:R||z})]})})}function It({provider:t,displayName:s,authStatus:a,catalog:n,logoProvider:i,baseProvider:o,isRemoteMode:c,port:u,defaultTarget:r,topNotice:m,onAddAccount:v,onSetDefault:h,onRemoveAccount:N,onPauseToggle:g,onSoloMode:f,onBulkPause:F,onBulkResume:y,isRemovingAccount:D,isPausingAccount:S,isSoloingAccount:d,isBulkPausing:b,isBulkResuming:x}){const[w,U]=l.useState(!1),{privacyMode:k}=Ut(),{data:T}=Ts(),{data:q}=Is(t),G=Rs(),C=Es(),I=o||t,j=I.toLowerCase()==="agy",E=l.useMemo(()=>{const L=q?.presets||[];return j?L.filter($=>!ie($.default)&&!ie($.opus)&&!ie($.sonnet)&&!ie($.haiku)):L},[j,q?.presets]),M=l.useMemo(()=>{if(!T?.models)return[];const $={gemini:["google"],agy:["antigravity"],codex:["openai"],qwen:["alibaba","qwen"],iflow:["iflow"],kiro:["kiro","aws"],ghcp:["github","copilot"],kimi:["kimi","moonshot"]}[I.toLowerCase()]||[I.toLowerCase()];return T.models.filter(ae=>$.some(ye=>ae.owned_by.toLowerCase().includes(ye))?j?!ie(ae.id):!0:!1)},[j,T,I]),O=(o||t).toLowerCase(),{data:A,isLoading:R,refetch:V,rawJsonContent:z,rawJsonEdits:W,isRawJsonValid:X,hasChanges:oe,currentModel:Y,opusModel:Z,sonnetModel:p,haikuModel:K,extendedContextEnabled:te,toggleExtendedContext:pe,handleRawJsonChange:Se,updateEnvValue:Ke,updateEnvValues:Pe,saveMutation:se,conflictDialog:qe,handleConflictResolve:be,missingRequiredFields:Me}=Ea(t,n),De=l.useMemo(()=>(a.accounts||[]).map(L=>({...L,provider:L.provider||o||t})),[a.accounts,o,t]),{data:Te}=Rt({queryKey:["auth-tokens-raw"],queryFn:async()=>{const L=await fetch("/api/settings/auth/tokens/raw");return L.ok?L.json():{apiKey:{value:"ccs-internal-managed"}}},staleTime:6e4}),xe=Te?.apiKey?.value??"ccs-internal-managed",Ne=L=>{if(j&&[L.ANTHROPIC_MODEL,L.ANTHROPIC_DEFAULT_OPUS_MODEL,L.ANTHROPIC_DEFAULT_SONNET_MODEL,L.ANTHROPIC_DEFAULT_HAIKU_MODEL].some(ae=>typeof ae=="string"&&ie(ae))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}Pe({ANTHROPIC_BASE_URL:`http://127.0.0.1:${u??st}/api/provider/${O}`,ANTHROPIC_AUTH_TOKEN:xe,...L}),H.success(`Applied "${L.ANTHROPIC_MODEL?.split("/").pop()||"preset"}" preset`)},Ie=(L,$)=>{if(j&&[L.default,L.opus,L.sonnet,L.haiku].some(ye=>ie(ye))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}Pe({ANTHROPIC_BASE_URL:`http://127.0.0.1:${u??st}/api/provider/${O}`,ANTHROPIC_AUTH_TOKEN:xe,ANTHROPIC_MODEL:L.default,ANTHROPIC_DEFAULT_OPUS_MODEL:L.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:L.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:L.haiku}),H.success(`Applied ${$?`"${$}"`:"custom"} preset`),U(!1)},He=(L,$)=>{if(!$){H.error(qt.t("commonToast.enterPresetName"));return}if(j&&[L.default,L.opus,L.sonnet,L.haiku].some(ae=>ie(ae))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}G.mutate({profile:t,data:{name:$,...L}}),U(!1)};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(qa,{provider:t,displayName:s,logoProvider:i,data:A,isLoading:R,hasChanges:oe,isRawJsonValid:X,isSaving:se.isPending,isRemoteMode:c,port:u,onRefetch:V,onSave:()=>se.mutate()}),m?e.jsx("div",{className:"border-b bg-muted/10 px-4 py-3",children:m}):null,R?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(ee,{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(Os,{defaultValue:"config",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(Ls,{className:"w-full",children:[e.jsx(At,{value:"config",className:"flex-1",children:"Model Config"}),e.jsx(At,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsx(St,{value:"config",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(Ja,{provider:t,catalog:n,savedPresets:E,currentModel:Y,opusModel:Z,sonnetModel:p,haikuModel:K,providerModels:M,extendedContextEnabled:te,onExtendedContextToggle:pe,onApplyPreset:Ne,onUpdateEnvValue:Ke,onOpenCustomPreset:()=>U(!0),onDeletePreset:L=>C.mutate({profile:t,name:L}),isDeletePending:C.isPending,accounts:De,onAddAccount:v,onSetDefault:h,onRemoveAccount:N,onPauseToggle:g,onSoloMode:f,onBulkPause:F,onBulkResume:y,isRemovingAccount:D,isPausingAccount:S,isSoloingAccount:d,isBulkPausing:b,isBulkResuming:x,privacyMode:k,isRemoteMode:c})}),e.jsx(St,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(Ka,{provider:t,displayName:s,defaultTarget:r,data:A,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(aa,{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(_s,{rawJsonContent:z,isRawJsonValid:X,rawJsonEdits:W,onRawJsonChange:Se,profileEnv:A?.settings?.env,missingRequiredFields:Me})]})]}),e.jsx(ra,{open:qe,title:"File Modified Externally",description:"This settings file was modified by another process. Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>be(!0),onCancel:()=>be(!1)}),e.jsx(Ua,{open:w,onClose:()=>U(!1),currentValues:{default:Y||"",opus:Z||"",sonnet:p||"",haiku:K||""},onApply:Ie,onSave:He,isSaving:G.isPending,catalog:n,allModels:M})]})}function Wa({status:t,isSelected:s,onSelect:a}){const{t:n}=re(),i=t.accounts?.length||0;return e.jsxs("button",{className:Q("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(pt,{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(B,{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(ve,{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(ft,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:n("cliproxyPage.notConnected")})]})})]})]})}function Xa({variant:t,parentAuth:s,isSelected:a,onSelect:n,onDelete:i,isDeleting:o}){const{t:c}=re(),u=()=>{n()};return e.jsxs("div",{role:"button",tabIndex:0,className:Q("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:u,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),u())},children:[e.jsxs("div",{className:"relative",children:[e.jsx(pt,{provider:t.provider,size:"sm"}),e.jsx(es,{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(B,{variant:"outline",className:"text-[9px] h-4 px-1",children:c("cliproxyPage.variant")}),e.jsx(B,{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(ve,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:c("cliproxyPage.viaProvider",{provider:t.provider})})]}):e.jsxs(e.Fragment,{children:[e.jsx(ft,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:c("cliproxyPage.parentNotConnected")})]})})]}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:r=>{r.stopPropagation(),i()},disabled:o,children:e.jsx(Zt,{className:"w-3 h-3"})})]})}function Ya({onSetup:t}){const{t:s}=re();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(Ae,{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(_,{onClick:t,className:"gap-2",children:[e.jsx(Ce,{className:"w-4 h-4"}),s("cliproxyPage.quickSetup")]})]})})}function fn(){const{t}=re(),s=rt(),{data:a,isLoading:n}=_t(),{data:i,isFetching:o}=Fs(),{data:c}=Ft(),{data:u}=Us(),r=Ks(),m=qs(),v=Hs(),h=Gs(),N=Vs(),g=Bs(),f=zs(),F=$s(),[y,D]=l.useState(()=>{if(typeof window<"u"){const K=new URLSearchParams(window.location.search).get("provider")?.trim().toLowerCase();return K&&Xe(K)?K:localStorage.getItem("cliproxy-selected-provider")}return null}),[S,d]=l.useState(null),[b,x]=l.useState(!1),[w,U]=l.useState(()=>{if(typeof window>"u")return null;const p=new URLSearchParams(window.location.search),K=p.get("provider")?.trim().toLowerCase();return p.get("action")!=="auth"||!K||!Xe(K)?null:{provider:K,displayName:Qs(K),isFirstAccount:!1}}),k=l.useMemo(()=>a?.authStatus||[],[a?.authStatus]),T=a?.source==="remote",q=l.useMemo(()=>i?.variants||[],[i?.variants]),G=l.useMemo(()=>jt(c?.catalogs),[c?.catalogs]),C=!!c,I=p=>{D(p),p&&localStorage.setItem("cliproxy-selected-provider",p)},j=l.useMemo(()=>S?null:y&&k.some(p=>p.provider===y)?y:k.length>0&&(k.find(K=>(K.accounts?.length||0)>0)?.provider||k[0]?.provider)||null,[y,S,k]),E=k.find(p=>p.provider===j),M=q.find(p=>p.name===S),O=M?k.find(p=>p.provider===M.provider):void 0,A=(M?.provider||E?.provider||"").toLowerCase().trim(),R=A==="gemini"||A==="agy",V=()=>{s.invalidateQueries({queryKey:["cliproxy"]}),s.invalidateQueries({queryKey:["cliproxy-auth"]}),s.invalidateQueries({queryKey:["cliproxy-catalog"]})},z=(p,K,te)=>{v.isPending||h.isPending||(te?v.mutate({provider:p,accountId:K}):h.mutate({provider:p,accountId:K}))},W=(p,K)=>{N.isPending||N.mutate({provider:p,accountId:K})},X=(p,K)=>{g.isPending||g.mutate({provider:p,accountIds:K})},oe=(p,K)=>{f.isPending||f.mutate({provider:p,accountIds:K})},Y=p=>{I(p),d(null)},Z=p=>{d(p),I(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(Ae,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:u?.backendLabel??"CLIProxy"})]}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:V,disabled:o,children:e.jsx(ht,{className:Q("w-4 h-4",o&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:t("cliproxyPage.accountManagement")}),e.jsxs(_,{variant:"default",size:"sm",className:"w-full gap-2",onClick:()=>x(!0),children:[e.jsx(Ce,{className:"w-4 h-4"}),t("cliproxyPage.quickSetup")]})]}),e.jsx(mt,{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(p=>e.jsx(Js,{className:"h-14 w-full rounded-lg"},p))}):e.jsx("div",{className:"space-y-1",children:k.map(p=>e.jsx(Wa,{status:p,isSelected:j===p.provider,onSelect:()=>Y(p.provider)},p.provider))}),q.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(es,{className:"w-3 h-3"}),t("cliproxyPage.variants")]}),e.jsx("div",{className:"space-y-1",children:q.map(p=>e.jsx(Xa,{variant:p,parentAuth:k.find(K=>K.provider===p.provider),isSelected:S===p.name,onSelect:()=>Z(p.name),onDelete:()=>F.mutate(p.name),isDeleting:F.isPending},p.name))})]})]})}),e.jsx("div",{className:"p-3 border-t",children:e.jsx(la,{})}),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:k.length})}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ve,{className:"w-3 h-3 text-green-600"}),t("cliproxyPage.connectedCount",{count:k.filter(p=>p.authenticated).length})]})]})})]}),e.jsx("div",{className:"flex-1 flex min-w-0 flex-col overflow-hidden bg-background",children:M&&O?e.jsx(e.Fragment,{children:e.jsx(It,{provider:M.name,displayName:t("cliproxyPage.variantDisplay",{name:M.name,provider:M.provider}),authStatus:O,catalog:G[M.provider],logoProvider:M.provider,baseProvider:M.provider,defaultTarget:M.target,isRemoteMode:T,port:M.port,topNotice:R?e.jsx(it,{compact:!0,showProxySettingsLink:!0}):void 0,onAddAccount:()=>U({provider:M.provider,displayName:O.displayName,isFirstAccount:(O.accounts?.length||0)===0}),onSetDefault:p=>r.mutate({provider:M.provider,accountId:p}),onRemoveAccount:p=>m.mutate({provider:M.provider,accountId:p}),onPauseToggle:(p,K)=>z(M.provider,p,K),onSoloMode:p=>W(M.provider,p),onBulkPause:p=>X(M.provider,p),onBulkResume:p=>oe(M.provider,p),isRemovingAccount:m.isPending,isPausingAccount:v.isPending||h.isPending,isSoloingAccount:N.isPending,isBulkPausing:g.isPending,isBulkResuming:f.isPending})}):E?e.jsx(e.Fragment,{children:e.jsx(It,{provider:E.provider,displayName:E.displayName,authStatus:E,catalog:G[E.provider],isRemoteMode:T,topNotice:R?e.jsx(it,{compact:!0,showProxySettingsLink:!0}):void 0,onAddAccount:()=>U({provider:E.provider,displayName:E.displayName,isFirstAccount:(E.accounts?.length||0)===0}),onSetDefault:p=>r.mutate({provider:E.provider,accountId:p}),onRemoveAccount:p=>m.mutate({provider:E.provider,accountId:p}),onPauseToggle:(p,K)=>z(E.provider,p,K),onSoloMode:p=>W(E.provider,p),onBulkPause:p=>X(E.provider,p),onBulkResume:p=>oe(E.provider,p),isRemovingAccount:m.isPending,isPausingAccount:v.isPending||h.isPending,isSoloingAccount:N.isPending,isBulkPausing:g.isPending,isBulkResuming:f.isPending})}):e.jsx(Ya,{onSetup:()=>x(!0)})}),e.jsx(ka,{open:b,onClose:()=>x(!1)}),e.jsx(Ta,{open:w!==null,onClose:()=>U(null),provider:w?.provider||"",displayName:w?.displayName||"",catalog:C&&w?.provider?G[w.provider]:void 0,isFirstAccount:w?.isFirstAccount||!1})]})}export{fn 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,o,c)=>c?c.toUpperCase():o.toLowerCase()),s=t=>{const e=_(t);return e.charAt(0).toUpperCase()+e.slice(1)},k=(...t)=>t.filter((e,o,c)=>!!e&&e.trim()!==""&&c.indexOf(e)===o).join(" ").trim(),v=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var m={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:o=2,absoluteStrokeWidth:c,className:n="",children:h,iconNode:p,...y},r)=>d.createElement("svg",{ref:r,...m,width:e,height:e,stroke:t,strokeWidth:c?Number(o)*24/Number(e):o,className:k("lucide",n),...!h&&!v(y)&&{"aria-hidden":"true"},...y},[...p.map(([i,l])=>d.createElement(i,l)),...Array.isArray(h)?h:[h]]));const a=(t,e)=>{const o=d.forwardRef(({className:c,...n},h)=>d.createElement(x,{ref:h,iconNode:e,className:k(`lucide-${M(s(t))}`,`lucide-${t}`,c),...n}));return o.displayName=s(t),o};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"}]],K2=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"}]],X2=a("archive",f);const w=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],Q2=a("arrow-down-left",w);const $=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],J2=a("arrow-down-right",$);const N=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Y2=a("arrow-down",N);const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],a0=a("arrow-left",u);const b=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],e0=a("arrow-right-left",b);const z=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],t0=a("arrow-right",z);const q=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],o0=a("arrow-up-right",q);const C=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],c0=a("arrow-up",C);const A=[["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"}]],h0=a("book-open",A);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"}]],d0=a("bot",j);const H=[["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"}]],n0=a("box",H);const L=[["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"}]],y0=a("brain-circuit",L);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"}]],s0=a("brain",V);const S=[["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"}]],k0=a("bug",S);const P=[["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"}]],p0=a("calendar-clock",P);const F=[["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"}]],r0=a("calendar",F);const R=[["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"}]],i0=a("chart-column",R);const B=[["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"}]],l0=a("chart-pie",B);const U=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],M0=a("check-check",U);const Z=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_0=a("check",Z);const D=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],v0=a("chevron-down",D);const E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],m0=a("chevron-left",E);const T=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],x0=a("chevron-right",T);const W=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],g0=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"}]],f0=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"}]],w0=a("circle-alert",G);const I=[["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",I);const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],N0=a("circle-check",K);const X=[["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"}]],u0=a("circle-question-mark",X);const Q=[["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"}]],b0=a("circle-x",Q);const J=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],z0=a("circle",J);const Y=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],q0=a("clock",Y);const a1=[["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"}]],C0=a("cloud-cog",a1);const e1=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],A0=a("cloud",e1);const t1=[["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"}]],j0=a("code-xml",t1);const o1=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],H0=a("code",o1);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"}]],L0=a("coins",c1);const h1=[["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"}]],V0=a("command",h1);const d1=[["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"}]],S0=a("copy",d1);const n1=[["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"}]],P0=a("cpu",n1);const y1=[["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"}]],F0=a("database",y1);const s1=[["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"}]],R0=a("dollar-sign",s1);const k1=[["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"}]],B0=a("download",k1);const p1=[["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"}]],U0=a("ellipsis",p1);const r1=[["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"}]],Z0=a("external-link",r1);const i1=[["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"}]],D0=a("eye-off",i1);const l1=[["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"}]],E0=a("eye",l1);const M1=[["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"}]],T0=a("file-braces-corner",M1);const _1=[["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"}]],W0=a("file-braces",_1);const v1=[["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"}]],O0=a("file-code-corner",v1);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"}]],G0=a("file-code",m1);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:"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"}]],I0=a("file-down",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:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],K0=a("file-exclamation-point",g1);const f1=[["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"}]],X0=a("file-text",f1);const w1=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],Q0=a("fingerprint-pattern",w1);const $1=[["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"}]],J0=a("folder-check",$1);const N1=[["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"}]],Y0=a("folder-code",N1);const u1=[["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"}]],aa=a("folder-open",u1);const b1=[["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"}]],ea=a("folder",b1);const z1=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],ta=a("funnel",z1);const q1=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],oa=a("gauge",q1);const C1=[["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"}]],ca=a("git-branch",C1);const A1=[["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"}]],ha=a("github",A1);const j1=[["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"}]],da=a("globe",j1);const H1=[["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"}]],na=a("grip-horizontal",H1);const L1=[["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"}]],ya=a("grip-vertical",L1);const V1=[["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"}]],sa=a("heart",V1);const S1=[["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"}]],ka=a("history",S1);const P1=[["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"}]],pa=a("house",P1);const F1=[["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"}]],ra=a("image",F1);const R1=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],ia=a("inbox",R1);const B1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],la=a("info",B1);const U1=[["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"}]],Ma=a("key-round",U1);const Z1=[["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"}]],_a=a("key",Z1);const D1=[["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"}]],va=a("laptop",D1);const E1=[["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"}]],ma=a("layers",E1);const T1=[["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"}]],xa=a("link-2",T1);const W1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],ga=a("list-filter",W1);const O1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=a("loader-circle",O1);const G1=[["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"}]],wa=a("lock",G1);const I1=[["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"}]],$a=a("log-out",I1);const K1=[["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"}]],Na=a("megaphone",K1);const X1=[["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"}]],ua=a("message-square",X1);const Q1=[["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"}]],ba=a("monitor-smartphone",Q1);const J1=[["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"}]],za=a("monitor",J1);const Y1=[["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"}]],qa=a("moon",Y1);const a2=[["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"}]],Ca=a("network",a2);const e2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Aa=a("panel-left",e2);const t2=[["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"}]],ja=a("pause",t2);const o2=[["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"}]],Ha=a("pen-line",o2);const c2=[["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"}]],La=a("pencil",c2);const h2=[["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"}]],Va=a("play",h2);const d2=[["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"}]],Sa=a("plug-zap",d2);const n2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Pa=a("plus",n2);const y2=[["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"}]],Fa=a("power-off",y2);const s2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Ra=a("power",s2);const k2=[["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"}]],Ba=a("puzzle",k2);const p2=[["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"}]],Ua=a("radio",p2);const r2=[["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"}]],Za=a("refresh-cw",r2);const i2=[["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"}]],Da=a("rotate-ccw",i2);const l2=[["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"}]],Ea=a("rotate-cw",l2);const M2=[["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"}]],Ta=a("route",M2);const _2=[["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"}]],Wa=a("save",_2);const v2=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Oa=a("scroll-text",v2);const m2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ga=a("search",m2);const x2=[["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"}]],Ia=a("server",x2);const g2=[["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"}]],Ka=a("settings-2",g2);const f2=[["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"}]],Xa=a("settings",f2);const w2=[["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"}]],Qa=a("shield-alert",w2);const $2=[["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"}]],Ja=a("shield-check",$2);const N2=[["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"}]],Ya=a("shield",N2);const u2=[["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"}]],ae=a("sliders-horizontal",u2);const b2=[["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"}]],ee=a("sparkles",b2);const z2=[["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"}]],te=a("square-terminal",z2);const q2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],oe=a("square",q2);const C2=[["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"}]],ce=a("star",C2);const A2=[["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"}]],he=a("sun",A2);const j2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],de=a("terminal",j2);const H2=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],ne=a("timer-reset",H2);const L2=[["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"}]],ye=a("trash-2",L2);const V2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],se=a("trending-up",V2);const S2=[["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"}]],ke=a("triangle-alert",S2);const P2=[["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"}]],pe=a("unlink",P2);const F2=[["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"}]],re=a("upload",F2);const R2=[["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"}]],ie=a("user",R2);const B2=[["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"}]],le=a("users",B2);const U2=[["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"}]],Me=a("wand-sparkles",U2);const Z2=[["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"}]],_e=a("waves",Z2);const D2=[["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"}]],ve=a("wifi-off",D2);const E2=[["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"}]],me=a("wifi",E2);const T2=[["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"}]],xe=a("workflow",T2);const W2=[["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"}]],ge=a("wrench",W2);const O2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fe=a("x",O2);const G2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],we=a("zap",G2);export{de as $,K2 as A,h0 as B,x0 as C,ja as D,D0 as E,aa as F,oa as G,pa as H,b0 as I,Va as J,_a as K,fa as L,qa as M,ya as N,ga as O,Aa as P,Da as Q,Za as R,te as S,ke as T,le as U,Ua as V,ve as W,fe as X,P0 as Y,we as Z,la as _,i0 as a,xa as a$,H0 as a0,o0 as a1,Q2 as a2,X0 as a3,K0 as a4,na as a5,t0 as a6,Ka as a7,ra as a8,Pa as a9,W0 as aA,B0 as aB,a0 as aC,Qa as aD,Ca as aE,U0 as aF,Y0 as aG,ca as aH,xe as aI,Ta as aJ,T0 as aK,Ra as aL,Fa as aM,f0 as aN,Sa as aO,ma as aP,J0 as aQ,Ha as aR,ka as aS,O0 as aT,ea as aU,y0 as aV,Q0 as aW,ia as aX,ta as aY,ne as aZ,pe as a_,ee as aa,ua as ab,s0 as ac,Ia as ad,X2 as ae,G0 as af,m0 as ag,Ja as ah,ba as ai,wa as aj,V0 as ak,R0 as al,F0 as am,J2 as an,r0 as ao,L0 as ap,se as aq,l0 as ar,ye as as,Wa as at,Ga as au,Me as av,j0 as aw,ae as ax,C0 as ay,re as az,ha as b,_e as b0,La as b1,M0 as b2,ge as b3,za as b4,d0 as b5,p0 as b6,Na as b7,A0 as b8,va as b9,n0 as ba,k0 as bb,e0 as bc,I0 as bd,Ea as be,oe as bf,Y2 as bg,c0 as bh,Ba as c,Oa as d,Xa as e,he as f,E0 as g,me as h,Ya as i,sa as j,$0 as k,z0 as l,_0 as m,Ma as n,S0 as o,Z0 as p,ie as q,$a as r,v0 as s,g0 as t,da as u,q0 as v,w0 as w,N0 as x,u0 as y,ce as z};