@amir83nasr/10router 0.1.3 → 0.1.5
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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +7 -7
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/media-providers/systemone/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/media-providers/systemone/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +5 -5
- package/.next/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/cli-tools/all-statuses/route.js +1 -1
- package/.next/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/.next/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/dsh-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/.next/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/.next/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/.next/server/app/api/providers/client/route.js +1 -1
- package/.next/server/app/api/translator/send/route.js +1 -1
- package/.next/server/app/api/translator/translate/route.js +1 -1
- package/.next/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/.next/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/.next/server/app/api/v1/systemone/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/.next/server/app/callback.html +1 -1
- package/.next/server/app/callback.rsc +5 -5
- package/.next/server/app/callback.segments/_full.segment.rsc +5 -5
- package/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/dashboard/basic-chat.html +1 -1
- package/.next/server/app/dashboard/basic-chat.rsc +7 -7
- package/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/cli-tools.html +1 -1
- package/.next/server/app/dashboard/cli-tools.rsc +8 -8
- package/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/combos.html +1 -1
- package/.next/server/app/dashboard/combos.rsc +7 -7
- package/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/endpoint.html +1 -1
- package/.next/server/app/dashboard/endpoint.rsc +8 -8
- package/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/media-providers/systemone.html +1 -1
- package/.next/server/app/dashboard/media-providers/systemone.rsc +7 -7
- package/.next/server/app/dashboard/media-providers/systemone.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/systemone/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/media-providers/systemone.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/media-providers/systemone.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/profile.html +1 -1
- package/.next/server/app/dashboard/profile.rsc +7 -7
- package/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/providers/new.html +1 -1
- package/.next/server/app/dashboard/providers/new.rsc +7 -7
- package/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/providers.html +1 -1
- package/.next/server/app/dashboard/providers.rsc +7 -7
- package/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/proxy-pools.html +1 -1
- package/.next/server/app/dashboard/proxy-pools.rsc +7 -7
- package/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/pxpipe.html +1 -1
- package/.next/server/app/dashboard/pxpipe.rsc +6 -6
- package/.next/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/.next/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/quota.html +2 -2
- package/.next/server/app/dashboard/quota.rsc +8 -8
- package/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/.next/server/app/dashboard/settings/pricing.rsc +5 -5
- package/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/dashboard/token-saver.html +1 -1
- package/.next/server/app/dashboard/token-saver.rsc +6 -6
- package/.next/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/.next/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard/usage.html +2 -2
- package/.next/server/app/dashboard/usage.rsc +7 -7
- package/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard.html +1 -1
- package/.next/server/app/dashboard.rsc +8 -8
- package/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +5 -5
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/.next/server/app/landing.html +1 -1
- package/.next/server/app/landing.rsc +5 -5
- package/.next/server/app/landing.segments/_full.segment.rsc +5 -5
- package/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +5 -5
- package/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +7 -7
- package/.next/server/chunks/1011.js +1 -1
- package/.next/server/chunks/1194.js +1 -1
- package/.next/server/chunks/1289.js +1 -1
- package/.next/server/chunks/1633.js +1 -1
- package/.next/server/chunks/2339.js +1 -1
- package/.next/server/chunks/3425.js +1 -1
- package/.next/server/chunks/4129.js +1 -1
- package/.next/server/chunks/537.js +1 -1
- package/.next/server/chunks/6056.js +1 -1
- package/.next/server/chunks/7816.js +1 -1
- package/.next/server/chunks/9429.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{1278-1326946dbcc0adb5.js → 1278-846112734a0f5e55.js} +1 -1
- package/.next/static/chunks/{159-c129d43e789e7018.js → 159-39356ce437096d44.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/console-log/{page-0737ab5a4827fa77.js → page-bf251f657ba991f0.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-1f54dc9be2c50aba.js → page-bedeed81041d8f79.js} +1 -1
- package/.next/static/chunks/app/{layout-06e49e3bcc852dbd.js → layout-6cb42d6935f83cc9.js} +1 -1
- package/open-sse/executors/opencode-zen.js +5 -2
- package/open-sse/providers/registry/opencode-go.js +23 -6
- package/open-sse/providers/registry/opencode-zen.js +6 -4
- package/open-sse/providers/registry/opencode.js +2 -1
- package/package.json +2 -2
- package/src/app/api/providers/[id]/test/testUtils.js +3 -3
- /package/.next/static/{3VUtJ57WoimjS256-MQ04 → lLaVjv9m3OfeP2eGEVKC1}/_buildManifest.js +0 -0
- /package/.next/static/{3VUtJ57WoimjS256-MQ04 → lLaVjv9m3OfeP2eGEVKC1}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{1352:(e,t,r)=>{"use strict";r.d(t,{Bc:()=>i,ZI:()=>l,k$:()=>d,m_:()=>o});var a=r(29798);r(15814);var s=r(5471),n=r(44484);function i({delayDuration:e=0,...t}){return(0,a.jsx)(n.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function o({...e}){return(0,a.jsx)(n.bL,{"data-slot":"tooltip",...e})}function d({...e}){return(0,a.jsx)(n.l9,{"data-slot":"tooltip-trigger",...e})}function l({className:e,sideOffset:t=0,children:r,...i}){return(0,a.jsx)(n.ZL,{children:(0,a.jsxs)(n.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,s.cn)("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...i,children:[r,(0,a.jsx)(n.i3,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}},4836:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(15814);let s=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var i=r(28145);let o=(0,a.forwardRef)(({color:e,size:t,width:r,height:o,strokeWidth:d,absoluteStrokeWidth:l,nonScalingStroke:c,className:u="",children:g,iconNode:p=[],icon:h={node:p,aliases:[],size:24},...m},f)=>{let{size:x=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,nonScalingStroke:k=!1,color:y="currentColor",className:w=""}=(0,i.T)()??{},j=!!g||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[N,z,A=[]]=function(e,t={}){return function(e,t={}){let r=t.attributeNames??{},a=e=>r[e]??e,i=e.size??e.width??n.width,o=e.size??e.height??n.height,d=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],l=[...e.name?[`lucide-${e.name}`]:[],...d],c=t.className?.split(" ").filter(Boolean)??[],u=!1===t.includeDefaultClasses?s(...c):s("lucide",...l,...c),g=t.absoluteStrokeWidth?Number(t.strokeWidth??n["stroke-width"])*Number(e.size??e.width??n.width)/Number(t.size??t.width??n.width):t.strokeWidth??n["stroke-width"];return["svg",{...Object.entries(n).reduce((e,[t,r])=>(e[a(t)]=r,e),{}),..."color"in t&&t.color&&{[a("stroke")]:t.color},..."size"in t&&null!=t.size&&{[a("width")]:t.size,[a("height")]:t.size},..."width"in t&&null!=t.width&&{[a("width")]:t.width},..."height"in t&&null!=t.height&&{[a("height")]:t.height},[a("stroke-width")]:g,...u&&{[a("class")]:u},[a("viewBox")]:`0 0 ${i} ${o}`,...!1===t.hasA11yProp?{[a("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[r,s,n]=e,i=t.nonScalingStroke?{[a("vector-effect")]:"non-scaling-stroke",...s}:s;return n?[r,i,n]:[r,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(h,{color:e??y,width:r??t??x,height:o??t??x,strokeWidth:d??v,absoluteStrokeWidth:l??b,nonScalingStroke:c??k,className:s(w,u),hasA11yProp:j,attributes:m});return(0,a.createElement)(N,{ref:f,...z},[...A.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(g)?g:[g]])})},13189:(e,t,r)=>{"use strict";r.d(t,{default:()=>D});var a=r(29798),s=r(15814),n=r(75669),i=r(18055),o=r(53784),d=r(77345),l=r(1352),c=r(45111),u=r(74719),g=r(66685),p=r(24477),h=r(26339),m=r(75877),f=r(51660);let x={USAGE:"usage",STREAM:"stream","STREAM USAGE":"usage",COMBO:"combo",FUSION:"combo",TOKEN:"token",RTK:"rtk",HEADROOM:"rtk",REQUEST:"request",PROXY:"proxy",AUTH:"auth",AG_QUOTA:"auth",DB:"db",TUNNEL:"tunnel",PROJECTID:"other"},v={debug:"debug",info:"info",log:"info",warn:"warn",error:"error"},b={debug:0,info:1,warn:2,error:3};function k(e,t){return b[t]>b[e]?t:e}function y(e,t){let r=v[e]??"info",a="other";if(/\[DBG:[^\]]+\]/.test(t)||t.includes("\uD83D\uDC1B"))return{level:"debug",category:"debug"};let s=t.match(/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+(DEBUG|INFO|WARN|ERROR)\b/);if(s){let e=s[2].toLowerCase();b[e]>b[r]&&(r=e)}let n=t.match(/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+\[[0-9a-f]{4}\]\s+([A-Z]+)\b/);if(n){let e=n[2];"REQ"===e?a="request":"DONE"===e?a="done":"SAVERS"===e?a="rtk":"REFRESH"===e?a="token":"BLOCKED"===e||"ABORT"===e?a="stream":"ERROR"===e&&(r=k(r,"error"),"other"===a&&(a="request"))}if("other"===a&&/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+\[(http|stream|usage)\]/i.test(t)){let e=t.match(/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+\[(http|stream|usage)\]/i)[2].toLowerCase();a="http"===e?"request":e}let i=t.match(/\[([A-Z][A-Z _-]*)\]/g);if(i)for(let e of i){let t=e.slice(1,-1).trim();if(x[t]){a=x[t];break}if("DBG"===t||t.startsWith("DBG:"))return{level:"debug",category:"debug"}}return t.includes("✗")||t.includes("❌")?(r=k(r,"error"),"other"===a&&(a="request")):t.includes("\uD83D\uDCCA")?t.includes("DONE")?a="done":"other"===a&&(a="usage"):t.includes("⚠️")?r=k(r,"warn"):t.includes("\uD83C\uDF0A")?"other"===a&&(a="stream"):t.includes("\uD83D\uDD11")||t.includes("TOKEN REFRESHED")?"other"===a&&(a="token"):t.includes("ℹ️")||t.includes("\uD83D\uDD0D")?t.includes("\uD83D\uDD0D")&&(r=k(r,"debug")):t.includes("\uD83D\uDCE5")&&"other"===a&&(a="request"),"other"===a&&/\b(POST|GET|PUT|DELETE|PATCH)\b/.test(t)&&(a="request"),/\bERROR \d{3}\b/.test(t)||/\bFAILED\b/.test(t)||/\bBLOCKED\b/.test(t)?r=k(r,"error"):/\b(falling back|fallback|unavailable|skipped|retry)\b/i.test(t)&&(r=k(r,"warn")),"other"===a&&(t.includes("[RTK]")||t.includes("HEADROOM")||t.includes("PXPIPE")?a="rtk":t.includes("[ProjectId]")?a="other":t.includes("[ProxyFetch]")?a="proxy":t.includes("[Tunnel]")?a="tunnel":t.includes("[DB]")?a="db":t.includes("[RequestDetail]")?a="request":t.includes("[STREAM]")?a="stream":t.includes("[TOKEN]")?a="token":t.includes("[COMBO]")||t.includes("[FUSION]")?a="combo":t.includes("[CHAT]")&&(a="request")),{level:r,category:a}}function w(e,t="log"){if("string"==typeof e){let{level:r,category:a}=y(t,e);return{ts:Date.now(),level:r,category:a,text:e}}if(e&&"object"==typeof e&&"string"==typeof e.text){if("number"==typeof e.ts&&e.level&&e.category)return e;let{level:r,category:a}=y(t,e.text);return{ts:"number"==typeof e.ts?e.ts:Date.now(),level:e.level??r,category:e.category??a,text:e.text}}let r=String(e??""),{level:a,category:s}=y(t,r);return{ts:Date.now(),level:a,category:s,text:r}}let j={debug:"secondary",info:"default",warn:"secondary",error:"destructive"},N={debug:"bg-muted text-muted-foreground",info:"bg-sky-500/15 text-sky-700 dark:text-sky-300",warn:"bg-amber-500/15 text-amber-700 dark:text-amber-300",error:""},z={debug:"DEBUG",info:"INFO",warn:"WARN",error:"ERROR"},A=["debug","info","warn","error"],E={all:"All categories",request:"Request",done:"Done",usage:"Usage",combo:"Combo",token:"Token",rtk:"RTK",stream:"Stream",debug:"Debug",auth:"Auth",proxy:"Proxy",db:"DB",tunnel:"Tunnel",other:"Other"},C=["request","done","usage","combo","token","rtk","stream","debug","auth","proxy","db","tunnel","other"],R=/^\[\d{1,2}:\d{2}(:\d{2})?(\s?[AP]M)?\]\s*/,O=/\b(IN|OUT) \d[\d,]*( \(CACHE [^)]*\))?|\b\d[\d,]*ms\b|\b[A-Za-z_][\w.-]*=[^\s·|,]+/g;function S({text:e,isError:t}){let[r,n]=(0,s.useMemo)(()=>{let t;return -1===(t=e.indexOf("\n"))?[e,null]:[e.slice(0,t),e.slice(t+1)]},[e]),i=(0,s.useMemo)(()=>(function(e){let t=[],r=0;for(let a of e.matchAll(O)){let s=a[0],n=a.index??0;if(n>r&&t.push({kind:"plain",text:e.slice(r,n)}),/^(IN|OUT) /.test(s))t.push({kind:"tokens",text:s});else if(/ms$/.test(s))t.push({kind:"duration",text:s});else{let e=s.indexOf("=");t.push({kind:"kv",key:s.slice(0,e+1),value:s.slice(e+1)})}r=n+s.length}return r<e.length&&t.push({kind:"plain",text:e.slice(r)}),0===t.length&&t.push({kind:"plain",text:e}),t})(r.replace(R,"")),[r]);return(0,a.jsxs)("span",{className:"break-words",children:[i.map((e,t)=>"duration"===e.kind?(0,a.jsx)("span",{className:"font-semibold text-amber-700",children:e.text},t):"tokens"===e.kind?(0,a.jsx)("span",{className:"font-semibold text-emerald-700",children:e.text},t):"kv"===e.kind?(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:e.key}),(0,a.jsx)("span",{className:"font-medium text-sky-700",children:e.value})]},t):(0,a.jsx)("span",{children:e.text},t)),n&&(0,a.jsxs)("details",{className:"mt-1",children:[(0,a.jsx)("summary",{className:`cursor-pointer text-[11px] font-medium ${t?"text-red-600":"text-muted-foreground"} hover:underline`,children:"Stack trace"}),(0,a.jsx)("pre",{className:"mt-1 max-h-40 overflow-auto rounded bg-muted p-2 text-[11px] whitespace-pre-wrap text-muted-foreground",children:n})]})]})}function T({entry:e}){let t="error"===e.level,r="warn"===e.level,s="done"===e.category;return(0,a.jsxs)("div",{className:`flex items-start gap-2 px-3 py-1.5 leading-relaxed ${t?"border-l-2 border-red-500 bg-red-500/5":r?"border-l-2 border-amber-500 bg-amber-500/5":s?"border-l-2 border-green-500 bg-green-500/5":"border-l-2 border-transparent hover:bg-muted/50"}`,children:[(0,a.jsx)("span",{className:"shrink-0 pt-0.5 text-[11px] text-muted-foreground tabular-nums",children:new Date(e.ts).toLocaleTimeString("en-US",{hour12:!1})}),(0,a.jsx)(o.E,{variant:j[e.level],className:`shrink-0 ${N[e.level]}`,children:z[e.level]}),(0,a.jsx)("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-semibold text-muted-foreground uppercase",children:E[e.category]}),(0,a.jsx)("span",{className:"min-w-0 flex-1 text-foreground",children:(0,a.jsx)(S,{text:e.text,isError:t})})]})}function _(e){return e.map(e=>w(e))}function D(){let[e,t]=(0,s.useState)([]),[r,x]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),[k,y]=(0,s.useState)(!0),[N,R]=(0,s.useState)(""),[O,S]=(0,s.useState)(new Set(A)),[D,L]=(0,s.useState)("all"),M=(0,s.useRef)(null),U=(0,s.useRef)(v);(0,s.useEffect)(()=>{U.current=v},[v]);let B=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};(0,s.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>x(!0),e.onmessage=e=>{if(U.current)return;let r=JSON.parse(e.data);if("init"===r.type)t(_(r.logs).slice(-f.UY.maxLines));else if("line"===r.type){let e=w(r.line);t(t=>{let r=[...t,e];return r.length>f.UY.maxLines?r.slice(-f.UY.maxLines):r})}else if("lines"===r.type){let e=_(r.lines);t(t=>{let r=[...t,...e];return r.length>f.UY.maxLines?r.slice(-f.UY.maxLines):r})}else"clear"===r.type&&t([])},e.onerror=()=>x(!1),()=>e.close()},[]),(0,s.useEffect)(()=>{k&&M.current&&(M.current.scrollTop=M.current.scrollHeight)},[e,k]);let $=(0,s.useMemo)(()=>{let t=N.trim().toLowerCase();return e.filter(e=>!!O.has(e.level)&&("all"===D||e.category===D)&&(!t||!!e.text.toLowerCase().includes(t)))},[e,O,D,N]),q=(0,s.useMemo)(()=>e.filter(e=>"error"===e.level).length,[e]),P=(0,s.useMemo)(()=>e.filter(e=>"warn"===e.level).length,[e]);return(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)(n.aR,{children:[(0,a.jsx)(n.ZB,{className:"sr-only",children:"Console logs"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(l.m_,{children:[(0,a.jsx)(l.k$,{asChild:!0,children:(0,a.jsx)("span",{className:r?"size-2 rounded-full bg-green-500":"size-2 rounded-full bg-red-500"})}),(0,a.jsx)(l.ZI,{children:r?"Connected":"Disconnected"})]}),(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:[$.length,"/",e.length," lines",q>0&&(0,a.jsxs)("span",{className:"font-semibold text-red-600",children:[" \xb7 ",q," errors"]}),P>0&&(0,a.jsxs)("span",{className:"font-semibold text-yellow-600",children:[" \xb7 ",P," warnings"]})]}),(0,a.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(u.A,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,a.jsx)(d.p,{value:N,onChange:e=>R(e.target.value),placeholder:"Search logs…",className:"h-7 w-44 pl-8 text-xs"})]}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:A.map(e=>(0,a.jsxs)(l.m_,{children:[(0,a.jsx)(l.k$,{asChild:!0,children:(0,a.jsx)("button",{type:"button",onClick:()=>{S(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},className:`cursor-pointer transition-opacity ${O.has(e)?"opacity-100":"opacity-30 grayscale"}`,children:(0,a.jsx)(o.E,{variant:j[e],children:z[e]})})}),(0,a.jsx)(l.ZI,{children:`Toggle ${z[e]}`})]},e))}),(0,a.jsxs)(c.l6,{value:D,onValueChange:e=>L(e),children:[(0,a.jsx)(c.bq,{className:"h-7 w-32 text-xs",children:(0,a.jsx)(c.yv,{})}),(0,a.jsxs)(c.gC,{children:[(0,a.jsx)(c.eb,{value:"all",children:E.all}),C.map(e=>(0,a.jsx)(c.eb,{value:e,children:E[e]},e))]})]}),(0,a.jsxs)(i.$,{size:"sm",variant:"outline",onClick:()=>b(e=>!e),children:[v?(0,a.jsx)(g.A,{}):(0,a.jsx)(p.A,{}),v?"Resume":"Pause"]}),(0,a.jsxs)(l.m_,{children:[(0,a.jsx)(l.k$,{asChild:!0,children:(0,a.jsxs)(i.$,{size:"sm",variant:k?"secondary":"outline",onClick:()=>y(e=>!e),children:[(0,a.jsx)(h.A,{}),"Follow"]})}),(0,a.jsx)(l.ZI,{children:"Auto-scroll to newest"})]}),(0,a.jsxs)(i.$,{size:"sm",variant:"outline",onClick:B,children:[(0,a.jsx)(m.A,{}),"Clear"]})]})]})]}),(0,a.jsx)(n.Wu,{className:"pt-0",children:(0,a.jsx)("div",{ref:M,className:"h-[calc(100vh-220px)] overflow-y-auto rounded-b-lg border border-border bg-card p-2 font-mono text-xs",children:0===e.length?(0,a.jsx)("span",{className:"text-muted-foreground",children:"No console logs yet."}):0===$.length?(0,a.jsx)("span",{className:"text-muted-foreground",children:"No logs match the current filters."}):(0,a.jsx)("div",{className:"divide-y divide-border/50",children:$.map((e,t)=>(0,a.jsx)(T,{entry:e},t))})})})]})}},15298:(e,t,r)=>{Promise.resolve().then(r.bind(r,13189))},18055:(e,t,r)=>{"use strict";r.d(t,{$:()=>d});var a=r(29798);r(15814);var s=r(54366),n=r(5471),i=r(80954);let o=(0,s.F)("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function d({className:e,variant:t="default",size:r="default",asChild:s=!1,...l}){let c=s?i.bL:"button";return(0,a.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":r,className:(0,n.cn)(o({variant:t,size:r,className:e})),...l})}},24477:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"pause",size:24,node:[["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"}]]};s.node;let n=(0,a.A)(s)},26339:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};s.node;let n=(0,a.A)(s)},28145:(e,t,r)=>{"use strict";r.d(t,{T:()=>i,a:()=>n});var a=r(15814);let s=(0,a.createContext)({});function n({children:e,size:t,color:r,strokeWidth:i,absoluteStrokeWidth:o,nonScalingStroke:d,className:l}){let c=(0,a.useMemo)(()=>({size:t,color:r,strokeWidth:i,absoluteStrokeWidth:o,nonScalingStroke:d,className:l}),[t,r,i,o,d,l]);return(0,a.createElement)(s.Provider,{value:c},e)}let i=()=>(0,a.useContext)(s)},28830:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};s.node;let n=(0,a.A)(s)},45111:(e,t,r)=>{"use strict";r.d(t,{bq:()=>u,eb:()=>p,gC:()=>g,l6:()=>l,yv:()=>c});var a=r(29798);r(15814);var s=r(5471),n=r(95862),i=r(58765),o=r(63587),d=r(28830);function l({...e}){return(0,a.jsx)(n.bL,{"data-slot":"select",...e})}function c({...e}){return(0,a.jsx)(n.WT,{"data-slot":"select-value",...e})}function u({className:e,size:t="default",children:r,...o}){return(0,a.jsxs)(n.l9,{"data-slot":"select-trigger","data-size":t,className:(0,s.cn)("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-background py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[r,(0,a.jsx)(n.In,{asChild:!0,children:(0,a.jsx)(i.A,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function g({className:e,children:t,position:r="popper",align:i="center",...o}){return(0,a.jsx)(n.ZL,{children:(0,a.jsxs)(n.UC,{"data-slot":"select-content","data-align-trigger":"item-aligned"===r,className:(0,s.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:i,...o,children:[(0,a.jsx)(h,{}),(0,a.jsx)(n.LM,{"data-position":r,className:(0,s.cn)("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)","popper"===r&&""),children:t}),(0,a.jsx)(m,{})]})})}function p({className:e,children:t,...r}){return(0,a.jsxs)(n.q7,{"data-slot":"select-item",className:(0,s.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,a.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:(0,a.jsx)(n.VF,{children:(0,a.jsx)(o.A,{className:"pointer-events-none"})})}),(0,a.jsx)(n.p4,{children:t})]})}function h({className:e,...t}){return(0,a.jsx)(n.PP,{"data-slot":"select-scroll-up-button",className:(0,s.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:(0,a.jsx)(d.A,{})})}function m({className:e,...t}){return(0,a.jsx)(n.wn,{"data-slot":"select-scroll-down-button",className:(0,s.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:(0,a.jsx)(i.A,{})})}},50009:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(15814),s=r(4836);function n(e,t=[],r=[]){let i,o="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,d=(0,a.forwardRef)(({className:e,...t},r)=>(0,a.createElement)(s.A,{ref:r,icon:o,className:e,...t}));return o.name&&(d.displayName=(i=(e=>{let t="",r=!1;for(let a of e){if("-"===a||"_"===a||a<=" "){r=t.length>0;continue}0===t.length?t+=a.toLowerCase():t+=r?a.toUpperCase():a,r=!1}return t})(o.name)).charAt(0).toUpperCase()+i.slice(1)),d}},51660:(e,t,r)=>{"use strict";r.d(t,{Q2:()=>a.Q2,fg:()=>a.fg,vQ:()=>s,_$:()=>i,MA:()=>a.MA,UY:()=>d,Nu:()=>n,zN:()=>a.zN,B2:()=>o});var a=r(13794);r(80159);let s={name:"10Router Proxy",description:"AI Infrastructure Management",version:"0.1.3"},n={changelogUrl:"/api/changelog"},i=20128,o={storageKey:"theme",defaultTheme:"light"},d={maxLines:500,pollIntervalMs:1e3}},53784:(e,t,r)=>{"use strict";r.d(t,{E:()=>d});var a=r(29798);r(15814);var s=r(54366),n=r(5471),i=r(80954);let o=(0,s.F)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function d({className:e,variant:t="default",asChild:r=!1,...s}){let l=r?i.bL:"span";return(0,a.jsx)(l,{"data-slot":"badge","data-variant":t,className:(0,n.cn)(o({variant:t}),e),...s})}},58765:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};s.node;let n=(0,a.A)(s)},63587:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};s.node;let n=(0,a.A)(s)},66685:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"play",size:24,node:[["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"}]]};s.node;let n=(0,a.A)(s)},74719:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let n=(0,a.A)(s)},75669:(e,t,r)=>{"use strict";r.d(t,{BT:()=>d,Wu:()=>c,X9:()=>l,ZB:()=>o,Zp:()=>n,aR:()=>i});var a=r(29798);r(15814);var s=r(5471);function n({className:e,size:t="default",...r}){return(0,a.jsx)("div",{"data-slot":"card","data-size":t,className:(0,s.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...r})}function i({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...t})}function o({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...t})}function d({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...t})}function l({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-action",className:(0,s.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function c({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("flex flex-col gap-3 px-(--card-spacing)",e),...t})}},75877:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};s.node;let n=(0,a.A)(s)},77345:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var a=r(29798);r(15814);var s=r(5471);function n({className:e,type:t,...r}){return(0,a.jsx)("input",{type:t,"data-slot":"input",className:(0,s.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-background px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r})}}},e=>{e.O(0,[5166,7552,9980,5778,4484,3577,5862,159,427,9966,7358],()=>e(e.s=15298)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{1352:(e,t,r)=>{"use strict";r.d(t,{Bc:()=>i,ZI:()=>l,k$:()=>d,m_:()=>o});var a=r(29798);r(15814);var s=r(5471),n=r(44484);function i({delayDuration:e=0,...t}){return(0,a.jsx)(n.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function o({...e}){return(0,a.jsx)(n.bL,{"data-slot":"tooltip",...e})}function d({...e}){return(0,a.jsx)(n.l9,{"data-slot":"tooltip-trigger",...e})}function l({className:e,sideOffset:t=0,children:r,...i}){return(0,a.jsx)(n.ZL,{children:(0,a.jsxs)(n.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,s.cn)("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...i,children:[r,(0,a.jsx)(n.i3,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}},4836:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(15814);let s=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var i=r(28145);let o=(0,a.forwardRef)(({color:e,size:t,width:r,height:o,strokeWidth:d,absoluteStrokeWidth:l,nonScalingStroke:c,className:u="",children:g,iconNode:p=[],icon:h={node:p,aliases:[],size:24},...m},f)=>{let{size:x=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,nonScalingStroke:k=!1,color:y="currentColor",className:w=""}=(0,i.T)()??{},j=!!g||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[N,z,A=[]]=function(e,t={}){return function(e,t={}){let r=t.attributeNames??{},a=e=>r[e]??e,i=e.size??e.width??n.width,o=e.size??e.height??n.height,d=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],l=[...e.name?[`lucide-${e.name}`]:[],...d],c=t.className?.split(" ").filter(Boolean)??[],u=!1===t.includeDefaultClasses?s(...c):s("lucide",...l,...c),g=t.absoluteStrokeWidth?Number(t.strokeWidth??n["stroke-width"])*Number(e.size??e.width??n.width)/Number(t.size??t.width??n.width):t.strokeWidth??n["stroke-width"];return["svg",{...Object.entries(n).reduce((e,[t,r])=>(e[a(t)]=r,e),{}),..."color"in t&&t.color&&{[a("stroke")]:t.color},..."size"in t&&null!=t.size&&{[a("width")]:t.size,[a("height")]:t.size},..."width"in t&&null!=t.width&&{[a("width")]:t.width},..."height"in t&&null!=t.height&&{[a("height")]:t.height},[a("stroke-width")]:g,...u&&{[a("class")]:u},[a("viewBox")]:`0 0 ${i} ${o}`,...!1===t.hasA11yProp?{[a("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[r,s,n]=e,i=t.nonScalingStroke?{[a("vector-effect")]:"non-scaling-stroke",...s}:s;return n?[r,i,n]:[r,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(h,{color:e??y,width:r??t??x,height:o??t??x,strokeWidth:d??v,absoluteStrokeWidth:l??b,nonScalingStroke:c??k,className:s(w,u),hasA11yProp:j,attributes:m});return(0,a.createElement)(N,{ref:f,...z},[...A.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(g)?g:[g]])})},13189:(e,t,r)=>{"use strict";r.d(t,{default:()=>D});var a=r(29798),s=r(15814),n=r(75669),i=r(18055),o=r(53784),d=r(77345),l=r(1352),c=r(45111),u=r(74719),g=r(66685),p=r(24477),h=r(26339),m=r(75877),f=r(51660);let x={USAGE:"usage",STREAM:"stream","STREAM USAGE":"usage",COMBO:"combo",FUSION:"combo",TOKEN:"token",RTK:"rtk",HEADROOM:"rtk",REQUEST:"request",PROXY:"proxy",AUTH:"auth",AG_QUOTA:"auth",DB:"db",TUNNEL:"tunnel",PROJECTID:"other"},v={debug:"debug",info:"info",log:"info",warn:"warn",error:"error"},b={debug:0,info:1,warn:2,error:3};function k(e,t){return b[t]>b[e]?t:e}function y(e,t){let r=v[e]??"info",a="other";if(/\[DBG:[^\]]+\]/.test(t)||t.includes("\uD83D\uDC1B"))return{level:"debug",category:"debug"};let s=t.match(/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+(DEBUG|INFO|WARN|ERROR)\b/);if(s){let e=s[2].toLowerCase();b[e]>b[r]&&(r=e)}let n=t.match(/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+\[[0-9a-f]{4}\]\s+([A-Z]+)\b/);if(n){let e=n[2];"REQ"===e?a="request":"DONE"===e?a="done":"SAVERS"===e?a="rtk":"REFRESH"===e?a="token":"BLOCKED"===e||"ABORT"===e?a="stream":"ERROR"===e&&(r=k(r,"error"),"other"===a&&(a="request"))}if("other"===a&&/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+\[(http|stream|usage)\]/i.test(t)){let e=t.match(/^\[\d{1,2}:\d{2}(:\d{2})?\]\s+\[(http|stream|usage)\]/i)[2].toLowerCase();a="http"===e?"request":e}let i=t.match(/\[([A-Z][A-Z _-]*)\]/g);if(i)for(let e of i){let t=e.slice(1,-1).trim();if(x[t]){a=x[t];break}if("DBG"===t||t.startsWith("DBG:"))return{level:"debug",category:"debug"}}return t.includes("✗")||t.includes("❌")?(r=k(r,"error"),"other"===a&&(a="request")):t.includes("\uD83D\uDCCA")?t.includes("DONE")?a="done":"other"===a&&(a="usage"):t.includes("⚠️")?r=k(r,"warn"):t.includes("\uD83C\uDF0A")?"other"===a&&(a="stream"):t.includes("\uD83D\uDD11")||t.includes("TOKEN REFRESHED")?"other"===a&&(a="token"):t.includes("ℹ️")||t.includes("\uD83D\uDD0D")?t.includes("\uD83D\uDD0D")&&(r=k(r,"debug")):t.includes("\uD83D\uDCE5")&&"other"===a&&(a="request"),"other"===a&&/\b(POST|GET|PUT|DELETE|PATCH)\b/.test(t)&&(a="request"),/\bERROR \d{3}\b/.test(t)||/\bFAILED\b/.test(t)||/\bBLOCKED\b/.test(t)?r=k(r,"error"):/\b(falling back|fallback|unavailable|skipped|retry)\b/i.test(t)&&(r=k(r,"warn")),"other"===a&&(t.includes("[RTK]")||t.includes("HEADROOM")||t.includes("PXPIPE")?a="rtk":t.includes("[ProjectId]")?a="other":t.includes("[ProxyFetch]")?a="proxy":t.includes("[Tunnel]")?a="tunnel":t.includes("[DB]")?a="db":t.includes("[RequestDetail]")?a="request":t.includes("[STREAM]")?a="stream":t.includes("[TOKEN]")?a="token":t.includes("[COMBO]")||t.includes("[FUSION]")?a="combo":t.includes("[CHAT]")&&(a="request")),{level:r,category:a}}function w(e,t="log"){if("string"==typeof e){let{level:r,category:a}=y(t,e);return{ts:Date.now(),level:r,category:a,text:e}}if(e&&"object"==typeof e&&"string"==typeof e.text){if("number"==typeof e.ts&&e.level&&e.category)return e;let{level:r,category:a}=y(t,e.text);return{ts:"number"==typeof e.ts?e.ts:Date.now(),level:e.level??r,category:e.category??a,text:e.text}}let r=String(e??""),{level:a,category:s}=y(t,r);return{ts:Date.now(),level:a,category:s,text:r}}let j={debug:"secondary",info:"default",warn:"secondary",error:"destructive"},N={debug:"bg-muted text-muted-foreground",info:"bg-sky-500/15 text-sky-700 dark:text-sky-300",warn:"bg-amber-500/15 text-amber-700 dark:text-amber-300",error:""},z={debug:"DEBUG",info:"INFO",warn:"WARN",error:"ERROR"},A=["debug","info","warn","error"],E={all:"All categories",request:"Request",done:"Done",usage:"Usage",combo:"Combo",token:"Token",rtk:"RTK",stream:"Stream",debug:"Debug",auth:"Auth",proxy:"Proxy",db:"DB",tunnel:"Tunnel",other:"Other"},C=["request","done","usage","combo","token","rtk","stream","debug","auth","proxy","db","tunnel","other"],R=/^\[\d{1,2}:\d{2}(:\d{2})?(\s?[AP]M)?\]\s*/,O=/\b(IN|OUT) \d[\d,]*( \(CACHE [^)]*\))?|\b\d[\d,]*ms\b|\b[A-Za-z_][\w.-]*=[^\s·|,]+/g;function S({text:e,isError:t}){let[r,n]=(0,s.useMemo)(()=>{let t;return -1===(t=e.indexOf("\n"))?[e,null]:[e.slice(0,t),e.slice(t+1)]},[e]),i=(0,s.useMemo)(()=>(function(e){let t=[],r=0;for(let a of e.matchAll(O)){let s=a[0],n=a.index??0;if(n>r&&t.push({kind:"plain",text:e.slice(r,n)}),/^(IN|OUT) /.test(s))t.push({kind:"tokens",text:s});else if(/ms$/.test(s))t.push({kind:"duration",text:s});else{let e=s.indexOf("=");t.push({kind:"kv",key:s.slice(0,e+1),value:s.slice(e+1)})}r=n+s.length}return r<e.length&&t.push({kind:"plain",text:e.slice(r)}),0===t.length&&t.push({kind:"plain",text:e}),t})(r.replace(R,"")),[r]);return(0,a.jsxs)("span",{className:"break-words",children:[i.map((e,t)=>"duration"===e.kind?(0,a.jsx)("span",{className:"font-semibold text-amber-700",children:e.text},t):"tokens"===e.kind?(0,a.jsx)("span",{className:"font-semibold text-emerald-700",children:e.text},t):"kv"===e.kind?(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:e.key}),(0,a.jsx)("span",{className:"font-medium text-sky-700",children:e.value})]},t):(0,a.jsx)("span",{children:e.text},t)),n&&(0,a.jsxs)("details",{className:"mt-1",children:[(0,a.jsx)("summary",{className:`cursor-pointer text-[11px] font-medium ${t?"text-red-600":"text-muted-foreground"} hover:underline`,children:"Stack trace"}),(0,a.jsx)("pre",{className:"mt-1 max-h-40 overflow-auto rounded bg-muted p-2 text-[11px] whitespace-pre-wrap text-muted-foreground",children:n})]})]})}function T({entry:e}){let t="error"===e.level,r="warn"===e.level,s="done"===e.category;return(0,a.jsxs)("div",{className:`flex items-start gap-2 px-3 py-1.5 leading-relaxed ${t?"border-l-2 border-red-500 bg-red-500/5":r?"border-l-2 border-amber-500 bg-amber-500/5":s?"border-l-2 border-green-500 bg-green-500/5":"border-l-2 border-transparent hover:bg-muted/50"}`,children:[(0,a.jsx)("span",{className:"shrink-0 pt-0.5 text-[11px] text-muted-foreground tabular-nums",children:new Date(e.ts).toLocaleTimeString("en-US",{hour12:!1})}),(0,a.jsx)(o.E,{variant:j[e.level],className:`shrink-0 ${N[e.level]}`,children:z[e.level]}),(0,a.jsx)("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-semibold text-muted-foreground uppercase",children:E[e.category]}),(0,a.jsx)("span",{className:"min-w-0 flex-1 text-foreground",children:(0,a.jsx)(S,{text:e.text,isError:t})})]})}function _(e){return e.map(e=>w(e))}function D(){let[e,t]=(0,s.useState)([]),[r,x]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),[k,y]=(0,s.useState)(!0),[N,R]=(0,s.useState)(""),[O,S]=(0,s.useState)(new Set(A)),[D,L]=(0,s.useState)("all"),M=(0,s.useRef)(null),U=(0,s.useRef)(v);(0,s.useEffect)(()=>{U.current=v},[v]);let B=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};(0,s.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>x(!0),e.onmessage=e=>{if(U.current)return;let r=JSON.parse(e.data);if("init"===r.type)t(_(r.logs).slice(-f.UY.maxLines));else if("line"===r.type){let e=w(r.line);t(t=>{let r=[...t,e];return r.length>f.UY.maxLines?r.slice(-f.UY.maxLines):r})}else if("lines"===r.type){let e=_(r.lines);t(t=>{let r=[...t,...e];return r.length>f.UY.maxLines?r.slice(-f.UY.maxLines):r})}else"clear"===r.type&&t([])},e.onerror=()=>x(!1),()=>e.close()},[]),(0,s.useEffect)(()=>{k&&M.current&&(M.current.scrollTop=M.current.scrollHeight)},[e,k]);let $=(0,s.useMemo)(()=>{let t=N.trim().toLowerCase();return e.filter(e=>!!O.has(e.level)&&("all"===D||e.category===D)&&(!t||!!e.text.toLowerCase().includes(t)))},[e,O,D,N]),q=(0,s.useMemo)(()=>e.filter(e=>"error"===e.level).length,[e]),P=(0,s.useMemo)(()=>e.filter(e=>"warn"===e.level).length,[e]);return(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)(n.aR,{children:[(0,a.jsx)(n.ZB,{className:"sr-only",children:"Console logs"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(l.m_,{children:[(0,a.jsx)(l.k$,{asChild:!0,children:(0,a.jsx)("span",{className:r?"size-2 rounded-full bg-green-500":"size-2 rounded-full bg-red-500"})}),(0,a.jsx)(l.ZI,{children:r?"Connected":"Disconnected"})]}),(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:[$.length,"/",e.length," lines",q>0&&(0,a.jsxs)("span",{className:"font-semibold text-red-600",children:[" \xb7 ",q," errors"]}),P>0&&(0,a.jsxs)("span",{className:"font-semibold text-yellow-600",children:[" \xb7 ",P," warnings"]})]}),(0,a.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(u.A,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,a.jsx)(d.p,{value:N,onChange:e=>R(e.target.value),placeholder:"Search logs…",className:"h-7 w-44 pl-8 text-xs"})]}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:A.map(e=>(0,a.jsxs)(l.m_,{children:[(0,a.jsx)(l.k$,{asChild:!0,children:(0,a.jsx)("button",{type:"button",onClick:()=>{S(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},className:`cursor-pointer transition-opacity ${O.has(e)?"opacity-100":"opacity-30 grayscale"}`,children:(0,a.jsx)(o.E,{variant:j[e],children:z[e]})})}),(0,a.jsx)(l.ZI,{children:`Toggle ${z[e]}`})]},e))}),(0,a.jsxs)(c.l6,{value:D,onValueChange:e=>L(e),children:[(0,a.jsx)(c.bq,{className:"h-7 w-32 text-xs",children:(0,a.jsx)(c.yv,{})}),(0,a.jsxs)(c.gC,{children:[(0,a.jsx)(c.eb,{value:"all",children:E.all}),C.map(e=>(0,a.jsx)(c.eb,{value:e,children:E[e]},e))]})]}),(0,a.jsxs)(i.$,{size:"sm",variant:"outline",onClick:()=>b(e=>!e),children:[v?(0,a.jsx)(g.A,{}):(0,a.jsx)(p.A,{}),v?"Resume":"Pause"]}),(0,a.jsxs)(l.m_,{children:[(0,a.jsx)(l.k$,{asChild:!0,children:(0,a.jsxs)(i.$,{size:"sm",variant:k?"secondary":"outline",onClick:()=>y(e=>!e),children:[(0,a.jsx)(h.A,{}),"Follow"]})}),(0,a.jsx)(l.ZI,{children:"Auto-scroll to newest"})]}),(0,a.jsxs)(i.$,{size:"sm",variant:"outline",onClick:B,children:[(0,a.jsx)(m.A,{}),"Clear"]})]})]})]}),(0,a.jsx)(n.Wu,{className:"pt-0",children:(0,a.jsx)("div",{ref:M,className:"h-[calc(100vh-220px)] overflow-y-auto rounded-b-lg border border-border bg-card p-2 font-mono text-xs",children:0===e.length?(0,a.jsx)("span",{className:"text-muted-foreground",children:"No console logs yet."}):0===$.length?(0,a.jsx)("span",{className:"text-muted-foreground",children:"No logs match the current filters."}):(0,a.jsx)("div",{className:"divide-y divide-border/50",children:$.map((e,t)=>(0,a.jsx)(T,{entry:e},t))})})})]})}},15298:(e,t,r)=>{Promise.resolve().then(r.bind(r,13189))},18055:(e,t,r)=>{"use strict";r.d(t,{$:()=>d});var a=r(29798);r(15814);var s=r(54366),n=r(5471),i=r(80954);let o=(0,s.F)("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function d({className:e,variant:t="default",size:r="default",asChild:s=!1,...l}){let c=s?i.bL:"button";return(0,a.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":r,className:(0,n.cn)(o({variant:t,size:r,className:e})),...l})}},24477:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"pause",size:24,node:[["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"}]]};s.node;let n=(0,a.A)(s)},26339:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};s.node;let n=(0,a.A)(s)},28145:(e,t,r)=>{"use strict";r.d(t,{T:()=>i,a:()=>n});var a=r(15814);let s=(0,a.createContext)({});function n({children:e,size:t,color:r,strokeWidth:i,absoluteStrokeWidth:o,nonScalingStroke:d,className:l}){let c=(0,a.useMemo)(()=>({size:t,color:r,strokeWidth:i,absoluteStrokeWidth:o,nonScalingStroke:d,className:l}),[t,r,i,o,d,l]);return(0,a.createElement)(s.Provider,{value:c},e)}let i=()=>(0,a.useContext)(s)},28830:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};s.node;let n=(0,a.A)(s)},45111:(e,t,r)=>{"use strict";r.d(t,{bq:()=>u,eb:()=>p,gC:()=>g,l6:()=>l,yv:()=>c});var a=r(29798);r(15814);var s=r(5471),n=r(95862),i=r(58765),o=r(63587),d=r(28830);function l({...e}){return(0,a.jsx)(n.bL,{"data-slot":"select",...e})}function c({...e}){return(0,a.jsx)(n.WT,{"data-slot":"select-value",...e})}function u({className:e,size:t="default",children:r,...o}){return(0,a.jsxs)(n.l9,{"data-slot":"select-trigger","data-size":t,className:(0,s.cn)("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-background py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[r,(0,a.jsx)(n.In,{asChild:!0,children:(0,a.jsx)(i.A,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function g({className:e,children:t,position:r="popper",align:i="center",...o}){return(0,a.jsx)(n.ZL,{children:(0,a.jsxs)(n.UC,{"data-slot":"select-content","data-align-trigger":"item-aligned"===r,className:(0,s.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:i,...o,children:[(0,a.jsx)(h,{}),(0,a.jsx)(n.LM,{"data-position":r,className:(0,s.cn)("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)","popper"===r&&""),children:t}),(0,a.jsx)(m,{})]})})}function p({className:e,children:t,...r}){return(0,a.jsxs)(n.q7,{"data-slot":"select-item",className:(0,s.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,a.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:(0,a.jsx)(n.VF,{children:(0,a.jsx)(o.A,{className:"pointer-events-none"})})}),(0,a.jsx)(n.p4,{children:t})]})}function h({className:e,...t}){return(0,a.jsx)(n.PP,{"data-slot":"select-scroll-up-button",className:(0,s.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:(0,a.jsx)(d.A,{})})}function m({className:e,...t}){return(0,a.jsx)(n.wn,{"data-slot":"select-scroll-down-button",className:(0,s.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:(0,a.jsx)(i.A,{})})}},50009:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(15814),s=r(4836);function n(e,t=[],r=[]){let i,o="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,d=(0,a.forwardRef)(({className:e,...t},r)=>(0,a.createElement)(s.A,{ref:r,icon:o,className:e,...t}));return o.name&&(d.displayName=(i=(e=>{let t="",r=!1;for(let a of e){if("-"===a||"_"===a||a<=" "){r=t.length>0;continue}0===t.length?t+=a.toLowerCase():t+=r?a.toUpperCase():a,r=!1}return t})(o.name)).charAt(0).toUpperCase()+i.slice(1)),d}},51660:(e,t,r)=>{"use strict";r.d(t,{Q2:()=>a.Q2,fg:()=>a.fg,vQ:()=>s,_$:()=>i,MA:()=>a.MA,UY:()=>d,Nu:()=>n,zN:()=>a.zN,B2:()=>o});var a=r(13794);r(80159);let s={name:"10Router Proxy",description:"AI Infrastructure Management",version:"0.1.5"},n={changelogUrl:"/api/changelog"},i=20128,o={storageKey:"theme",defaultTheme:"light"},d={maxLines:500,pollIntervalMs:1e3}},53784:(e,t,r)=>{"use strict";r.d(t,{E:()=>d});var a=r(29798);r(15814);var s=r(54366),n=r(5471),i=r(80954);let o=(0,s.F)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function d({className:e,variant:t="default",asChild:r=!1,...s}){let l=r?i.bL:"span";return(0,a.jsx)(l,{"data-slot":"badge","data-variant":t,className:(0,n.cn)(o({variant:t}),e),...s})}},58765:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};s.node;let n=(0,a.A)(s)},63587:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};s.node;let n=(0,a.A)(s)},66685:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"play",size:24,node:[["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"}]]};s.node;let n=(0,a.A)(s)},74719:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let n=(0,a.A)(s)},75669:(e,t,r)=>{"use strict";r.d(t,{BT:()=>d,Wu:()=>c,X9:()=>l,ZB:()=>o,Zp:()=>n,aR:()=>i});var a=r(29798);r(15814);var s=r(5471);function n({className:e,size:t="default",...r}){return(0,a.jsx)("div",{"data-slot":"card","data-size":t,className:(0,s.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...r})}function i({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...t})}function o({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...t})}function d({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...t})}function l({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-action",className:(0,s.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function c({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("flex flex-col gap-3 px-(--card-spacing)",e),...t})}},75877:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(50009);let s={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};s.node;let n=(0,a.A)(s)},77345:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var a=r(29798);r(15814);var s=r(5471);function n({className:e,type:t,...r}){return(0,a.jsx)("input",{type:t,"data-slot":"input",className:(0,s.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-background px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r})}}},e=>{e.O(0,[5166,7552,9980,5778,4484,3577,5862,159,427,9966,7358],()=>e(e.s=15298)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{1689:(e,a,r)=>{"use strict";r.r(a),r.d(a,{default:()=>b});var t=r(29798),i=r(58913),s=r(15814),n=r(70782),o=r(50141),d=r.n(o),l=r(14231),c=r(75669),u=r(18055),p=r(77345),g=r(45111),h=r(69221),f=r(51660);let m=Object.values(f.Q2).map(e=>({value:e.id,label:e.name})),x=Object.values(f.MA).map(e=>({value:e.id,label:e.name}));function v({label:e,required:a,error:r,hint:i,className:s,children:n}){return(0,t.jsxs)("div",{className:`flex flex-col gap-1.5 ${s||""}`,children:[e&&(0,t.jsxs)("label",{className:"text-sm font-medium text-foreground",children:[e,a&&(0,t.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),n,r&&(0,t.jsx)("p",{className:"text-xs text-red-500",children:r}),i&&!r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i})]})}function b(){let e=(0,n.useRouter)(),[a,r]=(0,s.useState)(!1),[o,b]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[y,k]=(0,s.useState)({}),w=(e,a)=>{b(r=>({...r,[e]:a})),y[e]&&k(a=>({...a,[e]:null}))},_=async a=>{let t;if(a.preventDefault(),t={},o.provider||(t.provider="Please select a provider"),"api_key"!==o.authMethod||o.apiKey||(t.apiKey="API Key is required"),k(t),0===Object.keys(t).length){r(!0);try{let a=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(a.ok)e.push("/dashboard/providers");else{let e=await a.json();k({submit:e.error||"Failed to create provider"})}}catch(e){k({submit:"An error occurred. Please try again."})}finally{r(!1)}}},j=f.Q2[o.provider];return(0,t.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(u.$,{variant:"outline",size:"sm",asChild:!0,className:"mb-4",children:(0,t.jsxs)(d(),{href:"/dashboard/providers",children:[(0,t.jsx)(i.default,{name:"arrow_back",className:"text-lg"}),"Back to Providers"]})}),(0,t.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,t.jsx)(c.Zp,{children:(0,t.jsx)(c.Wu,{children:(0,t.jsxs)("form",{onSubmit:_,className:"flex flex-col gap-6",children:[(0,t.jsx)(v,{label:"Provider",required:!0,error:y.provider,children:(0,t.jsxs)(g.l6,{value:o.provider,onValueChange:e=>w("provider",e),children:[(0,t.jsx)(g.bq,{className:"w-full",children:(0,t.jsx)(g.yv,{placeholder:"Select a provider"})}),(0,t.jsx)(g.gC,{children:m.map(e=>(0,t.jsx)(g.eb,{value:String(e.value),children:e.label},e.value))})]})}),j&&(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4 rounded-[10px] bg-background border border-border",children:[(0,t.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-background border border-border",children:(0,t.jsx)(i.default,{name:j.icon,className:"text-xl",style:{color:j.color}})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:j.name}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Selected provider"})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("div",{className:"flex gap-3",children:x.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>w("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${o.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,t.jsx)(i.default,{name:"api_key"===e.value?"key":"lock",className:""}),(0,t.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===o.authMethod&&(0,t.jsx)(v,{label:"API Key",required:!0,error:y.apiKey,hint:"Your API key will be encrypted and stored securely.",children:(0,t.jsx)(p.p,{type:"password",placeholder:"Enter your API key",value:o.apiKey,onChange:e=>w("apiKey",e.target.value)})}),"oauth2"===o.authMethod&&(0,t.jsxs)("div",{className:"p-4 rounded-[10px] bg-background border border-border",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Connect your account using OAuth2 authentication."}),(0,t.jsxs)(u.$,{type:"button",variant:"secondary",children:[(0,t.jsx)(i.default,{name:"link"}),"Connect with OAuth2"]})]}),(0,t.jsx)(v,{label:"Display Name",hint:"Optional. A friendly name to identify this configuration.",children:(0,t.jsx)(p.p,{placeholder:"e.g., Production API, Dev Environment",value:o.displayName,onChange:e=>w("displayName",e.target.value)})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(l.d,{checked:o.isActive,onCheckedChange:e=>w("isActive",e),"aria-label":"Active"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Active"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Enable this provider for use in your applications"})]})]}),y.submit&&(0,t.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:y.submit}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,t.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,t.jsx)(u.$,{type:"button",variant:"ghost",className:"w-full",children:"Cancel"})}),(0,t.jsxs)(u.$,{type:"submit",disabled:a,className:"w-full flex-1",children:[a&&(0,t.jsx)(h.A,{className:"size-4 animate-spin"}),"Create Provider"]})]})]})})})]})}},14231:(e,a,r)=>{"use strict";r.d(a,{d:()=>n});var t=r(29798);r(15814);var i=r(5471),s=r(72320);function n({className:e,size:a="default",...r}){return(0,t.jsx)(s.bL,{"data-slot":"switch","data-size":a,className:(0,i.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...r,children:(0,t.jsx)(s.zi,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}},18055:(e,a,r)=>{"use strict";r.d(a,{$:()=>d});var t=r(29798);r(15814);var i=r(54366),s=r(5471),n=r(80954);let o=(0,i.F)("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function d({className:e,variant:a="default",size:r="default",asChild:i=!1,...l}){let c=i?n.bL:"button";return(0,t.jsx)(c,{"data-slot":"button","data-variant":a,"data-size":r,className:(0,s.cn)(o({variant:a,size:r,className:e})),...l})}},45111:(e,a,r)=>{"use strict";r.d(a,{bq:()=>u,eb:()=>g,gC:()=>p,l6:()=>l,yv:()=>c});var t=r(29798);r(15814);var i=r(5471),s=r(95862),n=r(58765),o=r(63587),d=r(28830);function l({...e}){return(0,t.jsx)(s.bL,{"data-slot":"select",...e})}function c({...e}){return(0,t.jsx)(s.WT,{"data-slot":"select-value",...e})}function u({className:e,size:a="default",children:r,...o}){return(0,t.jsxs)(s.l9,{"data-slot":"select-trigger","data-size":a,className:(0,i.cn)("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-background py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[r,(0,t.jsx)(s.In,{asChild:!0,children:(0,t.jsx)(n.A,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function p({className:e,children:a,position:r="popper",align:n="center",...o}){return(0,t.jsx)(s.ZL,{children:(0,t.jsxs)(s.UC,{"data-slot":"select-content","data-align-trigger":"item-aligned"===r,className:(0,i.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:n,...o,children:[(0,t.jsx)(h,{}),(0,t.jsx)(s.LM,{"data-position":r,className:(0,i.cn)("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)","popper"===r&&""),children:a}),(0,t.jsx)(f,{})]})})}function g({className:e,children:a,...r}){return(0,t.jsxs)(s.q7,{"data-slot":"select-item",className:(0,i.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:(0,t.jsx)(s.VF,{children:(0,t.jsx)(o.A,{className:"pointer-events-none"})})}),(0,t.jsx)(s.p4,{children:a})]})}function h({className:e,...a}){return(0,t.jsx)(s.PP,{"data-slot":"select-scroll-up-button",className:(0,i.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:(0,t.jsx)(d.A,{})})}function f({className:e,...a}){return(0,t.jsx)(s.wn,{"data-slot":"select-scroll-down-button",className:(0,i.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:(0,t.jsx)(n.A,{})})}},51660:(e,a,r)=>{"use strict";r.d(a,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>i,_$:()=>n,MA:()=>t.MA,UY:()=>d,Nu:()=>s,zN:()=>t.zN,B2:()=>o});var t=r(13794);r(80159);let i={name:"10Router Proxy",description:"AI Infrastructure Management",version:"0.1.3"},s={changelogUrl:"/api/changelog"},n=20128,o={storageKey:"theme",defaultTheme:"light"},d={maxLines:500,pollIntervalMs:1e3}},58913:(e,a,r)=>{"use strict";r.d(a,{default:()=>d});var t=r(29798);r(15814);var i=r(36256);let s={add:"Plus",account_circle:"CircleUser",account_tree:"GitFork",api:"Plug",apps:"LayoutGrid",arrow_back:"ArrowLeft",arrow_downward:"ArrowDown",arrow_forward:"ArrowRight",arrow_upward:"ArrowUp",attach_file:"Paperclip",bar_chart:"BarChart3",block:"Ban",bolt:"Zap",business:"Briefcase",cancel:"X",cast:"Cast",chat:"MessageSquare",check:"Check",check_circle:"CheckCircle2",checklist:"ClipboardCheck",chevron_down:"ChevronDown",chevron_left:"ChevronLeft",chevron_right:"ChevronRight",chevron_up:"ChevronUp",close:"X",cloud:"Cloud",cloud_off:"CloudOff",cloud_sync:"CloudSync",cloud_upload:"CloudUpload",code:"Code2",computer:"Monitor",content_copy:"Copy",cookie:"Cookie",dashboard:"LayoutDashboard",data_array:"Table",data_object:"Braces",data_usage:"BarChart3",dark_mode:"Moon",delete:"Trash2",devices:"MonitorSmartphone",dns:"Network",download:"Download",edit:"Pencil",error:"CircleAlert",expand_more:"ChevronDown",extension:"Blocks",file_upload:"UploadCloud",filter_alt_off:"SlidersHorizontal",folder_open:"FolderOpen",gavel:"Scale",graphic_eq:"AudioWaveform",grid_view:"Grid2X2",group:"Users",help:"CircleHelp",history:"History",hourglass_top:"Timer",hub:"Router",image:"Image",image_search:"ScanSearch",info:"Info",input:"FileInput",key:"Key",keyboard_arrow_down:"ArrowDown",keyboard_arrow_up:"ArrowUp",lan:"Layers",language:"Languages",layers:"Layers",legend_toggle:"ListTree",light_mode:"Sun",link:"Link",link_off:"Link2Off",lock:"Lock",lock_open:"LockOpen",logout:"LogOut",menu:"Menu",menu_book:"BookOpen",mic:"Mic",monitoring:"Activity",monitor:"Monitor",movie:"Clapperboard",music_note:"Music",neurology:"Brain",open_in_new:"ExternalLink",output:"FileOutput",pause_circle:"CirclePause",person:"User",play_arrow:"Play",play_circle:"CirclePlay",playlist_add:"ListPlus",power:"Power",power_off:"PowerOff",power_settings_new:"Power",progress_activity:"Loader2",psychology:"BrainCircuit",public:"Earth",qr_code_scanner:"ScanQrCode",record_voice_over:"Mic",refresh:"RefreshCw",restart_alt:"RotateCcw",restore:"RotateCcw",rocket_launch:"Rocket",route:"Route",save:"Save",savings:"PiggyBank",scatter_plot:"ScatterChart",schedule:"Clock",science:"FlaskConical",search:"Search",search_off:"SearchX",security:"ShieldCheck",send:"Send",settings:"Settings",shield:"Shield",shield_lock:"ShieldCheck",shield_with_heart:"HeartPulse",smart_toy:"Bot",star:"Star",stop:"Square",stop_circle:"CircleStop",sync:"RefreshCw",sync_alt:"RefreshCw",terminal:"Terminal",toggle_off:"ToggleLeft",toggle_on:"ToggleRight",translate:"Languages",travel_explore:"Music4",upload:"Upload",upload_file:"UploadCloud",verified:"BadgeCheck",verified_user:"ShieldCheck",visibility:"Eye",visibility_off:"EyeOff",vpn_key:"KeyRound",vpn_lock:"Lock",warning:"TriangleAlert",wifi:"Wifi",wifi_off:"WifiOff",wifi_tethering:"Wifi"};function n(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){let a=e.trim().match(/^(\d+(?:\.\d+)?)px$/);if(a)return Number(a[1])}return null}function o({name:e="",className:a,style:r,...d}){let l=i[e]??i[s[e]||String(e).split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e[0].toUpperCase()+e.slice(1)).join("")]??i.Circle,c=function(e=""){let a=String(e).match(/\[(\d+(?:\.\d+)?)px\]/);return a?Number(a[1]):({"text-xs":12,"text-sm":14,"text-base":16,"text-lg":18,"text-xl":20,"text-2xl":24,"text-3xl":30,"text-4xl":36})[String(e).match(/\btext-(xs|sm|base|lg|xl|2xl|3xl|4xl)\b/)?.[0]]||null}(a)??(r&&"object"==typeof r?n(r.width)??n(r.height)??n(r.fontSize):null),u=c?{width:c,height:c}:void 0,p=String(a??"").replace(/\bmaterial-symbols-outlined\b/g,"").replace(/\bfill-1\b/g,"").replace(/\s+/g," ").trim();return(0,t.jsx)(l,{className:p,style:u?{...u,...r}:r,"aria-hidden":"true",...d})}function d({name:e,className:a,style:r}){return(0,t.jsx)(o,{name:e,className:a,style:r})}},75669:(e,a,r)=>{"use strict";r.d(a,{BT:()=>d,Wu:()=>c,X9:()=>l,ZB:()=>o,Zp:()=>s,aR:()=>n});var t=r(29798);r(15814);var i=r(5471);function s({className:e,size:a="default",...r}){return(0,t.jsx)("div",{"data-slot":"card","data-size":a,className:(0,i.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...r})}function n({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,i.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a})}function o({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,i.cn)("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a})}function d({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,i.cn)("text-sm text-muted-foreground",e),...a})}function l({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,i.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})}function c({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,i.cn)("flex flex-col gap-3 px-(--card-spacing)",e),...a})}},76103:(e,a,r)=>{Promise.resolve().then(r.bind(r,1689))},77345:(e,a,r)=>{"use strict";r.d(a,{p:()=>s});var t=r(29798);r(15814);var i=r(5471);function s({className:e,type:a,...r}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,i.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-background px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r})}}},e=>{e.O(0,[6766,5166,7552,9980,1471,5778,3577,5862,5113,159,427,9966,7358],()=>e(e.s=76103)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{1689:(e,a,r)=>{"use strict";r.r(a),r.d(a,{default:()=>b});var t=r(29798),i=r(58913),s=r(15814),n=r(70782),o=r(50141),d=r.n(o),l=r(14231),c=r(75669),u=r(18055),p=r(77345),g=r(45111),h=r(69221),f=r(51660);let m=Object.values(f.Q2).map(e=>({value:e.id,label:e.name})),x=Object.values(f.MA).map(e=>({value:e.id,label:e.name}));function v({label:e,required:a,error:r,hint:i,className:s,children:n}){return(0,t.jsxs)("div",{className:`flex flex-col gap-1.5 ${s||""}`,children:[e&&(0,t.jsxs)("label",{className:"text-sm font-medium text-foreground",children:[e,a&&(0,t.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),n,r&&(0,t.jsx)("p",{className:"text-xs text-red-500",children:r}),i&&!r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i})]})}function b(){let e=(0,n.useRouter)(),[a,r]=(0,s.useState)(!1),[o,b]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[y,k]=(0,s.useState)({}),w=(e,a)=>{b(r=>({...r,[e]:a})),y[e]&&k(a=>({...a,[e]:null}))},_=async a=>{let t;if(a.preventDefault(),t={},o.provider||(t.provider="Please select a provider"),"api_key"!==o.authMethod||o.apiKey||(t.apiKey="API Key is required"),k(t),0===Object.keys(t).length){r(!0);try{let a=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(a.ok)e.push("/dashboard/providers");else{let e=await a.json();k({submit:e.error||"Failed to create provider"})}}catch(e){k({submit:"An error occurred. Please try again."})}finally{r(!1)}}},j=f.Q2[o.provider];return(0,t.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(u.$,{variant:"outline",size:"sm",asChild:!0,className:"mb-4",children:(0,t.jsxs)(d(),{href:"/dashboard/providers",children:[(0,t.jsx)(i.default,{name:"arrow_back",className:"text-lg"}),"Back to Providers"]})}),(0,t.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,t.jsx)(c.Zp,{children:(0,t.jsx)(c.Wu,{children:(0,t.jsxs)("form",{onSubmit:_,className:"flex flex-col gap-6",children:[(0,t.jsx)(v,{label:"Provider",required:!0,error:y.provider,children:(0,t.jsxs)(g.l6,{value:o.provider,onValueChange:e=>w("provider",e),children:[(0,t.jsx)(g.bq,{className:"w-full",children:(0,t.jsx)(g.yv,{placeholder:"Select a provider"})}),(0,t.jsx)(g.gC,{children:m.map(e=>(0,t.jsx)(g.eb,{value:String(e.value),children:e.label},e.value))})]})}),j&&(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4 rounded-[10px] bg-background border border-border",children:[(0,t.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-background border border-border",children:(0,t.jsx)(i.default,{name:j.icon,className:"text-xl",style:{color:j.color}})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:j.name}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Selected provider"})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("div",{className:"flex gap-3",children:x.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>w("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${o.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,t.jsx)(i.default,{name:"api_key"===e.value?"key":"lock",className:""}),(0,t.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===o.authMethod&&(0,t.jsx)(v,{label:"API Key",required:!0,error:y.apiKey,hint:"Your API key will be encrypted and stored securely.",children:(0,t.jsx)(p.p,{type:"password",placeholder:"Enter your API key",value:o.apiKey,onChange:e=>w("apiKey",e.target.value)})}),"oauth2"===o.authMethod&&(0,t.jsxs)("div",{className:"p-4 rounded-[10px] bg-background border border-border",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Connect your account using OAuth2 authentication."}),(0,t.jsxs)(u.$,{type:"button",variant:"secondary",children:[(0,t.jsx)(i.default,{name:"link"}),"Connect with OAuth2"]})]}),(0,t.jsx)(v,{label:"Display Name",hint:"Optional. A friendly name to identify this configuration.",children:(0,t.jsx)(p.p,{placeholder:"e.g., Production API, Dev Environment",value:o.displayName,onChange:e=>w("displayName",e.target.value)})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(l.d,{checked:o.isActive,onCheckedChange:e=>w("isActive",e),"aria-label":"Active"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Active"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Enable this provider for use in your applications"})]})]}),y.submit&&(0,t.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:y.submit}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,t.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,t.jsx)(u.$,{type:"button",variant:"ghost",className:"w-full",children:"Cancel"})}),(0,t.jsxs)(u.$,{type:"submit",disabled:a,className:"w-full flex-1",children:[a&&(0,t.jsx)(h.A,{className:"size-4 animate-spin"}),"Create Provider"]})]})]})})})]})}},14231:(e,a,r)=>{"use strict";r.d(a,{d:()=>n});var t=r(29798);r(15814);var i=r(5471),s=r(72320);function n({className:e,size:a="default",...r}){return(0,t.jsx)(s.bL,{"data-slot":"switch","data-size":a,className:(0,i.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...r,children:(0,t.jsx)(s.zi,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}},18055:(e,a,r)=>{"use strict";r.d(a,{$:()=>d});var t=r(29798);r(15814);var i=r(54366),s=r(5471),n=r(80954);let o=(0,i.F)("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function d({className:e,variant:a="default",size:r="default",asChild:i=!1,...l}){let c=i?n.bL:"button";return(0,t.jsx)(c,{"data-slot":"button","data-variant":a,"data-size":r,className:(0,s.cn)(o({variant:a,size:r,className:e})),...l})}},45111:(e,a,r)=>{"use strict";r.d(a,{bq:()=>u,eb:()=>g,gC:()=>p,l6:()=>l,yv:()=>c});var t=r(29798);r(15814);var i=r(5471),s=r(95862),n=r(58765),o=r(63587),d=r(28830);function l({...e}){return(0,t.jsx)(s.bL,{"data-slot":"select",...e})}function c({...e}){return(0,t.jsx)(s.WT,{"data-slot":"select-value",...e})}function u({className:e,size:a="default",children:r,...o}){return(0,t.jsxs)(s.l9,{"data-slot":"select-trigger","data-size":a,className:(0,i.cn)("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-background py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[r,(0,t.jsx)(s.In,{asChild:!0,children:(0,t.jsx)(n.A,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function p({className:e,children:a,position:r="popper",align:n="center",...o}){return(0,t.jsx)(s.ZL,{children:(0,t.jsxs)(s.UC,{"data-slot":"select-content","data-align-trigger":"item-aligned"===r,className:(0,i.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:n,...o,children:[(0,t.jsx)(h,{}),(0,t.jsx)(s.LM,{"data-position":r,className:(0,i.cn)("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)","popper"===r&&""),children:a}),(0,t.jsx)(f,{})]})})}function g({className:e,children:a,...r}){return(0,t.jsxs)(s.q7,{"data-slot":"select-item",className:(0,i.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:(0,t.jsx)(s.VF,{children:(0,t.jsx)(o.A,{className:"pointer-events-none"})})}),(0,t.jsx)(s.p4,{children:a})]})}function h({className:e,...a}){return(0,t.jsx)(s.PP,{"data-slot":"select-scroll-up-button",className:(0,i.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:(0,t.jsx)(d.A,{})})}function f({className:e,...a}){return(0,t.jsx)(s.wn,{"data-slot":"select-scroll-down-button",className:(0,i.cn)("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:(0,t.jsx)(n.A,{})})}},51660:(e,a,r)=>{"use strict";r.d(a,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>i,_$:()=>n,MA:()=>t.MA,UY:()=>d,Nu:()=>s,zN:()=>t.zN,B2:()=>o});var t=r(13794);r(80159);let i={name:"10Router Proxy",description:"AI Infrastructure Management",version:"0.1.5"},s={changelogUrl:"/api/changelog"},n=20128,o={storageKey:"theme",defaultTheme:"light"},d={maxLines:500,pollIntervalMs:1e3}},58913:(e,a,r)=>{"use strict";r.d(a,{default:()=>d});var t=r(29798);r(15814);var i=r(36256);let s={add:"Plus",account_circle:"CircleUser",account_tree:"GitFork",api:"Plug",apps:"LayoutGrid",arrow_back:"ArrowLeft",arrow_downward:"ArrowDown",arrow_forward:"ArrowRight",arrow_upward:"ArrowUp",attach_file:"Paperclip",bar_chart:"BarChart3",block:"Ban",bolt:"Zap",business:"Briefcase",cancel:"X",cast:"Cast",chat:"MessageSquare",check:"Check",check_circle:"CheckCircle2",checklist:"ClipboardCheck",chevron_down:"ChevronDown",chevron_left:"ChevronLeft",chevron_right:"ChevronRight",chevron_up:"ChevronUp",close:"X",cloud:"Cloud",cloud_off:"CloudOff",cloud_sync:"CloudSync",cloud_upload:"CloudUpload",code:"Code2",computer:"Monitor",content_copy:"Copy",cookie:"Cookie",dashboard:"LayoutDashboard",data_array:"Table",data_object:"Braces",data_usage:"BarChart3",dark_mode:"Moon",delete:"Trash2",devices:"MonitorSmartphone",dns:"Network",download:"Download",edit:"Pencil",error:"CircleAlert",expand_more:"ChevronDown",extension:"Blocks",file_upload:"UploadCloud",filter_alt_off:"SlidersHorizontal",folder_open:"FolderOpen",gavel:"Scale",graphic_eq:"AudioWaveform",grid_view:"Grid2X2",group:"Users",help:"CircleHelp",history:"History",hourglass_top:"Timer",hub:"Router",image:"Image",image_search:"ScanSearch",info:"Info",input:"FileInput",key:"Key",keyboard_arrow_down:"ArrowDown",keyboard_arrow_up:"ArrowUp",lan:"Layers",language:"Languages",layers:"Layers",legend_toggle:"ListTree",light_mode:"Sun",link:"Link",link_off:"Link2Off",lock:"Lock",lock_open:"LockOpen",logout:"LogOut",menu:"Menu",menu_book:"BookOpen",mic:"Mic",monitoring:"Activity",monitor:"Monitor",movie:"Clapperboard",music_note:"Music",neurology:"Brain",open_in_new:"ExternalLink",output:"FileOutput",pause_circle:"CirclePause",person:"User",play_arrow:"Play",play_circle:"CirclePlay",playlist_add:"ListPlus",power:"Power",power_off:"PowerOff",power_settings_new:"Power",progress_activity:"Loader2",psychology:"BrainCircuit",public:"Earth",qr_code_scanner:"ScanQrCode",record_voice_over:"Mic",refresh:"RefreshCw",restart_alt:"RotateCcw",restore:"RotateCcw",rocket_launch:"Rocket",route:"Route",save:"Save",savings:"PiggyBank",scatter_plot:"ScatterChart",schedule:"Clock",science:"FlaskConical",search:"Search",search_off:"SearchX",security:"ShieldCheck",send:"Send",settings:"Settings",shield:"Shield",shield_lock:"ShieldCheck",shield_with_heart:"HeartPulse",smart_toy:"Bot",star:"Star",stop:"Square",stop_circle:"CircleStop",sync:"RefreshCw",sync_alt:"RefreshCw",terminal:"Terminal",toggle_off:"ToggleLeft",toggle_on:"ToggleRight",translate:"Languages",travel_explore:"Music4",upload:"Upload",upload_file:"UploadCloud",verified:"BadgeCheck",verified_user:"ShieldCheck",visibility:"Eye",visibility_off:"EyeOff",vpn_key:"KeyRound",vpn_lock:"Lock",warning:"TriangleAlert",wifi:"Wifi",wifi_off:"WifiOff",wifi_tethering:"Wifi"};function n(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){let a=e.trim().match(/^(\d+(?:\.\d+)?)px$/);if(a)return Number(a[1])}return null}function o({name:e="",className:a,style:r,...d}){let l=i[e]??i[s[e]||String(e).split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e[0].toUpperCase()+e.slice(1)).join("")]??i.Circle,c=function(e=""){let a=String(e).match(/\[(\d+(?:\.\d+)?)px\]/);return a?Number(a[1]):({"text-xs":12,"text-sm":14,"text-base":16,"text-lg":18,"text-xl":20,"text-2xl":24,"text-3xl":30,"text-4xl":36})[String(e).match(/\btext-(xs|sm|base|lg|xl|2xl|3xl|4xl)\b/)?.[0]]||null}(a)??(r&&"object"==typeof r?n(r.width)??n(r.height)??n(r.fontSize):null),u=c?{width:c,height:c}:void 0,p=String(a??"").replace(/\bmaterial-symbols-outlined\b/g,"").replace(/\bfill-1\b/g,"").replace(/\s+/g," ").trim();return(0,t.jsx)(l,{className:p,style:u?{...u,...r}:r,"aria-hidden":"true",...d})}function d({name:e,className:a,style:r}){return(0,t.jsx)(o,{name:e,className:a,style:r})}},75669:(e,a,r)=>{"use strict";r.d(a,{BT:()=>d,Wu:()=>c,X9:()=>l,ZB:()=>o,Zp:()=>s,aR:()=>n});var t=r(29798);r(15814);var i=r(5471);function s({className:e,size:a="default",...r}){return(0,t.jsx)("div",{"data-slot":"card","data-size":a,className:(0,i.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...r})}function n({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,i.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a})}function o({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,i.cn)("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a})}function d({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,i.cn)("text-sm text-muted-foreground",e),...a})}function l({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,i.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})}function c({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,i.cn)("flex flex-col gap-3 px-(--card-spacing)",e),...a})}},76103:(e,a,r)=>{Promise.resolve().then(r.bind(r,1689))},77345:(e,a,r)=>{"use strict";r.d(a,{p:()=>s});var t=r(29798);r(15814);var i=r(5471);function s({className:e,type:a,...r}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,i.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-background px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r})}}},e=>{e.O(0,[6766,5166,7552,9980,1471,5778,3577,5862,5113,159,427,9966,7358],()=>e(e.s=76103)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1352:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>i,ZI:()=>l,k$:()=>s,m_:()=>d});var o=n(29798);n(15814);var r=n(5471),a=n(44484);function i({delayDuration:e=0,...t}){return(0,o.jsx)(a.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function d({...e}){return(0,o.jsx)(a.bL,{"data-slot":"tooltip",...e})}function s({...e}){return(0,o.jsx)(a.l9,{"data-slot":"tooltip-trigger",...e})}function l({className:e,sideOffset:t=0,children:n,...i}){return(0,o.jsx)(a.ZL,{children:(0,o.jsxs)(a.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,r.cn)("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...i,children:[n,(0,o.jsx)(a.i3,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}},8872:(e,t,n)=>{Promise.resolve().then(n.bind(n,48565)),Promise.resolve().then(n.bind(n,1693)),Promise.resolve().then(n.bind(n,4780)),Promise.resolve().then(n.t.bind(n,52760,23)),Promise.resolve().then(n.t.bind(n,10414,23)),Promise.resolve().then(n.t.bind(n,65262,23)),Promise.resolve().then(n.t.bind(n,63185,23)),Promise.resolve().then(n.bind(n,84885)),Promise.resolve().then(n.bind(n,33526))},33526:(e,t,n)=>{"use strict";n.d(t,{ThemeProvider:()=>d});var o=n(29798),r=n(15814),a=n(88739),i=n(1352);function d({children:e}){let{initTheme:t}=(0,a.A)();return(0,r.useEffect)(()=>{t()},[t]),(0,o.jsx)(i.Bc,{children:e})}},51660:(e,t,n)=>{"use strict";n.d(t,{Q2:()=>o.Q2,fg:()=>o.fg,vQ:()=>r,_$:()=>i,MA:()=>o.MA,UY:()=>s,Nu:()=>a,zN:()=>o.zN,B2:()=>d});var o=n(13794);n(80159);let r={name:"10Router Proxy",description:"AI Infrastructure Management",version:"0.1.
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1352:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>i,ZI:()=>l,k$:()=>s,m_:()=>d});var o=n(29798);n(15814);var r=n(5471),a=n(44484);function i({delayDuration:e=0,...t}){return(0,o.jsx)(a.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function d({...e}){return(0,o.jsx)(a.bL,{"data-slot":"tooltip",...e})}function s({...e}){return(0,o.jsx)(a.l9,{"data-slot":"tooltip-trigger",...e})}function l({className:e,sideOffset:t=0,children:n,...i}){return(0,o.jsx)(a.ZL,{children:(0,o.jsxs)(a.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,r.cn)("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...i,children:[n,(0,o.jsx)(a.i3,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}},8872:(e,t,n)=>{Promise.resolve().then(n.bind(n,48565)),Promise.resolve().then(n.bind(n,1693)),Promise.resolve().then(n.bind(n,4780)),Promise.resolve().then(n.t.bind(n,52760,23)),Promise.resolve().then(n.t.bind(n,10414,23)),Promise.resolve().then(n.t.bind(n,65262,23)),Promise.resolve().then(n.t.bind(n,63185,23)),Promise.resolve().then(n.bind(n,84885)),Promise.resolve().then(n.bind(n,33526))},33526:(e,t,n)=>{"use strict";n.d(t,{ThemeProvider:()=>d});var o=n(29798),r=n(15814),a=n(88739),i=n(1352);function d({children:e}){let{initTheme:t}=(0,a.A)();return(0,r.useEffect)(()=>{t()},[t]),(0,o.jsx)(i.Bc,{children:e})}},51660:(e,t,n)=>{"use strict";n.d(t,{Q2:()=>o.Q2,fg:()=>o.fg,vQ:()=>r,_$:()=>i,MA:()=>o.MA,UY:()=>s,Nu:()=>a,zN:()=>o.zN,B2:()=>d});var o=n(13794);n(80159);let r={name:"10Router Proxy",description:"AI Infrastructure Management",version:"0.1.5"},a={changelogUrl:"/api/changelog"},i=20128,d={storageKey:"theme",defaultTheme:"light"},s={maxLines:500,pollIntervalMs:1e3}},51780:(e,t,n)=>{"use strict";n.d(t,{FE:()=>p,Tl:()=>u,kk:()=>c,oQ:()=>m,wn:()=>g});var o=n(66454);let r={},a=o.Xn,i=[];function d(){if("u"<typeof document)return o.Xn;let e=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${o.CL}=`)),t=e?decodeURIComponent(e.split("=").slice(1).join("=")):o.Xn;return(0,o.QC)(t)}function s(e){"u">typeof document&&(document.documentElement.lang=e,document.documentElement.dir="fa"===e?"rtl":"ltr")}async function l(e){if("en"===e){r={};return}try{let t=await fetch(`/i18n/literals/${e}.json`);r=await t.json()}catch(e){console.error("Failed to load translations:",e),r={}}}function u(e){if(!e||"string"!=typeof e)return e;let t=e.trim();return t&&"en"!==a&&r[t]||e}function c(){return a}function m(e){return i.push(e),()=>{i=i.filter(t=>t!==e)}}function f(e){if(!e.nodeValue||!e.nodeValue.trim())return;let t=e.parentElement;if(!t)return;let n=t;for(;n;){if(n.hasAttribute&&n.hasAttribute("data-i18n-skip"))return;n=n.parentElement}if(["script","style","code","pre","colgroup","table","thead","tbody","tfoot","tr","select","datalist","optgroup"].includes(t.tagName?.toLowerCase()))return;e._originalText||(e._originalText=e.nodeValue);let o=u(e._originalText);o!==e.nodeValue&&(e.nodeValue=o)}function h(e){let t;if(!e)return;let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),o=[];for(;t=n.nextNode();)o.push(t);o.forEach(f)}async function p(){s(a=d()),await l(a),h(document.body),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE?h(e):e.nodeType===Node.TEXT_NODE&&f(e)})})}).observe(document.body,{childList:!0,subtree:!0})}async function g(){s(a=d()),await l(a),i.forEach(e=>e()),h(document.body)}},63185:()=>{},66454:(e,t,n)=>{"use strict";n.d(t,{CL:()=>a,QC:()=>i,Xn:()=>r,YZ:()=>o});let o=["en","fa"],r="en",a="locale";function i(e){return"fa"===e?"fa":r}},84885:(e,t,n)=>{"use strict";n.d(t,{RuntimeI18nProvider:()=>d});var o=n(29798),r=n(15814),a=n(70782),i=n(51780);function d({children:e}){let t=(0,a.usePathname)();return(0,r.useEffect)(()=>{(0,i.FE)()},[]),(0,r.useEffect)(()=>{t&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,i.wn)()})})},[t]),(0,o.jsx)(o.Fragment,{children:e})}},88739:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var o=n(58013),r=n(47353),a=n(51660);function i(){document.documentElement.classList.remove("dark")}let d=(0,o.v)()((0,r.Zr)(e=>({theme:"light",setTheme:()=>{e({theme:"light"}),i()},toggleTheme:()=>{e({theme:"light"}),i()},initTheme:()=>{e({theme:"light"}),i()}}),{name:a.B2.storageKey}))}},e=>{e.O(0,[165,2262,5166,7552,9980,4484,7287,159,427,9966,7358],()=>e(e.s=8872)),_N_E=e.O()}]);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { DefaultExecutor } from "./default.js";
|
|
3
3
|
import { resolveSessionId } from "../utils/sessionManager.js";
|
|
4
|
-
import {
|
|
4
|
+
import { modelTargetFormat } from "../providers/models/schema.js";
|
|
5
|
+
import { getProviderModels } from "../config/providerModels.js";
|
|
5
6
|
import {
|
|
6
7
|
normalizeResponsesInput,
|
|
7
8
|
clampResponsesCallId,
|
|
@@ -172,7 +173,9 @@ function baseModelId(model) {
|
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
function isResponsesModel(model) {
|
|
175
|
-
|
|
176
|
+
// PROVIDER_MODELS is keyed by alias ("ocz"), not provider id.
|
|
177
|
+
const entry = getProviderModels("ocz").find((m) => m.id === baseModelId(model));
|
|
178
|
+
return modelTargetFormat(entry) === "openai-responses";
|
|
176
179
|
}
|
|
177
180
|
|
|
178
181
|
// Flatten Chat Completions tool declarations into the Responses flat shape and
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
textIcon: "OC",
|
|
12
12
|
website: "https://opencode.ai/auth",
|
|
13
13
|
notice: {
|
|
14
|
-
text: "OpenCode Go
|
|
14
|
+
text: "OpenCode Go: $10/mo, Go Plus $40/mo. Access to Kimi, GLM, Qwen, MiMo, MiniMax models.",
|
|
15
15
|
apiKeyUrl: "https://opencode.ai/auth",
|
|
16
16
|
},
|
|
17
17
|
},
|
|
@@ -43,9 +43,9 @@ export default {
|
|
|
43
43
|
auth: { combined: true, header: "Authorization", scheme: "bearer" },
|
|
44
44
|
},
|
|
45
45
|
],
|
|
46
|
-
// supportedFormats follow the endpoint table in https://opencode.ai/docs/go
|
|
46
|
+
// supportedFormats follow the endpoint table in https://opencode.ai/v2/docs/console/go
|
|
47
47
|
models: [
|
|
48
|
-
{ id: "deepseek-flash", name: "DeepSeek V4.1 Flash", supportedFormats: ["openai"] },
|
|
48
|
+
{ id: "deepseek-v4.1-flash", name: "DeepSeek V4.1 Flash", supportedFormats: ["openai"] },
|
|
49
49
|
{ id: "glm-5.3-flash", name: "GLM 5.3 Flash (Vision)", supportedFormats: ["openai"] },
|
|
50
50
|
{ id: "glm-5.3", name: "GLM 5.3", supportedFormats: ["openai"] },
|
|
51
51
|
{ id: "glm-5.2", name: "GLM 5.2", supportedFormats: ["openai"] },
|
|
@@ -69,26 +69,43 @@ export default {
|
|
|
69
69
|
supportedFormats: ["openai", "claude", "openai-responses"],
|
|
70
70
|
},
|
|
71
71
|
{ id: "longcat-2.0", name: "LongCat 2.0", supportedFormats: ["openai"] },
|
|
72
|
+
{ id: "mimo-v2.6-flash", name: "MiMo V2.6 Flash", supportedFormats: ["openai"] },
|
|
73
|
+
{ id: "mimo-v2.6-pro", name: "MiMo V2.6 Pro", supportedFormats: ["openai"] },
|
|
72
74
|
{ id: "mimo-v2.5", name: "MiMo V2.5", supportedFormats: ["openai"] },
|
|
73
75
|
{ id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro", supportedFormats: ["openai"] },
|
|
74
76
|
{ id: "minimax-m3", name: "MiniMax M3", supportedFormats: ["openai", "claude"] },
|
|
75
77
|
{ id: "minimax-m2.7", name: "MiniMax M2.7", supportedFormats: ["openai", "claude"] },
|
|
76
|
-
{ id: "minimax-m2.5", name: "MiniMax M2.5", supportedFormats: ["openai", "claude"] },
|
|
77
78
|
{ id: "qwen3.8-max", name: "Qwen 3.8 Max", supportedFormats: ["openai", "claude"] },
|
|
78
79
|
{ id: "qwen3.8-flash", name: "Qwen 3.8 Flash", supportedFormats: ["openai", "claude"] },
|
|
79
|
-
{ id: "qwen3.7-max", name: "Qwen 3.7 Max", supportedFormats: ["openai", "claude"] },
|
|
80
80
|
{ id: "qwen3.7-plus", name: "Qwen 3.7 Plus", supportedFormats: ["openai", "claude"] },
|
|
81
|
-
{ id: "qwen3.6-plus", name: "Qwen 3.6 Plus", supportedFormats: ["openai", "claude"] },
|
|
82
81
|
{ id: "hy4-preview", name: "Hy4 Preview", supportedFormats: ["openai"] },
|
|
83
82
|
{ id: "hy3", name: "Hy3", supportedFormats: ["openai"] },
|
|
83
|
+
{ id: "space-bunny-free", name: "Space Bunny Free", supportedFormats: ["openai"] },
|
|
84
|
+
{
|
|
85
|
+
id: "longcat-2.5-preview-free",
|
|
86
|
+
name: "LongCat 2.5 Preview Free",
|
|
87
|
+
supportedFormats: ["openai"],
|
|
88
|
+
},
|
|
84
89
|
// Served by /zen/go/v1/responses only — the responses-only entry forces chatCore
|
|
85
90
|
// past the sourceFormat-matched transports into translation (see chatCore guard).
|
|
91
|
+
{
|
|
92
|
+
id: "grok-4.7",
|
|
93
|
+
name: "Grok 4.7",
|
|
94
|
+
targetFormat: "openai-responses",
|
|
95
|
+
supportedFormats: ["openai-responses"],
|
|
96
|
+
},
|
|
86
97
|
{
|
|
87
98
|
id: "grok-4.6",
|
|
88
99
|
name: "Grok 4.6",
|
|
89
100
|
targetFormat: "openai-responses",
|
|
90
101
|
supportedFormats: ["openai-responses"],
|
|
91
102
|
},
|
|
103
|
+
{
|
|
104
|
+
id: "gpt-6-luna",
|
|
105
|
+
name: "GPT 6 Luna",
|
|
106
|
+
targetFormat: "openai-responses",
|
|
107
|
+
supportedFormats: ["openai-responses"],
|
|
108
|
+
},
|
|
92
109
|
{
|
|
93
110
|
id: "gpt-5.6-luna",
|
|
94
111
|
name: "GPT 5.6 Luna",
|
|
@@ -24,7 +24,8 @@ export default {
|
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
// Multi-endpoint: pick the transport matching the client sourceFormat to skip
|
|
27
|
-
// translation. Mirrors opencode-go, pointed at /zen/v1 (
|
|
27
|
+
// translation. Mirrors opencode-go, pointed at /zen/v1 (endpoint families per
|
|
28
|
+
// https://opencode.ai/v2/docs/console/inference, Go table at /v2/docs/console/go).
|
|
28
29
|
transports: [
|
|
29
30
|
{
|
|
30
31
|
format: "openai",
|
|
@@ -42,8 +43,8 @@ export default {
|
|
|
42
43
|
auth: { combined: true, header: "Authorization", scheme: "bearer" },
|
|
43
44
|
},
|
|
44
45
|
],
|
|
45
|
-
// supportedFormats follow the
|
|
46
|
-
//
|
|
46
|
+
// supportedFormats follow the per-model API families (chat completions /
|
|
47
|
+
// messages / responses) documented in https://opencode.ai/v2/docs/console/inference.
|
|
47
48
|
models: [
|
|
48
49
|
// Claude (messages)
|
|
49
50
|
{ id: "claude-fable-5", name: "Claude Fable 5", supportedFormats: ["claude"] },
|
|
@@ -288,7 +289,8 @@ export default {
|
|
|
288
289
|
"User-Agent": "opencode/1.18.35",
|
|
289
290
|
},
|
|
290
291
|
},
|
|
291
|
-
|
|
292
|
+
// Live catalog per https://opencode.ai/v2/docs/console/inference (unauth GET).
|
|
293
|
+
modelsFetcher: { url: "https://opencode.ai/inference/v1/models", type: "opencode-free" },
|
|
292
294
|
passthroughModels: true,
|
|
293
295
|
features: {
|
|
294
296
|
usage: true,
|
|
@@ -49,6 +49,7 @@ export default {
|
|
|
49
49
|
"User-Agent": "opencode/1.18.35",
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
// Live catalog per https://opencode.ai/v2/docs/console/inference (unauth GET).
|
|
53
|
+
modelsFetcher: { url: "https://opencode.ai/inference/v1/models", type: "opencode-free" },
|
|
53
54
|
passthroughModels: true,
|
|
54
55
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amir83nasr/10router",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Amir83Nasr/10Router.git"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"jose": "^6.1.3",
|
|
65
65
|
"lucide-react": "^1.47.0",
|
|
66
66
|
"marked": "^18.0.1",
|
|
67
|
-
"next": "
|
|
67
|
+
"next": "16.3.5",
|
|
68
68
|
"node-machine-id": "^1.1.12",
|
|
69
69
|
"open": "^11.0.0",
|
|
70
70
|
"ora": "^9.1.0",
|
|
@@ -899,14 +899,14 @@ async function testApiKeyConnection(connection, effectiveProxy = null) {
|
|
|
899
899
|
return { valid, error: valid ? null : "Session expired — re-paste cookie" };
|
|
900
900
|
}
|
|
901
901
|
case "opencode": {
|
|
902
|
-
// Connectivity-only probe: GET /models never exercises the Responses
|
|
902
|
+
// Connectivity-only probe: GET /inference/v1/models never exercises the Responses
|
|
903
903
|
// tool path, so a green dashboard test does NOT rule out 403
|
|
904
904
|
// FreeTierError on POST /zen/v1/responses with tools (requires
|
|
905
905
|
// bash+read decoys + tool_choice auto — see OpenCodeExecutor).
|
|
906
906
|
const res = await fetchWithConnectionProxy(
|
|
907
|
-
"https://opencode.ai/
|
|
907
|
+
"https://opencode.ai/inference/v1/models",
|
|
908
908
|
{
|
|
909
|
-
headers: {
|
|
909
|
+
headers: { "User-Agent": "opencode/1.18.35" },
|
|
910
910
|
},
|
|
911
911
|
effectiveProxy,
|
|
912
912
|
);
|
|
File without changes
|
|
File without changes
|