9router 0.2.89 → 0.2.91

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 (249) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +27 -27
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  5. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/_global-error.html +2 -2
  16. package/app/.next/server/app/_global-error.rsc +1 -1
  17. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  18. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  19. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  20. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  21. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  22. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  23. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/_not-found.html +1 -1
  25. package/app/.next/server/app/_not-found.rsc +2 -2
  26. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  27. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  28. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  29. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  30. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  31. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  32. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  43. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  58. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  61. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  62. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  64. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  80. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  81. package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  83. package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  85. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  87. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  88. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  89. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  90. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  91. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  92. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  93. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  95. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  96. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  98. package/app/.next/server/app/callback.html +1 -1
  99. package/app/.next/server/app/callback.rsc +2 -2
  100. package/app/.next/server/app/callback.segments/_full.segment.rsc +2 -2
  101. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  102. package/app/.next/server/app/callback.segments/_index.segment.rsc +2 -2
  103. package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
  104. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  105. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  106. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  107. package/app/.next/server/app/dashboard/cli-tools.rsc +4 -4
  108. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  109. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  110. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  111. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  112. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
  113. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  114. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +2 -2
  115. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  116. package/app/.next/server/app/dashboard/combos.html +1 -1
  117. package/app/.next/server/app/dashboard/combos.rsc +4 -4
  118. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  119. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  120. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  121. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  122. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +4 -4
  123. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  124. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +2 -2
  125. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  126. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  127. package/app/.next/server/app/dashboard/endpoint.rsc +4 -4
  128. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  129. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  130. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  131. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  132. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
  133. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  134. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +2 -2
  135. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  136. package/app/.next/server/app/dashboard/profile.html +1 -1
  137. package/app/.next/server/app/dashboard/profile.rsc +4 -4
  138. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  139. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  140. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  141. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  142. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
  143. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  144. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +2 -2
  145. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  146. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  147. package/app/.next/server/app/dashboard/providers/new.rsc +4 -4
  148. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  149. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  150. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  151. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  152. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  153. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +4 -4
  154. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  155. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +2 -2
  156. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  157. package/app/.next/server/app/dashboard/providers.html +1 -1
  158. package/app/.next/server/app/dashboard/providers.rsc +4 -4
  159. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  160. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  161. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  162. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  163. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
  164. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  165. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +2 -2
  166. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  167. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  168. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  169. package/app/.next/server/app/dashboard/settings/pricing.rsc +2 -2
  170. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +2 -2
  171. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  172. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +2 -2
  173. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  174. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  175. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  176. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  177. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  178. package/app/.next/server/app/dashboard/translator.html +1 -1
  179. package/app/.next/server/app/dashboard/translator.rsc +4 -4
  180. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  181. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  182. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  183. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  184. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
  185. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  186. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +2 -2
  187. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  188. package/app/.next/server/app/dashboard/usage.html +1 -1
  189. package/app/.next/server/app/dashboard/usage.rsc +4 -4
  190. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  191. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  192. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  193. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  194. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +4 -4
  195. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  196. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +2 -2
  197. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  198. package/app/.next/server/app/dashboard.html +1 -1
  199. package/app/.next/server/app/dashboard.rsc +4 -4
  200. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  201. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  202. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  203. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +4 -4
  204. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  205. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +2 -2
  206. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  207. package/app/.next/server/app/index.html +1 -1
  208. package/app/.next/server/app/index.rsc +2 -2
  209. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  210. package/app/.next/server/app/index.segments/_full.segment.rsc +2 -2
  211. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  212. package/app/.next/server/app/index.segments/_index.segment.rsc +2 -2
  213. package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  214. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  215. package/app/.next/server/app/landing.html +1 -1
  216. package/app/.next/server/app/landing.rsc +2 -2
  217. package/app/.next/server/app/landing.segments/_full.segment.rsc +2 -2
  218. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  219. package/app/.next/server/app/landing.segments/_index.segment.rsc +2 -2
  220. package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
  221. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  222. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  223. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  224. package/app/.next/server/app/login.html +1 -1
  225. package/app/.next/server/app/login.rsc +3 -3
  226. package/app/.next/server/app/login.segments/_full.segment.rsc +3 -3
  227. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  228. package/app/.next/server/app/login.segments/_index.segment.rsc +2 -2
  229. package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  230. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  231. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  232. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  233. package/app/.next/server/app-paths-manifest.json +27 -27
  234. package/app/.next/server/chunks/412.js +1 -1
  235. package/app/.next/server/chunks/7533.js +1 -1
  236. package/app/.next/server/chunks/7647.js +1 -1
  237. package/app/.next/server/chunks/8954.js +1 -1
  238. package/app/.next/server/chunks/9489.js +2 -2
  239. package/app/.next/server/pages/404.html +1 -1
  240. package/app/.next/server/pages/500.html +2 -2
  241. package/app/.next/server/server-reference-manifest.js +1 -1
  242. package/app/.next/server/server-reference-manifest.json +1 -1
  243. package/app/.next/static/chunks/5497-a8926676ecc6669d.js +7 -0
  244. package/app/.next/static/chunks/{8729-8e5ba4c38b294fe1.js → 8729-5b0c3af0a5f8edd2.js} +1 -1
  245. package/app/package.json +1 -1
  246. package/package.json +1 -1
  247. package/app/.next/static/chunks/5497-590ec825fbd92e55.js +0 -7
  248. /package/app/.next/static/{0kBQAQeQcXjhcg1PkyrJY → LqzciTT7zmw49q95ikgdF}/_buildManifest.js +0 -0
  249. /package/app/.next/static/{0kBQAQeQcXjhcg1PkyrJY → LqzciTT7zmw49q95ikgdF}/_ssgManifest.js +0 -0
@@ -0,0 +1,7 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,options:t=[],value:s,onChange:l,placeholder:n="Select an option",error:i,hint:o,disabled:d=!1,required:c=!1,className:m,selectClassName:x,...u}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",m),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,c&&(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:l,disabled:d,className:(0,a.cn)("w-full py-2 px-3 pr-10 text-sm text-text-main","bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md appearance-none","focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none","transition-all disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",i?"border-red-500 focus:border-red-500 focus:ring-red-500/20":"",x),...u,children:[(0,r.jsx)("option",{value:"",disabled:!0,children:n}),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"})})]}),i&&(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"}),i]}),o&&!i&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:o})]})}},1620:(e,t,s)=>{s.d(t,{D:()=>o});var r=s(12115),a=s(90085);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}}},4809:(e,t,s)=>{s.d(t,{default:()=>B});var r=s(95155),a=s(12115),l=s(73321),n=s(25086),i=s(56061),o=s(84588),d=s(14051),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function x({stats:e}){let t;return(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,r.jsx)("span",{className:"text-2xl font-bold",children:m(e.totalRequests)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-primary",children:m(e.totalPromptTokens)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-success",children:m(e.totalCompletionTokens)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let u=e=>new Intl.NumberFormat().format(e||0),h=e=>`$${(e||0).toFixed(2)}`;function p(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 b({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function f({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":u(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":u(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:u(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":h(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":h(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:h(e.totalCost||e.cost)})]})}function g({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:i,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:h}){let[p,g]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&g(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...p]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[p,m]);let j=(0,a.useCallback)(e=>{g(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),y=(0,a.useMemo)(()=>"tokens"===c?[{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"}],[c]),v=t.length+y.length;return(0,r.jsxs)(o.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(b,{field:e.field,currentSort:n,currentOrder:i})]},e.field)),y.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(b,{field:e.field,currentSort:n,currentOrder:i})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>j(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${p.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(f,{item:e.summary,viewMode:c,isSummary:!0})]}),p.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(f,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:v,className:"px-6 py-8 text-center text-text-muted",children:h})})]})]})})]})}b.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},f.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},g.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=s(62882),y=s(84867);s(30315);var v=s(52679);function N({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(j.h7,{type:"target",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function w({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(j.h7,{type:"source",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"9Router",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"9Router"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}N.propTypes={data:c().object.isRequired},w.propTypes={data:c().object.isRequired};let k={provider:N,router:w};function C({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let n=(0,a.useMemo)(()=>new Set(t.map(e=>e.provider?.toLowerCase()).filter(Boolean)),[t]),i=(0,a.useMemo)(()=>new Set(s?[s.toLowerCase()]:[]),[s]),o=(0,a.useMemo)(()=>new Set(l?[l.toLowerCase()]:[]),[l]),{nodes:d,edges:c}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),n=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let i=[],o=[];return i.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,d)=>{var c,m;let x,u,h=(c=e.provider,v.Q2[c]||{color:"#6b7280",name:c}),p=t.has(e.provider?.toLowerCase()),b=!p&&s.has(e.provider?.toLowerCase()),f=!p&&r.has(e.provider?.toLowerCase()),g=`provider-${e.provider}`,j={label:h.name||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(m=e.provider,`/providers/${m}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:p},y=-Math.PI/2+2*Math.PI*d/a,N=l*Math.cos(y),w=n*Math.sin(y);Math.abs(y+Math.PI/2)<Math.PI/4||Math.abs(y-3*Math.PI/2)<Math.PI/4?(x="top",u="bottom"):Math.abs(y-Math.PI/2)<Math.PI/4?(x="bottom",u="top"):N>0?(x="right",u="left"):(x="left",u="right"),i.push({id:g,type:"provider",position:{x:N-90,y:w-15},data:j,draggable:!1}),o.push({id:`e-${g}`,source:"router",sourceHandle:x,target:g,targetHandle:u,animated:p,style:(h.color,f?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:p?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:b?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:i,edges:o}})(e,n,i,o),[e,n,i,o]),m=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),x=(0,a.useRef)(null),u=(0,a.useCallback)(e=>{x.current=e,setTimeout(()=>e.fitView({padding:.3}),50)},[]);return(0,r.jsx)("div",{className:"w-full rounded-lg border border-border bg-bg-subtle/30",style:{height:480},children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(j.Gc,{nodes:d,edges:c,nodeTypes:k,fitView:!0,fitViewOptions:{padding:.3},onInit:u,proOptions:{hideAttribution:!0},panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1},m)})}C.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var S=s(52297),T=s(81989),R=s(9684),M=s(6255),$=s(53020),I=s(40730),E=s(54058);let L=[{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}],O=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),z=e=>`$${(e||0).toFixed(4)}`;function q(){let[e,t]=(0,a.useState)("7d"),[s,l]=(0,a.useState)([]),[n,i]=(0,a.useState)(!0),[d,c]=(0,a.useState)("tokens"),m=(0,a.useCallback)(async()=>{i(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();l(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{i(!1)}},[e]);(0,a.useEffect)(()=>{m()},[m]);let x=s.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(o.default,{className:"p-4 flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:[(0,r.jsx)("button",{onClick:()=>c("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===d?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,r.jsx)("button",{onClick:()=>c("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===d?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),(0,r.jsx)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:L.map(s=>(0,r.jsx)("button",{onClick:()=>t(s.value),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${e===s.value?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:s.label},s.value))})]}),n?(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):x?(0,r.jsx)(S.u,{width:"100%",height:200,children:(0,r.jsxs)(T.Q,{data:s,margin:{top:4,right:8,left:0,bottom:0},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,r.jsx)(R.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)(M.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)($.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===d?O:z,width:50}),(0,r.jsx)(I.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[O(e),"Tokens"]:[z(e),"Cost"]}),"tokens"===d?(0,r.jsx)(E.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)(E.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function U({requests:e=[]}){return(0,r.jsxs)(o.default,{className:"flex flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full text-xs border-collapse",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{var s;let a,l=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${l?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[u(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[u(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(s=e.timestamp,(a=Math.floor((Date.now()-new Date(s))/1e3))<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:`${Math.floor(a/86400)}d ago`)})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function _(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),a=s.cost||0,l=r>0?(s.promptTokens||0)*(a/r):0,n=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:n,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 P(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,totalTokens:0,cost:0,inputCost: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.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||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)}q.propTypes={};let F=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],A=[{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"}],D=[{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"}],W=[{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"}],K=[{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"}];function B(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),s=t.get("sortBy")||"rawModel",o=t.get("sortOrder")||"asc",[d,c]=(0,a.useState)(null),[m,h]=(0,a.useState)(!0),[b,f]=(0,a.useState)("model"),[j,y]=(0,a.useState)([]);(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{if(!e?.connections)return;let t=new Set;y(e.connections.filter(e=>!t.has(e.provider)&&(t.add(e.provider),!0)))}).catch(()=>{})},[]),(0,a.useEffect)(()=>{console.log("[SSE CLIENT] connecting...");let e=new EventSource("/api/usage/stream");return e.onopen=()=>console.log("[SSE CLIENT] connected ✓"),e.onmessage=e=>{try{let t=JSON.parse(e.data);console.log("[SSE CLIENT] message received | activeRequests:",t.activeRequests?.length||0,"| providers:",t.activeRequests?.map(e=>e.provider)),c(t),h(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=t=>{console.error("[SSE CLIENT] error | readyState:",e.readyState,t),h(!1)},()=>{console.log("[SSE CLIENT] closing"),e.close()}},[]);let v=(0,a.useCallback)((s,r)=>{let a=new URLSearchParams(t.toString());a.get("sortBy")===r?a.set("sortOrder","asc"===a.get("sortOrder")?"desc":"asc"):(a.set("sortBy",r),a.set("sortOrder","asc")),e.replace(`?${a.toString()}`,{scroll:!1})},[t,e]),N=(0,a.useMemo)(()=>{if(!d)return null;switch(b){case"model":{let e=d.pending?.byModel||{};return{columns:F,groupedData:P(_(d.byModel,e,s,o),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})}}case"account":{let e={};return d?.pending?.byAccount&&Object.entries(d.byAccount||{}).forEach(([t,s])=>{let r=d.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:A,groupedData:P(_(d.byAccount,e,s,o),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})}}case"apiKey":return{columns:D,groupedData:P(_(d.byApiKey,{},s,o),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})};default:return{columns:W,groupedData:P(_(d.byEndpoint,{},s,o),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})}}},[d,b,s,o]);return m?(0,r.jsx)(n.CardSkeleton,{}):d?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(x,{stats:d}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-2 items-stretch",children:[(0,r.jsx)(C,{providers:j,activeRequests:d.activeRequests||[],lastProvider:d.recentRequests?.[0]?.provider||"",errorProvider:d.errorProvider||""}),(0,r.jsx)(U,{requests:d.recentRequests||[]})]}),(0,r.jsx)(q,{}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-between",children:(0,r.jsx)("select",{value:b,onChange:e=>f(e.target.value),className:"px-3 py-1.5 rounded-lg border border-border bg-bg-subtle text-sm font-medium text-text focus:outline-none focus:ring-2 focus:ring-primary/50",children:K.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})}),N&&(0,r.jsx)(g,{title:"",columns:N.columns,groupedData:N.groupedData,tableType:b,sortBy:s,sortOrder:o,onToggleSort:v,storageKey:N.storageKey,renderSummaryCells:N.renderSummaryCells,renderDetailCells:N.renderDetailCells,emptyMessage:N.emptyMessage})]})]}):(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."})}},7648:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(12115),l=s(92622),n=s(74891);function i({children:e}){let[t,s]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,r.jsx)("div",{className:"hidden lg:flex",children:(0,r.jsx)(l.default,{})}),(0,r.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,r.jsx)(l.default,{onClose:()=>s(!1)})}),(0,r.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300",children:[(0,r.jsx)(n.default,{onMenuClick:()=>s(!0)}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-6 lg:p-10",children:(0,r.jsx)("div",{className:"max-w-7xl mx-auto",children:e})})]})]})}},11059:(e,t,s)=>{s.d(t,{C:()=>a});var r=s(12115);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")=>{navigator.clipboard.writeText(t),s(r),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(null)},e)},[e])}}},11910:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,type:t="text",placeholder:s,value:l,onChange:n,error:i,hint:o,icon:d,disabled:c=!1,required:m=!1,className:x,inputClassName:u,...h}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",x),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:[d&&(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:d})}),(0,r.jsx)("input",{type:t,placeholder:s,value:l,onChange:n,disabled:c,className:(0,a.cn)("w-full py-2 px-3 text-sm text-text-main","bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md","placeholder-text-muted/60","focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none","transition-all shadow-inner disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",d&&"pl-10",i?"border-red-500 focus:border-red-500 focus:ring-red-500/20":"",u),...h})]}),i&&(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"}),i]}),o&&!i&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:o})]})}},23615:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(95155),a=s(12115),l=s(84588);function n(){let[e,t]=(0,a.useState)([]),[s,n]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!0);(0,a.useEffect)(()=>{d()},[]),(0,a.useEffect)(()=>{let e;return i&&(e=setInterval(()=>{d(!1)},3e3)),()=>clearInterval(e)},[i]);let d=async(e=!0)=>{e&&n(!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&&n(!1)}};return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,r.jsx)("span",{children:"Auto Refresh (3s)"}),(0,r.jsx)("div",{onClick:()=>o(!i),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${i?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,r.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${i?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,r.jsx)(l.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,r.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:s&&0===e.length?(0,r.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,r.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,r.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,r.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=e.split(" | ");if(s.length<7)return null;let a=s[6],l=a.includes("PENDING"),n=a.includes("FAILED"),i=a.includes("OK");return(0,r.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${l?"bg-primary/5":""}`,children:[(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:s[0]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:s[1]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,r.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,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:s[3],children:s[3]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:s[4]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:s[5]}),(0,r.jsx)("td",{className:`px-3 py-1.5 font-bold ${i?"text-success":n?"text-error":"text-primary animate-pulse"}`,children:a})]},t)})})]})})}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are saved to log.txt in the application data directory."})]})}},25086:(e,t,s)=>{s.d(t,{CardSkeleton:()=>o,PageLoading:()=>n,Skeleton:()=>i,Spinner:()=>l,default:()=>d});var r=s(95155),a=s(31474);function l({size:e="md",className:t}){return(0,r.jsx)("span",{className:(0,a.cn)("material-symbols-outlined animate-spin text-primary",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function n({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)(l,{size:"xl"}),(0,r.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function i({className:e,...t}){return(0,r.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-lg bg-border",e),...t})}function o(){return(0,r.jsxs)("div",{className:"p-6 rounded-xl border border-border bg-surface",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)(i,{className:"h-4 w-24"}),(0,r.jsx)(i,{className:"size-10 rounded-lg"})]}),(0,r.jsx)(i,{className:"h-8 w-16 mb-2"}),(0,r.jsx)(i,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,r.jsx)(n,{...t});case"skeleton":return(0,r.jsx)(i,{...t});case"card":return(0,r.jsx)(o,{...t});default:return(0,r.jsx)(l,{...t})}}},28067:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({options:e=[],value:t,onChange:s,size:l="md",className:n}){let i={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,r.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-lg","bg-black/5 dark:bg-white/5",n),children:e.map(e=>(0,r.jsxs)("button",{onClick:()=>s(e.value),className:(0,a.cn)("px-4 rounded-md font-medium transition-all",i[l],t===e.value?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(12115),l=s(81127),n=s(92542);function i({isOpen:e,onClose:t,title:s="Manual Configuration",configs:i=[]}){let[o,d]=(0,a.useState)(null),c=async(e,t)=>{try{await navigator.clipboard.writeText(e),d(t),setTimeout(()=>d(null),2e3)}catch(e){console.log("Failed to copy:",e)}};return(0,r.jsx)(l.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:i.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,r.jsxs)(n.default,{variant:"ghost",size:"sm",onClick:()=>c(e.content,t),children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:o===t?"check":"content_copy"}),o===t?"Copied!":"Copy"]})]}),(0,r.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},30815:(e,t,s)=>{s.d(t,{default:()=>o});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497);function o({isOpen:e,onSuccess:t,onClose:s}){let[l,n]=(0,a.useState)(""),[o,d]=(0,a.useState)(""),[c,m]=(0,a.useState)(null),[x,u]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1),[b,f]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(async()=>{p(!0),m(null),f(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(n(t.accessToken),d(t.machineId),f(!0)):m(t.error||"Could not auto-detect tokens")}catch(e){m("Failed to auto-detect tokens")}finally{p(!1)}})()},[e]);let g=async()=>{if(!l.trim())return void m("Please enter an access token");if(!o.trim())return void m("Please enter a machine ID");u(!0),m(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:l.trim(),machineId:o.trim()})}),r=await e.json();if(!e.ok)throw Error(r.error||"Import failed");t?.(),s()}catch(e){m(e.message)}finally{u(!1)}};return(0,r.jsx)(i.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:s,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,r.jsxs)(r.Fragment,{children:[b&&(0,r.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,r.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),!b&&!c&&(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("textarea",{value:l,onChange:e=>n(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(i.pd,{value:o,onChange:e=>d(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),c&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:c})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:g,fullWidth:!0,disabled:x||!l.trim()||!o.trim(),children:x?"Importing...":"Import Token"}),(0,r.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onSuccess:n().func,onClose:n().func.isRequired}},31474:(e,t,s)=>{s.d(t,{cn:()=>r});function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},35497:(e,t,s)=>{s.d(t,{Ex:()=>d.default,$n:()=>r.default,Zp:()=>n.default,Qv:()=>o.CardSkeleton,G9:()=>g.default,pd:()=>a.default,Mh:()=>f.default,uR:()=>h.default,aF:()=>i.default,rq:()=>u.default,LF:()=>x.default,gM:()=>b.default,Iz:()=>j.default,l6:()=>l.default,UW:()=>m.default,lM:()=>c.default,jK:()=>p.default});var r=s(92542),a=s(11910),l=s(98),n=s(84588),i=s(81127),o=s(25086);s(56319);var d=s(56061),c=s(98542),m=s(38587);s(21110),s(92622),s(74891),s(92173);var x=s(90882),u=s(72908),h=s(28815),p=s(4809),b=s(23615);s(61500);var f=s(62899);s(94230);var g=s(30815),j=s(28067);s(7648),s(91450)},38587:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(95155),a=s(1620),l=s(31474);function n({className:e,variant:t="default"}){let{theme:s,toggleTheme:n,isDark:i}=(0,a.D)(),o={default:(0,l.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted","hover:bg-black/5","hover:text-text-main","transition-colors"),card:(0,l.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-md","text-text-muted-light hover:text-primary","hover:text-primary","transition-all group")};return(0,r.jsx)("button",{onClick:n,className:(0,l.cn)(o[t],e),"aria-label":`Switch to ${i?"light":"dark"} mode`,title:`Switch to ${i?"light":"dark"} mode`,children:(0,r.jsx)("span",{className:(0,l.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:i?"light_mode":"dark_mode"})})}},56061:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={default:"bg-black/5 dark:bg-white/10 text-text-muted",primary:"bg-primary/10 text-primary",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:i=!1,icon:o,className:d}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",l[t],n[s],d),children:[i&&(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-primary","default"===t&&"bg-gray-500")}),o&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:o}),e]})}},56319:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({src:e,alt:t="Avatar",name:s,size:l="md",className:n}){let i={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"};return e?(0,r.jsx)("div",{className:(0,a.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",i[l],n),style:{backgroundImage:`url(${e})`},role:"img","aria-label":t}):(0,r.jsx)("div",{className:(0,a.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",i[l],(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),n),role:"img","aria-label":t,children:(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)})}},61500:(e,t,s)=>{s.d(t,{default:()=>o});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497);function o({isOpen:e,onMethodSelect:t,onClose:s}){let[l,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(""),[c,m]=(0,a.useState)("us-east-1"),[x,u]=(0,a.useState)(""),[h,p]=(0,a.useState)(null),[b,f]=(0,a.useState)(!1),[g,j]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"import"===l&&e&&(async()=>{j(!0),p(null),v(!1);try{let e=await fetch("/api/oauth/kiro/auto-import"),t=await e.json();t.found?(u(t.refreshToken),v(!0)):p(t.error||"Could not auto-detect token")}catch(e){p("Failed to auto-detect token")}finally{j(!1)}})()},[l,e]);let N=e=>{n(e),p(null)},w=()=>{n(null),p(null)},k=async()=>{if(!x.trim())return void p("Please enter a refresh token");f(!0),p(null);try{let e=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:x.trim()})}),t=await e.json();if(!e.ok)throw Error(t.error||"Import failed");s()}catch(e){p(e.message)}finally{f(!1)}},C=e=>{t("social",{provider:e})};return(0,r.jsx)(i.aF,{isOpen:e,title:"Connect Kiro",onClose:s,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[!l&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,r.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,r.jsx)("button",{onClick:()=>N("idc"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,r.jsx)("button",{onClick:()=>N("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>N("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>N("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})})]}),"idc"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(i.pd,{value:o,onChange:e=>d(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,r.jsx)(i.pd,{value:c,onChange:e=>m(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),h&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:h}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>{o.trim()?t("idc",{startUrl:o.trim(),region:c}):p("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,r.jsx)(i.$n,{onClick:w,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>C("google"),fullWidth:!0,children:"Continue with Google"}),(0,r.jsx)(i.$n,{onClick:w,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>C("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,r.jsx)(i.$n,{onClick:w,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[g&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!g&&(0,r.jsxs)(r.Fragment,{children:[y&&(0,r.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,r.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!y&&!h&&(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(i.pd,{value:x,onChange:e=>u(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),h&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:k,fullWidth:!0,disabled:b||!x.trim(),children:b?"Importing...":"Import Token"}),(0,r.jsx)(i.$n,{onClick:w,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onMethodSelect:n().func.isRequired,onClose:n().func.isRequired}},62899:(e,t,s)=>{s.d(t,{default:()=>c});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(90882),o=s(61500),d=s(94230);function c({isOpen:e,providerInfo:t,onSuccess:s,onClose:l}){let[n,c]=(0,a.useState)(null),[m,x]=(0,a.useState)(null),[u,h]=(0,a.useState)(null),p=(0,a.useCallback)((e,t)=>{"builder-id"===e?c("builder-id"):"idc"===e?(c("idc"),h(t)):"social"===e?(c("social"),x(t.provider)):"import"===e&&s?.()},[s]),b=()=>{c(null),x(null),h(null)};return n?"builder-id"===n||"idc"===n?(0,r.jsx)(i.default,{isOpen:e,provider:"kiro",providerInfo:t,onSuccess:()=>{c(null),h(null),s?.()},onClose:b,idcConfig:u}):"social"===n&&m?(0,r.jsx)(d.default,{isOpen:e,provider:m,onSuccess:()=>{c(null),x(null),s?.()},onClose:b}):null:(0,r.jsx)(o.default,{isOpen:e,onMethodSelect:p,onClose:l})}c.propTypes={isOpen:n().bool.isRequired,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired}},72908:(e,t,s)=>{s.d(t,{default:()=>m});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(81127),o=s(28777),d=s(52679);let c=[...Object.keys(d.zN),...Object.keys(d.fg)];function m({isOpen:e,onClose:t,onSelect:s,selectedModel:l,activeProviders:n=[],title:m="Select Model",modelAliases:x={}}){let[u,h]=(0,a.useState)(""),[p,b]=(0,a.useState)([]),[f,g]=(0,a.useState)([]),j=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();b(t.combos||[])}catch(e){console.error("Error fetching combos:",e),b([])}};(0,a.useEffect)(()=>{e&&j()},[e]);let y=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();g(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),g([])}};(0,a.useEffect)(()=>{e&&y()},[e]);let v=(0,a.useMemo)(()=>({...d.zN,...d.fg}),[]),N=(0,a.useMemo)(()=>{let e={};return[...new Set([...n.map(e=>e.provider)])].sort((e,t)=>{let s=c.indexOf(e),r=c.indexOf(t);return(-1===s?999:s)-(-1===r?999:r)}).forEach(t=>{let s=o.Xg[t]||t,r=v[t]||{name:t,color:"#666"},a=(0,d.mq)(t)||(0,d.gb)(t);if(r.passthroughModels){let a=Object.entries(x).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t}));if(a.length>0){let l=f.find(e=>e.id===t),n=l?.name||r.name;e[t]={name:n,alias:s,color:r.color,models:a}}}else if(a){let s=f.find(e=>e.id===t),a=s?.name||r.name,l=Object.entries(x).filter(([,e])=>e.startsWith(`${t}/`)).map(([e,s])=>({id:s.replace(`${t}/`,""),name:e,value:s}));l.length>0&&(e[t]={name:a,alias:s?.prefix||t,color:r.color,models:l,isCustom:!0,hasModels:!0})}else{let a=(0,o.KC)(t);a.length>0&&(e[t]={name:r.name,alias:s,color:r.color,models:a.map(e=>({id:e.id,name:e.name,value:`${s}/${e.id}`}))})}}),e},[n,x,v,f]),w=(0,a.useMemo)(()=>{if(!u.trim())return p;let e=u.toLowerCase();return p.filter(t=>t.name.toLowerCase().includes(e))},[p,u]),k=(0,a.useMemo)(()=>{if(!u.trim())return N;let e=u.toLowerCase(),t={};return Object.entries(N).forEach(([s,r])=>{let a=r.models.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)),l=r.name.toLowerCase().includes(e);(a.length>0||l)&&(t[s]={...r,models:a})}),t},[N,u]),C=e=>{s(e),t(),h("")};return(0,r.jsxs)(i.default,{isOpen:e,onClose:()=>{t(),h("")},title:m,size:"md",className:"p-4!",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,r.jsx)("input",{type:"text",placeholder:"Search...",value:u,onChange:e=>h(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,r.jsxs)("div",{className:"max-h-[300px] overflow-y-auto space-y-3",children:[w.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",w.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.map(e=>{let t=l===e.name;return(0,r.jsx)("button",{onClick:()=>C({id:e.name,name:e.name,value:e.name}),className:`
2
+ px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
3
+ ${t?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
+ `,children:e.name},e.id)})})]}),Object.entries(k).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t.color}}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=l===e.value;return(0,r.jsx)("button",{onClick:()=>C(e),className:`
5
+ px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
6
+ ${t?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
+ `,children:e.name},e.id)})})]},e)),0===Object.keys(k).length&&0===w.length&&(0,r.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,r.jsx)("p",{className:"text-xs",children:"No models found"})]})]})]})}m.propTypes={isOpen:n().bool.isRequired,onClose:n().func.isRequired,onSelect:n().func.isRequired,selectedModel:n().string,activeProviders:n().arrayOf(n().shape({provider:n().string.isRequired})),title:n().string,modelAliases:n().object}},74891:(e,t,s)=>{s.d(t,{default:()=>x});var r=s(95155),a=s(73321),l=s(98500),n=s.n(l),i=s(5772),o=s(14051),d=s.n(o),c=s(35497),m=s(90620);function x({onMenuClick:e,showMenuButton:t=!0}){let s=(0,a.usePathname)(),l=(0,a.useRouter)(),{title:o,description:d,breadcrumbs:x}=(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/providers\/([^/]+)$/);if(t){let e=t[1],s=m.zN[e]||m.fg[e];if(s)return{title:s.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:s.name,image:`/providers/${s.id}.png`}]}}return e.includes("/providers")?{title:"Providers",description:"Manage your AI provider connections",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(s),u=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(l.push("/login"),l.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,r.jsxs)("header",{className:"flex items-center justify-between px-8 py-5 border-b border-black/5 dark:border-white/5 bg-bg/80 backdrop-blur-xl z-10 sticky top-0",children:[(0,r.jsx)("div",{className:"flex items-center gap-3 lg:hidden",children:t&&(0,r.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,r.jsx)("div",{className:"hidden lg:flex flex-col",children:x.length>0?(0,r.jsx)("div",{className:"flex items-center gap-2",children:x.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,r.jsx)(n(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,r.jsx)(i.default,{src:e.image,alt:e.label,width:28,height:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",sizes:"28px",onError:e=>{e.currentTarget.style.display="none"}}),(0,r.jsx)("h1",{className:"text-2xl font-semibold text-text-main tracking-tight",children:e.label})]})]},`${e.label}-${e.href||"current"}`))}):o?(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold text-text-main tracking-tight",children:o}),d&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:d})]}):null}),(0,r.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,r.jsx)(c.UW,{}),(0,r.jsx)("button",{onClick:u,className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-all",title:"Logout",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"logout"})})]})]})}x.propTypes={onMenuClick:d().func,showMenuButton:d().bool}},81127:(e,t,s)=>{s.d(t,{ConfirmModal:()=>o,default:()=>i});var r=s(95155),a=s(12115),l=s(31474),n=s(92542);function i({isOpen:e,onClose:t,title:s,children:n,footer:i,size:o="md",closeOnOverlay:d=!0,showCloseButton:c=!0,className:m}){return((0,a.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,a.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),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/30 backdrop-blur-sm",onClick:d?t:void 0}),(0,r.jsxs)("div",{className:(0,l.cn)("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",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[o],m),children:[(s||c)&&(0,r.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-black/5 dark:border-white/5",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mr-4",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),s&&(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})]}),c&&(0,r.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 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(80vh-140px)] overflow-y-auto",children:n}),i&&(0,r.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-black/5 dark:border-white/5",children:i})]})]}):null}function o({isOpen:e,onClose:t,onConfirm:s,title:a="Confirm",message:l,confirmText:o="Confirm",cancelText:d="Cancel",variant:c="danger",loading:m=!1}){return(0,r.jsx)(i,{isOpen:e,onClose:t,title:a,size:"sm",footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{variant:"ghost",onClick:t,disabled:m,children:d}),(0,r.jsx)(n.default,{variant:c,onClick:s,loading:m,children:o})]}),children:(0,r.jsx)("p",{className:"text-text-muted",children:l})})}},84588:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({children:e,title:t,subtitle:s,icon:l,action:n,padding:i="md",hover:o=!1,className:d,...c}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",o&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[i],d),...c,children:[(t||n)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[l&&(0,r.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:l})}),(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})]})]}),n]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...s,children:e})},l.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-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...s,children:e})},l.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-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","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})]})}},90882:(e,t,s)=>{s.d(t,{default:()=>m});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497),o=s(11059);let d="oauth_pending_auth";function c(){try{localStorage.removeItem(d)}catch{}}function m({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:n}){let[m,x]=(0,a.useState)("waiting"),[u,h]=(0,a.useState)(null),[p,b]=(0,a.useState)(""),[f,g]=(0,a.useState)(null),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null),[w,k]=(0,a.useState)(!1),C=(0,a.useRef)(null),{copied:S,copy:T}=(0,o.C)(),[R,M]=(0,a.useState)(!1),[$,I]=(0,a.useState)("/callback?code=..."),E=(0,a.useRef)(!1);(0,a.useEffect)(()=>{M("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),I(`${window.location.origin}/callback?code=...`)},[]);let L=(0,a.useCallback)(async(e,s)=>{if(u)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:u.redirectUri,codeVerifier:u.codeVerifier,state:s})}),a=await r.json();if(!r.ok)throw Error(a.error);c(),x("success"),l?.()}catch(e){c(),g(e.message),x("error")}},[u,t,l]),O=(0,a.useCallback)(async(e,s,r,a)=>{k(!0);for(let n=0;n<60;n++){await new Promise(e=>setTimeout(e,1e3*r));try{let n=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),i=await n.json();if(i.success){x("success"),k(!1),l?.();return}if("expired_token"===i.error||"access_denied"===i.error)throw Error(i.errorDescription||i.error);"slow_down"===i.error&&(r=Math.min(r+5,30))}catch(e){g(e.message),x("error"),k(!1);return}}g("Authorization timeout"),x("error"),k(!1)},[t,l]),z=(0,a.useCallback)(async()=>{if(t)try{let s;if(g(null),["github","qwen","kiro","kimi-coding","kilocode"].includes(t)){y(!0),x("waiting");let e=await fetch(`/api/oauth/${t}/device-code`),s=await e.json();if(!e.ok)throw Error(s.error);N(s);let r=s.verification_uri_complete||s.verification_uri;r&&window.open(r,"_blank");let a="kiro"===t?{_clientId:s._clientId,_clientSecret:s._clientSecret}:null;O(s.device_code,s.codeVerifier,s.interval||5,a);return}if("codex"===t)s="http://localhost:1455/auth/callback";else{let e=window.location.port||("https:"===window.location.protocol?"443":"80");s=`http://localhost:${e}/callback`}let r=await fetch(`/api/oauth/${t}/authorize?redirect_uri=${encodeURIComponent(s)}`),a=await r.json();if(!r.ok)throw Error(a.error);h({...a,redirectUri:s});var e={codeVerifier:a.codeVerifier,redirectUri:s,state:a.state};try{localStorage.setItem(d,JSON.stringify({provider:t,...e,timestamp:Date.now()}))}catch{}"codex"!==t&&R?(x("waiting"),C.current=window.open(a.authUrl,"oauth_popup","width=600,height=700"),C.current||x("input")):(x("input"),window.open(a.authUrl,"_blank"))}catch(e){g(e.message),x("error")}},[t,R,O]);(0,a.useEffect)(()=>{if(e&&t){let e=function(e){try{let t=localStorage.getItem(d);if(!t)return null;let s=JSON.parse(t);if(s.provider!==e||Date.now()-s.timestamp>3e5)return localStorage.removeItem(d),null;return s}catch{return null}}(t);if(e){h({codeVerifier:e.codeVerifier,redirectUri:e.redirectUri,state:e.state}),x("waiting"),b(""),g(null),y(!1),N(null),k(!1);return}h(null),b(""),g(null),y(!1),N(null),k(!1),z()}},[e,t,z]),(0,a.useEffect)(()=>{let e;if(!u)return;E.current=!1;let t=async e=>{if(E.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){E.current=!0,g(a||r),x("error");return}if(t){if(!localStorage.getItem(d)){E.current=!0,x("success"),l?.();return}E.current=!0,await L(t,s)}},s=e=>{let s=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),r=e.origin===window.location.origin;(s||r)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let s=JSON.parse(e.newValue);t(s),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let s=JSON.parse(e);s.timestamp&&Date.now()-s.timestamp<3e4&&(t(s),localStorage.removeItem("oauth_callback"))}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[u,L]);let q=async()=>{try{g(null);let e=new URL(p),t=e.searchParams.get("code"),s=e.searchParams.get("state"),r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!t)throw Error("No authorization code found in URL");await L(t,s)}catch(e){g(e.message),x("error")}},U=(0,a.useCallback)(()=>{c(),n()},[n]);return t&&s?(0,r.jsx)(i.aF,{isOpen:e,title:`Connect ${s.name}`,onClose:U,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["waiting"===m&&!j&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Waiting for Authorization"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Complete the authorization in the popup window."}),(0,r.jsx)(i.$n,{variant:"ghost",onClick:()=>x("input"),children:"Popup blocked? Enter URL manually"})]}),"waiting"===m&&j&&v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-center py-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the URL below and enter the code:"}),(0,r.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Verification URL"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("code",{className:"flex-1 text-sm break-all",children:v.verification_uri}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"verify_url"===S?"check":"content_copy",onClick:()=>T(v.verification_uri,"verify_url")})]})]}),(0,r.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:v.user_code}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"user_code"===S?"check":"content_copy",onClick:()=>T(v.user_code,"user_code")})]})]})]}),w&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"input"===m&&!j&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.pd,{value:u?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(i.$n,{variant:"secondary",icon:"auth_url"===S?"check":"content_copy",onClick:()=>T(u?.authUrl,"auth_url"),children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser."}),(0,r.jsx)(i.pd,{value:p,onChange:e=>b(e.target.value),placeholder:$,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:q,fullWidth:!0,disabled:!p,children:"Connect"}),(0,r.jsx)(i.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===m&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",s.name," account has been connected."]}),(0,r.jsx)(i.$n,{onClick:U,fullWidth:!0,children:"Done"})]}),"error"===m&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:f}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:z,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(i.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}m.propTypes={isOpen:n().bool.isRequired,provider:n().string,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired}},91450:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(14051),l=s.n(a),n=s(38587);function i({children:e}){return(0,r.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,r.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,r.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,r.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,r.jsx)(n.default,{variant:"card"})}),(0,r.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})]})}i.propTypes={children:l().node.isRequired}},92173:(e,t,s)=>{s.d(t,{default:()=>c});var r=s(95155),a=s(98500),l=s.n(a),n=s(90620);let i=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],o=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],d=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function c(){return(0,r.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,r.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,r.jsx)("div",{className:"size-6 text-primary",children:(0,r.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,r.jsx)("path",{clipRule:"evenodd",d:"M12.0799 24L4 19.2479L9.95537 8.75216L18.04 13.4961L18.0446 4H29.9554L29.96 13.4961L38.0446 8.75216L44 19.2479L35.92 24L44 28.7521L38.0446 39.2479L29.96 34.5039L29.9554 44H18.0446L18.04 34.5039L9.95537 39.2479L4 28.7521L12.0799 24Z",fillRule:"evenodd"})})}),(0,r.jsx)("span",{className:"text-xl font-bold text-text-main",children:n.vQ.name})]}),(0,r.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,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.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,r.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.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,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,r.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:i.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(l(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,r.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:o.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(l(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,r.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:d.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(l(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]})]}),(0,r.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",n.vQ.name," Inc. All rights reserved."]}),(0,r.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,r.jsx)(l(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,r.jsx)(l(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},92542:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={primary:"bg-gradient-to-b from-primary to-primary-hover text-white shadow-sm",secondary:"bg-white dark:bg-white/10 border border-black/10 dark:border-white/10 text-text-main hover:bg-black/5 dark:hover:bg-white/5",outline:"border border-black/15 dark:border-white/15 text-text-main hover:bg-black/5",ghost:"text-text-muted hover:bg-black/5 dark:hover:bg-white/5 hover:text-text-main",danger:"bg-red-500 text-white hover:bg-red-600 shadow-sm"},n={sm:"h-7 px-3 text-xs rounded-md",md:"h-9 px-4 text-sm rounded-lg",lg:"h-11 px-6 text-sm rounded-lg"};function i({children:e,variant:t="primary",size:s="md",icon:i,iconRight:o,disabled:d=!1,loading:c=!1,fullWidth:m=!1,className:x,...u}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-medium transition-all duration-200 cursor-pointer","active:scale-[0.99] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",l[t],n[s],m&&"w-full",x),disabled:d||c,...u,children:[c?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):i?(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:i}):null,e,o&&!c&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o})]})}},92622:(e,t,s)=>{s.d(t,{default:()=>f});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(98500),o=s.n(i),d=s(73321),c=s(31474),m=s(90620),x=s(92542),u=s(81127);let h=[{href:"/dashboard/endpoint",label:"Endpoint",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/cli-tools",label:"CLI Tools",icon:"terminal"}],p=[{href:"/dashboard/translator",label:"Translator",icon:"translate"}],b=[{href:"/dashboard/profile",label:"Settings",icon:"settings"}];function f({onClose:e}){let t=(0,d.usePathname)(),[s,l]=(0,a.useState)(!1),[n,i]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1);(0,a.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>y(e?.enableRequestLogs===!0)).catch(()=>{})},[]);let v=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),N=async()=>{i(!0);try{await fetch("/api/shutdown",{method:"POST"})}catch(e){}i(!1),l(!1),g(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("aside",{className:"flex w-72 flex-col border-r border-black/5 dark:border-white/5 bg-vibrancy backdrop-blur-xl transition-colors duration-300",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-6 pt-5 pb-2",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),(0,r.jsx)("div",{className:"px-6 py-4",children:(0,r.jsxs)(o(),{href:"/dashboard",className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-9 rounded bg-linear-to-br from-[#f97815] to-[#c2590a]",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("h1",{className:"text-lg font-semibold tracking-tight text-text-main",children:m.vQ.name}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["v",m.vQ.version]})]})]})}),(0,r.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-1 overflow-y-auto custom-scrollbar",children:[h.map(t=>(0,r.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-2 rounded-lg transition-all group",v(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",v(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,r.jsx)("span",{className:"text-sm font-medium",children:t.label})]},t.href)),j&&(0,r.jsxs)("div",{className:"pt-4 mt-2",children:[(0,r.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"Debug"}),p.map(t=>(0,r.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-2 rounded-lg transition-all group",v(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",v(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,r.jsx)("span",{className:"text-sm font-medium",children:t.label})]},t.href))]}),(0,r.jsxs)("div",{className:"pt-4 mt-2",children:[(0,r.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),b.map(t=>(0,r.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-2 rounded-lg transition-all group",v(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",v(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,r.jsx)("span",{className:"text-sm font-medium",children:t.label})]},t.href))]})]}),(0,r.jsxs)("div",{className:"p-3 border-t border-black/5 dark:border-white/5",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-surface/50 mb-2",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-6 rounded-md bg-blue-500/10 text-blue-500 shrink-0 mt-0.5",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"})}),(0,r.jsx)("div",{className:"flex flex-col",children:(0,r.jsx)("span",{className:"text-xs font-medium text-text-main leading-relaxed",children:"Service is running in terminal. You can close this web page. Shutdown will stop the service."})})]}),(0,r.jsx)(x.default,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>l(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"})]})]}),(0,r.jsx)(u.ConfirmModal,{isOpen:s,onClose:()=>l(!1),onConfirm:N,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:n}),f&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"text-center p-8",children:[(0,r.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,r.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,r.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,r.jsx)(x.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}f.propTypes={onClose:n().func}},94230:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497),o=s(11059);function d({isOpen:e,provider:t,onSuccess:s,onClose:l}){let[n,d]=(0,a.useState)("loading"),[c,m]=(0,a.useState)(""),[x,u]=(0,a.useState)(null),[h,p]=(0,a.useState)(""),[b,f]=(0,a.useState)(null),{copied:g,copy:j}=(0,o.C)();(0,a.useEffect)(()=>{e&&t&&(async()=>{try{f(null),d("loading");let e=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),s=await e.json();if(!e.ok)throw Error(s.error);u(s),m(s.authUrl),d("input"),window.open(s.authUrl,"_blank")}catch(e){f(e.message),d("error")}})()},[e,t]);let y=async()=>{try{let e;f(null);try{e=new URL(h)}catch(e){throw Error("Invalid callback URL format")}let r=e.searchParams.get("code");e.searchParams.get("state");let a=e.searchParams.get("error");if(a)throw Error(e.searchParams.get("error_description")||a);if(!r)throw Error("No authorization code found in URL");let l=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:r,codeVerifier:x.codeVerifier,provider:t})}),n=await l.json();if(!l.ok)throw Error(n.error);d("success"),s?.()}catch(e){f(e.message),d("error")}},v="google"===t?"Google":"GitHub";return(0,r.jsx)(i.aF,{isOpen:e,title:`Connect Kiro via ${v}`,onClose:l,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===n&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",v," authentication"]})]}),"input"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.pd,{value:c,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(i.$n,{variant:"secondary",icon:"auth_url"===g?"check":"content_copy",onClick:()=>j(c,"auth_url"),children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,r.jsx)(i.pd,{value:h,onChange:e=>p(e.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:y,fullWidth:!0,disabled:!h,children:"Connect"}),(0,r.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===n&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",v," has been connected."]}),(0,r.jsx)(i.$n,{onClick:l,fullWidth:!0,children:"Done"})]}),"error"===n&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:b}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>d("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:n().bool.isRequired,provider:n().oneOf(["google","github"]).isRequired,onSuccess:n().func,onClose:n().func.isRequired}},98542:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({checked:e=!1,onChange:t,label:s,description:l,disabled:n=!1,size:i="md",className:o}){let d={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"}};return(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-3",n&&"opacity-50 cursor-not-allowed",o),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:n,onClick:()=>{!n&&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-1 focus:ring-primary/30",e?"bg-primary":"bg-black/10 dark:bg-white/20",d[i].track,n&&"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?d[i].translate:"translate-x-0.5",d[i].thumb,"mt-0.5")})}),(s||l)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),l&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:l})]})]})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8729],{13097:(e,i,a)=>{a.d(i,{KC:()=>m,Xg:()=>o,vq:()=>n});let n={cc:[{id:"claude-opus-4-6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-5-20251101",name:"Claude 4.5 Opus"},{id:"claude-sonnet-4-5-20250929",name:"Claude 4.5 Sonnet"},{id:"claude-haiku-4-5-20251001",name:"Claude 4.5 Haiku"}],cx:[{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"},{id:"gpt-5.3-codex-xhigh",name:"GPT 5.3 Codex (xHigh)"},{id:"gpt-5.3-codex-high",name:"GPT 5.3 Codex (High)"},{id:"gpt-5.3-codex-low",name:"GPT 5.3 Codex (Low)"},{id:"gpt-5.3-codex-none",name:"GPT 5.3 Codex (None)"},{id:"gpt-5.3-codex-spark",name:"GPT 5.3 Codex Spark"},{id:"gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini"},{id:"gpt-5.1-codex-mini-high",name:"GPT 5.1 Codex Mini (High)"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.1-codex-max",name:"GPT 5.1 Codex Max"},{id:"gpt-5.1-codex",name:"GPT 5.1 Codex"},{id:"gpt-5.1",name:"GPT 5.1"},{id:"gpt-5-codex",name:"GPT 5 Codex"},{id:"gpt-5-codex-mini",name:"GPT 5 Codex Mini"}],gc:[{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"}],qw:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash"},{id:"vision-model",name:"Qwen3 Vision Model"},{id:"coder-model",name:"Qwen3.5 Coder Model"}],if:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"kimi-k2",name:"Kimi K2"},{id:"kimi-k2-thinking",name:"Kimi K2 Thinking"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"deepseek-v3.2-chat",name:"DeepSeek V3.2 Chat"},{id:"minimax-m2.1",name:"MiniMax M2.1"},{id:"minimax-m2.5",name:"MiniMax M2.5"},{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6",name:"GLM 4.6"},{id:"glm-5",name:"GLM 5"}],ag:[{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"gemini-3-1-pro-high",name:"Gemini 3.1 Pro High"},{id:"gemini-3-1-pro-low",name:"Gemini 3.1 Pro Low"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High"},{id:"gemini-3-pro-low",name:"Gemini 3 Pro Low"},{id:"gemini-3-flash",name:"Gemini 3 Flash"}],gh:[{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o mini"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-5",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-codex",name:"GPT-5 Codex"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5.1-codex",name:"GPT-5.1 Codex"},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini"},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.1",name:"Claude Opus 4.1"},{id:"claude-opus-4.5",name:"Claude Opus 4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4.6",name:"Claude Opus 4.6"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"oswe-vscode-prime",name:"Raptor Mini"}],kr:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"}],cu:[{id:"default",name:"Auto (Server Picks)"},{id:"claude-4.5-opus-high-thinking",name:"Claude 4.5 Opus High Thinking"},{id:"claude-4.5-opus-high",name:"Claude 4.5 Opus High"},{id:"claude-4.5-sonnet-thinking",name:"Claude 4.5 Sonnet Thinking"},{id:"claude-4.5-sonnet",name:"Claude 4.5 Sonnet"},{id:"claude-4.5-haiku",name:"Claude 4.5 Haiku"},{id:"claude-4.5-opus",name:"Claude 4.5 Opus"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"}],kmc:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],kc:[{id:"anthropic/claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"anthropic/claude-opus-4-20250514",name:"Claude Opus 4"},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"openai/gpt-4.1",name:"GPT-4.1"},{id:"openai/o3",name:"o3"},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat"},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner"}],cl:[{id:"anthropic/claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"anthropic/claude-opus-4-20250514",name:"Claude Opus 4"},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"openai/gpt-4.1",name:"GPT-4.1"},{id:"openai/o3",name:"o3"},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat"}],openai:[{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o Mini"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"o1",name:"O1"},{id:"o1-mini",name:"O1 Mini"}],anthropic:[{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"claude-opus-4-20250514",name:"Claude Opus 4"},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet"}],gemini:[{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"},{id:"gemini-embedding-001",name:"Gemini Embedding 001",type:"embedding"},{id:"text-embedding-005",name:"Text Embedding 005",type:"embedding"},{id:"text-embedding-004",name:"Text Embedding 004 (Legacy)",type:"embedding"}],openrouter:[{id:"auto",name:"Auto (Best Available)"}],glm:[{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6v",name:"GLM 4.6V (Vision)"}],"glm-cn":[{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM-4.7"},{id:"glm-4.6",name:"GLM-4.6"},{id:"glm-4.5-air",name:"GLM-4.5-Air"}],kimi:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],minimax:[{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],"minimax-cn":[{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],deepseek:[{id:"deepseek-chat",name:"DeepSeek V3.2 Chat"},{id:"deepseek-reasoner",name:"DeepSeek V3.2 Reasoner"}],groq:[{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B"},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"qwen/qwen3-32b",name:"Qwen3 32B"},{id:"openai/gpt-oss-120b",name:"GPT-OSS 120B"}],xai:[{id:"grok-4",name:"Grok 4"},{id:"grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning"},{id:"grok-code-fast-1",name:"Grok Code Fast"},{id:"grok-3",name:"Grok 3"}],mistral:[{id:"mistral-large-latest",name:"Mistral Large 3"},{id:"codestral-latest",name:"Codestral"},{id:"mistral-medium-latest",name:"Mistral Medium 3"}],perplexity:[{id:"sonar-pro",name:"Sonar Pro"},{id:"sonar",name:"Sonar"}],together:[{id:"meta-llama/Llama-3.3-70B-Instruct-Turbo",name:"Llama 3.3 70B Turbo"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B",name:"Qwen3 235B"},{id:"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",name:"Llama 4 Maverick"}],fireworks:[{id:"accounts/fireworks/models/deepseek-v3p1",name:"DeepSeek V3.1"},{id:"accounts/fireworks/models/llama-v3p3-70b-instruct",name:"Llama 3.3 70B"},{id:"accounts/fireworks/models/qwen3-235b-a22b",name:"Qwen3 235B"}],cerebras:[{id:"gpt-oss-120b",name:"GPT OSS 120B"},{id:"zai-glm-4.7",name:"ZAI GLM 4.7"},{id:"llama-3.3-70b",name:"Llama 3.3 70B"},{id:"llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout"},{id:"qwen-3-235b-a22b-instruct-2507",name:"Qwen3 235B A22B"},{id:"qwen-3-32b",name:"Qwen3 32B"}],cohere:[{id:"command-r-plus-08-2024",name:"Command R+ (Aug 2024)"},{id:"command-r-08-2024",name:"Command R (Aug 2024)"},{id:"command-a-03-2025",name:"Command A (Mar 2025)"}],nvidia:[{id:"moonshotai/kimi-k2.5",name:"Kimi K2.5"},{id:"z-ai/glm4.7",name:"GLM 4.7"},{id:"deepseek-ai/deepseek-v3.2",name:"DeepSeek V3.2"},{id:"nvidia/llama-3.3-70b-instruct",name:"Llama 3.3 70B"},{id:"meta/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"deepseek/deepseek-r1",name:"DeepSeek R1"}],nebius:[{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B Instruct"}],siliconflow:[{id:"deepseek-ai/DeepSeek-V3.2",name:"DeepSeek V3.2"},{id:"deepseek-ai/DeepSeek-V3.1",name:"DeepSeek V3.1"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B-Instruct-2507",name:"Qwen3 235B"},{id:"Qwen/Qwen3-Coder-480B-A35B-Instruct",name:"Qwen3 Coder 480B"},{id:"Qwen/Qwen3-32B",name:"Qwen3 32B"},{id:"moonshotai/Kimi-K2.5",name:"Kimi K2.5"},{id:"zai-org/GLM-4.7",name:"GLM 4.7"},{id:"openai/gpt-oss-120b",name:"GPT OSS 120B"},{id:"baidu/ERNIE-4.5-300B-A47B",name:"ERNIE 4.5 300B"}],hyperbolic:[{id:"Qwen/QwQ-32B",name:"QwQ 32B"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek V3"},{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B"},{id:"meta-llama/Llama-3.2-3B-Instruct",name:"Llama 3.2 3B"},{id:"Qwen/Qwen2.5-72B-Instruct",name:"Qwen 2.5 72B"},{id:"Qwen/Qwen2.5-Coder-32B-Instruct",name:"Qwen 2.5 Coder 32B"},{id:"NousResearch/Hermes-3-Llama-3.1-70B",name:"Hermes 3 70B"}]},o={claude:"cc",codex:"cx","gemini-cli":"gc",qwen:"qw",iflow:"if",antigravity:"ag",github:"gh",kiro:"kr",cursor:"cu","kimi-coding":"kmc",kilocode:"kc",cline:"cl",openai:"openai",anthropic:"anthropic",gemini:"gemini",openrouter:"openrouter",glm:"glm","glm-cn":"glm-cn",kimi:"kimi",minimax:"minimax","minimax-cn":"minimax-cn",deepseek:"deepseek",groq:"groq",xai:"xai",mistral:"mistral",perplexity:"perplexity",together:"together",fireworks:"fireworks",cerebras:"cerebras",cohere:"cohere",nvidia:"nvidia",nebius:"nebius",siliconflow:"siliconflow",hyperbolic:"hyperbolic"};function m(e){return n[o[e]||e]||[]}},21110:(e,i,a)=>{a.d(i,{ThemeProvider:()=>d});var n=a(95155),o=a(12115),m=a(90085);function d({children:e}){let{initTheme:i}=(0,m.A)();return(0,o.useEffect)(()=>{i()},[i]),(0,n.jsx)(n.Fragment,{children:e})}},28777:(e,i,a)=>{a.d(i,{KC:()=>n.KC,Xg:()=>n.Xg});var n=a(13097);Object.entries(a(52679).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(n.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},52679:(e,i,a)=>{a.d(i,{DI:()=>t,IS:()=>n,JH:()=>d,MA:()=>c,Q2:()=>s,fg:()=>m,gb:()=>l,mq:()=>r,wG:()=>g,wb:()=>u,zN:()=>o,zt:()=>p});let n={iflow:{id:"iflow",alias:"if",name:"iFlow AI",icon:"water_drop",color:"#6366F1"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981"},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4"},kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"}},o={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B"},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6"},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"}},m={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",passthroughModels:!0,website:"https://openrouter.ai"},glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com"},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com"},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",website:"https://ai.google.dev"},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com"},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai"},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai"},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai"},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai"},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai"},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com"},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz"},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com"},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com"},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai"}},d="openai-compatible-",t="anthropic-compatible-";function r(e){return"string"==typeof e&&e.startsWith(d)}function l(e){return"string"==typeof e&&e.startsWith(t)}let s={...n,...o,...m},c={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function p(e){for(let i of Object.values(s))if(i.alias===e||i.id===e)return i;return null}function g(e){let i=s[e];return i?.alias||e}Object.values(s).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(s).reduce((e,i)=>(e[i.id]=i.alias,e),{});let u=["antigravity","kiro","github","codex"]},90085:(e,i,a)=>{a.d(i,{A:()=>t});var n=a(1934),o=a(31692),m=a(90620);function d(e){let i=document.documentElement,a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?a:e)?i.classList.add("dark"):i.classList.remove("dark")}let t=(0,n.v)((0,o.Zr)((e,i)=>({theme:m.B2.defaultTheme,setTheme:i=>{e({theme:i}),d(i)},toggleTheme:()=>{let a="dark"===i().theme?"light":"dark";e({theme:a}),d(a)},initTheme:()=>{d(i().theme)}}),{name:m.B2.storageKey}))},90620:(e,i,a)=>{a.d(i,{Q2:()=>n.Q2,fg:()=>n.fg,vQ:()=>o,MA:()=>n.MA,zN:()=>n.zN,B2:()=>m});var n=a(52679);a(28777);let o={name:"Endpoint Proxy",description:"AI Infrastructure Management",version:"0.2.89"},m={storageKey:"theme",defaultTheme:"system"}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8729],{13097:(e,i,a)=>{a.d(i,{KC:()=>m,Xg:()=>o,vq:()=>n});let n={cc:[{id:"claude-opus-4-6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-5-20251101",name:"Claude 4.5 Opus"},{id:"claude-sonnet-4-5-20250929",name:"Claude 4.5 Sonnet"},{id:"claude-haiku-4-5-20251001",name:"Claude 4.5 Haiku"}],cx:[{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"},{id:"gpt-5.3-codex-xhigh",name:"GPT 5.3 Codex (xHigh)"},{id:"gpt-5.3-codex-high",name:"GPT 5.3 Codex (High)"},{id:"gpt-5.3-codex-low",name:"GPT 5.3 Codex (Low)"},{id:"gpt-5.3-codex-none",name:"GPT 5.3 Codex (None)"},{id:"gpt-5.3-codex-spark",name:"GPT 5.3 Codex Spark"},{id:"gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini"},{id:"gpt-5.1-codex-mini-high",name:"GPT 5.1 Codex Mini (High)"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.1-codex-max",name:"GPT 5.1 Codex Max"},{id:"gpt-5.1-codex",name:"GPT 5.1 Codex"},{id:"gpt-5.1",name:"GPT 5.1"},{id:"gpt-5-codex",name:"GPT 5 Codex"},{id:"gpt-5-codex-mini",name:"GPT 5 Codex Mini"}],gc:[{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"}],qw:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash"},{id:"vision-model",name:"Qwen3 Vision Model"},{id:"coder-model",name:"Qwen3.5 Coder Model"}],if:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"kimi-k2",name:"Kimi K2"},{id:"kimi-k2-thinking",name:"Kimi K2 Thinking"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"deepseek-v3.2-chat",name:"DeepSeek V3.2 Chat"},{id:"minimax-m2.1",name:"MiniMax M2.1"},{id:"minimax-m2.5",name:"MiniMax M2.5"},{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6",name:"GLM 4.6"},{id:"glm-5",name:"GLM 5"}],ag:[{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"gemini-3-1-pro-high",name:"Gemini 3.1 Pro High"},{id:"gemini-3-1-pro-low",name:"Gemini 3.1 Pro Low"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High"},{id:"gemini-3-pro-low",name:"Gemini 3 Pro Low"},{id:"gemini-3-flash",name:"Gemini 3 Flash"}],gh:[{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o mini"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-5",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-codex",name:"GPT-5 Codex"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5.1-codex",name:"GPT-5.1 Codex"},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini"},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.1",name:"Claude Opus 4.1"},{id:"claude-opus-4.5",name:"Claude Opus 4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4.6",name:"Claude Opus 4.6"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"oswe-vscode-prime",name:"Raptor Mini"}],kr:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"}],cu:[{id:"default",name:"Auto (Server Picks)"},{id:"claude-4.5-opus-high-thinking",name:"Claude 4.5 Opus High Thinking"},{id:"claude-4.5-opus-high",name:"Claude 4.5 Opus High"},{id:"claude-4.5-sonnet-thinking",name:"Claude 4.5 Sonnet Thinking"},{id:"claude-4.5-sonnet",name:"Claude 4.5 Sonnet"},{id:"claude-4.5-haiku",name:"Claude 4.5 Haiku"},{id:"claude-4.5-opus",name:"Claude 4.5 Opus"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"}],kmc:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],kc:[{id:"anthropic/claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"anthropic/claude-opus-4-20250514",name:"Claude Opus 4"},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"openai/gpt-4.1",name:"GPT-4.1"},{id:"openai/o3",name:"o3"},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat"},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner"}],cl:[{id:"anthropic/claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"anthropic/claude-opus-4-20250514",name:"Claude Opus 4"},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"openai/gpt-4.1",name:"GPT-4.1"},{id:"openai/o3",name:"o3"},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat"}],openai:[{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o Mini"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"o1",name:"O1"},{id:"o1-mini",name:"O1 Mini"}],anthropic:[{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"claude-opus-4-20250514",name:"Claude Opus 4"},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet"}],gemini:[{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"},{id:"gemini-embedding-001",name:"Gemini Embedding 001",type:"embedding"},{id:"text-embedding-005",name:"Text Embedding 005",type:"embedding"},{id:"text-embedding-004",name:"Text Embedding 004 (Legacy)",type:"embedding"}],openrouter:[{id:"auto",name:"Auto (Best Available)"}],glm:[{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6v",name:"GLM 4.6V (Vision)"}],"glm-cn":[{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM-4.7"},{id:"glm-4.6",name:"GLM-4.6"},{id:"glm-4.5-air",name:"GLM-4.5-Air"}],kimi:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],minimax:[{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],"minimax-cn":[{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],deepseek:[{id:"deepseek-chat",name:"DeepSeek V3.2 Chat"},{id:"deepseek-reasoner",name:"DeepSeek V3.2 Reasoner"}],groq:[{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B"},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"qwen/qwen3-32b",name:"Qwen3 32B"},{id:"openai/gpt-oss-120b",name:"GPT-OSS 120B"}],xai:[{id:"grok-4",name:"Grok 4"},{id:"grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning"},{id:"grok-code-fast-1",name:"Grok Code Fast"},{id:"grok-3",name:"Grok 3"}],mistral:[{id:"mistral-large-latest",name:"Mistral Large 3"},{id:"codestral-latest",name:"Codestral"},{id:"mistral-medium-latest",name:"Mistral Medium 3"}],perplexity:[{id:"sonar-pro",name:"Sonar Pro"},{id:"sonar",name:"Sonar"}],together:[{id:"meta-llama/Llama-3.3-70B-Instruct-Turbo",name:"Llama 3.3 70B Turbo"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B",name:"Qwen3 235B"},{id:"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",name:"Llama 4 Maverick"}],fireworks:[{id:"accounts/fireworks/models/deepseek-v3p1",name:"DeepSeek V3.1"},{id:"accounts/fireworks/models/llama-v3p3-70b-instruct",name:"Llama 3.3 70B"},{id:"accounts/fireworks/models/qwen3-235b-a22b",name:"Qwen3 235B"}],cerebras:[{id:"gpt-oss-120b",name:"GPT OSS 120B"},{id:"zai-glm-4.7",name:"ZAI GLM 4.7"},{id:"llama-3.3-70b",name:"Llama 3.3 70B"},{id:"llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout"},{id:"qwen-3-235b-a22b-instruct-2507",name:"Qwen3 235B A22B"},{id:"qwen-3-32b",name:"Qwen3 32B"}],cohere:[{id:"command-r-plus-08-2024",name:"Command R+ (Aug 2024)"},{id:"command-r-08-2024",name:"Command R (Aug 2024)"},{id:"command-a-03-2025",name:"Command A (Mar 2025)"}],nvidia:[{id:"moonshotai/kimi-k2.5",name:"Kimi K2.5"},{id:"z-ai/glm4.7",name:"GLM 4.7"},{id:"deepseek-ai/deepseek-v3.2",name:"DeepSeek V3.2"},{id:"nvidia/llama-3.3-70b-instruct",name:"Llama 3.3 70B"},{id:"meta/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"deepseek/deepseek-r1",name:"DeepSeek R1"}],nebius:[{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B Instruct"}],siliconflow:[{id:"deepseek-ai/DeepSeek-V3.2",name:"DeepSeek V3.2"},{id:"deepseek-ai/DeepSeek-V3.1",name:"DeepSeek V3.1"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B-Instruct-2507",name:"Qwen3 235B"},{id:"Qwen/Qwen3-Coder-480B-A35B-Instruct",name:"Qwen3 Coder 480B"},{id:"Qwen/Qwen3-32B",name:"Qwen3 32B"},{id:"moonshotai/Kimi-K2.5",name:"Kimi K2.5"},{id:"zai-org/GLM-4.7",name:"GLM 4.7"},{id:"openai/gpt-oss-120b",name:"GPT OSS 120B"},{id:"baidu/ERNIE-4.5-300B-A47B",name:"ERNIE 4.5 300B"}],hyperbolic:[{id:"Qwen/QwQ-32B",name:"QwQ 32B"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek V3"},{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B"},{id:"meta-llama/Llama-3.2-3B-Instruct",name:"Llama 3.2 3B"},{id:"Qwen/Qwen2.5-72B-Instruct",name:"Qwen 2.5 72B"},{id:"Qwen/Qwen2.5-Coder-32B-Instruct",name:"Qwen 2.5 Coder 32B"},{id:"NousResearch/Hermes-3-Llama-3.1-70B",name:"Hermes 3 70B"}]},o={claude:"cc",codex:"cx","gemini-cli":"gc",qwen:"qw",iflow:"if",antigravity:"ag",github:"gh",kiro:"kr",cursor:"cu","kimi-coding":"kmc",kilocode:"kc",cline:"cl",openai:"openai",anthropic:"anthropic",gemini:"gemini",openrouter:"openrouter",glm:"glm","glm-cn":"glm-cn",kimi:"kimi",minimax:"minimax","minimax-cn":"minimax-cn",deepseek:"deepseek",groq:"groq",xai:"xai",mistral:"mistral",perplexity:"perplexity",together:"together",fireworks:"fireworks",cerebras:"cerebras",cohere:"cohere",nvidia:"nvidia",nebius:"nebius",siliconflow:"siliconflow",hyperbolic:"hyperbolic"};function m(e){return n[o[e]||e]||[]}},21110:(e,i,a)=>{a.d(i,{ThemeProvider:()=>d});var n=a(95155),o=a(12115),m=a(90085);function d({children:e}){let{initTheme:i}=(0,m.A)();return(0,o.useEffect)(()=>{i()},[i]),(0,n.jsx)(n.Fragment,{children:e})}},28777:(e,i,a)=>{a.d(i,{KC:()=>n.KC,Xg:()=>n.Xg});var n=a(13097);Object.entries(a(52679).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(n.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},52679:(e,i,a)=>{a.d(i,{DI:()=>t,IS:()=>n,JH:()=>d,MA:()=>c,Q2:()=>s,fg:()=>m,gb:()=>l,mq:()=>r,wG:()=>g,wb:()=>u,zN:()=>o,zt:()=>p});let n={iflow:{id:"iflow",alias:"if",name:"iFlow AI",icon:"water_drop",color:"#6366F1"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981"},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4"},kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"}},o={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B"},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6"},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"}},m={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",passthroughModels:!0,website:"https://openrouter.ai"},glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com"},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com"},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",website:"https://ai.google.dev"},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com"},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai"},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai"},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai"},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai"},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai"},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com"},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz"},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com"},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com"},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai"}},d="openai-compatible-",t="anthropic-compatible-";function r(e){return"string"==typeof e&&e.startsWith(d)}function l(e){return"string"==typeof e&&e.startsWith(t)}let s={...n,...o,...m},c={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function p(e){for(let i of Object.values(s))if(i.alias===e||i.id===e)return i;return null}function g(e){let i=s[e];return i?.alias||e}Object.values(s).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(s).reduce((e,i)=>(e[i.id]=i.alias,e),{});let u=["antigravity","kiro","github","codex"]},90085:(e,i,a)=>{a.d(i,{A:()=>t});var n=a(1934),o=a(31692),m=a(90620);function d(e){let i=document.documentElement,a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?a:e)?i.classList.add("dark"):i.classList.remove("dark")}let t=(0,n.v)((0,o.Zr)((e,i)=>({theme:m.B2.defaultTheme,setTheme:i=>{e({theme:i}),d(i)},toggleTheme:()=>{let a="dark"===i().theme?"light":"dark";e({theme:a}),d(a)},initTheme:()=>{d(i().theme)}}),{name:m.B2.storageKey}))},90620:(e,i,a)=>{a.d(i,{Q2:()=>n.Q2,fg:()=>n.fg,vQ:()=>o,MA:()=>n.MA,zN:()=>n.zN,B2:()=>m});var n=a(52679);a(28777);let o={name:"Endpoint Proxy",description:"AI Infrastructure Management",version:"0.2.91"},m={storageKey:"theme",defaultTheme:"system"}}}]);
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router-app",
3
- "version": "0.2.89",
3
+ "version": "0.2.91",
4
4
  "description": "9Router web dashboard",
5
5
  "private": true,
6
6
  "scripts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router",
3
- "version": "0.2.89",
3
+ "version": "0.2.91",
4
4
  "description": "9Router CLI - Start and manage 9Router server",
5
5
  "bin": {
6
6
  "9router": "./cli.js"