vansrouter 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (972) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +8 -7
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  6. package/app/.next-cli-build/routes-manifest.json +8 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +5 -5
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  77. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  88. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  92. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  93. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  95. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/check/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/check/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  135. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  175. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  177. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  207. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js +1 -0
  235. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js.nft.json +1 -0
  236. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route_client-reference-manifest.js +1 -0
  237. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  266. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  268. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  272. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  274. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  276. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  278. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  280. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  282. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  284. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  286. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  288. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  304. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  326. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  362. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  394. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  396. package/app/.next-cli-build/server/app/callback.html +1 -1
  397. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  398. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  399. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  401. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  406. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  407. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  410. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  411. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  413. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  416. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  420. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  421. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  423. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  426. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  431. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  433. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  436. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  441. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  443. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  446. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  452. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  454. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  457. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  462. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  464. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  467. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  472. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  474. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  477. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  483. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  485. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  488. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  492. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  493. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  495. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  498. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  503. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  505. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  508. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  513. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  515. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  517. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  518. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  519. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  522. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  523. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  525. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  527. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  531. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  532. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  534. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  541. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  542. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  546. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  548. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  551. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  552. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  555. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  556. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  558. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  561. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  562. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  566. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  568. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  571. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  572. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  575. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  576. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  578. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  580. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  581. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  584. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  585. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  587. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  588. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  589. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  590. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  591. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  592. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  593. package/app/.next-cli-build/server/app/landing.html +1 -1
  594. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  595. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  596. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  598. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/login/page.js +2 -2
  602. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  603. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  604. package/app/.next-cli-build/server/app/login.html +1 -1
  605. package/app/.next-cli-build/server/app/login.rsc +5 -5
  606. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  607. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  609. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  611. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  612. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +1 -1
  613. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  614. package/app/.next-cli-build/server/app/masuk/page.js +2 -2
  615. package/app/.next-cli-build/server/app/masuk/page.js.nft.json +1 -1
  616. package/app/.next-cli-build/server/app/masuk/page_client-reference-manifest.js +1 -1
  617. package/app/.next-cli-build/server/app-paths-manifest.json +8 -7
  618. package/app/.next-cli-build/server/chunks/1548.js +63 -0
  619. package/app/.next-cli-build/server/chunks/1688.js +1 -1
  620. package/app/.next-cli-build/server/chunks/2554.js +4 -4
  621. package/app/.next-cli-build/server/chunks/2557.js +4 -4
  622. package/app/.next-cli-build/server/chunks/3040.js +1 -1
  623. package/app/.next-cli-build/server/chunks/3405.js +1 -1
  624. package/app/.next-cli-build/server/chunks/3736.js +1 -1
  625. package/app/.next-cli-build/server/chunks/383.js +1 -1
  626. package/app/.next-cli-build/server/chunks/3950.js +1 -1
  627. package/app/.next-cli-build/server/chunks/4418.js +5 -5
  628. package/app/.next-cli-build/server/chunks/4539.js +1 -1
  629. package/app/.next-cli-build/server/chunks/4574.js +2 -2
  630. package/app/.next-cli-build/server/chunks/5006.js +1 -1
  631. package/app/.next-cli-build/server/chunks/5638.js +9 -0
  632. package/app/.next-cli-build/server/chunks/575.js +2 -2
  633. package/app/.next-cli-build/server/chunks/6159.js +1 -1
  634. package/app/.next-cli-build/server/chunks/6165.js +1 -1
  635. package/app/.next-cli-build/server/chunks/7006.js +1 -1
  636. package/app/.next-cli-build/server/chunks/7164.js +1 -1
  637. package/app/.next-cli-build/server/chunks/7938.js +1 -1
  638. package/app/.next-cli-build/server/chunks/8057.js +9 -0
  639. package/app/.next-cli-build/server/chunks/8691.js +1 -1
  640. package/app/.next-cli-build/server/chunks/883.js +1 -1
  641. package/app/.next-cli-build/server/chunks/9633.js +1 -1
  642. package/app/.next-cli-build/server/chunks/9673.js +1 -1
  643. package/app/.next-cli-build/server/chunks/9984.js +1 -1
  644. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  645. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  646. package/app/.next-cli-build/server/middleware.js +1 -1
  647. package/app/.next-cli-build/server/pages/404.html +1 -1
  648. package/app/.next-cli-build/server/pages/500.html +1 -1
  649. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  650. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  651. package/app/.next-cli-build/static/chunks/2940-7bfb9676e41c3baa.js +1 -0
  652. package/app/.next-cli-build/static/chunks/3657.512c2a8e4d8a3378.js +1 -0
  653. package/app/.next-cli-build/static/chunks/3700-1638d20a87ed45e9.js +23 -0
  654. package/app/.next-cli-build/static/chunks/{4385-a118d94b5fc20deb.js → 4385-d76278174392bc6b.js} +1 -1
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-f9d0971a0b2822bd.js → page-d057378e9d6e3055.js} +1 -1
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-fbb93561483790fe.js +12 -0
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-56b08e5cfa9b0979.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/_global-error/{page-6c97512bccbd0b3b.js → page-b4e2d712d7cc7da0.js} +1 -1
  659. package/app/.next-cli-build/static/chunks/app/api/auth/check/{route-6c97512bccbd0b3b.js → route-b4e2d712d7cc7da0.js} +1 -1
  660. package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-6c97512bccbd0b3b.js → route-b4e2d712d7cc7da0.js} +1 -1
  661. package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-6c97512bccbd0b3b.js → route-b4e2d712d7cc7da0.js} +1 -1
  662. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-b4e2d712d7cc7da0.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-b4e2d712d7cc7da0.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-b4e2d712d7cc7da0.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-b4e2d712d7cc7da0.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-b4e2d712d7cc7da0.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-b4e2d712d7cc7da0.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-b4e2d712d7cc7da0.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-b4e2d712d7cc7da0.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-b4e2d712d7cc7da0.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-b4e2d712d7cc7da0.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-b4e2d712d7cc7da0.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-b4e2d712d7cc7da0.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-b4e2d712d7cc7da0.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-b4e2d712d7cc7da0.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-b4e2d712d7cc7da0.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-b4e2d712d7cc7da0.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-b4e2d712d7cc7da0.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-b4e2d712d7cc7da0.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-b4e2d712d7cc7da0.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-b4e2d712d7cc7da0.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-b4e2d712d7cc7da0.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-b4e2d712d7cc7da0.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-b4e2d712d7cc7da0.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/combos/route-b4e2d712d7cc7da0.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-b4e2d712d7cc7da0.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-b4e2d712d7cc7da0.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-b4e2d712d7cc7da0.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-b4e2d712d7cc7da0.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-b4e2d712d7cc7da0.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-b4e2d712d7cc7da0.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/health/route-b4e2d712d7cc7da0.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/init/route-b4e2d712d7cc7da0.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-b4e2d712d7cc7da0.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/keys/route-b4e2d712d7cc7da0.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/locale/route-b4e2d712d7cc7da0.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-b4e2d712d7cc7da0.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-b4e2d712d7cc7da0.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-b4e2d712d7cc7da0.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-b4e2d712d7cc7da0.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-b4e2d712d7cc7da0.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-b4e2d712d7cc7da0.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-b4e2d712d7cc7da0.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-b4e2d712d7cc7da0.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-b4e2d712d7cc7da0.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-b4e2d712d7cc7da0.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-b4e2d712d7cc7da0.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/route-b4e2d712d7cc7da0.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/test/route-b4e2d712d7cc7da0.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-b4e2d712d7cc7da0.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-b4e2d712d7cc7da0.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-b4e2d712d7cc7da0.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-b4e2d712d7cc7da0.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-b4e2d712d7cc7da0.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-b4e2d712d7cc7da0.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-b4e2d712d7cc7da0.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-b4e2d712d7cc7da0.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-b4e2d712d7cc7da0.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-b4e2d712d7cc7da0.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-b4e2d712d7cc7da0.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-b4e2d712d7cc7da0.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-b4e2d712d7cc7da0.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/pricing/route-b4e2d712d7cc7da0.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-b4e2d712d7cc7da0.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-b4e2d712d7cc7da0.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-b4e2d712d7cc7da0.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/gcp-projects/route-b4e2d712d7cc7da0.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-b4e2d712d7cc7da0.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-b4e2d712d7cc7da0.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-b4e2d712d7cc7da0.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-b4e2d712d7cc7da0.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/[name]/reset/route-b4e2d712d7cc7da0.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/route-b4e2d712d7cc7da0.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-b4e2d712d7cc7da0.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-b4e2d712d7cc7da0.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/route-b4e2d712d7cc7da0.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-b4e2d712d7cc7da0.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-b4e2d712d7cc7da0.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-b4e2d712d7cc7da0.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-b4e2d712d7cc7da0.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-b4e2d712d7cc7da0.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-b4e2d712d7cc7da0.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-b4e2d712d7cc7da0.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-b4e2d712d7cc7da0.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-b4e2d712d7cc7da0.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-b4e2d712d7cc7da0.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-b4e2d712d7cc7da0.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-b4e2d712d7cc7da0.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-b4e2d712d7cc7da0.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-b4e2d712d7cc7da0.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-b4e2d712d7cc7da0.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-b4e2d712d7cc7da0.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-b4e2d712d7cc7da0.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-b4e2d712d7cc7da0.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-b4e2d712d7cc7da0.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-b4e2d712d7cc7da0.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/settings/route-b4e2d712d7cc7da0.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-b4e2d712d7cc7da0.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/tags/route-b4e2d712d7cc7da0.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-b4e2d712d7cc7da0.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-b4e2d712d7cc7da0.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-b4e2d712d7cc7da0.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-b4e2d712d7cc7da0.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-b4e2d712d7cc7da0.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-b4e2d712d7cc7da0.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-b4e2d712d7cc7da0.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-b4e2d712d7cc7da0.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-b4e2d712d7cc7da0.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-b4e2d712d7cc7da0.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-b4e2d712d7cc7da0.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-b4e2d712d7cc7da0.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-b4e2d712d7cc7da0.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-b4e2d712d7cc7da0.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-b4e2d712d7cc7da0.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-b4e2d712d7cc7da0.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-b4e2d712d7cc7da0.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-b4e2d712d7cc7da0.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-b4e2d712d7cc7da0.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/[id]/route-b4e2d712d7cc7da0.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-b4e2d712d7cc7da0.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-b4e2d712d7cc7da0.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-b4e2d712d7cc7da0.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-b4e2d712d7cc7da0.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-b4e2d712d7cc7da0.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-b4e2d712d7cc7da0.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-b4e2d712d7cc7da0.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-b4e2d712d7cc7da0.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-b4e2d712d7cc7da0.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-b4e2d712d7cc7da0.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-b4e2d712d7cc7da0.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-b4e2d712d7cc7da0.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-b4e2d712d7cc7da0.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-b4e2d712d7cc7da0.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-b4e2d712d7cc7da0.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-b4e2d712d7cc7da0.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-b4e2d712d7cc7da0.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-b4e2d712d7cc7da0.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/v1/route-b4e2d712d7cc7da0.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-b4e2d712d7cc7da0.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-b4e2d712d7cc7da0.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-b4e2d712d7cc7da0.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-b4e2d712d7cc7da0.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/version/route-b4e2d712d7cc7da0.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-b4e2d712d7cc7da0.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/version/update/route-b4e2d712d7cc7da0.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-b4e2d712d7cc7da0.js +1 -0
  807. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-b4e2d712d7cc7da0.js +1 -0
  808. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-b4e2d712d7cc7da0.js +1 -0
  809. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-b4e2d712d7cc7da0.js +1 -0
  810. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-b4e2d712d7cc7da0.js +1 -0
  811. package/app/.next-cli-build/static/chunks/webpack-dcde53305cf97d3a.js +1 -0
  812. package/app/package.json +1 -1
  813. package/package.json +1 -1
  814. package/app/.next-cli-build/server/chunks/3141.js +0 -9
  815. package/app/.next-cli-build/server/chunks/7204.js +0 -63
  816. package/app/.next-cli-build/server/chunks/8121.js +0 -9
  817. package/app/.next-cli-build/static/chunks/2940-118a55e898443060.js +0 -1
  818. package/app/.next-cli-build/static/chunks/3657.ebdbf7a663552b39.js +0 -1
  819. package/app/.next-cli-build/static/chunks/3700-15225430a8d2ad27.js +0 -23
  820. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c8313893c058d947.js +0 -12
  821. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-81fc749f0faf82dc.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-6c97512bccbd0b3b.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-6c97512bccbd0b3b.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-6c97512bccbd0b3b.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-6c97512bccbd0b3b.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-6c97512bccbd0b3b.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-6c97512bccbd0b3b.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-6c97512bccbd0b3b.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-6c97512bccbd0b3b.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-6c97512bccbd0b3b.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-6c97512bccbd0b3b.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-6c97512bccbd0b3b.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-6c97512bccbd0b3b.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-6c97512bccbd0b3b.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-6c97512bccbd0b3b.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-6c97512bccbd0b3b.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-6c97512bccbd0b3b.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-6c97512bccbd0b3b.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-6c97512bccbd0b3b.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-6c97512bccbd0b3b.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-6c97512bccbd0b3b.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-6c97512bccbd0b3b.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-6c97512bccbd0b3b.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-6c97512bccbd0b3b.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/combos/route-6c97512bccbd0b3b.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-6c97512bccbd0b3b.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-6c97512bccbd0b3b.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-6c97512bccbd0b3b.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-6c97512bccbd0b3b.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-6c97512bccbd0b3b.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-6c97512bccbd0b3b.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/health/route-6c97512bccbd0b3b.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/init/route-6c97512bccbd0b3b.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-6c97512bccbd0b3b.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/keys/route-6c97512bccbd0b3b.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/locale/route-6c97512bccbd0b3b.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-6c97512bccbd0b3b.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-6c97512bccbd0b3b.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-6c97512bccbd0b3b.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-6c97512bccbd0b3b.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-6c97512bccbd0b3b.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-6c97512bccbd0b3b.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-6c97512bccbd0b3b.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-6c97512bccbd0b3b.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-6c97512bccbd0b3b.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-6c97512bccbd0b3b.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-6c97512bccbd0b3b.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/models/route-6c97512bccbd0b3b.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/models/test/route-6c97512bccbd0b3b.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-6c97512bccbd0b3b.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-6c97512bccbd0b3b.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-6c97512bccbd0b3b.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-6c97512bccbd0b3b.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-6c97512bccbd0b3b.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-6c97512bccbd0b3b.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-6c97512bccbd0b3b.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-6c97512bccbd0b3b.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-6c97512bccbd0b3b.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-6c97512bccbd0b3b.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-6c97512bccbd0b3b.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-6c97512bccbd0b3b.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-6c97512bccbd0b3b.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/pricing/route-6c97512bccbd0b3b.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-6c97512bccbd0b3b.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-6c97512bccbd0b3b.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-6c97512bccbd0b3b.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-6c97512bccbd0b3b.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-6c97512bccbd0b3b.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-6c97512bccbd0b3b.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-6c97512bccbd0b3b.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/[name]/reset/route-6c97512bccbd0b3b.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/route-6c97512bccbd0b3b.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-6c97512bccbd0b3b.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-6c97512bccbd0b3b.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/providers/route-6c97512bccbd0b3b.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-6c97512bccbd0b3b.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-6c97512bccbd0b3b.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-6c97512bccbd0b3b.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-6c97512bccbd0b3b.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-6c97512bccbd0b3b.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-6c97512bccbd0b3b.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-6c97512bccbd0b3b.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-6c97512bccbd0b3b.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-6c97512bccbd0b3b.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-6c97512bccbd0b3b.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-6c97512bccbd0b3b.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-6c97512bccbd0b3b.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-6c97512bccbd0b3b.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-6c97512bccbd0b3b.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-6c97512bccbd0b3b.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-6c97512bccbd0b3b.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-6c97512bccbd0b3b.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-6c97512bccbd0b3b.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-6c97512bccbd0b3b.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-6c97512bccbd0b3b.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/settings/route-6c97512bccbd0b3b.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-6c97512bccbd0b3b.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/tags/route-6c97512bccbd0b3b.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-6c97512bccbd0b3b.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-6c97512bccbd0b3b.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-6c97512bccbd0b3b.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-6c97512bccbd0b3b.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-6c97512bccbd0b3b.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-6c97512bccbd0b3b.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-6c97512bccbd0b3b.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-6c97512bccbd0b3b.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-6c97512bccbd0b3b.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-6c97512bccbd0b3b.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-6c97512bccbd0b3b.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-6c97512bccbd0b3b.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-6c97512bccbd0b3b.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-6c97512bccbd0b3b.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-6c97512bccbd0b3b.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-6c97512bccbd0b3b.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-6c97512bccbd0b3b.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-6c97512bccbd0b3b.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-6c97512bccbd0b3b.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/[id]/route-6c97512bccbd0b3b.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-6c97512bccbd0b3b.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-6c97512bccbd0b3b.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-6c97512bccbd0b3b.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-6c97512bccbd0b3b.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-6c97512bccbd0b3b.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-6c97512bccbd0b3b.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-6c97512bccbd0b3b.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-6c97512bccbd0b3b.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-6c97512bccbd0b3b.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-6c97512bccbd0b3b.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-6c97512bccbd0b3b.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-6c97512bccbd0b3b.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-6c97512bccbd0b3b.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-6c97512bccbd0b3b.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-6c97512bccbd0b3b.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-6c97512bccbd0b3b.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-6c97512bccbd0b3b.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-6c97512bccbd0b3b.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/v1/route-6c97512bccbd0b3b.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-6c97512bccbd0b3b.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-6c97512bccbd0b3b.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-6c97512bccbd0b3b.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-6c97512bccbd0b3b.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/version/route-6c97512bccbd0b3b.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-6c97512bccbd0b3b.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/version/update/route-6c97512bccbd0b3b.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-6c97512bccbd0b3b.js +0 -1
  966. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-6c97512bccbd0b3b.js +0 -1
  967. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-6c97512bccbd0b3b.js +0 -1
  968. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-6c97512bccbd0b3b.js +0 -1
  969. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-6c97512bccbd0b3b.js +0 -1
  970. package/app/.next-cli-build/static/chunks/webpack-66c60e327317b84e.js +0 -1
  971. /package/app/.next-cli-build/static/{mJMUchoO2n2kOYCJYHVan → DgZGtay5XqIXdPv9nJfvo}/_buildManifest.js +0 -0
  972. /package/app/.next-cli-build/static/{mJMUchoO2n2kOYCJYHVan → DgZGtay5XqIXdPv9nJfvo}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2940],{7665:(e,t,s)=>{s.d(t,{A:()=>d,u:()=>c});var r=s(15102),a=s(82030),l=s(83916),n=s(88140),i=s(18419);let o={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"};function d({isOpen:e,onClose:t,title:s,children:n,footer:c,size:x="md",closeOnOverlay:m=!0,showTrafficLights:u=!0,className:p}){let h=o[x]||o.md,b=(0,a.useRef)(t);return((0,a.useEffect)(()=>{b.current=t}),(0,a.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,a.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&b.current()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]),e)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:m?t:void 0,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:(0,l.cn)("relative w-full bg-surface","border border-border-subtle","rounded-[14px] shadow-[var(--shadow-elev)]","fade-in",h,p),children:[(s||u)&&(0,r.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-border-subtle",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[u&&(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-4 ml-2",children:[(0,r.jsx)(i.A,{text:"Close",position:"top",color:"#FF5F56",children:(0,r.jsx)("button",{type:"button",onClick:t,"aria-label":"Close",title:"Close",className:"w-4 h-4 rounded-full bg-[#FF5F56] hover:brightness-90 transition-all cursor-pointer flex items-center justify-center group/dot",children:(0,r.jsx)("span",{className:"text-[9px] font-bold text-white opacity-0 group-hover/dot:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,r.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"}),(0,r.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"})]}),s&&(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})]}),(0,r.jsx)("button",{type:"button",onClick:t,"aria-label":"Close",className:"md:hidden p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 max-h-[calc(85vh-100px)] overflow-y-auto custom-scrollbar",children:n}),c&&(0,r.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-border-subtle",children:c})]})]}):null}function c({isOpen:e,onClose:t,onConfirm:s,title:a="Confirm",message:l,confirmText:i="Confirm",cancelText:o="Cancel",variant:x="danger",loading:m=!1}){return(0,r.jsx)(d,{isOpen:e,onClose:t,title:a,size:"sm",footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.A,{variant:"ghost",onClick:t,disabled:m,children:o}),(0,r.jsx)(n.A,{variant:x,onClick:s,loading:m,children:i})]}),children:(0,r.jsx)("p",{className:"text-text-muted",children:l})})}},18419:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(15102);function a({text:e,children:t,position:s="top",color:l}){let n=l?"":"bg-gray-900";return(0,r.jsxs)("div",{className:"relative inline-flex group/tt",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${n} text-white opacity-0 group-hover/tt:opacity-100 transition-opacity duration-150 whitespace-normal`,style:l?{backgroundColor:l}:{},children:e})]})}},21577:(e,t,s)=>{s.d(t,{C:()=>a});var r=s(82030);function a(e=2e3){let[t,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return{copied:t,copy:(0,r.useCallback)((t,r="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),s(r),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(null)},e)},[e])}}},24260:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(15102),a=s(55223),l=s(18419);function n({caps:e,className:t="",colorOverride:s,size:i=16}){if(!e)return null;let o=Object.keys(a.bs).filter(t=>e[t]);return 0===o.length?null:(0,r.jsx)("span",{className:`inline-flex items-center gap-0.5 ${t}`,children:o.map(e=>(0,r.jsx)(l.A,{text:`${a.bs[e].label} — ${a.bs[e].desc}`,children:(0,r.jsx)("span",{className:`material-symbols-outlined leading-none cursor-help ${s||a.bs[e].color}`,style:{fontSize:`${i}px`},children:a.bs[e].icon})},e))})}},25795:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(84156);let a=0,l=(0,r.v)((e,t)=>({notifications:[],addNotification:s=>{let r=++a,l={id:r,type:s.type||"info",message:s.message,title:s.title||null,duration:s.duration??5e3,dismissible:s.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(r),l.duration),r},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,s)=>t().addNotification({type:"success",message:e,title:s}),error:(e,s)=>t().addNotification({type:"error",message:e,title:s,duration:8e3}),warning:(e,s)=>t().addNotification({type:"warning",message:e,title:s}),info:(e,s)=>t().addNotification({type:"info",message:e,title:s})}))},31704:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(15102),a=s(82030),l=s(37837);function n({src:e,alt:t,size:s=32,className:i="",fallbackText:o="?",fallbackColor:d}){let[c,x]=(0,a.useState)(!1);return!e||c?(0,r.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${i}`.trim(),style:{width:s,height:s,color:d,fontSize:Math.max(10,Math.floor(.38*s))},children:o}):(0,r.jsx)(l.default,{src:e,alt:t,width:s,height:s,className:i,onError:()=>x(!0),unoptimized:!0})}},41488:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(15102),a=s(83916);function l({label:e,type:t="text",placeholder:s,value:n,onChange:i,error:o,hint:d,icon:c,disabled:x=!1,required:m=!1,className:u,inputClassName:p,...h}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",u),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[c&&(0,r.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,r.jsx)("input",{type:t,placeholder:s,value:n,onChange:i,disabled:x,className:(0,a.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",p),...h})]}),o&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},44104:(e,t,s)=>{s.d(t,{h:()=>r});let r={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4"}},47056:(e,t,s)=>{s.d(t,{Ay:()=>c,CardSkeleton:()=>d,EA:()=>o,WL:()=>i,y$:()=>n});var r=s(15102),a=s(83916);let l={sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"};function n({size:e="md",className:t}){return(0,r.jsx)("span",{className:(0,a.cn)("material-symbols-outlined animate-spin text-brand-500",l[e],t),children:"progress_activity"})}function i({message:e="Loading..."}){return(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,r.jsx)(n,{size:"xl"}),(0,r.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function o({className:e,...t}){return(0,r.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-[10px] bg-surface-2",e),...t})}function d(){return(0,r.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)(o,{className:"h-4 w-24"}),(0,r.jsx)(o,{className:"size-10 rounded-[10px]"})]}),(0,r.jsx)(o,{className:"h-8 w-16 mb-2"}),(0,r.jsx)(o,{className:"h-3 w-20"})]})}function c({type:e="spinner",...t}){switch(e){case"page":return(0,r.jsx)(i,{...t});case"skeleton":return(0,r.jsx)(o,{...t});case"card":return(0,r.jsx)(d,{...t});default:return(0,r.jsx)(n,{...t})}}},49526:(e,t,s)=>{s.d(t,{D:()=>o});var r=s(82030),a=s(43603);function l(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function n(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:s,initTheme:o}=(0,a.A)(),d=(0,r.useSyncExternalStore)(l,n,i);(0,r.useEffect)(()=>{o()},[o]),(0,r.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>o();return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:s,isDark:c}}},52252:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(15102),a=s(83916);let l={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};function n({checked:e=!1,onChange:t,label:s,description:i,disabled:o=!1,size:d="md",className:c,"aria-label":x,title:m}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-3",o&&"opacity-50 cursor-not-allowed",c),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":x||s||m||"Toggle",disabled:o,onClick:()=>{!o&&t&&t(!e)},className:(0,a.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",e?"bg-brand-500":"bg-surface-3",l[d].track,o&&"cursor-not-allowed"),children:(0,r.jsx)("span",{className:(0,a.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?l[d].translate:"translate-x-0.5",l[d].thumb,"mt-0.5")})}),(s||i)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),i&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:i})]})]})}},62758:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(15102),a=s(83916);let l={none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"};function n({children:e,title:t,subtitle:s,icon:i,action:o,padding:d="md",hover:c=!1,elev:x=!1,className:m,...u}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-surface border border-border-subtle",x?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",c&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",l[d],m),...u,children:[(t||o)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,r.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),o]}),e]})}n.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...s,children:e})},n.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...s,children:e})},n.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",s),...l,children:[(0,r.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},71389:(e,t,s)=>{s.d(t,{C:()=>r});let r=(0,s(84156).v)(e=>({query:"",placeholder:"",visible:!1,setQuery:t=>e({query:t}),register:(t="Search...")=>e({visible:!0,placeholder:t,query:""}),unregister:()=>e({visible:!1,placeholder:"",query:""})}))},76860:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(15102),a=s(83916);let l=[];function n({label:e,options:t=l,value:s,onChange:i,placeholder:o="Select an option",error:d,hint:c,disabled:x=!1,required:m=!1,className:u,selectClassName:p,...h}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",u),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("select",{value:s,onChange:i,disabled:x,className:(0,a.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",d&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",p),...h,children:[(0,r.jsx)("option",{value:"",disabled:!0,children:o}),t.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,r.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),d&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),d]}),c&&!d&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:c})]})}},83916:(e,t,s)=>{s.d(t,{cn:()=>r});function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},88140:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(15102),a=s(83916);let l={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},n={sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]"};function i({children:e,variant:t="primary",size:s="md",icon:o,iconRight:d,disabled:c=!1,loading:x=!1,fullWidth:m=!1,className:u,...p}){return(0,r.jsxs)("button",{type:"button",className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",l[t],n[s],m&&"w-full",u),disabled:c||x,...p,children:[x?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):o?(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o}):null,e,d&&!x&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:d})]})}},92940:(e,t,s)=>{s.r(t),s.d(t,{AddCustomEmbeddingModal:()=>e3,AuthLayout:()=>eB,Avatar:()=>p,Badge:()=>h.A,Button:()=>a.A,CapacityBadges:()=>e_.A,Card:()=>i.A,CardSkeleton:()=>d.CardSkeleton,ChangelogModal:()=>e6,ComboFormModal:()=>eV,ConfirmModal:()=>o.u,CursorAuthModal:()=>e0,DashboardLayout:()=>eK,EditConnectionModal:()=>e5,Footer:()=>es,GitLabAuthModal:()=>e2,Header:()=>Y,HeaderMenu:()=>q,IFlowCookieModal:()=>e1,Input:()=>l.A,KiroAuthModal:()=>eY,KiroOAuthWrapper:()=>eZ,KiroSocialOAuthModal:()=>eX,LanguageSwitcher:()=>W.A,Loading:()=>d.Ay,ManualConfigModal:()=>eH,McpMarketplaceModal:()=>eJ,Modal:()=>o.A,ModelSelectModal:()=>eG,NineRemoteButton:()=>ez,NoAuthProxyCard:()=>e4,OAuthModal:()=>eQ,PageLoading:()=>d.WL,ProviderInfoCard:()=>e8,RequestLogger:()=>eF,SegmentedControl:()=>eO,Select:()=>n.A,Sidebar:()=>I,Skeleton:()=>d.EA,Spinner:()=>d.y$,ThemeProvider:()=>y.ThemeProvider,ThemeToggle:()=>j,Toggle:()=>b.A,Tooltip:()=>eU.A,UsageStats:()=>eR});var r=s(88511),a=s(88140),l=s(41488),n=s(76860),i=s(62758),o=s(7665),d=s(47056),c=s(15102),x=s(37837),m=s(83916);let u={xs:"size-6 text-xs",sm:"size-8 text-sm",md:"size-10 text-base",lg:"size-12 text-lg",xl:"size-16 text-xl"};function p({src:e,alt:t="Avatar",name:s,size:r="md",className:a}){return e?(0,c.jsx)("span",{className:(0,m.cn)("relative inline-block rounded-full overflow-hidden","ring-2 ring-white dark:ring-surface-dark shadow-sm",u[r],a),children:(0,c.jsx)(x.default,{src:e,alt:t,fill:!0,sizes:"48px",className:"object-cover",unoptimized:!0})}):(0,c.jsx)("span",{className:(0,m.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",u[r],function(e){if(!e)return"bg-primary";let t=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],s=e.charCodeAt(0)%t.length;return t[s]}(s),a),"aria-label":t,children:function(e){if(!e)return"?";let t=e.split(" ");return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()}(s)})}var h=s(97955),b=s(52252),f=s(49526);let g={default:(0,m.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,m.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};function j({className:e,variant:t="default"}){let{isDark:s,toggleTheme:r}=(0,f.D)();return(0,c.jsx)("button",{type:"button",onClick:r,className:(0,m.cn)(g[t],e),"aria-label":`Switch to ${s?"light":"dark"} mode`,title:`Switch to ${s?"light":"dark"} mode`,children:(0,c.jsx)("span",{className:(0,m.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:s?"light_mode":"dark_mode"})})}var y=s(21700),v=s(82030),N=s(93885),w=s.n(N),k=s(93278),C=s(11434),S=s(31038),T=s(21577),A=s(49387);let E=[{icon:"terminal",label:"Terminal",desc:"Full shell access"},{icon:"cast",label:"Desktop",desc:"Screen sharing"},{icon:"folder_open",label:"Files",desc:"Browse & edit files"}],L=[{icon:"qr_code_scanner",text:"Scan QR to connect instantly"},{icon:"wifi_off",text:"No port forwarding needed"},{icon:"devices",text:"Works on any device"}];function $({isOpen:e,onClose:t}){let s=(0,v.useRef)(t);return((0,v.useEffect)(()=>{s.current=t}),(0,v.useEffect)(()=>{if(!e)return;document.body.style.overflow="hidden";let t=e=>{"Escape"===e.key&&s.current()};return document.addEventListener("keydown",t),()=>{document.body.style.overflow="",document.removeEventListener("keydown",t)}},[e]),e)?(0,A.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[(0,c.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:t,"aria-hidden":"true"}),(0,c.jsxs)("div",{className:"relative w-full max-w-sm rounded-[14px] overflow-hidden shadow-[var(--shadow-elev)] fade-in flex flex-col bg-surface border border-border-subtle",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border-subtle",children:[(0,c.jsxs)("div",{className:"flex items-center gap-3",children:[(0,c.jsx)("div",{className:"w-7 h-7 rounded-[8px] flex items-center justify-center bg-primary",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-white text-base",children:"terminal"})}),(0,c.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-mono",children:"9Remote"})]}),(0,c.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})]}),(0,c.jsxs)("div",{className:"px-7 py-7 pb-9 flex flex-col gap-6",children:[(0,c.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center mt-2",children:[(0,c.jsx)("div",{className:"w-14 h-14 rounded-[14px] flex items-center justify-center mb-1 bg-primary shadow-[var(--shadow-warm)]",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-white text-[30px]",children:"terminal"})}),(0,c.jsx)("h1",{className:"text-lg font-bold text-text-main tracking-tight",children:"9Remote"}),(0,c.jsx)("p",{className:"text-xs text-text-muted leading-5 max-w-[220px]",children:"Access your terminal, desktop & files from anywhere"})]}),(0,c.jsx)("div",{className:"flex gap-2 w-full",children:E.map(({icon:e,label:t,desc:s})=>(0,c.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1.5 py-4 px-1 rounded-[10px] border border-border-subtle bg-surface-2",children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-primary text-[22px]",children:e}),(0,c.jsx)("p",{className:"text-xs font-semibold text-text-main",children:t}),(0,c.jsx)("p",{className:"text-[10px] text-text-muted text-center leading-4",children:s})]},t))}),(0,c.jsx)("div",{className:"flex flex-col gap-3 w-full",children:L.map(({icon:e,text:t})=>(0,c.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,c.jsx)("span",{className:"material-symbols-outlined flex-shrink-0 text-primary text-[16px]",children:e}),(0,c.jsx)("span",{className:"text-xs text-text-muted",children:t})]},e))}),(0,c.jsxs)("button",{type:"button",onClick:()=>window.open("https://9remote.cc","_blank"),className:"w-full py-3 flex items-center justify-center gap-2 text-sm font-semibold text-white rounded-[10px] bg-primary hover:bg-primary-hover shadow-[var(--shadow-warm)] active:scale-[0.98] transition-all",children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-base",children:"open_in_new"}),"Get 9Remote"]})]})]})]}),document.body):null}let M=["embedding","image","tts","stt"],P="/dashboard/media-providers/web",R=[{href:"/dashboard/endpoint",label:"Endpoint & Key",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/combos",label:"Combos",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],z=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"}],F=[{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/skills",label:"Skills",icon:"extension"}];function I({onClose:e}){let t=(0,k.usePathname)(),[s,r]=(0,v.useState)(!1),[l,n]=(0,v.useState)(!1),[i,d]=(0,v.useState)(!1),[x,u]=(0,v.useState)(null),[p,h]=(0,v.useState)(!1),[b,f]=(0,v.useState)(!1),[g,j]=(0,v.useState)(0),[y,N]=(0,v.useState)(!1),{copied:A,copy:E}=(0,T.C)(2e3),L=C.h0.installCmdLatest;(0,v.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{e.enableTranslator&&N(!0)}).catch(()=>{})},[]),(0,v.useEffect)(()=>{fetch("/api/version").then(e=>e.json()).then(e=>{e.hasUpdate&&u(e)}).catch(()=>{})},[]);let O=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),U=async()=>{try{await navigator.clipboard.writeText(L)}catch{}E(L);let e=C.h0.shutdownCountdownSec;j(e);let t=setInterval(()=>{j(e-=1),e<=0&&(clearInterval(t),fetch("/api/version/shutdown",{method:"POST"}).catch(()=>{}),d(!0))},1e3)};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("aside",{className:"flex w-72 flex-col border-r border-border-subtle bg-vibrancy backdrop-blur-xl transition-colors duration-300 min-h-full",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2 px-6 pt-5 pb-2",children:[(0,c.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,c.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,c.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),(0,c.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-2",children:[(0,c.jsxs)(w(),{href:"/dashboard",className:"flex items-center gap-3",children:[(0,c.jsx)("div",{className:"flex items-center justify-center size-9 rounded-[10px] bg-gradient-to-br from-brand-500 to-brand-700 shadow-[var(--shadow-warm)]",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,c.jsxs)("div",{className:"flex flex-col",children:[(0,c.jsx)("h1",{className:"text-lg font-semibold tracking-tight text-text-main",children:C.vQ.name}),(0,c.jsxs)("span",{className:"text-xs text-text-muted",children:["v",C.vQ.version]})]})]}),x&&(0,c.jsxs)("div",{className:"flex flex-col gap-1.5 rounded p-1 -m-1",children:[(0,c.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-amber-500",children:["↑ New version available: v",x.latestVersion]}),(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)("button",{onClick:()=>h(!0),className:"px-2 py-1 rounded bg-green-600 hover:bg-green-700 dark:bg-amber-500 dark:hover:bg-amber-600 text-white text-[11px] font-semibold transition-colors cursor-pointer",children:x.canAutoRestart?"Update & Restart":"Update now"}),(0,c.jsx)("button",{onClick:()=>E(x.installCommand||L),title:"Copy install command",className:"flex-1 text-left hover:opacity-80 transition-opacity cursor-pointer min-w-0",children:(0,c.jsx)("code",{className:"block text-[10px] text-green-600/80 dark:text-amber-400/70 font-mono truncate",children:A?"✓ copied!":x.installCommand||L})})]})]})]}),(0,c.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-0.5 overflow-y-auto custom-scrollbar",children:[R.map(t=>(0,c.jsxs)(w(),{href:t.href,onClick:e,className:(0,m.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",O(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:(0,m.cn)("material-symbols-outlined text-[18px]",O(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,c.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),(0,c.jsxs)("div",{className:"pt-3 mt-2 space-y-0.5",children:[(0,c.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),(0,c.jsxs)("button",{onClick:()=>r(e=>!e),className:(0,m.cn)("w-full flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",t.startsWith("/dashboard/media-providers")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"perm_media"}),(0,c.jsx)("span",{className:"text-[13px] font-medium flex-1 text-left",children:"Media Providers"}),(0,c.jsx)("span",{className:"material-symbols-outlined text-[14px] transition-transform",style:{transform:s?"rotate(180deg)":"rotate(0deg)"},children:"expand_more"})]}),s&&(0,c.jsxs)("div",{className:"pl-4",children:[S.rj.filter(e=>M.includes(e.id)).map(s=>(0,c.jsxs)(w(),{href:`/dashboard/media-providers/${s.id}`,onClick:e,className:(0,m.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(`/dashboard/media-providers/${s.id}`)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:s.icon}),(0,c.jsx)("span",{className:"text-sm",children:s.label})]},s.id)),(0,c.jsxs)(w(),{href:P,onClick:e,className:(0,m.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(P)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"travel_explore"}),(0,c.jsx)("span",{className:"text-sm",children:"Web Fetch & Search"})]},"web")]}),F.map(t=>(0,c.jsxs)(w(),{href:t.href,onClick:e,className:(0,m.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",O(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:(0,m.cn)("material-symbols-outlined text-[18px]",O(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,c.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),z.map(t=>"/dashboard/translator"!==t.href||y?(0,c.jsxs)(w(),{href:t.href,onClick:e,className:(0,m.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",O(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:(0,m.cn)("material-symbols-outlined text-[18px]",O(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,c.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href):null),(0,c.jsxs)("button",{onClick:()=>n(!0),className:(0,m.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group w-full","text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[18px] group-hover:text-primary transition-colors",children:"computer"}),(0,c.jsx)("span",{className:"text-[13px] font-medium",children:"Remote"})]}),(0,c.jsxs)(w(),{href:"/dashboard/profile",onClick:e,className:(0,m.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",O("/dashboard/profile")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,c.jsx)("span",{className:(0,m.cn)("material-symbols-outlined text-[18px]",O("/dashboard/profile")?"fill-1":"group-hover:text-primary transition-colors"),children:"settings"}),(0,c.jsx)("span",{className:"text-[13px] font-medium",children:"Settings"})]})]})]})]}),(0,c.jsx)($,{isOpen:l,onClose:()=>n(!1)}),(0,c.jsx)(o.u,{isOpen:p,onClose:()=>h(!1),onConfirm:()=>{h(!1),f(!0)},title:"Update VansRouter",message:`Show install command for v${x?.latestVersion||""}? You can copy it and shutdown to install manually.`,confirmText:"Show Command",cancelText:"Cancel",variant:"primary"}),(i||b)&&(0,c.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-6",children:b?(0,c.jsx)(D,{latestVersion:x?.latestVersion,installCmd:L,copied:A,onCopyAndShutdown:U,onCancel:()=>{f(!1),j(0)},countdown:g,isDisconnected:i}):(0,c.jsxs)("div",{className:"text-center p-8",children:[(0,c.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,c.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,c.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,c.jsx)(a.A,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}function D({latestVersion:e,installCmd:t,copied:s,onCopyAndShutdown:r,onCancel:l,countdown:n,isDisconnected:i}){let o=n>0;return(0,c.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-neutral-900/95 border border-white/10 p-6 text-white",children:[(0,c.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,c.jsx)("div",{className:"flex items-center justify-center size-11 rounded-full bg-amber-500/20 text-amber-400",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"content_copy"})}),(0,c.jsxs)("div",{children:[(0,c.jsxs)("h2",{className:"text-lg font-semibold",children:["Update VansRouter",e?` to v${e}`:""]}),(0,c.jsx)("p",{className:"text-xs text-white/60",children:i?"Server stopped. Paste the command into a terminal to install.":o?`Command copied. Server will stop in ${n}s...`:"Click the button below to copy the install command and shutdown."})]})]}),(0,c.jsx)("p",{className:"text-sm text-white/80 mb-2",children:"Install command:"}),(0,c.jsx)("div",{className:"w-full px-3 py-2 rounded bg-white/5 mb-4",children:(0,c.jsx)("code",{className:"text-xs font-mono text-amber-400 break-all",children:t})}),(0,c.jsxs)("ol",{className:"text-xs text-white/70 space-y-1 list-decimal list-inside mb-4",children:[(0,c.jsxs)("li",{children:["Click ",(0,c.jsx)("strong",{children:"Copy & Shutdown"})," below."]}),(0,c.jsx)("li",{children:"Paste the command into your terminal and press Enter."}),(0,c.jsxs)("li",{children:["Run ",(0,c.jsx)("code",{className:"px-1 rounded bg-white/10 text-green-400",children:"vansrouter"})," again after install."]})]}),i?(0,c.jsx)(a.A,{variant:"secondary",fullWidth:!0,onClick:()=>globalThis.location.reload(),children:"Reload Page"}):(0,c.jsxs)("div",{className:"flex gap-2",children:[(0,c.jsx)(a.A,{variant:"secondary",onClick:l,disabled:o,children:"Cancel"}),(0,c.jsx)(a.A,{variant:"primary",fullWidth:!0,onClick:r,disabled:o,children:s?"✓ Copied — shutting down...":o?`Shutting down in ${n}s`:"Copy & Shutdown"})]})]})}var O=s(31704),U=s(97902);function _({icon:e,label:t,onClick:s,trailing:r,danger:a}){return(0,c.jsxs)("button",{type:"button",onClick:s,className:`flex items-center gap-3 w-full px-4 py-2.5 text-sm transition-colors ${a?"text-red-500 hover:bg-red-500/10":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"}`,children:[(0,c.jsx)("span",{className:`material-symbols-outlined text-[20px] ${a?"":"text-text-muted"}`,children:e}),(0,c.jsx)("span",{className:"flex-1 text-left",children:t}),r&&(0,c.jsx)("span",{className:"text-base",children:r})]})}function q({onLogout:e}){let[t,s]=(0,v.useState)(!1),[r,a]=(0,v.useState)(!1),[l,n]=(0,v.useState)(!1),[i,d]=(0,v.useState)(!1),{toggleTheme:x,isDark:m}=(0,f.D)(),u=(0,v.useRef)(null),p=async()=>{d(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}d(!1),n(!1)};return(0,v.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&s(!1)};if(t)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"relative",ref:u,children:[(0,c.jsx)("button",{type:"button",onClick:()=>s(e=>!e),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Menu",children:(0,c.jsx)("span",{className:"material-symbols-outlined",children:"grid_view"})}),t&&(0,c.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-60 bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl z-50 animate-in fade-in zoom-in-95 duration-150 overflow-hidden py-1",children:[(0,c.jsx)(_,{icon:"history",label:"Change Log",onClick:()=>{s(!1),a(!0)}}),(0,c.jsx)(_,{icon:m?"light_mode":"dark_mode",label:"Theme",onClick:()=>{x(),s(!1)}}),(0,c.jsx)(_,{icon:"power_settings_new",label:"Shutdown",danger:!0,onClick:()=>{s(!1),n(!0)}}),(0,c.jsx)(_,{icon:"logout",label:"Logout",danger:!0,onClick:()=>{s(!1),e()}})]})]}),(0,c.jsx)(U.default,{isOpen:r,onClose:()=>a(!1)}),(0,c.jsx)(o.u,{isOpen:l,onClose:()=>n(!1),onConfirm:p,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:i})]})}var K=s(90238),B=s(44104),W=s(98657);function Q(){let[e,t]=(0,v.useState)(!1),s=function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${K.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,K.QC)(t)}();return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("button",{type:"button",onClick:()=>t(!0),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Language","data-i18n-skip":"true",children:(0,c.jsx)("span",{className:"text-lg leading-none",children:B.h[s]||"\uD83C\uDF10"})}),(0,c.jsx)(W.A,{hideTrigger:!0,isOpen:e,onClose:()=>t(!1)})]})}function G({isOpen:e,onClose:t}){let[s,r]=(0,v.useState)({data:null,loading:!1,error:""}),a=(0,v.useRef)(null),l=(0,v.useRef)(!1);(0,v.useEffect)(()=>{e&&!l.current&&(l.current=!0,Promise.resolve().then(()=>{C.Nu.donateUrl?(r(e=>({...e,loading:!0,error:""})),fetch(C.Nu.donateUrl,{cache:"no-store"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>r(t=>({...t,data:e,loading:!1}))).catch(e=>r(t=>({...t,error:e.message||"Failed to load",loading:!1})))):r({data:null,loading:!1,error:"Donate is not configured."})}))},[e]);let n=(0,v.useRef)(t);if((0,v.useEffect)(()=>{n.current=t}),(0,v.useEffect)(()=>{let t=e=>{a.current&&!a.current.contains(e.target)&&n.current()};if(e)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[e]),(0,v.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&n.current()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]),!e||"u"<typeof document)return null;let{data:i,loading:o,error:d}=s;return(0,A.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,c.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),(0,c.jsxs)("div",{ref:a,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,c.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-pink-500",children:"volunteer_activism"}),i?.title||"Support 9Router"]}),(0,c.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,c.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[o&&(0,c.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,c.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),d&&(0,c.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load donate info: ",d]}),!o&&!d&&i&&(0,c.jsxs)(c.Fragment,{children:[i.message&&(0,c.jsx)("p",{className:"text-text-muted text-sm mb-6 text-center",children:i.message}),(0,c.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:i.channels?.map(e=>(0,c.jsx)(H,{channel:e},e.id))})]})]})]})]}),document.body)}function H({channel:e}){let{label:t,description:s,icon:r,color:a,url:l,qr:n}=e,i=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-3",style:{backgroundColor:`${a}20`,color:a},children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:r})}),(0,c.jsx)("div",{className:"font-semibold text-text-main mb-1",children:t}),s&&(0,c.jsx)("div",{className:"text-xs text-text-muted mb-3 text-center",children:s}),n&&(0,c.jsx)(x.default,{src:n,alt:`${t} QR`,className:"w-full max-w-[180px] aspect-square object-contain rounded-lg bg-white p-1",width:180,height:180,unoptimized:!0})]});return(0,c.jsxs)("div",{className:"flex flex-col items-center p-4 rounded-xl border border-black/10 dark:border-white/10 bg-surface/50 hover:border-pink-500/40 transition-colors",children:[i,l&&(0,c.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium text-white hover:opacity-90 transition-opacity",style:{backgroundColor:a},children:["Open",(0,c.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"})]})]})}var V=s(71389),J=s(20264);function Y({onMenuClick:e,showMenuButton:t=!0}){let s=(0,k.usePathname)(),[r,a]=(0,v.useState)(""),[l,n]=(0,v.useState)(""),[i,o]=(0,v.useState)(!1),{title:d,description:x,icon:m,breadcrumbs:u}=(0,v.useMemo)(()=>(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/media-providers\/([^/]+)\/([^/]+)$/);if(t){let e=t[1],s=t[2],r=S.rj.find(t=>t.id===e),a=S.Q2[s];return{title:a?.name||s,description:"",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:r?.label||e,href:`/dashboard/media-providers/${e}`},{label:a?.name||s,image:`/providers/${s}.webp`}]}}let s=e.match(/\/media-providers\/([^/]+)$/);if(s){let e=s[1],t=S.rj.find(t=>t.id===e);return{title:t?.label||e,description:`Manage your ${t?.label||e} providers`,icon:t?.icon||"perm_media",breadcrumbs:[]}}let r=e.match(/\/providers\/([^/]+)$/);if(r){let e=r[1],t=C.zN[e]||C.fg[e];if(t)return{title:t.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:t.name,image:`/providers/${t.id}.webp`}]}}return e.includes("/providers")&&!e.includes("/media-providers")?{title:"Providers",description:"Manage your AI provider connections",icon:"dns",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",icon:"layers",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",icon:"bar_chart",breadcrumbs:[]}:e.includes("/auth-files")?{title:"Auth Files",description:"Map provider credentials stored in the local database",icon:"vpn_key",breadcrumbs:[]}:e.includes("/quota")?{title:"Quota Tracker",description:"Track and manage your API quota limits",icon:"data_usage",breadcrumbs:[]}:e.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through 9Router",icon:"security",breadcrumbs:[]}:e.includes("/token-saver")?{title:"Token Saver",description:"Compress prompts and outputs to save tokens",icon:"savings",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",icon:"terminal",breadcrumbs:[]}:e.includes("/proxy-pools")?{title:"Proxy Pools",description:"Manage your proxy pool configurations",icon:"lan",breadcrumbs:[]}:e.includes("/skills")?{title:"Agent Skills",description:"Copy a link and paste to your AI to use 9Router — no install needed",icon:"extension",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",icon:"settings",breadcrumbs:[]}:e.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",icon:"translate",breadcrumbs:[]}:e.includes("/console-log")?{title:"Console Log",description:"Live server console output",icon:"monitor",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(s),[s]);(0,v.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/auth/status",{cache:"no-store"});if(!t.ok)return;let s=await t.json();e||(a(s?.displayName||s?.oidcName||s?.oidcEmail||""),n(s?.loginMethod||""))}catch{e||(a(""),n(""))}}(),()=>{e=!0}},[]);let p=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,c.jsxs)("header",{className:"shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20",children:[(0,c.jsx)("div",{className:"flex items-center gap-3 lg:hidden shrink-0",children:t&&(0,c.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,c.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,c.jsx)("div",{className:"flex flex-col min-w-0 flex-1",children:u.length>0?(0,c.jsx)("div",{className:"flex items-center gap-2",children:u.map((e,t)=>(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,c.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,c.jsx)(w(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,c.jsx)(O.A,{src:e.image,alt:e.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:e.label.slice(0,2).toUpperCase()}),(0,c.jsx)("h1",{className:"text-base lg:text-2xl font-semibold text-text-main tracking-tight truncate",children:(0,J.Tl)(e.label)})]})]},`${e.label}-${e.href||"current"}`))}):d?(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,c.jsx)("span",{className:"material-symbols-outlined text-primary text-xl lg:text-2xl",children:m}),(0,c.jsx)("h1",{className:"text-base lg:text-2xl font-semibold tracking-tight truncate",children:(0,J.Tl)(d)})]}),x&&(0,c.jsx)("p",{className:"hidden lg:block text-sm text-text-muted truncate",children:(0,J.Tl)(x)})]}):null}),(0,c.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[r&&"OIDC"===l&&(0,c.jsxs)("div",{className:"hidden sm:flex items-center max-w-[220px] px-3 py-1.5 rounded-full border border-border bg-surface/70 text-xs text-text-muted truncate",children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1.5 text-primary",children:"person"}),(0,c.jsx)("span",{className:"truncate",children:r}),(0,c.jsx)("span",{className:"ml-2 shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary",children:"OIDC"})]}),(0,c.jsx)(Z,{}),(0,c.jsxs)("button",{onClick:()=>o(!0),className:"flex items-center gap-1.5 px-3 h-8 rounded-lg border border-pink-500/30 bg-pink-500/10 text-pink-600 dark:text-pink-400 hover:bg-pink-500/20 transition-colors text-sm font-medium","aria-label":"Donate",children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"volunteer_activism"}),(0,c.jsx)("span",{className:"hidden sm:inline",children:"Donate"})]}),(0,c.jsx)(j,{}),(0,c.jsx)(Q,{}),(0,c.jsx)(q,{onLogout:p})]}),(0,c.jsx)(G,{isOpen:i,onClose:()=>o(!1)})]})}function Z(){let e=(0,V.C)(e=>e.visible),t=(0,V.C)(e=>e.query),s=(0,V.C)(e=>e.placeholder),r=(0,V.C)(e=>e.setQuery);return e?(0,c.jsxs)("div",{className:"relative w-[160px] sm:w-[220px]",children:[(0,c.jsx)("span",{className:"material-symbols-outlined absolute left-2 top-1/2 -translate-y-1/2 text-text-muted text-[16px] pointer-events-none",children:"search"}),(0,c.jsx)("input",{type:"text",value:t,onChange:e=>r(e.target.value),placeholder:s,className:"w-full h-8 pl-7 pr-7 rounded-lg border border-border bg-surface/60 text-sm focus:outline-none focus:border-primary/50 transition-colors"}),t&&(0,c.jsx)("button",{type:"button",onClick:()=>r(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-main p-0.5 rounded","aria-label":"Clear search",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}):null}let X=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],ee=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],et=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function es(){return(0,c.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,c.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,c.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,c.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,c.jsx)("div",{className:"size-6 text-primary",children:(0,c.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,c.jsx)("path",{clipRule:"evenodd",d:"M12.08 24L4 19.25L9.96 8.75L18.04 13.5L18.04 4H29.96L29.96 13.5L38.04 8.75L44 19.25L35.92 24L44 28.75L38.04 39.25L29.96 34.5L29.96 44H18.04L18.04 34.5L9.96 39.25L4 28.75L12.08 24Z",fillRule:"evenodd"})})}),(0,c.jsx)("span",{className:"text-xl font-bold text-text-main",children:C.vQ.name})]}),(0,c.jsx)("p",{className:"text-text-muted mb-6 max-w-sm font-light",children:"The unified interface for modern AI infrastructure. Secure, observable, and scalable."}),(0,c.jsxs)("div",{className:"flex gap-4",children:[(0,c.jsx)("button",{type:"button",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,c.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})})}),(0,c.jsx)("button",{type:"button",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,c.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,c.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:X.map(e=>(0,c.jsx)("li",{children:(0,c.jsx)(w(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,c.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:ee.map(e=>(0,c.jsx)("li",{children:(0,c.jsx)(w(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,c.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:et.map(e=>(0,c.jsx)("li",{children:(0,c.jsx)(w(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]})]}),(0,c.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,c.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 2025 ",C.vQ.name," Inc. All rights reserved."]}),(0,c.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,c.jsx)(w(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,c.jsx)(w(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}let er=e=>new Intl.NumberFormat().format(e||0);function ea({stats:e}){let t;return(0,c.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 sm:gap-4",children:[(0,c.jsxs)(i.A,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,c.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,c.jsx)("span",{className:"truncate text-2xl font-bold",children:er(e.totalRequests)})]}),(0,c.jsxs)(i.A,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,c.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,c.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:er(e.totalPromptTokens)})]}),(0,c.jsxs)(i.A,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,c.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Cached Tokens"}),(0,c.jsx)("span",{className:"truncate text-2xl font-bold text-info",children:er(e.totalCachedTokens)})]}),(0,c.jsxs)(i.A,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,c.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,c.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:er(e.totalCompletionTokens)})]}),(0,c.jsxs)(i.A,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,c.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,c.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,c.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}let el=new Intl.NumberFormat,en=e=>el.format(e||0),ei=e=>`$${(e||0).toFixed(2)}`;function eo(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function ed({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,c.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,c.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function ec({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":en(e.promptTokens)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":en(e.completionTokens)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:en(e.totalTokens)})]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":ei(e.inputCost)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":ei(e.outputCost)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:ei(e.totalCost||e.cost)})]})}function ex({title:e,columns:t,groupedData:s,tableType:r,sortBy:a,sortOrder:l,onToggleSort:n,viewMode:o,storageKey:d,renderDetailCells:x,renderSummaryCells:m,emptyMessage:u}){let[p,h]=(0,v.useState)(()=>{try{let e=localStorage.getItem(d);if(e)return new Set(JSON.parse(e))}catch{}return new Set}),b=(0,v.useCallback)(e=>{h(t=>{let s=new Set(t);s.has(e)?s.delete(e):s.add(e);try{localStorage.setItem(d,JSON.stringify([...s]))}catch(e){console.error(`Failed to save ${d}:`,e)}return s})},[d]),f=(0,v.useMemo)(()=>"tokens"===o?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[o]),g=t.length+f.length;return(0,c.jsxs)(i.A,{className:"overflow-hidden",children:[(0,c.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,c.jsx)("h3",{className:"font-semibold",children:e})}),(0,c.jsx)("div",{className:"overflow-x-auto",children:(0,c.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,c.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,c.jsxs)("tr",{children:[t.map(e=>(0,c.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>n(r,e.field),children:[e.label," ",(0,c.jsx)(ed,{field:e.field,currentSort:a,currentOrder:l})]},e.field)),f.map(e=>(0,c.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>n(r,e.field),children:[e.label," ",(0,c.jsx)(ed,{field:e.field,currentSort:a,currentOrder:l})]},e.field))]})}),(0,c.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,c.jsxs)(v.Fragment,{children:[(0,c.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>b(e.groupKey),children:[(0,c.jsx)("td",{className:"px-6 py-3",children:(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${p.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,c.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),m(e),(0,c.jsx)(ec,{item:e.summary,viewMode:o,isSummary:!0})]}),p.has(e.groupKey)&&e.items.map(e=>(0,c.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,c.jsx)(ec,{item:e,viewMode:o})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,c.jsx)("tr",{children:(0,c.jsx)("td",{colSpan:g,className:"px-6 py-8 text-center text-text-muted",children:u})})]})]})})]})}let em=(0,r.default)(()=>Promise.all([s.e(5334),s.e(1399),s.e(6676)]).then(s.bind(s,46676)).then(e=>{let{AreaChart:t,Area:s,XAxis:r,YAxis:a,CartesianGrid:l,Tooltip:n,ResponsiveContainer:i}=e;function o({data:e,viewMode:d,fmtTokens:x,fmtCost:m}){return(0,c.jsx)(i,{width:"100%",height:220,children:(0,c.jsxs)(t,{data:e,margin:{top:4,right:8,left:0,bottom:0},children:[(0,c.jsxs)("defs",{children:[(0,c.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,c.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,c.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,c.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,c.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,c.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,c.jsx)(l,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,c.jsx)(r,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,c.jsx)(a,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===d?x:m,width:50}),(0,c.jsx)(n,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[x(e),"Tokens"]:[m(e),"Cost"]}),"tokens"===d?(0,c.jsx)(s,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,c.jsx)(s,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})})}return o.displayName="RechartsChart",{default:o}}),{loadableGenerated:{webpack:()=>[46676]},ssr:!1,loading:()=>(0,c.jsx)("div",{className:"h-[220px] w-full rounded-lg border border-border bg-bg-subtle/30","aria-label":"Loading chart"})}),eu=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),ep=e=>`$${(e||0).toFixed(4)}`;function eh({period:e="7d"}){let[t,s]=(0,v.useState)([]),[r,a]=(0,v.useState)(!0),[l,n]=(0,v.useState)("tokens"),o=(0,v.useRef)(null),d=(0,v.useCallback)(async()=>{a(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{a(!1)}},[e]);(0,v.useEffect)(()=>{o.current!==e&&(o.current=e,d())},[d,e]);let x=t.some(e=>e.tokens>0||e.cost>0);return(0,c.jsxs)(i.A,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,c.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,c.jsx)("button",{type:"button",onClick:()=>n("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,c.jsx)("button",{type:"button",onClick:()=>n("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),r?(0,c.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):x?(0,c.jsx)(em,{data:t,viewMode:l,fmtTokens:eu,fmtCost:ep}):(0,c.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function eb(e){let t=S.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}let ef=(0,r.default)(()=>Promise.all([s.e(2554),s.e(7418),s.e(5334),s.e(2673),s.e(5331)]).then(s.bind(s,75331)),{loadableGenerated:{webpack:()=>[75331]},ssr:!1}),eg=(0,c.jsx)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:Array.from({length:4}).map((e,t)=>(0,c.jsx)("div",{className:"h-24 w-full animate-pulse rounded-lg border border-border bg-bg-subtle/50","aria-hidden":"true"},t))}),ej=(0,c.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,c.jsx)("div",{className:"h-[320px] w-full animate-pulse rounded-lg border border-border bg-bg-subtle/50 sm:h-[480px]","aria-hidden":"true"}),(0,c.jsx)("div",{className:"h-[320px] w-full animate-pulse rounded-lg border border-border bg-bg-subtle/50 sm:h-[480px]","aria-hidden":"true"})]}),ey=(0,c.jsx)("div",{className:"h-[220px] w-full animate-pulse rounded-lg border border-border bg-bg-subtle/50","aria-hidden":"true"}),ev=(0,c.jsx)("div",{className:"h-64 w-full animate-pulse rounded-lg border border-border bg-bg-subtle/50","aria-hidden":"true"});function eN({timestamp:e}){let t,[,s]=(0,v.useState)(0);return(0,v.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,c.jsx)(c.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}let ew=[];function ek({requests:e=ew}){return(0,c.jsxs)(i.A,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,c.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,c.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,c.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,c.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,c.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,c.jsxs)("tr",{className:"border-b border-border",children:[(0,c.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2",children:(0,c.jsx)("span",{className:"sr-only",children:"Status"})}),(0,c.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,c.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,c.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,c.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,c.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,c.jsx)("td",{className:"py-1.5",children:(0,c.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`,"aria-label":s?"Success":"Error"})}),(0,c.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,c.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,c.jsxs)("span",{className:"text-primary",children:[en(e.promptTokens),"↑"]})," ",(0,c.jsxs)("span",{className:"text-success",children:[en(e.completionTokens),"↓"]})]}),(0,c.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,c.jsx)(eN,{timestamp:e.timestamp})})]},`${e.timestamp}-${e.model}-${t}`)})})]})}):(0,c.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function eC(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),a=s.cost||0,l=s.cachedTokens||0,n=Math.max(0,(s.promptTokens||0)-l),i=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:r>0?a/r*n:0,cachedCost:r>0?a/r*l:0,outputCost:i,pending:t[e]||0}}).sort((e,t)=>{let a=e[s],l=t[s];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===r?-1:1:a>l?"asc"===r?1:-1:0})}function eS(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,totalTokens:0,cost:0,inputCost:0,cachedCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=s[r].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.cachedTokens+=e.cachedTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.cachedCost+=e.cachedCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}let eT=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],eA=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],eE=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],eL=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],e$=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],eM=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function eP({period:e,setPeriod:t,fetching:s}){return(0,c.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,c.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:eM.map(r=>(0,c.jsx)("button",{type:"button",onClick:()=>t(r.value),disabled:s,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${e===r.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:r.label},r.value))}),s&&(0,c.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]})}function eR({period:e,setPeriod:t,hidePeriodSelector:s=!1}={}){let r=(0,k.useRouter)(),a=(0,k.useSearchParams)(),l=a.get("sortBy")||"rawModel",n=a.get("sortOrder")||"asc",[i,o]=(0,v.useState)(null),[d,x]=(0,v.useState)({loading:!0,fetching:!1}),m=d.loading,u=d.fetching,[p,b]=(0,v.useState)("model"),[f,g]=(0,v.useState)("costs"),[j,y]=(0,v.useState)([]),[N,w]=(0,v.useState)("today"),C=(0,v.useRef)(!0),T=(0,v.useRef)(!1),A=e??N;(0,v.useEffect)(()=>{let e=new AbortController;return Promise.all([fetch("/api/providers",{signal:e.signal}).then(e=>e.ok?e.json():null),fetch("/api/provider-nodes",{signal:e.signal}).then(e=>e.ok?e.json():null)]).then(([t,s])=>{if(e.signal.aborted)return;let r={};for(let e of s?.nodes||[])r[e.id]=e.name;let a=new Set;y([...(t?.connections||[]).reduce((e,t)=>(!1===t.isActive||!eb(t.provider)||a.has(t.provider)||(a.add(t.provider),e.push({...t,nodeName:r[t.provider]||null})),e),[]),...Object.values(S.IS).reduce((e,t)=>(t.noAuth&&!a.has(t.id)&&eb(t.id)&&e.push({provider:t.id,name:t.name}),e),[])])}).catch(()=>{}),()=>e.abort()},[]),(0,v.useEffect)(()=>{C.current?(C.current=!1,x({loading:!0,fetching:!1})):x({loading:!1,fetching:!0});let e=new AbortController;return fetch(`/api/usage/stats?period=${A}`,{signal:e.signal}).then(e=>e.ok?e.json():null).then(t=>{!e.signal.aborted&&t&&(T.current=!0,o(e=>({...e,...t})))}).catch(()=>{}).finally(()=>{e.signal.aborted||x({loading:!1,fetching:!1})}),()=>e.abort()},[A]),(0,v.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);o(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending}:e),T.current&&x(e=>({...e,loading:!1}))}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>x(e=>({...e,loading:!1})),()=>e.close()},[]);let E=(0,v.useCallback)((e,t)=>{let s=new URLSearchParams(a.toString());s.get("sortBy")===t?s.set("sortOrder","asc"===s.get("sortOrder")?"desc":"asc"):(s.set("sortBy",t),s.set("sortOrder","asc")),r.replace(`?${s.toString()}`,{scroll:!1})},[a,r]),L=(0,v.useMemo)(()=>{if(!i)return null;switch(p){case"model":{let e=i.pending?.byModel||{};return{columns:eT,groupedData:eS(eC(i.byModel,e,l,n),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.summary.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,c.jsx)("td",{className:"px-6 py-3",children:(0,c.jsx)(h.A,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.lastUsed)})]})}}case"account":{let e={};return i?.pending?.byAccount&&Object.entries(i.byAccount||{}).forEach(([t,s])=>{let r=i.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:eA,groupedData:eS(eC(i.byAccount,e,l,n),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,c.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.summary.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,c.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,c.jsx)("td",{className:"px-6 py-3",children:(0,c.jsx)(h.A,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.lastUsed)})]})}}case"apiKey":return{columns:eE,groupedData:eS(eC(i.byApiKey,{},l,n),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,c.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.summary.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,c.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,c.jsx)("td",{className:"px-6 py-3",children:(0,c.jsx)(h.A,{variant:"neutral",size:"sm",children:e.provider})}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.lastUsed)})]})};default:return{columns:eL,groupedData:eS(eC(i.byEndpoint,{},l,n),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,c.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.summary.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,c.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,c.jsx)("td",{className:"px-6 py-3",children:(0,c.jsx)(h.A,{variant:"neutral",size:"sm",children:e.provider})}),(0,c.jsx)("td",{className:"px-6 py-3 text-right",children:en(e.requests)}),(0,c.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:eo(e.lastUsed)})]})}}},[i,p,l,n]);return i||m?(0,c.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!s&&(0,c.jsx)(eP,{period:A,setPeriod:t??w,fetching:u}),m?eg:(0,c.jsx)(ea,{stats:i}),m?ej:(0,c.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,c.jsx)(ef,{providers:j,activeRequests:i.activeRequests||[],lastProvider:i.recentRequests?.[0]?.provider||"",errorProvider:i.errorProvider||""}),(0,c.jsx)(ek,{requests:i.recentRequests||[]})]}),m?ey:(0,c.jsx)(eh,{period:A}),(0,c.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,c.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,c.jsx)("select",{value:p,onChange:e=>b(e.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:e$.map(e=>(0,c.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,c.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,c.jsx)("button",{type:"button",onClick:()=>g("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===f?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,c.jsx)("button",{type:"button",onClick:()=>g("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===f?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),m?ev:L&&(0,c.jsx)(ex,{title:"",columns:L.columns,groupedData:L.groupedData,tableType:p,sortBy:l,sortOrder:n,onToggleSort:E,viewMode:f,storageKey:L.storageKey,renderSummaryCells:L.renderSummaryCells,renderDetailCells:L.renderDetailCells,emptyMessage:L.emptyMessage})]})]}):(0,c.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."})}function ez(){let[e,t]=(0,v.useState)(!1);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("button",{type:"button",onClick:()=>t(!0),className:"relative flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg transition-all text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5",title:"9Remote",children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"computer"}),(0,c.jsx)("span",{className:"text-xs font-medium",children:"Remote"})]}),(0,c.jsx)($,{isOpen:e,onClose:()=>t(!1)})]})}function eF(){let[e,t]=(0,v.useState)([]),[s,r]=(0,v.useState)(!0),[a,l]=(0,v.useState)(!0);(0,v.useEffect)(()=>{n()},[]),(0,v.useEffect)(()=>{let e;return a&&(e=setInterval(()=>{n(!1)},3e3)),()=>clearInterval(e)},[a]);let n=async(e=!0)=>{e&&r(!0);try{let e=await fetch("/api/usage/request-logs");if(e.ok){let s=await e.json();t(s)}}catch(e){console.error("Failed to fetch logs:",e)}finally{e&&r(!1)}};return(0,c.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,c.jsx)("div",{className:"flex items-center gap-2",children:(0,c.jsxs)("span",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,c.jsx)("span",{children:"Auto Refresh (3s)"}),(0,c.jsx)("button",{type:"button",role:"switch","aria-checked":a,"aria-label":"Auto Refresh (3s)",onClick:()=>l(!a),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${a?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,c.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${a?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,c.jsx)(i.A,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,c.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:s&&0===e.length?(0,c.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,c.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,c.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,c.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,c.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,c.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,c.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,c.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,c.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,c.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,c.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=e.split(" | ");if(s.length<7)return null;let r=s[6],a=r.includes("PENDING"),l=r.includes("FAILED"),n=r.includes("OK");return(0,c.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${a?"bg-primary/5":""}`,children:[(0,c.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:s[0]}),(0,c.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:s[1]}),(0,c.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,c.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:s[2]})}),(0,c.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:s[3],children:s[3]}),(0,c.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:s[4]}),(0,c.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:s[5]}),(0,c.jsx)("td",{className:`px-3 py-1.5 font-bold ${n?"text-success":l?"text-error":"text-primary animate-pulse"}`,children:r})]},`${s[0]}-${s[1]}-${s[3]}`)})})]})})}),(0,c.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are loaded from the request history database."})]})}let eI={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"},eD=[];function eO({options:e=eD,value:t,onChange:s,size:r="md",className:a}){return(0,c.jsx)("div",{className:(0,m.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",a),children:e.map(e=>(0,c.jsxs)("button",{type:"button",onClick:()=>s(e.value),className:(0,m.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",eI[r],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,c.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}var eU=s(18419),e_=s(24260),eq=s(25795);function eK({children:e}){let[t,s]=(0,v.useState)(!1),r=(0,k.usePathname)(),a=(0,eq.i)(e=>e.notifications),l=(0,eq.i)(e=>e.removeNotification);return(0,v.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&s(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),(0,c.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,c.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:a.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,c.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,c.jsxs)("div",{className:"flex items-start gap-2",children:[(0,c.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,c.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,c.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,c.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,c.jsx)("button",{type:"button",onClick:()=>l(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,c.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1),"aria-hidden":"true"}),(0,c.jsx)("div",{className:"hidden lg:flex",children:(0,c.jsx)(I,{})}),(0,c.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,c.jsx)(I,{onClose:()=>s(!1)})}),(0,c.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300 isolate",children:[(0,c.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none -z-10","aria-hidden":"true"}),(0,c.jsx)(Y,{onMenuClick:()=>s(!0)},r),(0,c.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===r?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===r?"flex flex-col overflow-hidden":""}`,children:(0,c.jsx)("div",{className:`${"/dashboard/basic-chat"===r?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}function eB({children:e}){return(0,c.jsxs)("div",{className:"min-h-screen flex flex-col relative bg-bg transition-colors duration-500 overflow-x-hidden selection:bg-primary/20 selection:text-primary",children:[(0,c.jsx)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 dark:bg-primary/5 rounded-full blur-[100px] pointer-events-none z-0"}),(0,c.jsx)("div",{className:"fixed bottom-0 right-0 w-[600px] h-[600px] bg-orange-200/20 dark:bg-orange-900/10 rounded-full blur-[120px] pointer-events-none z-0 translate-y-1/3 translate-x-1/3"}),(0,c.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,c.jsx)(j,{variant:"card"})}),(0,c.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:e})]})}let eW=e=>(0,r.default)(e,{ssr:!1,loading:()=>null}),eQ=eW(()=>s.e(2884).then(s.bind(s,72884))),eG=eW(()=>Promise.all([s.e(7236),s.e(5479),s.e(9078)]).then(s.bind(s,29078))),eH=eW(()=>s.e(1409).then(s.bind(s,11409))),eV=eW(()=>Promise.all([s.e(7236),s.e(5479),s.e(1049)]).then(s.bind(s,71049))),eJ=eW(()=>s.e(3124).then(s.bind(s,23124))),eY=eW(()=>s.e(6474).then(s.bind(s,76474))),eZ=eW(()=>Promise.all([s.e(6474),s.e(3257)]).then(s.bind(s,83257))),eX=eW(()=>s.e(5560).then(s.bind(s,65560))),e0=eW(()=>s.e(6909).then(s.bind(s,46909))),e1=eW(()=>s.e(9146).then(s.bind(s,9146))),e2=eW(()=>s.e(3386).then(s.bind(s,43386))),e5=eW(()=>s.e(3657).then(s.bind(s,53657))),e3=eW(()=>s.e(406).then(s.bind(s,50406))),e4=eW(()=>s.e(3245).then(s.bind(s,83245))),e6=eW(()=>Promise.resolve().then(s.bind(s,97902))),e8=eW(()=>s.e(1567).then(s.bind(s,61567)))},97902:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o});var r=s(15102),a=s(82030),l=s(49387),n=s(15383),i=s(11434);function o({isOpen:e,onClose:t}){let[d,c]=(0,a.useState)({html:"",loading:!1,error:""}),x=(0,a.useRef)(null),m=(0,a.useRef)(!1);(0,a.useEffect)(()=>{e&&!m.current&&(m.current=!0,c(e=>({...e,loading:!0,error:""})),fetch(i.Nu.changelogUrl).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(e=>c(t=>{var r;return{...t,html:(r=n.xI.parse(e),s(15690).sanitize(r,{FORBID_TAGS:["script","iframe","object","embed","form"],FORBID_ATTR:["onerror","onload","onclick"]})),loading:!1}})).catch(e=>c(t=>({...t,error:e.message||"Failed to load",loading:!1}))))},[e]);let u=(0,a.useRef)(t);if((0,a.useEffect)(()=>{u.current=t}),(0,a.useEffect)(()=>{let t=e=>{x.current&&!x.current.contains(e.target)&&u.current()};if(e)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[e]),(0,a.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&u.current()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]),!e||"u"<typeof document)return null;let{html:p,loading:h,error:b}=d;return(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),(0,r.jsxs)("div",{ref:x,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Change Log"}),(0,r.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[h&&(0,r.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),b&&(0,r.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load changelog: ",b]}),!h&&!b&&p&&(0,r.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:p}})]})]})]}),document.body)}n.xI.setOptions({gfm:!0,breaks:!0})},97955:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(15102),a=s(83916);let l={default:"bg-surface-2 text-text-muted",primary:"bg-brand-500/10 text-brand-600 dark:text-brand-300",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},n={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function i({children:e,variant:t="default",size:s="md",dot:o=!1,icon:d,className:c}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",l[t],n[s],c),children:[o&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full","success"===t&&"bg-green-500","warning"===t&&"bg-yellow-500","error"===t&&"bg-red-500","info"===t&&"bg-blue-500","primary"===t&&"bg-brand-500","default"===t&&"bg-gray-500")}),d&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:d}),e]})}},98657:(e,t,s)=>{s.d(t,{A:()=>d});var r=s(15102),a=s(82030),l=s(49387),n=s(90238),i=s(20264);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:s,hideTrigger:c=!1}){let[x,m]=(0,a.useState)(()=>(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,n.QC)(t)})()),[u,p]=(0,a.useState)(!1),[h,b]=(0,a.useState)(!1),f=(0,a.useRef)(null),g="boolean"==typeof t,j=g?t:h,y=(0,a.useCallback)(e=>{g?!e&&s&&s(x):b(e)},[g,s,x]),v=(0,a.useRef)(y);(0,a.useEffect)(()=>{v.current=y}),(0,a.useEffect)(()=>{function e(e){f.current&&!f.current.contains(e.target)&&v.current(!1)}if(j)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]),(0,a.useEffect)(()=>{if(!j)return;let e=e=>{"Escape"===e.key&&v.current(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[j]);let N=async e=>{if(e!==x&&!u){p(!0),y(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,i.wn)(),m(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,r.jsxs)("div",{className:e,children:[!c&&(0,r.jsxs)("button",{type:"button",onClick:()=>y(!j),disabled:u,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,r.jsx)("span",{className:"text-sm font-medium",children:o(x).name}),(0,r.jsx)("span",{className:"text-lg",children:o(x).flag})]}),j&&(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>y(!1),"aria-hidden":"true"}),(0,r.jsxs)("div",{ref:f,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,r.jsx)("button",{type:"button",onClick:()=>y(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:n.YZ.map(e=>{let t=x===e,s=o(e);return(0,r.jsxs)("button",{type:"button",onClick:()=>N(e),disabled:u,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${u?"opacity-70 cursor-wait":""}`,title:s.name,children:[(0,r.jsx)("span",{className:"text-2xl",children:s.flag}),(0,r.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:s.name}),t&&(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3657],{53657:(e,a,i)=>{i.r(a),i.d(a,{default:()=>u});var t=i(15102),r=i(82030),n=i(7665),l=i(41488),s=i(88140),o=i(97955),p=i(76860),c=i(31038);function d(e,a){switch(a.type){case"RESET":return{testing:!1,testResult:null,validating:!1,validationResult:null,saving:!1};case"TEST_START":return{...e,testing:!0,testResult:null};case"TEST_DONE":return{...e,testing:!1,testResult:a.result};case"VALIDATE_START":return{...e,validating:!0,validationResult:null};case"VALIDATE_DONE":return{...e,validating:!1,validationResult:a.result};case"SAVE_START":return{...e,saving:!0};case"SAVE_DONE":return{...e,saving:!1};default:return e}}function u({isOpen:e,connection:a,proxyPools:i,onSave:v,onClose:y}){let[h,g]=(0,r.useState)({name:"",priority:1,apiKey:""}),[f,A]=(0,r.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),m={accountId:a?.provider==="cloudflare-ai"&&a.providerSpecificData&&a.providerSpecificData.accountId||""},[S,E]=(0,r.useState)(""),[T,x]=(0,r.useReducer)(d,{testing:!1,testResult:null,validating:!1,validationResult:null,saving:!1}),{testing:D,testResult:j,validating:b,validationResult:N,saving:z}=T,[C,I]=(0,r.useState)(a);if(a!==C&&(I(a),a)){g({name:a.name||"",priority:a.priority||1,apiKey:""}),"azure"===a.provider&&a.providerSpecificData&&A({azureEndpoint:a.providerSpecificData.azureEndpoint||"",apiVersion:a.providerSpecificData.apiVersion||"2024-10-01-preview",deployment:a.providerSpecificData.deployment||"",organization:a.providerSpecificData.organization||""});let e=c.Q2?.[a.provider];e?.regions&&E(a.providerSpecificData?.region||e.defaultRegion||e.regions[0]?.id||""),x({type:"RESET"})}let R=a?.authType==="oauth",V=a?.provider==="azure",O=a?.provider==="cloudflare-ai",_=!!a&&((0,c.mq)(a.provider)||(0,c.gb)(a.provider)),w=a&&c.Q2?.[a.provider]?.regions||null,K=()=>{if(w&&S)return{...a?.providerSpecificData||{},region:S}},k=async()=>{if(a?.provider){x({type:"TEST_START"});try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json();x({type:"TEST_DONE",result:i.valid?"success":"failed"})}catch{x({type:"TEST_DONE",result:"failed"})}}},L=async()=>{if(a?.provider&&h.apiKey){x({type:"VALIDATE_START"});try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a.provider,apiKey:h.apiKey,...V?{providerSpecificData:f}:{},...O?{providerSpecificData:m}:{},...w?{providerSpecificData:K()}:{}})}),i=await e.json();x({type:"VALIDATE_DONE",result:i.valid?"success":"failed"})}catch{x({type:"VALIDATE_DONE",result:"failed"})}}},P=async()=>{if(a){x({type:"SAVE_START"});try{let e={name:h.name,priority:h.priority};if(!R&&h.apiKey){e.apiKey=h.apiKey;let i="success"===N;if(!i)try{x({type:"VALIDATE_START"});let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a.provider,apiKey:h.apiKey,...V?{providerSpecificData:f}:{},...O?{providerSpecificData:m}:{},...w?{providerSpecificData:K()}:{}})});i=!!(await e.json()).valid,x({type:"VALIDATE_DONE",result:i?"success":"failed"})}catch{x({type:"VALIDATE_DONE",result:"failed"})}i&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}w&&S&&(e.providerSpecificData=K()),V&&(e.providerSpecificData={azureEndpoint:f.azureEndpoint,apiVersion:f.apiVersion,deployment:f.deployment,organization:f.organization}),O&&(e.providerSpecificData={accountId:m.accountId}),await v(e)}finally{x({type:"SAVE_DONE"})}}};return a?(0,t.jsx)(n.A,{isOpen:e,title:"Edit Connection",onClose:y,children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(l.A,{label:"Name",value:h.name,onChange:e=>g({...h,name:e.target.value}),placeholder:R?"Account name":"Production Key"}),R&&a.email&&(0,t.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,t.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,t.jsx)("p",{className:"font-medium",children:a.email})]}),(0,t.jsx)(l.A,{label:"Priority",type:"number",value:h.priority,onChange:e=>g({...h,priority:Number.parseInt(e.target.value,10)||1})}),!R&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.A,{label:"API Key",type:"password",value:h.apiKey,onChange:e=>g({...h,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,t.jsx)("div",{className:"pt-6",children:(0,t.jsx)(s.A,{onClick:L,disabled:!h.apiKey||b||z,variant:"secondary",children:b?"Checking...":"Check"})})]}),N&&(0,t.jsx)(o.A,{variant:"success"===N?"success":"error",children:"success"===N?"Valid":"Invalid"})]}),V&&(0,t.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,t.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(l.A,{label:"Azure Endpoint",value:f.azureEndpoint,onChange:e=>A({...f,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com",hint:"Your Azure OpenAI resource endpoint URL"}),(0,t.jsx)(l.A,{label:"Deployment Name",value:f.deployment,onChange:e=>A({...f,deployment:e.target.value}),placeholder:"gpt-4",hint:"The deployment name in your Azure resource"}),(0,t.jsx)(l.A,{label:"API Version",value:f.apiVersion,onChange:e=>A({...f,apiVersion:e.target.value}),placeholder:"2024-10-01-preview",hint:"Azure OpenAI API version to use"}),(0,t.jsx)(l.A,{label:"Organization",value:f.organization,onChange:e=>A({...f,organization:e.target.value}),placeholder:"Organization ID",hint:"Required for billing"})]})]}),w&&(0,t.jsx)(p.A,{label:"Region",value:S,onChange:e=>E(e.target.value),options:w.map(e=>({value:e.id,label:e.label}))}),!_&&!V&&!O&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(s.A,{onClick:k,variant:"secondary",disabled:D,children:D?"Testing...":"Test Connection"}),j&&(0,t.jsx)(o.A,{variant:"success"===j?"success":"error",children:"success"===j?"Valid":"Failed"})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.A,{onClick:P,fullWidth:!0,disabled:z,children:z?"Saving...":"Save"}),(0,t.jsx)(s.A,{onClick:y,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}}}]);
@@ -1,23 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3700],{93700:(e,i,o)=>{o.d(i,{dM:()=>n,wn:()=>a});let a={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["gemini-3.5-flash-low","gemini-3-flash-agent","gemini-3.5-flash-extra-low","gemini-3.1-pro-low","gemini-pro-agent","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"],defaultModels:[{id:"gemini-3.5-flash-low",name:"Gemini 3.5 Flash (Medium) / Default",alias:"gemini-3.5-flash-low"},{id:"gemini-3-flash-agent",name:"Gemini 3.5 Flash (High)",alias:"gemini-3-flash-agent"},{id:"gemini-3.5-flash-extra-low",name:"Gemini 3.5 Flash (Low)",alias:"gemini-3.5-flash-extra-low"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro (Low)",alias:"gemini-3.1-pro-low"},{id:"gemini-pro-agent",name:"Gemini 3.1 Pro (High)",alias:"gemini-pro-agent"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Thinking)",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 (Thinking)",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT-OSS 120B (Medium)",alias:"gpt-oss-120b-medium"},{id:"gemini-3-flash",name:"Gemini 3 Flash (Command)",alias:"gemini-3-flash"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-5-mini","gpt-5.4-nano","claude-haiku-4.5","gpt-4o","gpt-4.1"],defaultModels:[{id:"gpt-5-mini",name:"GPT-5 mini",alias:"gpt-5-mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 nano",alias:"gpt-5.4-nano"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"q.us-east-1.amazonaws.com",defaultModels:[{id:"claude-sonnet-5",name:"Claude Sonnet 5",alias:"claude-sonnet-5"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"}]}},n={claude:{id:"claude",name:"Claude Code",image:"/providers/claude.png",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",fableModel:"ANTHROPIC_DEFAULT_FABLE_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","fable","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"fable",name:"Claude Fable",alias:"fable",envKey:"ANTHROPIC_DEFAULT_FABLE_MODEL",defaultValue:"cc/claude-fable-5"},{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-8"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-5"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI / App",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},cowork:{id:"cowork",name:"Claude Cowork",image:"/providers/claude.png",color:"#D97757",description:"Claude Desktop Cowork (third-party inference)",configType:"custom"},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"custom"},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
2
- "apiBase": "{{baseUrl}}",
3
- "title": "{{model}}",
4
- "model": "{{model}}",
5
- "provider": "openai",
6
- "apiKey": "{{apiKey}}"
7
- }`}},amp:{id:"amp",name:"Amp CLI",image:"/providers/amp.png",color:"#F97316",description:"Sourcegraph Amp coding assistant CLI",docsUrl:"/docs?section=cli-tools&tool=amp",configType:"guide",defaultCommand:"amp",modelAliases:["g25p","g25f","cs45","g54"],notes:[{type:"info",text:"Use 9Router model aliases to keep Amp shorthand mappings stable across provider updates."},{type:"warning",text:"Suggested shorthand examples: g25p → gemini/gemini-2.5-pro, g25f → gemini/gemini-2.5-flash, cs45 → cc/claude-sonnet-4-5-20250929."}],guideSteps:[{step:1,title:"Install Amp",desc:"Install the Amp CLI using the package manager supported by your environment."},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"Select Model",type:"modelSelector"},{step:5,title:"Add Shorthands",desc:"Map Amp shorthand names such as g25p or cs45 to 9Router aliases in your local config."}],codeBlock:{language:"bash",code:`export OPENAI_API_KEY="{{apiKey}}"
8
- export OPENAI_BASE_URL="{{baseUrl}}"
9
- amp --model "{{model}}"
10
- # Example shorthand aliases you can map locally:
11
- # g25p -> gemini/gemini-2.5-pro
12
- # cs45 -> cc/claude-sonnet-4-5-20250929`}},qwen:{id:"qwen",name:"Qwen Code",image:"/providers/qwen.png",color:"#10B981",description:"Alibaba Qwen Code CLI — supports OpenAI, Anthropic & Gemini providers via 9Router",docsUrl:"https://qwenlm.github.io/qwen-code-docs/en/users/configuration/model-providers/",configType:"guide",defaultCommand:"qwen",notes:[{type:"info",text:"Qwen Code supports multiple provider types (openai, anthropic, gemini) via modelProviders in settings.json. 9Router works as an OpenAI-compatible endpoint."},{type:"info",text:"Any model available in 9Router can be used — not just Qwen models. Select from Qwen, Claude, Gemini, GPT, and more."},{type:"warning",text:"Config path: Linux/macOS ~/.qwen/settings.json • Windows %USERPROFILE%\\.qwen\\settings.json"},{type:"error",text:"Qwen OAuth free tier was discontinued on 2026-04-15. Use 9Router with alicode/openrouter/anthropic/gemini providers instead."}],modelAliases:["coder-model","qwen3-coder-plus","qwen3-coder-flash","vision-model","claude-sonnet-4-6","claude-opus-4-6-thinking","gemini-3-flash","gemini-3.1-pro-high"],defaultModels:[{id:"coder-model",name:"Coder Model (Qwen 3.6 Plus)",alias:"coder-model",envKey:"OPENAI_MODEL",defaultValue:"coder-model",isTopLevel:!0},{id:"qwen3-coder-plus",name:"Qwen 3 Coder Plus",alias:"qwen3-coder-plus",envKey:"OPENAI_MODEL",defaultValue:"qwen3-coder-plus"},{id:"qwen3-coder-flash",name:"Qwen 3 Coder Flash",alias:"qwen3-coder-flash",envKey:"OPENAI_MODEL",defaultValue:"qwen3-coder-flash"},{id:"vision-model",name:"Vision Model (Multimodal)",alias:"vision-model",envKey:"OPENAI_MODEL",defaultValue:"vision-model"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6",envKey:"OPENAI_MODEL",defaultValue:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking",envKey:"OPENAI_MODEL",defaultValue:"claude-opus-4-6-thinking"},{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high",envKey:"OPENAI_MODEL",defaultValue:"gemini-3.1-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash",envKey:"OPENAI_MODEL",defaultValue:"gemini-3-flash"}],guideSteps:[{step:1,title:"Install Qwen Code",desc:"npm install -g @qwen-code/qwen-code"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"Select Model",type:"modelSelector"},{step:5,title:"Save Config",desc:"Copy the JSON below to your ~/.qwen/settings.json file."}],codeBlock:{language:"json",code:`{
13
- "security": {
14
- "auth": {
15
- "selectedType": "openai",
16
- "apiKey": "{{apiKey}}",
17
- "baseUrl": "{{baseUrl}}"
18
- }
19
- },
20
- "model": {
21
- "name": "{{model}}"
22
- }
23
- }`}},"deepseek-tui":{id:"deepseek-tui",name:"DeepSeek TUI",image:"/providers/deepseek-tui.png",color:"#4D6BFE",description:"DeepSeek Terminal Coding Agent (Rust TUI)",docsUrl:"https://github.com/DeepSeek-TUI/DeepSeek-TUI",configType:"custom",defaultCommand:"deepseek",modelAliases:["deepseek-v4-pro","deepseek-v4-flash","deepseek-chat","deepseek-reasoner"],defaultModels:[{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",alias:"deepseek-v4-pro"},{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",alias:"deepseek-v4-flash"},{id:"deepseek-chat",name:"DeepSeek V3 Chat",alias:"deepseek-chat"}],notes:[{type:"info",text:"DeepSeek TUI uses ~/.deepseek/config.toml for configuration. 9Router will update the provider to 'openai' mode with your base_url, api_key, and model."},{type:"warning",text:"Config path: Linux/macOS ~/.deepseek/config.toml • Windows %USERPROFILE%\\.deepseek\\config.toml"}]},jcode:{id:"jcode",name:"jcode",image:"/providers/jcode.png",color:"#FF6B35",description:"High-performance Rust-based coding agent harness",configType:"custom",docsUrl:"https://github.com/1jehuang/jcode",notes:[{type:"info",text:"jcode is a Rust-based coding agent with semantic memory, multi-agent swarms, and extreme performance (27.8 MB RAM, 14ms boot)."},{type:"info",text:"Configure 9router as an OpenAI-compatible provider to route all jcode requests through 9router's optimization layer."},{type:"warning",text:"Requires jcode installed. Install via: curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash"}],defaultModels:[{id:"claude-opus-4-7",name:"Claude Opus 4.7",alias:"opus",defaultValue:"cc/claude-opus-4-7"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"sonnet",defaultValue:"cc/claude-sonnet-4-6"},{id:"gpt-5.5",name:"GPT 5.5",alias:"gpt5",defaultValue:"cx/gpt-5.5"},{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro",alias:"gemini",defaultValue:"gemini/gemini-3.1-pro"}]}}}}]);
@@ -1,12 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{21863:(e,t,a)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>s})},28937:(e,t,a)=>{e.exports=a(41979)()},41979:(e,t,a)=>{"use strict";var s=a(78784);function l(){}function i(){}i.resetWarningCache=l,e.exports=function(){function e(e,t,a,l,i,o){if(o!==s){var n=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw n.name="Invariant Violation",n}}function t(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:l};return a.PropTypes=a,a}},68810:(e,t,a)=>{Promise.resolve().then(a.bind(a,76727))},76727:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>F});var s=a(15102),l=a(82030),i=a(93278),o=a(93885),n=a.n(o),r=a(37837),d=a(92940),c=a(31038),m=a(55223),p=a(58788),x=a(47236);let u=["none","low","medium","high"],h=["none","thinking"],f=["none","low","medium","high","max"],g={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":f,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":u,zai:h,qwen:u,kimi:f,deepseek:["none","high","max"],minimax:h,hunyuan:u,step:u},y=[{pattern:"*gpt-5.6-sol*",levels:["none","minimal","low","medium","high","xhigh","max"]},{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function b(e,t){let a=(0,p.nl)(e,t);if(!a.reasoning)return null;let s=y.find(e=>(0,x.gH)(e.pattern,t)),l=s?.levels||g[a.thinkingFormat]||u;return!1===a.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var v=a(21577),j=a(85479),w=a(20264);let k=new Map;async function N(e){if(!e?.url||!e?.type)return[];let t=k.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),a=await fetch(`/api/providers/suggested-models?${t}`);if(!a.ok)return[];let s=(await a.json()).data??[];return k.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}function C({customModels:e=[],modelAliases:t={},providerAlias:a,builtInModels:s=[],type:l="llm",includeLegacyAliases:i=!0}){let o=new Set(s.map(e=>e.id)),n=new Set,r=[];for(let t of e){if(!t?.id||t.providerAlias!==a)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||o.has(t.id))continue;let s=`${a}/${t.id}`;n.has(s)||(n.add(s),r.push({id:t.id,name:t.name||t.id,fullModel:s,source:"custom",type:e}))}if(!i)return r;let d=`${a}/`;for(let[e,a]of Object.entries(t||{})){if("string"!=typeof a||!a.startsWith(d))continue;let t=a.slice(d.length);!t||o.has(t)||n.has(a)||(n.add(a),r.push({id:t,alias:e,fullModel:a,source:"legacyAlias",type:l||"llm"}))}return r}function S({model:e,fullModel:t,alias:a,copied:l,onCopy:i,testStatus:o,isCustom:n,isFree:r,onDeleteAlias:c,onTest:m,isTesting:p,onDisable:x,caps:u}){let h="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:h?{color:h}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),(0,s.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,s.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,s.jsx)(d.CapacityBadges,{caps:u,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>i(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:l===`model-${e.id}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:l===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,s.jsx)("button",{onClick:c,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):x?(0,s.jsx)("button",{onClick:x,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function T({modelId:e,fullModel:t,copied:a,onCopy:l,onDeleteAlias:i,onTest:o,testStatus:n,isTesting:r}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e}`?"Copied!":"Copy"})]}),o&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:o,disabled:r,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:r?{animation:"spin 1s linear infinite"}:void 0,children:r?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:r?"Testing...":"Test"})]})]})]}),(0,s.jsx)("button",{onClick:i,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function A({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:a,customModels:i,copied:o,onCopy:n,onDeleteAlias:r,onAddCustomModel:c,onDeleteCustomModel:m,connections:p,isAnthropic:x}){let[u,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),[v,j]=(0,l.useState)(null),[w,k]=(0,l.useState)({}),N=async t=>{if(!v){j(t);try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await a.json();k(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{k(e=>({...e,[t]:"error"}))}finally{j(null)}}},S=C({customModels:i,modelAliases:a,providerAlias:e,type:"llm"}),E=async()=>{if(!u.trim()||f)return;let e=u.trim();if(S.some(t=>t.id===e))return void alert("Model already exists for this provider.");g(!0);try{await c(e),h("")}catch(e){console.log("Error adding model:",e)}finally{g(!1)}},I=async()=>{if(y)return;let e=p.find(e=>!1!==e.isActive);if(e){b(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||"Failed to import models");let s=a.models||[];if(0===s.length)return void alert("No models returned from /models.");let l=0;for(let e of s){let t=e.id||e.name||e.model;t&&(S.some(e=>e.id===t)||(await c(t),l+=1))}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{b(!1)}}},O=p.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",x?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&E(),placeholder:x?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:E,disabled:!u.trim()||f,children:f?"Adding...":"Add"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"download",onClick:I,disabled:!O||y,children:y?"Importing...":"Import from /models"})]}),!O&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),S.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:S.map(({id:a,alias:l,source:i})=>(0,s.jsx)(T,{modelId:a,fullModel:`${t}/${a}`,copied:o,onCopy:n,onDeleteAlias:()=>"custom"===i?m(a):r(l),onTest:p.length>0?()=>N(a):void 0,testStatus:w[a],isTesting:v===a},`${i}-${e}/${a}`))})]})}var E=a(21863);function I({until:e}){let[t,a]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let s=Math.floor(t/1e3);if(s<60)a(`${s}s`);else if(s<3600)a(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);a(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function O({connection:e,proxyPools:t,isOAuth:a,isFirst:i,isLast:o,onMoveUp:n,onMoveDown:r,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,autoPing:h=null}){let[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),v=(0,l.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,k=w?j.get(w):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!w||N,S=k?`Pool: ${k.name}`:w?`Pool: ${w} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",T=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",A="";if(k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=t}}let $=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";k?.isActive===!0?P="success":(w||N)&&(P="error"),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let _=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),g(!1)}},D=e.authType||(a?"oauth":"apikey"),U="oauth"===D,z="cookie"===D,B=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(U?"OAuth Account":z?"Cookie Account":"API Key"),M=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[R,K]=(0,l.useState)(!1),L=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.useEffect)(()=>{let t=()=>{K(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let a=L?setInterval(t,1e3):null;return()=>{a&&clearInterval(a)}},[L]);let F="unavailable"!==e.testStatus||R?e.testStatus:"active",J=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,s.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.jsx)("button",{onClick:n,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:r,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:z?"cookie":U?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:B}),M&&(0,s.jsx)("p",{className:"text-xs text-text-muted truncate",children:M}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(d.Badge,{variant:(0,E.g)(e.isActive,F),size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,s.jsx)(d.Badge,{variant:"default",size:"sm",children:U?"OAuth":z?"Cookie":"API Key"}),C&&(0,s.jsx)(d.Badge,{variant:P,size:"sm",children:"Proxy"}),R&&!1!==e.isActive&&(0,s.jsx)(I,{until:L}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),J()&&(0,s.jsx)(d.Badge,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:J()})]}),C&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),A&&(0,s.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:A}),$&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:$,children:["no_proxy: ",$]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:v,children:[(0,s.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,s.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,s.jsx)("button",{onClick:()=>_("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>_(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,s.jsx)(d.Tooltip,{text:T,children:(0,s.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,s.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(d.Toggle,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}var $=a(28937),P=a.n($);let _=`name1|sk-key1
2
- name2|sk-key2
3
- sk-key-only-auto-named`;function D({isOpen:e,provider:t,providerName:a,isCompatible:i,isAnthropic:o,authType:n,authHint:r,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===n,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",w="azure"===t,k="cloudflare-ai"===t,N=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||N?.[0]?.id||"",[S,T]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[A,E]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,O]=(0,l.useState)({accountId:""}),[$,P]=(0,l.useState)(C),[U,z]=(0,l.useState)(!1),[B,M]=(0,l.useState)(null),[R,K]=(0,l.useState)(!1),L=k?`name1|sk-key1|acc123456
4
- name2|sk-key2|def789012
5
- sk-key-only-auto-named`:_,[F,J]=(0,l.useState)("single"),[W,q]=(0,l.useState)(""),[H,V]=(0,l.useState)(null),G=()=>y&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:w?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:k?{accountId:I.accountId}:N&&$?{region:$}:void 0,Q=async()=>{z(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})}),a=await e.json();M(a.valid?"success":"failed")}catch{M("failed")}finally{z(!1)}},Y=async()=>{if(t&&(y||S.apiKey)&&(y||S.name)&&(!i||S.defaultModel.trim())){K(!0);try{let e=!1;try{z(!0),M(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})});e=!!(await a.json()).valid,M(e?"success":"failed")}catch{M("failed")}finally{z(!1)}await u({name:S.name||(y?"Ollama Local":""),apiKey:S.apiKey,defaultModel:i?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===g?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{K(!1)}}},X=async()=>{let e=W.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),V(null);let a=0,s=0;for(let l=0;l<e.length;l++){let i,o,n=e[l].split("|"),r=n.length>=2?n[0].trim():"Key",d=`${r} ${l+1}`;k&&n.length>=3?(i=n.slice(1,-1).join("|").trim(),o={accountId:n[n.length-1].trim()}):i=n.length>=2?n.slice(1).join("|").trim():n[0].trim();try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:i,name:d,priority:1,testStatus:"unknown",...o?{providerSpecificData:o}:{}})})).ok?a++:s++}catch{s++}}K(!1),V({success:a,failed:s}),a>0&&h&&h()};return t?(0,s.jsx)(d.Modal,{isOpen:e,title:`Add ${a||t} ${j}`,onClose:f,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{J("single"),V(null)},children:"Single"}),(0,s.jsx)(d.Button,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{J("bulk"),V(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:k?(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:L,value:W,onChange:e=>q(e.target.value)}),H&&(0,s.jsxs)("div",{className:`text-sm font-medium ${H.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",H.success," added",H.failed>0?`, ✗ ${H.failed} failed`:""]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:X,fullWidth:!0,disabled:R||!W.trim(),children:R?"Adding...":"Add All Keys"}),(0,s.jsx)(d.Button,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Input,{label:"Name",value:S.name,onChange:e=>T({...S,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Input,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>T({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.Button,{onClick:Q,disabled:U||R,variant:"secondary",children:U?"Checking...":"Check"})})]}),!y&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Input,{label:j,type:b?"text":"password",value:S.apiKey,onChange:e=>T({...S,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.Button,{onClick:Q,disabled:!S.apiKey||U||R,variant:"secondary",children:U?"Checking...":"Check"})})]}),v&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&r&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[r,m&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),N&&(0,s.jsx)(d.Select,{label:"Region",value:$,onChange:e=>P(e.target.value),options:N.map(e=>({value:e.id,label:e.label}))}),i&&(0,s.jsx)(d.Input,{label:"Default Model",value:S.defaultModel,onChange:e=>T({...S,defaultModel:e.target.value}),placeholder:o?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),B&&(0,s.jsx)(d.Badge,{variant:"success"===B?"success":"error",children:"success"===B?"Valid":"Invalid"}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),i&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),k&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(d.Input,{label:"Account ID",value:I.accountId,onChange:e=>O({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),w&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(d.Input,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:e=>E({...A,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(d.Input,{label:"Deployment Name",value:A.deployment,onChange:e=>E({...A,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(d.Input,{label:"API Version",value:A.apiVersion,onChange:e=>E({...A,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(d.Input,{label:"Organization",value:A.organization,onChange:e=>E({...A,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(d.Input,{label:"Priority",type:"number",value:S.priority,onChange:e=>T({...S,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(d.Select,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>T({...S,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:Y,fullWidth:!0,disabled:R||!y&&(!S.name||!S.apiKey)||i&&!S.defaultModel.trim()||w&&(!A.azureEndpoint||!A.deployment||!A.organization)||k&&!I.accountId,children:R?"Saving...":"Save"}),(0,s.jsx)(d.Button,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}D.propTypes={isOpen:P().bool.isRequired,provider:P().string,providerName:P().string,isCompatible:P().bool,isAnthropic:P().bool,authType:P().string,authHint:P().string,website:P().string,proxyPools:P().arrayOf(P().shape({id:P().string,name:P().string})),error:P().string,onSave:P().func.isRequired,onBulkDone:P().func,onClose:P().func.isRequired};let U=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function z({isOpen:e,node:t,onSave:a,onClose:i,isAnthropic:o}){let[n,r]=(0,l.useState)(()=>({name:t?.name||"",prefix:t?.prefix||"",apiType:t?.apiType||"chat",baseUrl:t?.baseUrl||(o?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})),[c,m]=(0,l.useState)(!1),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null),[v,j]=(0,l.useState)(t);t!==v&&(j(t),t&&r({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(o?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}));let w=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};o||(e.apiType=n.apiType),await a(e)}finally{m(!1)}}},k=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:o?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,s.jsx)(d.Modal,{isOpen:e,title:`Edit ${o?"Anthropic":"OpenAI"} Compatible`,onClose:i,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.Input,{label:"Name",value:n.name,onChange:e=>r({...n,name:e.target.value}),placeholder:`${o?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(d.Input,{label:"Prefix",value:n.prefix,onChange:e=>r({...n,prefix:e.target.value}),placeholder:o?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!o&&(0,s.jsx)(d.Select,{label:"API Type",options:U,value:n.apiType,onChange:e=>r({...n,apiType:e.target.value})}),(0,s.jsx)(d.Input,{label:"Base URL",value:n.baseUrl,onChange:e=>r({...n,baseUrl:e.target.value}),placeholder:o?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${o?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Input,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.Button,{onClick:k,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,s.jsx)(d.Input,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,s.jsx)(d.Badge,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:w,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,s.jsx)(d.Button,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function B(e,t){switch(t.type){case"RESET":return{modelId:"",testStatus:null,testError:"",saving:!1};case"SET_MODEL":return{...e,modelId:t.value,testStatus:null,testError:""};case"TEST_START":return{...e,testStatus:"testing",testError:""};case"TEST_RESULT":return{...e,testStatus:t.ok?"ok":"error",testError:t.error||""};case"SAVE_START":return{...e,saving:!0};case"SAVE_DONE":return{...e,saving:!1};default:return e}}function M({isOpen:e,providerAlias:t,providerDisplayAlias:a,onSave:i,onClose:o}){let[n,r]=(0,l.useReducer)(B,{modelId:"",testStatus:null,testError:"",saving:!1}),{modelId:c,testStatus:m,testError:p,saving:x}=n,[u,h]=(0,l.useState)(!1);e&&!u?(h(!0),r({type:"RESET"})):!e&&u&&h(!1);let f=e=>{let a=`${t}/`;return e.startsWith(a)?e.slice(a.length):e},g=async()=>{let e=f(c.trim());if(e){r({type:"TEST_START"});try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await a.json();r({type:"TEST_RESULT",ok:s.ok,error:s.error})}catch(e){r({type:"TEST_RESULT",ok:!1,error:e.message})}}},y=async()=>{let e=f(c.trim());if(e&&!x){r({type:"SAVE_START"});try{await i(e)}finally{r({type:"SAVE_DONE"})}}};return(0,s.jsx)(d.Modal,{isOpen:e,onClose:o,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"add-custom-model-id",className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{id:"add-custom-model-id",type:"text",value:c,onChange:e=>r({type:"SET_MODEL",value:e.target.value}),onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),(0,s.jsx)(d.Button,{variant:"secondary",icon:"science",loading:"testing"===m,onClick:g,disabled:!c.trim()||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(c.trim())||"model-id"})]})]}),"ok"===m&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:p||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(d.Button,{onClick:o,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(d.Button,{onClick:y,fullWidth:!0,size:"sm",disabled:!c.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}let R=`[
6
- {
7
- "accessToken": "eyJhbGc...",
8
- "refreshToken": "rt_...",
9
- "idToken": "eyJhbGc...",
10
- "email": "user@example.com"
11
- }
12
- ]`;function K({isOpen:e,onClose:t,onSuccess:a}){let[i,o]=(0,l.useState)(""),[n,r]=(0,l.useState)(!1),[c,m]=(0,l.useState)(""),[p,x]=(0,l.useState)(null),u=()=>{n||(o(""),m(""),x(null),t())},h=async()=>{var e;let t;m(""),x(null);let s=i.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){m(`${(0,w.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void m((0,w.Tl)("No accounts found in input"));r(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,w.Tl)("Request failed"))}finally{r(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(d.Modal,{isOpen:e,title:(0,w.Tl)("Bulk Add Codex Accounts"),onClose:u,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,w.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:R,value:i,onChange:e=>o(e.target.value),disabled:n}),c&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,w.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,w.Tl)("failed")}`:""]}),f.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:h,fullWidth:!0,disabled:n||!i.trim(),children:n?(0,w.Tl)("Importing..."):(0,w.Tl)("Import All")}),(0,s.jsx)(d.Button,{onClick:u,variant:"ghost",fullWidth:!0,disabled:n,children:(0,w.Tl)("Close")})]})]})})}let L={claude:"claudeAutoPing",codex:"codexAutoPing"};function F(){let e,t=(0,i.useParams)(),a=(0,i.useRouter)(),o=t.id,{getCaps:p}=(0,j.y)(),[x,u]=(0,l.useState)([]),[h,f]=(0,l.useState)(!0),[g,y]=(0,l.useState)(null),[k,T]=(0,l.useState)([]),[E,I]=(0,l.useState)(!1),[$,P]=(0,l.useState)(!1),[_,U]=(0,l.useState)(!1),[B,R]=(0,l.useState)(""),[F,J]=(0,l.useState)(!1),[W,q]=(0,l.useState)(!1),[H,V]=(0,l.useState)(!1),[G,Q]=(0,l.useState)(!1),[Y,X]=(0,l.useState)(null),[Z,ee]=(0,l.useState)({}),[et,ea]=(0,l.useState)([]),[es,el]=(0,l.useState)(!1),[ei,eo]=(0,l.useState)({}),[en,er]=(0,l.useState)(""),[ed,ec]=(0,l.useState)(()=>new Set),[em,ep]=(0,l.useState)(!1),[ex,eu]=(0,l.useState)([]),[eh,ef]=(0,l.useState)("__none__"),[eg,ey]=(0,l.useState)(!1),[eb,ev]=(0,l.useState)(null),[ej,ew]=(0,l.useState)(""),[ek,eN]=(0,l.useState)("auto"),[eC,eS]=(0,l.useState)({enabled:!1,connections:{}}),[eT,eA]=(0,l.useState)([]),[eE,eI]=(0,l.useState)([]),[eO,e$]=(0,l.useState)([]),[eP,e_]=(0,l.useState)(null),[eD,eU]=(0,l.useState)(!1),[ez,eB]=(0,l.useState)(!1),[eM,eR]=(0,l.useState)(!1),[eK,eL]=(0,l.useState)(null),[eF,eJ]=(0,l.useState)({}),[eW,eq]=(0,l.useState)(null),eH=(0,l.useRef)(!1),[eV,eG]=(0,l.useState)(!1),{copied:eQ,copy:eY}=(0,v.C)(),eX="ag_risk_confirmed",eZ=()=>{I(!0)},e0=()=>{"antigravity"===o&&"true"!==window.localStorage.getItem(eX)?eU(!0):e4?eZ():(R(""),U(!0))},e1=()=>{R(""),U(!0)},e2=()=>{e4?e0():e1()},e5=g?{id:g.id,name:g.name||("anthropic-compatible"===g.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===g.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===g.type?"AC":"OC",apiType:g.apiType,baseUrl:g.baseUrl,type:g.type}:c.zN[o]||c.fg[o]||c.IS[o]||c.nJ[o]||c.br[o],e3=e5?.authModes||[],e4=!!c.zN[o]||!!c.IS[o]||e3.includes("oauth"),e8=!!c.fg[o]||e3.includes("apikey"),e6=!!c.IS[o]?.noAuth,e7=(0,m.KC)(o),e9=(0,c.wG)(o),te=(0,c.mq)(o),tt=(0,c.gb)(o),ta=te||tt,ts=!ta&&e4&&e8,tl="xai"===o?"Grok Build OAuth":"grok-cli"===o?"Grok CLI Device Login":"OAuth",ti="xai"===o?"xAI API Key":"API Key",to=e=>{if(!ek||"auto"===ek)return null;let t=b(o,e);return t&&t.includes(ek)?ek:null},tn=ta?o:e9,tr=(()=>{let e=new Set,t=new Set,a=a=>{if(!a||t.has(a))return;t.add(a);let s=b(o,a);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of e7)a(e.id);for(let e of eE)a(e.id);for(let e of et)e.providerAlias===tn&&"llm"===(e.kind||e.type||"llm")&&a(e.id);return e.size?["auto",...e]:null})(),td=ta?g?.prefix||o:e9,tc=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{cache:"no-store"}),t=await e.json();e.ok&&e$(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tn]),tm=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:[e]})})).ok&&await tc()}catch(e){console.log("Error disabling model:",e)}},tp=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tc()}catch(e){console.log("Error enabling model:",e)}},tx=async e=>{e.length&&e_({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{e_(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:e})})).ok&&await tc()}catch(e){console.log("Error disabling all models:",e)}}})},tu=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{method:"DELETE"})).ok&&await tc()}catch(e){console.log("Error enabling all models:",e)}},th=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ee(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tf=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ea(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===o&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eI(e.models)}).catch(()=>{})},[o]);let tg=(0,l.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),i=await t.json(),n=await a.json(),r=s.ok?await s.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===o);u(e)}a.ok&&T(n.proxyPools||[]);let d=(r.providerStrategies||{})[o]||{};ev(d.fallbackStrategy||null),ew(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(r.providerThinking||{})[o]||{};eN(c.mode||"auto");let m=L[o],p=m&&r[m]||{};if(eS({enabled:!0===p.enabled,connections:p.connections||{}}),t.ok){let e=(i.nodes||[]).find(e=>e.id===o)||null;if(!e&&ta)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===o)||null))break}y(e)}}catch(e){console.log("Error fetching connections:",e)}finally{f(!1)}},[o,ta]),ty=async e=>{try{let t=await fetch(`/api/provider-nodes/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(y(a.node),await tg(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),s=(a.ok?await a.json():{}).providerStrategies||{},l={};e&&(l.fallbackStrategy=e),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let i={...s};0===Object.keys(l).length?delete i[o]:i[o]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:i})})}catch(e){console.log("Error saving provider strategy:",e)}},tv=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[o]={mode:e}:delete a[o],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},tj=async e=>{let t=L[o];if(t){eS(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{tg(),th(),tf(),tc()},[tg,th,tf,tc]),(0,l.useEffect)(()=>{let e=(c.zN[o]||c.fg[o]||c.IS[o]||c.nJ[o])?.modelsFetcher;e&&N(e).then(eA)},[o]);let tw=async(e,t,a=e9)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await th();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tk=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await th()}catch(e){console.log("Error deleting alias:",e)}},tN=async(e,t="llm",a=tn)=>{try{let s=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a,id:e,type:t})});if(s.ok)await tf(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await s.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tC=async(e,t="llm",a=tn)=>{try{let s=new URLSearchParams({providerAlias:a,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await tf(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tS=async()=>{if(eV)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,w.Tl)("Please add an active Qoder connection first"));eG(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,w.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,w.Tl)("No models returned"));let l=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let a=t.replace(/^qoder\//,"");et.some(e=>e.providerAlias===tn&&e.id===a&&"llm"===(e.kind||e.type||"llm"))||Object.values(Z).includes(`${tn}/${a}`)||(await tN(a,"llm",tn),l+=1)}0===l?alert((0,w.Tl)("All models already exist, no new models added")):alert((0,w.Tl)("Successfully added")+` ${l} `+(0,w.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,w.Tl)("Error fetching models")+": "+e.message)}finally{eG(!1)}},tT=async()=>{if(ez||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eH.current=!1,eB(!0),eR(!1),eL(null),eJ(e),eq({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<x.length;e+=1){if(eH.current){eq({total:x.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=x[e];eL(s.id),eJ(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),l=await e.json(),i=!!l.valid;i?t+=1:a+=1,eJ(e=>({...e,[s.id]:{state:i?"success":"failed",error:i?null:l.error||null}}))}catch(e){a+=1,eJ(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}eq({total:x.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eL(null),eB(!1),eR(!1),eH.current=!1}},tA=async e=>{e_({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{e_(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&u(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tE=()=>{tg(),I(!1)},tI=async e=>{R("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await tg(),U(!1);return}R(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),R("Failed to save connection")}},tO=async e=>{try{(await fetch(`/api/providers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tg(),q(!1))}catch(e){console.log("Error updating connection:",e)}},t$=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&u(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tP=async(e,t)=>{let a=[...x];[a[e],a[t]]=[a[t],a[e]],u(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tg()}},t_=x.filter(e=>ex.includes(e.id)),tD=x.length>0&&ex.length===x.length;(0,l.useEffect)(()=>{eu(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===t_.length)return;let e=new Set(t_.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=k.find(e=>e.id===t);return a?.name}})();let tU=()=>{eg||Q(!1)},tz=async e=>{ey(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tg(),Q(!1)}finally{ey(!1)}},tB=e=>tz(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tM=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>{let a;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(a=e.id,ex.includes(a)),onChange:()=>{var t;return t=e.id,void eu(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(O,{connection:e,proxyPools:k,isOAuth:e4,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tP(t,t-1),onMoveDown:()=>tP(t,t+1),onToggleActive:t=>t$(e.id,t),autoPing:L[o]&&"oauth"===e.authType?{on:!0===eC.connections[e.id],onToggle:t=>{var a;return a=e.id,void tj({...eC,connections:{...eC.connections,[a]:t}})},provider:o}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&u(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{X(e),q(!0)},onDelete:()=>tA(e.id),oneByOneStatus:eF[e.id]||null})})]},e.id)})}),tR=k.filter(e=>!0===e.isActive),tK=(0,s.jsx)(d.Modal,{isOpen:G,onClose:tU,title:`Apply Proxy (${x.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=k.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tz(x.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eg||0===tR.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>tB(null),disabled:eg,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),k.map(e=>(0,s.jsxs)("button",{onClick:()=>tB(e.id),disabled:eg||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eg&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(d.Button,{onClick:tU,variant:"ghost",fullWidth:!0,disabled:eg,children:"Cancel"})]})}),tL=async e=>{if(!ed.has(e)){ec(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tn}/${e}`})}),a=await t.json();eo(t=>({...t,[e]:a.ok?"ok":"error"})),er(a.ok?"":a.error||"Model not reachable")}catch{eo(t=>({...t,[e]:"error"})),er("Network error")}finally{ec(t=>{let a=new Set(t);return a.delete(e),a})}}};return h?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.CardSkeleton,{}),(0,s.jsx)(d.CardSkeleton,{})]}):e5?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e5.color}15`},children:es?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:e5.color},children:e5.textIcon||e5.id.slice(0,2).toUpperCase()}):(0,s.jsx)(r.default,{src:te&&e5.apiType?"responses"===e5.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tt?"/providers/anthropic-m.png":`/providers/${e5.id}.png`,alt:e5.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>el(!0)})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e5.name}),(e5.notice?.apiKeyUrl||e5.notice?.signupUrl||e5.website)&&(0,s.jsxs)("a",{href:e5.notice?.apiKeyUrl||e5.notice?.signupUrl||e5.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e5.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e5.deprecated&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e5.deprecationNotice})]}),e5.notice?.text&&!e5.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e5.notice.text}),e5.notice.apiKeyUrl&&(0,s.jsx)("a",{href:e5.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),ta&&g&&(0,s.jsx)(d.Card,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:tt?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tt?"Messages API":"responses"===g.apiType?"Responses API":"Chat Completions"," \xb7 ",(g.baseUrl||"").replace(/\/$/,""),"/",tt?"messages":"responses"===g.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:()=>{R(""),U(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{e_({title:"Delete Compatible Node",message:`Delete this ${tt?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{e_(null);try{(await fetch(`/api/provider-nodes/${o}`,{method:"DELETE"})).ok&&a.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),e6?(0,s.jsx)(d.NoAuthProxyCard,{providerId:o}):(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&k.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>Q(!0),children:"Apply Proxy"}),x.length>0&&(0,s.jsxs)(s.Fragment,{children:[ex.length>0&&(0,s.jsxs)(d.Button,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ex.length;0!==e&&e_({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{e_(null);let e=0,t=[...ex];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}u(e=>e.filter(e=>!t.includes(e.id))),eu([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ex.length,")"]}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"sync",onClick:tT,disabled:ez,children:ez?"Testing Connection One-by-One...":"Test Connection One-by-One"}),ez&&(0,s.jsx)(d.Button,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{ez&&(eH.current=!0,eR(!0))},disabled:eM,children:eM?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(d.Toggle,{checked:"round-robin"===eb,onChange:e=>{let t=e?"round-robin":null,a=e?ej||"1":ej;e&&!ej&&ew("1"),ev(t),tb(t,a)}}),"round-robin"===eb&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:ej,onChange:e=>{var t;ew(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===x.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e4?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ts&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tl," or ",ti,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ts?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:e0,children:tl}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:e1,children:ti})]}):(0,s.jsxs)(s.Fragment,{children:[!ta&&"iflow"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),"codex"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),children:(0,w.Tl)("Bulk Add")}),(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:e2,children:ta?"Add API Key":"iflow"===o?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[eW&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",eW.total]}),(0,s.jsxs)("span",{children:["Completed: ",eW.completed]}),(0,s.jsxs)("span",{children:["Passed: ",eW.passed]}),(0,s.jsxs)("span",{children:["Failed: ",eW.failed]}),eW.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),ez&&eK&&(0,s.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eK)?.name||eK]})]})}),x.length>0&&(0,s.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:tD,onChange:()=>{tD?eu([]):eu(x.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tM,!ta&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),title:(0,w.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,w.Tl)("Bulk Add")}),ts?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:e0,className:"w-full sm:w-auto",children:tl}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:e1,className:"w-full sm:w-auto",children:ti})]}):(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:e2,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tr&&(0,s.jsx)("select",{value:ek,onChange:e=>{var t;eN(t=e.target.value),tv(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tr.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!ta&&(e=[...e7,...eE.filter(e=>!e7.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eO.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eO.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tu,children:"Active All"}),e.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tx(e),children:"Disable All"})]}))]}),!!en&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:en}),(()=>{let e,t,a;if(ta)return(0,s.jsx)(A,{providerStorageAlias:tn,providerDisplayAlias:td,modelAliases:Z,customModels:et,copied:eQ,onCopy:eY,onSetAlias:tw,onDeleteAlias:tk,onAddCustomModel:e=>tN(e,"llm",tn),onDeleteCustomModel:e=>tC(e,"llm",tn),connections:x,isAnthropic:tt});let l=[...e7,...eE.filter(e=>!e7.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),i=new Set(eO),n=l.filter(e=>!i.has(e.id)),r=l.filter(e=>i.has(e.id)),d=C({customModels:et,modelAliases:Z,providerAlias:tn,builtInModels:e7,type:"llm"});return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(S,{model:{id:e.id,name:e.name},fullModel:`${td}/${e.id}`,alias:e.alias,copied:eQ,onCopy:eY,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tC(e.id,"llm",tn):tk(e.alias)},testStatus:ei[e.id],onTest:x.length>0||e6?()=>tL(e.id):void 0,isTesting:ed.has(e.id),isCustom:!0,isFree:!1,caps:p(`${o}/${e.id}`),thinkingSuffix:to(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${tn}/${e.id}`,a=`${o}/${e.id}`,l=Object.entries(Z).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(S,{model:e,fullModel:`${td}/${e.id}`,alias:l,copied:eQ,onCopy:eY,onSetAlias:t=>tw(e.id,t,tn),onDeleteAlias:()=>tk(l),testStatus:ei[e.id],onTest:x.length>0||e6?()=>tL(e.id):void 0,isTesting:ed.has(e.id),isFree:e.isFree,onDisable:()=>tm(e.id),caps:p(`${o}/${e.id}`),thinkingSuffix:to(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>ep(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===o&&x.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:tS,disabled:eV,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:eV?{animation:"spin 1s linear infinite"}:void 0,children:eV?"progress_activity":"download"}),eV?(0,w.Tl)("Fetching..."):(0,w.Tl)("Fetch Qoder Models")]}),eT.length>0&&(e=new Set([...Object.values(Z),...d.map(e=>e.fullModel)]),t=new Set(e7.map(e=>e.id)),0===(a=eT.filter(a=>!e.has(`${tn}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await tN(e.id,"llm",tn)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),r.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(e=>(0,s.jsxs)("button",{onClick:()=>tp(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tK,"kiro"===o?(0,s.jsx)(d.KiroOAuthWrapper,{isOpen:E,providerInfo:e5,onSuccess:tE,onClose:()=>I(!1)}):"cursor"===o?(0,s.jsx)(d.CursorAuthModal,{isOpen:E,onSuccess:tE,onClose:()=>I(!1)}):"gitlab"===o?(0,s.jsx)(d.GitLabAuthModal,{isOpen:E,providerInfo:e5,onSuccess:tE,onClose:()=>I(!1)}):(0,s.jsx)(d.OAuthModal,{isOpen:E,provider:o,providerInfo:e5,onSuccess:tE,onClose:()=>I(!1)}),"iflow"===o&&(0,s.jsx)(d.IFlowCookieModal,{isOpen:$,onSuccess:()=>{tg(),P(!1)},onClose:()=>P(!1)}),(0,s.jsx)(D,{isOpen:_,provider:o,providerName:e5.name,isCompatible:ta,isAnthropic:tt,authType:e5?.authType,authHint:e5?.authHint,website:e5?.website,proxyPools:k,error:B,onSave:tI,onBulkDone:tg,onClose:()=>{R(""),U(!1)}}),(0,s.jsx)(d.EditConnectionModal,{isOpen:W,connection:Y,proxyPools:k,onSave:tO,onClose:()=>q(!1)}),ta&&(0,s.jsx)(z,{isOpen:H,node:g,onSave:ty,onClose:()=>V(!1),isAnthropic:tt}),!ta&&(0,s.jsx)(M,{isOpen:em,providerAlias:tn,providerDisplayAlias:td,onSave:async e=>{await tN(e,"llm",tn),ep(!1)},onClose:()=>ep(!1)}),"codex"===o&&(0,s.jsx)(K,{isOpen:F,onClose:()=>J(!1),onSuccess:tg}),(0,s.jsx)(d.ConfirmModal,{isOpen:eD,onClose:()=>eU(!1),onConfirm:()=>{(window.localStorage.setItem(eX,"true"),eU(!1),e4)?eZ():e1()},title:"Risk Notice",message:e5?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.ConfirmModal,{isOpen:!!eP,onClose:()=>e_(null),onConfirm:eP?.onConfirm,title:eP?.title||"Confirm",message:eP?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},78784:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e=>{e.O(0,[3885,9458,4525,4385,2940,7236,5479,2147,3204,7358],()=>e(e.s=68810)),_N_E=e.O()}]);