(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(52679),r=t(43666);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,g]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{}),x(),v(),m(),b()},[]);let x=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},S=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:g}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:S(),hasActiveProviders:S().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>g(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},31760:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,6069,8441,3794,7358],()=>e(e.s=31760)),_N_E=e.O()}]);