9router 0.2.81 → 0.2.83

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 (426) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +37 -36
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/routes-manifest.json +6 -0
  5. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/page.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  33. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/_global-error.html +2 -2
  37. package/app/.next/server/app/_global-error.rsc +1 -1
  38. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  39. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  40. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  41. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  42. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  43. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  44. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/_not-found.html +1 -1
  46. package/app/.next/server/app/_not-found.rsc +3 -3
  47. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  48. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  49. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  50. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  51. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  52. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  53. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  58. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  61. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  62. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  64. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  80. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  81. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  83. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  85. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  87. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  88. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  89. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  90. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  91. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  92. package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
  93. package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  95. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  96. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  98. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  99. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  101. package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  102. package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  103. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  104. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  105. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  106. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  107. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  108. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  109. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  110. package/app/.next/server/app/api/v1/embeddings/route.js +1 -0
  111. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -0
  112. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -0
  113. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  114. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  115. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  116. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  117. package/app/.next/server/app/api/v1/models/route.js +1 -1
  118. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  119. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  120. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  121. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  122. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  123. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  124. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  125. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  126. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  127. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  128. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  129. package/app/.next/server/app/callback.html +1 -1
  130. package/app/.next/server/app/callback.rsc +3 -3
  131. package/app/.next/server/app/callback.segments/_full.segment.rsc +3 -3
  132. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  133. package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
  134. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  135. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  136. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  137. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  138. package/app/.next/server/app/dashboard/cli-tools.rsc +5 -5
  139. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  140. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  141. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  142. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  143. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  144. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  145. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  146. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  147. package/app/.next/server/app/dashboard/combos.html +1 -1
  148. package/app/.next/server/app/dashboard/combos.rsc +5 -5
  149. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  150. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  151. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  152. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  153. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  154. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  155. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  156. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  157. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  158. package/app/.next/server/app/dashboard/endpoint.rsc +5 -5
  159. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  160. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  161. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  162. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  163. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  164. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  165. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  166. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  167. package/app/.next/server/app/dashboard/profile.html +1 -1
  168. package/app/.next/server/app/dashboard/profile.rsc +5 -5
  169. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  170. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  171. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  172. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  173. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  174. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  175. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  176. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  177. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  178. package/app/.next/server/app/dashboard/providers/new.rsc +5 -5
  179. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  180. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  181. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  182. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  183. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  184. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  185. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  186. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  187. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  188. package/app/.next/server/app/dashboard/providers.html +1 -1
  189. package/app/.next/server/app/dashboard/providers.rsc +5 -5
  190. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  191. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  192. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  193. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  194. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  195. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  196. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  197. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  198. package/app/.next/server/app/dashboard/settings/pricing/page.js +1 -1
  199. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  200. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  201. package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
  202. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  203. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  204. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  205. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  206. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  207. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  208. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  209. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  210. package/app/.next/server/app/dashboard/translator.html +1 -1
  211. package/app/.next/server/app/dashboard/translator.rsc +5 -5
  212. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  213. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  214. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  215. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  216. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  217. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  218. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  219. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  220. package/app/.next/server/app/dashboard/usage.html +1 -1
  221. package/app/.next/server/app/dashboard/usage.rsc +5 -5
  222. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  223. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  224. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  225. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  226. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  227. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  228. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  229. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  230. package/app/.next/server/app/dashboard.html +1 -1
  231. package/app/.next/server/app/dashboard.rsc +5 -5
  232. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  233. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  234. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  235. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
  236. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  237. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +3 -3
  238. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  239. package/app/.next/server/app/index.html +1 -1
  240. package/app/.next/server/app/index.rsc +3 -3
  241. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  242. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  243. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  244. package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
  245. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  246. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  247. package/app/.next/server/app/landing.html +1 -1
  248. package/app/.next/server/app/landing.rsc +3 -3
  249. package/app/.next/server/app/landing.segments/_full.segment.rsc +3 -3
  250. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  251. package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
  252. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  253. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  254. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  255. package/app/.next/server/app/login/page.js +1 -1
  256. package/app/.next/server/app/login/page.js.nft.json +1 -1
  257. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  258. package/app/.next/server/app/login.html +1 -1
  259. package/app/.next/server/app/login.rsc +4 -4
  260. package/app/.next/server/app/login.segments/_full.segment.rsc +4 -4
  261. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  262. package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
  263. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  264. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  265. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  266. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  267. package/app/.next/server/app-paths-manifest.json +37 -36
  268. package/app/.next/server/chunks/4070.js +1 -0
  269. package/app/.next/server/chunks/412.js +7 -4
  270. package/app/.next/server/chunks/7341.js +1 -1
  271. package/app/.next/server/chunks/8152.js +1 -1
  272. package/app/.next/server/chunks/8954.js +1 -1
  273. package/app/.next/server/chunks/9489.js +4 -0
  274. package/app/.next/server/chunks/9862.js +1 -1
  275. package/app/.next/server/pages/404.html +1 -1
  276. package/app/.next/server/pages/500.html +2 -2
  277. package/app/.next/server/server-reference-manifest.js +1 -1
  278. package/app/.next/server/server-reference-manifest.json +1 -1
  279. package/app/.next/static/chunks/1393-789dc00cee220ab3.js +1 -0
  280. package/app/.next/static/chunks/8729-f5d7e69f7d021295.js +1 -0
  281. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-b1db6324fdab22de.js +1 -0
  282. package/app/.next/static/chunks/app/_global-error/page-1c55a45c707c87a7.js +1 -0
  283. package/app/.next/static/chunks/app/api/auth/login/route-1c55a45c707c87a7.js +1 -0
  284. package/app/.next/static/chunks/app/api/auth/logout/route-1c55a45c707c87a7.js +1 -0
  285. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1c55a45c707c87a7.js +1 -0
  286. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1c55a45c707c87a7.js +1 -0
  287. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1c55a45c707c87a7.js +1 -0
  288. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1c55a45c707c87a7.js +1 -0
  289. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1c55a45c707c87a7.js +1 -0
  290. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1c55a45c707c87a7.js +1 -0
  291. package/app/.next/static/chunks/app/api/cloud/auth/route-1c55a45c707c87a7.js +1 -0
  292. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-1c55a45c707c87a7.js +1 -0
  293. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-1c55a45c707c87a7.js +1 -0
  294. package/app/.next/static/chunks/app/api/cloud/models/alias/route-1c55a45c707c87a7.js +1 -0
  295. package/app/.next/static/chunks/app/api/combos/[id]/route-1c55a45c707c87a7.js +1 -0
  296. package/app/.next/static/chunks/app/api/combos/route-1c55a45c707c87a7.js +1 -0
  297. package/app/.next/static/chunks/app/api/init/route-1c55a45c707c87a7.js +1 -0
  298. package/app/.next/static/chunks/app/api/keys/[id]/route-1c55a45c707c87a7.js +1 -0
  299. package/app/.next/static/chunks/app/api/keys/route-1c55a45c707c87a7.js +1 -0
  300. package/app/.next/static/chunks/app/api/models/alias/route-1c55a45c707c87a7.js +1 -0
  301. package/app/.next/static/chunks/app/api/models/route-1c55a45c707c87a7.js +1 -0
  302. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1c55a45c707c87a7.js +1 -0
  303. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1c55a45c707c87a7.js +1 -0
  304. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1c55a45c707c87a7.js +1 -0
  305. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1c55a45c707c87a7.js +1 -0
  306. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1c55a45c707c87a7.js +1 -0
  307. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1c55a45c707c87a7.js +1 -0
  308. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1c55a45c707c87a7.js +1 -0
  309. package/app/.next/static/chunks/app/api/pricing/route-1c55a45c707c87a7.js +1 -0
  310. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1c55a45c707c87a7.js +1 -0
  311. package/app/.next/static/chunks/app/api/provider-nodes/route-1c55a45c707c87a7.js +1 -0
  312. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1c55a45c707c87a7.js +1 -0
  313. package/app/.next/static/chunks/app/api/providers/[id]/models/route-1c55a45c707c87a7.js +1 -0
  314. package/app/.next/static/chunks/app/api/providers/[id]/route-1c55a45c707c87a7.js +1 -0
  315. package/app/.next/static/chunks/app/api/providers/[id]/test/route-1c55a45c707c87a7.js +1 -0
  316. package/app/.next/static/chunks/app/api/providers/client/route-1c55a45c707c87a7.js +1 -0
  317. package/app/.next/static/chunks/app/api/providers/route-1c55a45c707c87a7.js +1 -0
  318. package/app/.next/static/chunks/app/api/providers/validate/route-1c55a45c707c87a7.js +1 -0
  319. package/app/.next/static/chunks/app/api/settings/require-login/route-1c55a45c707c87a7.js +1 -0
  320. package/app/.next/static/chunks/app/api/settings/route-1c55a45c707c87a7.js +1 -0
  321. package/app/.next/static/chunks/app/api/shutdown/route-1c55a45c707c87a7.js +1 -0
  322. package/app/.next/static/chunks/app/api/sync/cloud/route-1c55a45c707c87a7.js +1 -0
  323. package/app/.next/static/chunks/app/api/sync/initialize/route-1c55a45c707c87a7.js +1 -0
  324. package/app/.next/static/chunks/app/api/tags/route-1c55a45c707c87a7.js +1 -0
  325. package/app/.next/static/chunks/app/api/translator/load/route-1c55a45c707c87a7.js +1 -0
  326. package/app/.next/static/chunks/app/api/translator/save/route-1c55a45c707c87a7.js +1 -0
  327. package/app/.next/static/chunks/app/api/translator/send/route-1c55a45c707c87a7.js +1 -0
  328. package/app/.next/static/chunks/app/api/translator/translate/route-1c55a45c707c87a7.js +1 -0
  329. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1c55a45c707c87a7.js +1 -0
  330. package/app/.next/static/chunks/app/api/usage/history/route-1c55a45c707c87a7.js +1 -0
  331. package/app/.next/static/chunks/app/api/usage/providers/route-1c55a45c707c87a7.js +1 -0
  332. package/app/.next/static/chunks/app/api/usage/request-details/route-1c55a45c707c87a7.js +1 -0
  333. package/app/.next/static/chunks/app/api/usage/request-logs/route-1c55a45c707c87a7.js +1 -0
  334. package/app/.next/static/chunks/app/api/v1/api/chat/route-1c55a45c707c87a7.js +1 -0
  335. package/app/.next/static/chunks/app/api/v1/chat/completions/route-1c55a45c707c87a7.js +1 -0
  336. package/app/.next/static/chunks/app/api/v1/embeddings/route-1c55a45c707c87a7.js +1 -0
  337. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1c55a45c707c87a7.js +1 -0
  338. package/app/.next/static/chunks/app/api/v1/messages/route-1c55a45c707c87a7.js +1 -0
  339. package/app/.next/static/chunks/app/api/v1/models/route-1c55a45c707c87a7.js +1 -0
  340. package/app/.next/static/chunks/app/api/v1/responses/route-1c55a45c707c87a7.js +1 -0
  341. package/app/.next/static/chunks/app/api/v1/route-1c55a45c707c87a7.js +1 -0
  342. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1c55a45c707c87a7.js +1 -0
  343. package/app/.next/static/chunks/app/api/v1beta/models/route-1c55a45c707c87a7.js +1 -0
  344. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-6389a6072b45738e.js +1 -0
  345. package/app/.next/static/chunks/app/page-1c55a45c707c87a7.js +1 -0
  346. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1c55a45c707c87a7.js +1 -0
  347. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1c55a45c707c87a7.js +1 -0
  348. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1c55a45c707c87a7.js +1 -0
  349. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1c55a45c707c87a7.js +1 -0
  350. package/app/.next/static/css/{e4a2c774b676c378.css → 749abce1b69e6225.css} +1 -1
  351. package/app/.next/static/llsbXY9gx1LDLE2Eumd6V/_buildManifest.js +1 -0
  352. package/app/package.json +1 -1
  353. package/package.json +1 -1
  354. package/app/.next/server/chunks/8031.js +0 -7
  355. package/app/.next/static/JUqzmhzTk6D9cZes7u1KQ/_buildManifest.js +0 -1
  356. package/app/.next/static/chunks/1393-e72d9173010b9d65.js +0 -1
  357. package/app/.next/static/chunks/8729-91b25a186bb251c1.js +0 -1
  358. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-874d3494c011eaf2.js +0 -1
  359. package/app/.next/static/chunks/app/_global-error/page-1968aadfb379c0a3.js +0 -1
  360. package/app/.next/static/chunks/app/api/auth/login/route-1968aadfb379c0a3.js +0 -1
  361. package/app/.next/static/chunks/app/api/auth/logout/route-1968aadfb379c0a3.js +0 -1
  362. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1968aadfb379c0a3.js +0 -1
  363. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1968aadfb379c0a3.js +0 -1
  364. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1968aadfb379c0a3.js +0 -1
  365. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1968aadfb379c0a3.js +0 -1
  366. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1968aadfb379c0a3.js +0 -1
  367. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1968aadfb379c0a3.js +0 -1
  368. package/app/.next/static/chunks/app/api/cloud/auth/route-1968aadfb379c0a3.js +0 -1
  369. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-1968aadfb379c0a3.js +0 -1
  370. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-1968aadfb379c0a3.js +0 -1
  371. package/app/.next/static/chunks/app/api/cloud/models/alias/route-1968aadfb379c0a3.js +0 -1
  372. package/app/.next/static/chunks/app/api/combos/[id]/route-1968aadfb379c0a3.js +0 -1
  373. package/app/.next/static/chunks/app/api/combos/route-1968aadfb379c0a3.js +0 -1
  374. package/app/.next/static/chunks/app/api/init/route-1968aadfb379c0a3.js +0 -1
  375. package/app/.next/static/chunks/app/api/keys/[id]/route-1968aadfb379c0a3.js +0 -1
  376. package/app/.next/static/chunks/app/api/keys/route-1968aadfb379c0a3.js +0 -1
  377. package/app/.next/static/chunks/app/api/models/alias/route-1968aadfb379c0a3.js +0 -1
  378. package/app/.next/static/chunks/app/api/models/route-1968aadfb379c0a3.js +0 -1
  379. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1968aadfb379c0a3.js +0 -1
  380. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1968aadfb379c0a3.js +0 -1
  381. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1968aadfb379c0a3.js +0 -1
  382. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1968aadfb379c0a3.js +0 -1
  383. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1968aadfb379c0a3.js +0 -1
  384. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1968aadfb379c0a3.js +0 -1
  385. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1968aadfb379c0a3.js +0 -1
  386. package/app/.next/static/chunks/app/api/pricing/route-1968aadfb379c0a3.js +0 -1
  387. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1968aadfb379c0a3.js +0 -1
  388. package/app/.next/static/chunks/app/api/provider-nodes/route-1968aadfb379c0a3.js +0 -1
  389. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1968aadfb379c0a3.js +0 -1
  390. package/app/.next/static/chunks/app/api/providers/[id]/models/route-1968aadfb379c0a3.js +0 -1
  391. package/app/.next/static/chunks/app/api/providers/[id]/route-1968aadfb379c0a3.js +0 -1
  392. package/app/.next/static/chunks/app/api/providers/[id]/test/route-1968aadfb379c0a3.js +0 -1
  393. package/app/.next/static/chunks/app/api/providers/client/route-1968aadfb379c0a3.js +0 -1
  394. package/app/.next/static/chunks/app/api/providers/route-1968aadfb379c0a3.js +0 -1
  395. package/app/.next/static/chunks/app/api/providers/validate/route-1968aadfb379c0a3.js +0 -1
  396. package/app/.next/static/chunks/app/api/settings/require-login/route-1968aadfb379c0a3.js +0 -1
  397. package/app/.next/static/chunks/app/api/settings/route-1968aadfb379c0a3.js +0 -1
  398. package/app/.next/static/chunks/app/api/shutdown/route-1968aadfb379c0a3.js +0 -1
  399. package/app/.next/static/chunks/app/api/sync/cloud/route-1968aadfb379c0a3.js +0 -1
  400. package/app/.next/static/chunks/app/api/sync/initialize/route-1968aadfb379c0a3.js +0 -1
  401. package/app/.next/static/chunks/app/api/tags/route-1968aadfb379c0a3.js +0 -1
  402. package/app/.next/static/chunks/app/api/translator/load/route-1968aadfb379c0a3.js +0 -1
  403. package/app/.next/static/chunks/app/api/translator/save/route-1968aadfb379c0a3.js +0 -1
  404. package/app/.next/static/chunks/app/api/translator/send/route-1968aadfb379c0a3.js +0 -1
  405. package/app/.next/static/chunks/app/api/translator/translate/route-1968aadfb379c0a3.js +0 -1
  406. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1968aadfb379c0a3.js +0 -1
  407. package/app/.next/static/chunks/app/api/usage/history/route-1968aadfb379c0a3.js +0 -1
  408. package/app/.next/static/chunks/app/api/usage/providers/route-1968aadfb379c0a3.js +0 -1
  409. package/app/.next/static/chunks/app/api/usage/request-details/route-1968aadfb379c0a3.js +0 -1
  410. package/app/.next/static/chunks/app/api/usage/request-logs/route-1968aadfb379c0a3.js +0 -1
  411. package/app/.next/static/chunks/app/api/v1/api/chat/route-1968aadfb379c0a3.js +0 -1
  412. package/app/.next/static/chunks/app/api/v1/chat/completions/route-1968aadfb379c0a3.js +0 -1
  413. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1968aadfb379c0a3.js +0 -1
  414. package/app/.next/static/chunks/app/api/v1/messages/route-1968aadfb379c0a3.js +0 -1
  415. package/app/.next/static/chunks/app/api/v1/models/route-1968aadfb379c0a3.js +0 -1
  416. package/app/.next/static/chunks/app/api/v1/responses/route-1968aadfb379c0a3.js +0 -1
  417. package/app/.next/static/chunks/app/api/v1/route-1968aadfb379c0a3.js +0 -1
  418. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1968aadfb379c0a3.js +0 -1
  419. package/app/.next/static/chunks/app/api/v1beta/models/route-1968aadfb379c0a3.js +0 -1
  420. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-b785c59db12afbb1.js +0 -1
  421. package/app/.next/static/chunks/app/page-1968aadfb379c0a3.js +0 -1
  422. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1968aadfb379c0a3.js +0 -1
  423. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1968aadfb379c0a3.js +0 -1
  424. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1968aadfb379c0a3.js +0 -1
  425. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1968aadfb379c0a3.js +0 -1
  426. /package/app/.next/static/{JUqzmhzTk6D9cZes7u1KQ → llsbXY9gx1LDLE2Eumd6V}/_ssgManifest.js +0 -0
@@ -1,7 +0,0 @@
1
- "use strict";exports.id=8031,exports.ids=[8031],exports.modules={4770:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({label:a,options:b=[],value:c,onChange:f,placeholder:g="Select an option",error:h,hint:i,disabled:j=!1,required:k=!1,className:l,selectClassName:m,...n}){return(0,d.jsxs)("div",{className:(0,e.cn)("flex flex-col gap-1.5",l),children:[a&&(0,d.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[a,k&&(0,d.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsxs)("select",{value:c,onChange:f,disabled:j,className:(0,e.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",h?"border-red-500 focus:border-red-500 focus:ring-red-500/20":"",m),...n,children:[(0,d.jsx)("option",{value:"",disabled:!0,children:g}),b.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))]}),(0,d.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),h&&(0,d.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),h]}),i&&!h&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:i})]})}},5291:(a,b,c)=>{c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(79346),i=c(86209),j=c(56110);function k({isOpen:a,providerInfo:b,onSuccess:c,onClose:f}){let[g,k]=(0,e.useState)(null),[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(null),p=(0,e.useCallback)((a,b)=>{"builder-id"===a?k("builder-id"):"idc"===a?(k("idc"),o(b)):"social"===a?(k("social"),m(b.provider)):"import"===a&&c?.()},[c]),q=()=>{k(null),m(null),o(null)};return g?"builder-id"===g||"idc"===g?(0,d.jsx)(h.default,{isOpen:a,provider:"kiro",providerInfo:b,onSuccess:()=>{k(null),o(null),c?.()},onClose:q,idcConfig:n}):"social"===g&&l?(0,d.jsx)(j.default,{isOpen:a,provider:l,onSuccess:()=>{k(null),m(null),c?.()},onClose:q}):null:(0,d.jsx)(i.default,{isOpen:a,onMethodSelect:p,onClose:f})}k.propTypes={isOpen:g().bool.isRequired,providerInfo:g().shape({name:g().string}),onSuccess:g().func,onClose:g().func.isRequired}},17660:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({children:a,title:b,subtitle:c,icon:f,action:g,padding:h="md",hover:i=!1,className:j,...k}){return(0,d.jsxs)("div",{className:(0,e.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",i&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[h],j),...k,children:[(b||g)&&(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[f&&(0,d.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:f})}),(0,d.jsxs)("div",{children:[b&&(0,d.jsx)("h3",{className:"text-text-main font-semibold",children:b}),c&&(0,d.jsx)("p",{className:"text-sm text-text-muted",children:c})]})]}),g]}),a]})}f.Section=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",b),...c,children:a})},f.Row=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.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]",b),...c,children:a})},f.ListItem=function({children:a,actions:b,className:c,...f}){return(0,d.jsxs)("div",{className:(0,e.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",c),...f,children:[(0,d.jsx)("div",{className:"flex-1 min-w-0",children:a}),b&&(0,d.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:b})]})}},25919:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({src:a,alt:b="Avatar",name:c,size:f="md",className:g}){let h={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 a?(0,d.jsx)("div",{className:(0,e.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",h[f],g),style:{backgroundImage:`url(${a})`},role:"img","aria-label":b}):(0,d.jsx)("div",{className:(0,e.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",h[f],(a=>{if(!a)return"bg-primary";let b=["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"],c=a.charCodeAt(0)%b.length;return b[c]})(c),g),role:"img","aria-label":b,children:(a=>{if(!a)return"?";let b=a.split(" ");return b.length>=2?`${b[0][0]}${b[1][0]}`.toUpperCase():a.substring(0,2).toUpperCase()})(c)})}},38504:(a,b,c)=>{c.d(b,{default:()=>n});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(19099),i=c(17660),j=c(75171),k=c(74812);function l({field:a,currentSort:b,currentOrder:c}){return b!==a?(0,d.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,d.jsx)("span",{className:"ml-1",children:"asc"===c?"↑":"↓"})}function m({data:a,colorClass:b="bg-primary"}){let c=Math.max(...a,1);return(0,d.jsx)("div",{className:"flex items-end gap-1 h-8 w-24",children:a.slice(-9).map((a,e)=>(0,d.jsx)("div",{className:`flex-1 rounded-t-sm transition-all duration-500 ${b}`,style:{height:`${Math.max(a/c*100,5)}%`},title:String(a)},`bar-${e}-${a}`))})}function n(){let a=(0,h.useRouter)(),b=(0,h.useSearchParams)(),c=b.get("modelSortBy")||"rawModel",f=b.get("modelSortOrder")||"asc",g=b.get("accountSortBy")||"rawModel",n=b.get("accountSortOrder")||"asc",o=b.get("apiKeySortBy")||"keyName",p=b.get("apiKeySortOrder")||"asc",[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(!0),[u,v]=(0,e.useState)(!0),[w,x]=(0,e.useState)("tokens"),[y,z]=(0,e.useState)(5e3),[A,B]=(0,e.useState)(0),[C,D]=(0,e.useState)(new Set),[E,F]=(0,e.useState)(new Set),[G,H]=(0,e.useState)(new Set),I=(c,d)=>{let e={model:{by:"modelSortBy",order:"modelSortOrder"},account:{by:"accountSortBy",order:"accountSortOrder"},apiKey:{by:"apiKeySortBy",order:"apiKeySortOrder"}}[c],f=new URLSearchParams(b.toString()),g=f.get(e.by),h=f.get(e.order);g===d?f.set(e.order,"asc"===h?"desc":"asc"):(f.set(e.by,d),f.set(e.order,"asc")),a.replace(`?${f.toString()}`,{scroll:!1})},J=(0,e.useCallback)((a,b={},c,d)=>Object.entries(a||{}).map(([a,c])=>{let d=(c.promptTokens||0)+(c.completionTokens||0),e=c.cost||0,f=d>0?(c.promptTokens||0)*(e/d):0,g=d>0?(c.completionTokens||0)*(e/d):0;return{...c,key:a,totalTokens:d,totalCost:e,inputCost:f,outputCost:g,pending:b[a]||0}}).sort((a,b)=>{let e=a[c],f=b[c];return("string"==typeof e&&(e=e.toLowerCase()),"string"==typeof f&&(f=f.toLowerCase()),e<f)?"asc"===d?-1:1:e>f?"asc"===d?1:-1:0}),[]),K=(0,e.useCallback)((a,b)=>{switch(b){case"rawModel":return a.rawModel||"Unknown Model";case"accountName":return a.accountName||`Account ${a.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return a.keyName||"Unknown Key";default:return a[b]||"Unknown"}},[]),L=(0,e.useCallback)((a,b)=>{if(!Array.isArray(a))return[];let c={};return a.forEach(a=>{let d=K(a,b);c[d]||(c[d]={groupKey:d,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let e=c[d];e.summary.requests+=a.requests||0,e.summary.promptTokens+=a.promptTokens||0,e.summary.completionTokens+=a.completionTokens||0,e.summary.totalTokens+=a.totalTokens||0,e.summary.cost+=a.cost||0,e.summary.inputCost+=a.inputCost||0,e.summary.outputCost+=a.outputCost||0,e.summary.pending+=a.pending||0,a.lastUsed&&(!e.summary.lastUsed||new Date(a.lastUsed)>new Date(e.summary.lastUsed))&&(e.summary.lastUsed=a.lastUsed),e.items.push(a)}),Object.values(c)},[K]),M=(0,e.useMemo)(()=>J(q?.byModel,q?.pending?.byModel,c,f),[q?.byModel,q?.pending?.byModel,c,f,J]),N=(0,e.useMemo)(()=>L(M,"rawModel"),[M,L]),O=(0,e.useMemo)(()=>{let a={};return q?.pending?.byAccount&&Object.entries(q.byAccount||{}).forEach(([b,c])=>{let d=q.pending.byAccount[c.connectionId];if(d){let e=c.provider?`${c.rawModel} (${c.provider})`:c.rawModel;a[b]=d[e]||0}}),J(q?.byAccount,a,g,n)},[q?.byAccount,q?.pending?.byAccount,g,n,J]),P=(0,e.useMemo)(()=>L(O,"accountName"),[O,L]),Q=(0,e.useMemo)(()=>J(q?.byApiKey,{},o,p),[q?.byApiKey,o,p,J]),R=(0,e.useMemo)(()=>L(Q,"keyName"),[Q,L]);(0,e.useCallback)(async(a=!0)=>{a&&t(!0);try{let a=await fetch("/api/usage/history");if(a.ok){let b=await a.json();r(b);let c=b.totalRequests||0;c>A?z(5e3):z(a=>Math.min(2*a,6e4)),B(c)}}catch(a){console.error("Failed to fetch usage stats:",a)}finally{a&&t(!1)}},[A]);let S=(0,e.useCallback)(a=>{D(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),T=(0,e.useCallback)(a=>{F(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),U=(0,e.useCallback)(a=>{H(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]);if(s)return(0,d.jsx)(k.CardSkeleton,{});if(!q)return(0,d.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let V=a=>new Intl.NumberFormat().format(a||0),W=a=>`$${(a||0).toFixed(2)}`,X=a=>{if(!a)return"Never";let b=new Date(a),c=Math.floor((new Date-b)/6e4);return c<1?"Just now":c<60?`${c}m ago`:c<1440?`${Math.floor(c/60)}h ago`:b.toLocaleDateString()};return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"Usage Overview"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:[(0,d.jsx)("button",{onClick:()=>x("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===w?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,d.jsx)("button",{onClick:()=>x("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===w?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"})]}),(0,d.jsxs)("div",{className:"text-sm font-medium text-text-muted flex items-center gap-2",children:[(0,d.jsxs)("span",{children:["Auto Refresh (",y/1e3,"s)"]}),(0,d.jsx)("button",{type:"button",onClick:()=>v(!u),role:"switch","aria-checked":u,"aria-label":"Toggle auto refresh",className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-primary/50 ${u?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,d.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${u?"translate-x-5":"translate-x-1"}`})})]})]})]}),(q.activeRequests||[]).length>0&&(0,d.jsx)(i.default,{className:"p-3 border-primary/20 bg-primary/5",children:(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-primary font-semibold text-sm uppercase tracking-wider",children:[(0,d.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,d.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),(0,d.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),"Active Requests"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-3",children:q.activeRequests.map(a=>(0,d.jsxs)("div",{className:"px-3 py-1.5 rounded-md bg-bg-subtle border border-primary/20 text-xs font-mono shadow-sm",children:[(0,d.jsx)("span",{className:"text-primary font-bold",children:a.model}),(0,d.jsx)("span",{className:"mx-1 text-text-muted",children:"|"}),(0,d.jsx)("span",{className:"text-text",children:a.provider}),(0,d.jsx)("span",{className:"mx-1 text-text-muted",children:"|"}),(0,d.jsx)("span",{className:"text-text font-medium",children:a.account}),a.count>1&&(0,d.jsxs)("span",{className:"ml-2 px-1.5 py-0.5 rounded bg-primary text-white font-bold",children:["x",a.count]})]},`${a.model}-${a.provider}-${a.account}`))})]})}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,d.jsx)(i.default,{className:"px-4 py-3 flex flex-col gap-1",children:(0,d.jsxs)("div",{className:"flex justify-between items-start",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,d.jsx)("span",{className:"text-2xl font-bold",children:V(q.totalRequests)})]}),(0,d.jsx)(m,{data:(q.last10Minutes||[]).map(a=>a.requests),colorClass:"bg-text-muted/30"})]})}),(0,d.jsx)(i.default,{className:"px-4 py-3 flex flex-col gap-1",children:(0,d.jsxs)("div",{className:"flex justify-between items-start",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,d.jsx)("span",{className:"text-2xl font-bold text-primary",children:V(q.totalPromptTokens)})]}),(0,d.jsx)(m,{data:(q.last10Minutes||[]).map(a=>a.promptTokens),colorClass:"bg-primary/50"})]})}),(0,d.jsx)(i.default,{className:"px-4 py-2 flex flex-col gap-1",children:(0,d.jsxs)("div",{className:"flex justify-between items-start gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-1 flex-1",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,d.jsx)("span",{className:"text-2xl font-bold text-success",children:V(q.totalCompletionTokens)})]}),(0,d.jsx)("div",{className:"w-px bg-border self-stretch mx-2"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1 flex-1",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Cost"}),(0,d.jsx)("span",{className:"text-2xl font-bold text-warning",children:W(q.totalCost)})]})]})})]}),(0,d.jsxs)(i.default,{className:"overflow-hidden",children:[(0,d.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,d.jsx)("h3",{className:"font-semibold",children:"Usage by Model"})}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,d.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,d.jsxs)("tr",{children:[(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","rawModel"),children:["Model"," ",(0,d.jsx)(l,{field:"rawModel",currentSort:c,currentOrder:f})]}),(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","provider"),children:["Provider"," ",(0,d.jsx)(l,{field:"provider",currentSort:c,currentOrder:f})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","requests"),children:["Requests"," ",(0,d.jsx)(l,{field:"requests",currentSort:c,currentOrder:f})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","lastUsed"),children:["Last Used"," ",(0,d.jsx)(l,{field:"lastUsed",currentSort:c,currentOrder:f})]}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","promptTokens"),children:["Input Tokens"," ",(0,d.jsx)(l,{field:"promptTokens",currentSort:c,currentOrder:f})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","completionTokens"),children:["Output Tokens"," ",(0,d.jsx)(l,{field:"completionTokens",currentSort:c,currentOrder:f})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","totalTokens"),children:["Total Tokens"," ",(0,d.jsx)(l,{field:"totalTokens",currentSort:c,currentOrder:f})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","promptTokens"),children:["Input Cost"," ",(0,d.jsx)(l,{field:"promptTokens",currentSort:c,currentOrder:f})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","completionTokens"),children:["Output Cost"," ",(0,d.jsx)(l,{field:"completionTokens",currentSort:c,currentOrder:f})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("model","cost"),children:["Total Cost"," ",(0,d.jsx)(l,{field:"cost",currentSort:c,currentOrder:f})]})]})]})}),(0,d.jsxs)("tbody",{className:"divide-y divide-border",children:[N.map(a=>(0,d.jsxs)(e.Fragment,{children:[(0,d.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>S(a.groupKey),children:[(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${C.has(a.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:`font-medium transition-colors ${a.summary.pending>0?"text-primary":""}`,children:a.groupKey})]})}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:V(a.summary.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:X(a.summary.lastUsed)}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.summary.promptTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.summary.completionTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:V(a.summary.totalTokens)})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.summary.inputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.summary.outputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:W(a.summary.totalCost)})]})]},`summary-${a.groupKey}`),C.has(a.groupKey)&&a.items.map(a=>(0,d.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[(0,d.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${a.pending>0?"text-primary":""}`,children:a.rawModel}),(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)(j.default,{variant:a.pending>0?"primary":"neutral",size:"sm",children:a.provider})}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:V(a.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:X(a.lastUsed)}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.promptTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.completionTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:V(a.totalTokens)})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.inputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.outputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:W(a.totalCost)})]})]},`detail-${a.key}`))]},a.groupKey)),0===N.length&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{colSpan:8,className:"px-6 py-8 text-center text-text-muted",children:"No usage recorded yet. Make some requests to see data here."})})]})]})})]}),(0,d.jsxs)(i.default,{className:"overflow-hidden",children:[(0,d.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,d.jsx)("h3",{className:"font-semibold",children:"Usage by Account"})}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,d.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,d.jsxs)("tr",{children:[(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","rawModel"),children:["Model"," ",(0,d.jsx)(l,{field:"rawModel",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","provider"),children:["Provider"," ",(0,d.jsx)(l,{field:"provider",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","accountName"),children:["Account"," ",(0,d.jsx)(l,{field:"accountName",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","requests"),children:["Requests"," ",(0,d.jsx)(l,{field:"requests",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","lastUsed"),children:["Last Used"," ",(0,d.jsx)(l,{field:"lastUsed",currentSort:g,currentOrder:n})]}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","promptTokens"),children:["Input Tokens"," ",(0,d.jsx)(l,{field:"promptTokens",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","completionTokens"),children:["Output Tokens"," ",(0,d.jsx)(l,{field:"completionTokens",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","totalTokens"),children:["Total Tokens"," ",(0,d.jsx)(l,{field:"totalTokens",currentSort:g,currentOrder:n})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","promptTokens"),children:["Input Cost"," ",(0,d.jsx)(l,{field:"promptTokens",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","completionTokens"),children:["Output Cost"," ",(0,d.jsx)(l,{field:"completionTokens",currentSort:g,currentOrder:n})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("account","cost"),children:["Total Cost"," ",(0,d.jsx)(l,{field:"cost",currentSort:g,currentOrder:n})]})]})]})}),(0,d.jsxs)("tbody",{className:"divide-y divide-border",children:[P.map(a=>(0,d.jsxs)(e.Fragment,{children:[(0,d.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>T(a.groupKey),children:[(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${E.has(a.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:`font-medium transition-colors ${a.summary.pending>0?"text-primary":""}`,children:a.groupKey})]})}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:V(a.summary.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:X(a.summary.lastUsed)}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:V(a.summary.totalTokens)})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:W(a.summary.totalCost)})]})]},`summary-${a.groupKey}`),E.has(a.groupKey)&&a.items.map(a=>(0,d.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)("span",{className:`font-medium transition-colors ${a.pending>0?"text-primary":""}`,children:a.accountName||`Account ${a.connectionId?.slice(0,8)}...`})}),(0,d.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${a.pending>0?"text-primary":""}`,children:a.rawModel}),(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)(j.default,{variant:a.pending>0?"primary":"neutral",size:"sm",children:a.provider})}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:V(a.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:X(a.lastUsed)}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.promptTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.completionTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:V(a.totalTokens)})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.inputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.outputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:W(a.totalCost)})]})]},`detail-${a.key}`))]},a.groupKey)),0===P.length&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{colSpan:9,className:"px-6 py-8 text-center text-text-muted",children:"No account-specific usage recorded yet. Make requests using OAuth accounts to see data here."})})]})]})})]}),(0,d.jsxs)(i.default,{className:"overflow-hidden",children:[(0,d.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,d.jsx)("h3",{className:"font-semibold",children:"Usage by API Key"})}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,d.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,d.jsxs)("tr",{children:[(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","keyName"),children:["API Key Name"," ",(0,d.jsx)(l,{field:"keyName",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","rawModel"),children:["Model"," ",(0,d.jsx)(l,{field:"rawModel",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","provider"),children:["Provider"," ",(0,d.jsx)(l,{field:"provider",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","requests"),children:["Requests"," ",(0,d.jsx)(l,{field:"requests",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","lastUsed"),children:["Last Used"," ",(0,d.jsx)(l,{field:"lastUsed",currentSort:o,currentOrder:p})]}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","promptTokens"),children:["Input Tokens"," ",(0,d.jsx)(l,{field:"promptTokens",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","completionTokens"),children:["Output Tokens"," ",(0,d.jsx)(l,{field:"completionTokens",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","totalTokens"),children:["Total Tokens"," ",(0,d.jsx)(l,{field:"totalTokens",currentSort:o,currentOrder:p})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","promptTokens"),children:["Input Cost"," ",(0,d.jsx)(l,{field:"promptTokens",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","completionTokens"),children:["Output Cost"," ",(0,d.jsx)(l,{field:"completionTokens",currentSort:o,currentOrder:p})]}),(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>I("apiKey","cost"),children:["Total Cost"," ",(0,d.jsx)(l,{field:"cost",currentSort:o,currentOrder:p})]})]})]})}),(0,d.jsxs)("tbody",{className:"divide-y divide-border",children:[R.map(a=>(0,d.jsxs)(e.Fragment,{children:[(0,d.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>U(a.groupKey),children:[(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${G.has(a.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"font-medium",children:a.groupKey})]})}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:V(a.summary.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:X(a.summary.lastUsed)}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.summary.promptTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.summary.completionTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:V(a.summary.totalTokens)})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.summary.inputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.summary.outputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:W(a.summary.totalCost)})]})]},`summary-${a.groupKey}`),G.has(a.groupKey)&&a.items.map(a=>(0,d.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[(0,d.jsx)("td",{className:"px-6 py-3 font-medium",children:a.keyName}),(0,d.jsx)("td",{className:"px-6 py-3",children:a.rawModel}),(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)(j.default,{variant:"neutral",size:"sm",children:a.provider})}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:V(a.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:X(a.lastUsed)}),"tokens"===w?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.promptTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:V(a.completionTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:V(a.totalTokens)})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.inputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:W(a.outputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:W(a.totalCost)})]})]},`detail-${a.key}`))]},a.groupKey)),0===R.length&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{colSpan:9,className:"px-6 py-8 text-center text-text-muted",children:"No API key usage recorded yet. Make requests using API keys to see data here."})})]})]})})]})]})}l.propTypes={field:g().string.isRequired,currentSort:g().string.isRequired,currentOrder:g().string.isRequired},m.propTypes={data:g().arrayOf(g().number).isRequired,colorClass:g().string}},39645:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(67484),f=c(95145),g=c(99070);function h({isOpen:a,onClose:b,title:c="Manual Configuration",configs:h=[]}){let[i,j]=(0,e.useState)(null),k=async(a,b)=>{try{await navigator.clipboard.writeText(a),j(b),setTimeout(()=>j(null),2e3)}catch(a){console.log("Failed to copy:",a)}};return(0,d.jsx)(f.default,{isOpen:a,onClose:b,title:c,size:"xl",children:(0,d.jsx)("div",{className:"flex flex-col gap-4",children:h.map((a,b)=>(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:a.filename}),(0,d.jsxs)(g.default,{variant:"ghost",size:"sm",onClick:()=>k(a.content,b),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:i===b?"check":"content_copy"}),i===b?"Copied!":"Copy"]})]}),(0,d.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:a.content})]},b))})})}},42118:(a,b,c)=>{c.d(b,{D:()=>i});var d=c(67484),e=c(13033);function f(a){return()=>{}}function g(){return!1}function h(){return!1}function i(){let{theme:a,setTheme:b,toggleTheme:c,initTheme:i}=(0,e.A)(),j=(0,d.useSyncExternalStore)(f,g,h);return{theme:a,setTheme:b,toggleTheme:c,isDark:"dark"===a||"system"===a&&j}}},42196:(a,b,c)=>{c.d(b,{default:()=>r});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(2116),i=c.n(h),j=c(19099),k=c(71404),l=c(12020),m=c(99070),n=c(95145);let o=[{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"}],q=[{href:"/dashboard/profile",label:"Settings",icon:"settings"}];function r({onClose:a}){let b=(0,j.usePathname)(),[c,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)(!1),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),v=a=>"/dashboard/endpoint"===a?"/dashboard"===b||b.startsWith("/dashboard/endpoint"):b.startsWith(a),w=async()=>{h(!0);try{await fetch("/api/shutdown",{method:"POST"})}catch(a){}h(!1),f(!1),s(!0)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.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,d.jsxs)("div",{className:"flex items-center gap-2 px-6 pt-5 pb-2",children:[(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),(0,d.jsx)("div",{className:"px-6 py-4",children:(0,d.jsxs)(i(),{href:"/dashboard",className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"flex items-center justify-center size-9 rounded bg-linear-to-br from-[#f97815] to-[#c2590a]",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("h1",{className:"text-lg font-semibold tracking-tight text-text-main",children:l.vQ.name}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["v",l.vQ.version]})]})]})}),(0,d.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-1 overflow-y-auto custom-scrollbar",children:[o.map(b=>(0,d.jsxs)(i(),{href:b.href,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-4 py-2 rounded-lg transition-all group",v(b.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,d.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[18px]",v(b.href)?"fill-1":"group-hover:text-primary transition-colors"),children:b.icon}),(0,d.jsx)("span",{className:"text-sm font-medium",children:b.label})]},b.href)),t&&(0,d.jsxs)("div",{className:"pt-4 mt-2",children:[(0,d.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"Debug"}),p.map(b=>(0,d.jsxs)(i(),{href:b.href,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-4 py-2 rounded-lg transition-all group",v(b.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,d.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[18px]",v(b.href)?"fill-1":"group-hover:text-primary transition-colors"),children:b.icon}),(0,d.jsx)("span",{className:"text-sm font-medium",children:b.label})]},b.href))]}),(0,d.jsxs)("div",{className:"pt-4 mt-2",children:[(0,d.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),q.map(b=>(0,d.jsxs)(i(),{href:b.href,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-4 py-2 rounded-lg transition-all group",v(b.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,d.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[18px]",v(b.href)?"fill-1":"group-hover:text-primary transition-colors"),children:b.icon}),(0,d.jsx)("span",{className:"text-sm font-medium",children:b.label})]},b.href))]})]}),(0,d.jsxs)("div",{className:"p-3 border-t border-black/5 dark:border-white/5",children:[(0,d.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-surface/50 mb-2",children:[(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"})}),(0,d.jsx)("div",{className:"flex flex-col",children:(0,d.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,d.jsx)(m.default,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>f(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"})]})]}),(0,d.jsx)(n.ConfirmModal,{isOpen:c,onClose:()=>f(!1),onConfirm:w,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:g}),r&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"text-center p-8",children:[(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,d.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,d.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,d.jsx)(m.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}r.propTypes={onClose:g().func}},48781:(a,b,c)=>{c.d(b,{default:()=>k});var d=c(48249),e=c(2116),f=c.n(e),g=c(12020);let h=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],i=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],j=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function k(){return(0,d.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,d.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,d.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,d.jsx)("div",{className:"size-6 text-primary",children:(0,d.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,d.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,d.jsx)("span",{className:"text-xl font-bold text-text-main",children:g.vQ.name})]}),(0,d.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,d.jsxs)("div",{className:"flex gap-4",children:[(0,d.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.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,d.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.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,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,d.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:h.map(a=>(0,d.jsx)("li",{children:(0,d.jsx)(f(),{href:a.href,className:"hover:text-primary transition-colors",children:a.label})},a.label))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,d.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:i.map(a=>(0,d.jsx)("li",{children:(0,d.jsx)(f(),{href:a.href,className:"hover:text-primary transition-colors",children:a.label})},a.label))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,d.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:j.map(a=>(0,d.jsx)("li",{children:(0,d.jsx)(f(),{href:a.href,className:"hover:text-primary transition-colors",children:a.label})},a.label))})]})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",g.vQ.name," Inc. All rights reserved."]}),(0,d.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,d.jsx)(f(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,d.jsx)(f(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},50377:(a,b,c)=>{c.d(b,{C:()=>e});var d=c(67484);function e(a=2e3){let[b,c]=(0,d.useState)(null),f=(0,d.useRef)(null);return{copied:b,copy:(0,d.useCallback)((b,d="default")=>{navigator.clipboard.writeText(b),c(d),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{c(null)},a)},[a])}}},50412:(a,b,c)=>{c.d(b,{Ex:()=>j.default,$n:()=>d.default,Zp:()=>g.default,Qv:()=>i.CardSkeleton,G9:()=>s.default,pd:()=>e.default,Mh:()=>r.default,uR:()=>o.default,aF:()=>h.default,rq:()=>n.default,LF:()=>m.default,gM:()=>q.default,Iz:()=>t.default,l6:()=>f.default,UW:()=>l.default,lM:()=>k.default,jK:()=>p.default});var d=c(99070),e=c(83552),f=c(4770),g=c(17660),h=c(95145),i=c(74812);c(25919);var j=c(75171),k=c(95514),l=c(53845);c(19308),c(42196),c(86739),c(48781);var m=c(79346),n=c(83352),o=c(39645),p=c(38504),q=c(91809);c(86209);var r=c(5291);c(56110);var s=c(51109),t=c(91099);c(85306),c(53838)},51109:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412);function i({isOpen:a,onSuccess:b,onClose:c}){let[f,g]=(0,e.useState)(""),[i,j]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),s=async()=>{if(!f.trim())return void l("Please enter an access token");if(!i.trim())return void l("Please enter a machine ID");n(!0),l(null);try{let a=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:f.trim(),machineId:i.trim()})}),d=await a.json();if(!a.ok)throw Error(d.error||"Import failed");b?.(),c()}catch(a){l(a.message)}finally{n(!1)}};return(0,d.jsx)(h.aF,{isOpen:a,title:"Connect Cursor IDE",onClose:c,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[o&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!o&&(0,d.jsxs)(d.Fragment,{children:[q&&(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,d.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),!q&&!k&&(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)("textarea",{value:f,onChange:a=>g(a.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,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(h.pd,{value:i,onChange:a=>j(a.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),k&&(0,d.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,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:s,fullWidth:!0,disabled:m||!f.trim()||!i.trim(),children:m?"Importing...":"Import Token"}),(0,d.jsx)(h.$n,{onClick:c,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}i.propTypes={isOpen:g().bool.isRequired,onSuccess:g().func,onClose:g().func.isRequired}},53838:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(49885),f=c.n(e),g=c(53845);function h({children:a}){return(0,d.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,d.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,d.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,d.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,d.jsx)(g.default,{variant:"card"})}),(0,d.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:a})]})}h.propTypes={children:f().node.isRequired}},53845:(a,b,c)=>{c.d(b,{default:()=>g});var d=c(48249),e=c(42118),f=c(71404);function g({className:a,variant:b="default"}){let{theme:c,toggleTheme:g,isDark:h}=(0,e.D)(),i={default:(0,f.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,f.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,d.jsx)("button",{onClick:g,className:(0,f.cn)(i[b],a),"aria-label":`Switch to ${h?"light":"dark"} mode`,title:`Switch to ${h?"light":"dark"} mode`,children:(0,d.jsx)("span",{className:(0,f.cn)("material-symbols-outlined text-[22px]","card"===b&&"transition-transform duration-300 group-hover:rotate-12"),children:h?"light_mode":"dark_mode"})})}},56110:(a,b,c)=>{c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(50377);function j({isOpen:a,provider:b,onSuccess:c,onClose:f}){let[g,j]=(0,e.useState)("loading"),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(null),{copied:s,copy:t}=(0,i.C)(),u=async()=>{try{let a;r(null);try{a=new URL(o)}catch(a){throw Error("Invalid callback URL format")}let d=a.searchParams.get("code");a.searchParams.get("state");let e=a.searchParams.get("error");if(e)throw Error(a.searchParams.get("error_description")||e);if(!d)throw Error("No authorization code found in URL");let f=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:d,codeVerifier:m.codeVerifier,provider:b})}),g=await f.json();if(!f.ok)throw Error(g.error);j("success"),c?.()}catch(a){r(a.message),j("error")}},v="google"===b?"Google":"GitHub";return(0,d.jsx)(h.aF,{isOpen:a,title:`Connect Kiro via ${v}`,onClose:f,size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===g&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",v," authentication"]})]}),"input"===g&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.pd,{value:k,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,d.jsx)(h.$n,{variant:"secondary",icon:"auth_url"===s?"check":"content_copy",onClick:()=>t(k,"auth_url"),children:"Copy"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,d.jsx)(h.pd,{value:o,onChange:a=>p(a.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:u,fullWidth:!0,disabled:!o,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===g&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",v," has been connected."]}),(0,d.jsx)(h.$n,{onClick:f,fullWidth:!0,children:"Done"})]}),"error"===g&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,d.jsx)("p",{className:"text-sm text-red-600 mb-4",children:q}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>j("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,d.jsx)(h.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}j.propTypes={isOpen:g().bool.isRequired,provider:g().oneOf(["google","github"]).isRequired,onSuccess:g().func,onClose:g().func.isRequired}},71404:(a,b,c)=>{c.d(b,{cn:()=>d});function d(...a){return a.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},74812:(a,b,c)=>{c.d(b,{CardSkeleton:()=>i,PageLoading:()=>g,Skeleton:()=>h,Spinner:()=>f,default:()=>j});var d=c(48249),e=c(71404);function f({size:a="md",className:b}){return(0,d.jsx)("span",{className:(0,e.cn)("material-symbols-outlined animate-spin text-primary",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[a],b),children:"progress_activity"})}function g({message:a="Loading..."}){return(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,d.jsx)(f,{size:"xl"}),(0,d.jsx)("p",{className:"mt-4 text-text-muted",children:a})]})}function h({className:a,...b}){return(0,d.jsx)("div",{className:(0,e.cn)("animate-pulse rounded-lg bg-border",a),...b})}function i(){return(0,d.jsxs)("div",{className:"p-6 rounded-xl border border-border bg-surface",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsx)(h,{className:"h-4 w-24"}),(0,d.jsx)(h,{className:"size-10 rounded-lg"})]}),(0,d.jsx)(h,{className:"h-8 w-16 mb-2"}),(0,d.jsx)(h,{className:"h-3 w-20"})]})}function j({type:a="spinner",...b}){switch(a){case"page":return(0,d.jsx)(g,{...b});case"skeleton":return(0,d.jsx)(h,{...b});case"card":return(0,d.jsx)(i,{...b});default:return(0,d.jsx)(f,{...b})}}},75171:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(71404);let f={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"},g={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 h({children:a,variant:b="default",size:c="md",dot:h=!1,icon:i,className:j}){return(0,d.jsxs)("span",{className:(0,e.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",f[b],g[c],j),children:[h&&(0,d.jsx)("span",{className:(0,e.cn)("size-1.5 rounded-full","success"===b&&"bg-green-500","warning"===b&&"bg-yellow-500","error"===b&&"bg-red-500","info"===b&&"bg-blue-500","primary"===b&&"bg-primary","default"===b&&"bg-gray-500")}),i&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:i}),a]})}},79346:(a,b,c)=>{c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(50377);function j({isOpen:a,provider:b,providerInfo:c,onSuccess:f,onClose:g}){let[j,k]=(0,e.useState)("waiting"),[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(!1),x=(0,e.useRef)(null),{copied:y,copy:z}=(0,i.C)(),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)("/callback?code=...");(0,e.useRef)(!1);let E=(0,e.useCallback)(async(a,c)=>{if(l)try{let d=await fetch(`/api/oauth/${b}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a,redirectUri:l.redirectUri,codeVerifier:l.codeVerifier,state:c})}),e=await d.json();if(!d.ok)throw Error(e.error);k("success"),f?.()}catch(a){q(a.message),k("error")}},[l,b,f]),F=(0,e.useCallback)(async(a,c,d,e)=>{w(!0);for(let g=0;g<60;g++){await new Promise(a=>setTimeout(a,1e3*d));try{let g=await fetch(`/api/oauth/${b}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:a,codeVerifier:c,extraData:e})}),h=await g.json();if(h.success){k("success"),w(!1),f?.();return}if("expired_token"===h.error||"access_denied"===h.error)throw Error(h.errorDescription||h.error);"slow_down"===h.error&&(d=Math.min(d+5,30))}catch(a){q(a.message),k("error"),w(!1);return}}q("Authorization timeout"),k("error"),w(!1)},[b,f]),G=(0,e.useCallback)(async()=>{if(b)try{let a;if(q(null),"github"===b||"qwen"===b||"kiro"===b){s(!0),k("waiting");let a=await fetch(`/api/oauth/${b}/device-code`),c=await a.json();if(!a.ok)throw Error(c.error);u(c);let d=c.verification_uri_complete||c.verification_uri;d&&window.open(d,"_blank");let e="kiro"===b?{_clientId:c._clientId,_clientSecret:c._clientSecret}:null;F(c.device_code,c.codeVerifier,c.interval||5,e);return}if("codex"===b)a="http://localhost:1455/auth/callback";else{let b=window.location.port||("https:"===window.location.protocol?"443":"80");a=`http://localhost:${b}/callback`}let c=await fetch(`/api/oauth/${b}/authorize?redirect_uri=${encodeURIComponent(a)}`),d=await c.json();if(!c.ok)throw Error(d.error);m({...d,redirectUri:a}),"codex"!==b&&A?(k("waiting"),x.current=window.open(d.authUrl,"oauth_popup","width=600,height=700"),x.current||k("input")):(k("input"),window.open(d.authUrl,"_blank"))}catch(a){q(a.message),k("error")}},[b,A,F]),H=async()=>{try{q(null);let a=new URL(n),b=a.searchParams.get("code"),c=a.searchParams.get("state"),d=a.searchParams.get("error");if(d)throw Error(a.searchParams.get("error_description")||d);if(!b)throw Error("No authorization code found in URL");await E(b,c)}catch(a){q(a.message),k("error")}};return b&&c?(0,d.jsx)(h.aF,{isOpen:a,title:`Connect ${c.name}`,onClose:g,size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:["waiting"===j&&!r&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Waiting for Authorization"}),(0,d.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Complete the authorization in the popup window."}),(0,d.jsx)(h.$n,{variant:"ghost",onClick:()=>k("input"),children:"Popup blocked? Enter URL manually"})]}),"waiting"===j&&r&&t&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"text-center py-4",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the URL below and enter the code:"}),(0,d.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Verification URL"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 text-sm break-all",children:t.verification_uri}),(0,d.jsx)(h.$n,{size:"sm",variant:"ghost",icon:"verify_url"===y?"check":"content_copy",onClick:()=>z(t.verification_uri,"verify_url")})]})]}),(0,d.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,d.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:t.user_code}),(0,d.jsx)(h.$n,{size:"sm",variant:"ghost",icon:"user_code"===y?"check":"content_copy",onClick:()=>z(t.user_code,"user_code")})]})]})]}),v&&(0,d.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"input"===j&&!r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.pd,{value:l?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,d.jsx)(h.$n,{variant:"secondary",icon:"auth_url"===y?"check":"content_copy",onClick:()=>z(l?.authUrl,"auth_url"),children:"Copy"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser."}),(0,d.jsx)(h.pd,{value:n,onChange:a=>o(a.target.value),placeholder:C,className:"font-mono text-xs"})]})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:H,fullWidth:!0,disabled:!n,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===j&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",c.name," account has been connected."]}),(0,d.jsx)(h.$n,{onClick:g,fullWidth:!0,children:"Done"})]}),"error"===j&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,d.jsx)("p",{className:"text-sm text-red-600 mb-4",children:p}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:G,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,d.jsx)(h.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}j.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerInfo:g().shape({name:g().string}),onSuccess:g().func,onClose:g().func.isRequired}},83352:(a,b,c)=>{c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(95145),i=c(91431),j=c(96919);let k=[...Object.keys(j.zN),...Object.keys(j.fg)];function l({isOpen:a,onClose:b,onSelect:c,selectedModel:f,activeProviders:g=[],title:l="Select Model",modelAliases:m={}}){let[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)([]),[r,s]=(0,e.useState)([]),t=(0,e.useMemo)(()=>({...j.zN,...j.fg}),[]),u=(0,e.useMemo)(()=>{let a={};return[...new Set([...g.map(a=>a.provider)])].sort((a,b)=>{let c=k.indexOf(a),d=k.indexOf(b);return(-1===c?999:c)-(-1===d?999:d)}).forEach(b=>{let c=i.Xg[b]||b,d=t[b]||{name:b,color:"#666"},e=(0,j.mq)(b)||(0,j.gb)(b);if(d.passthroughModels){let e=Object.entries(m).filter(([,a])=>a.startsWith(`${c}/`)).map(([a,b])=>({id:b.replace(`${c}/`,""),name:a,value:b}));if(e.length>0){let f=r.find(a=>a.id===b),g=f?.name||d.name;a[b]={name:g,alias:c,color:d.color,models:e}}}else if(e){let c=r.find(a=>a.id===b),e=c?.name||d.name,f=Object.entries(m).filter(([,a])=>a.startsWith(`${b}/`)).map(([a,c])=>({id:c.replace(`${b}/`,""),name:a,value:c}));f.length>0&&(a[b]={name:e,alias:c?.prefix||b,color:d.color,models:f,isCustom:!0,hasModels:!0})}else{let e=(0,i.KC)(b);e.length>0&&(a[b]={name:d.name,alias:c,color:d.color,models:e.map(a=>({id:a.id,name:a.name,value:`${c}/${a.id}`}))})}}),a},[g,m,t,r]),v=(0,e.useMemo)(()=>{if(!n.trim())return p;let a=n.toLowerCase();return p.filter(b=>b.name.toLowerCase().includes(a))},[p,n]),w=(0,e.useMemo)(()=>{if(!n.trim())return u;let a=n.toLowerCase(),b={};return Object.entries(u).forEach(([c,d])=>{let e=d.models.filter(b=>b.name.toLowerCase().includes(a)||b.id.toLowerCase().includes(a)),f=d.name.toLowerCase().includes(a);(e.length>0||f)&&(b[c]={...d,models:e})}),b},[u,n]),x=a=>{c(a),b(),o("")};return(0,d.jsxs)(h.default,{isOpen:a,onClose:()=>{b(),o("")},title:l,size:"md",className:"p-4!",children:[(0,d.jsx)("div",{className:"mb-3",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.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,d.jsx)("input",{type:"text",placeholder:"Search...",value:n,onChange:a=>o(a.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,d.jsxs)("div",{className:"max-h-[300px] overflow-y-auto space-y-3",children:[v.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,d.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",v.length,")"]})]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:v.map(a=>{let b=f===a.name;return(0,d.jsx)("button",{onClick:()=>x({id:a.name,name:a.name,value:a.name}),className:`
2
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
3
- ${b?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
- `,children:a.name},a.id)})})]}),Object.entries(w).map(([a,b])=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,d.jsx)("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:b.color}}),(0,d.jsx)("span",{className:"text-xs font-medium text-primary",children:b.name}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",b.models.length,")"]})]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.models.map(a=>{let b=f===a.value;return(0,d.jsx)("button",{onClick:()=>x(a),className:`
5
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
6
- ${b?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
- `,children:a.name},a.id)})})]},a)),0===Object.keys(w).length&&0===v.length&&(0,d.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,d.jsx)("p",{className:"text-xs",children:"No models found"})]})]})]})}l.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onSelect:g().func.isRequired,selectedModel:g().string,activeProviders:g().arrayOf(g().shape({provider:g().string.isRequired})),title:g().string,modelAliases:g().object}},83552:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({label:a,type:b="text",placeholder:c,value:f,onChange:g,error:h,hint:i,icon:j,disabled:k=!1,required:l=!1,className:m,inputClassName:n,...o}){return(0,d.jsxs)("div",{className:(0,e.cn)("flex flex-col gap-1.5",m),children:[a&&(0,d.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[a,l&&(0,d.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,d.jsxs)("div",{className:"relative",children:[j&&(0,d.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:j})}),(0,d.jsx)("input",{type:b,placeholder:c,value:f,onChange:g,disabled:k,className:(0,e.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",j&&"pl-10",h?"border-red-500 focus:border-red-500 focus:ring-red-500/20":"",n),...o})]}),h&&(0,d.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),h]}),i&&!h&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:i})]})}},85306:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(67484),f=c(42196),g=c(86739);function h({children:a}){let[b,c]=(0,e.useState)(!1);return(0,d.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[b&&(0,d.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>c(!1)}),(0,d.jsx)("div",{className:"hidden lg:flex",children:(0,d.jsx)(f.default,{})}),(0,d.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${b?"translate-x-0":"-translate-x-full"}`,children:(0,d.jsx)(f.default,{onClose:()=>c(!1)})}),(0,d.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300",children:[(0,d.jsx)(g.default,{onMenuClick:()=>c(!0)}),(0,d.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-6 lg:p-10",children:(0,d.jsx)("div",{className:"max-w-7xl mx-auto",children:a})})]})]})}},86209:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412);function i({isOpen:a,onMethodSelect:b,onClose:c}){let[f,g]=(0,e.useState)(null),[i,j]=(0,e.useState)(""),[k,l]=(0,e.useState)("us-east-1"),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),w=a=>{g(a),p(null)},x=()=>{g(null),p(null)},y=async()=>{if(!m.trim())return void p("Please enter a refresh token");r(!0),p(null);try{let a=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:m.trim()})}),b=await a.json();if(!a.ok)throw Error(b.error||"Import failed");c()}catch(a){p(a.message)}finally{r(!1)}},z=a=>{b("social",{provider:a})};return(0,d.jsx)(h.aF,{isOpen:a,title:"Connect Kiro",onClose:c,size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[!f&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,d.jsx)("button",{onClick:()=>b("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,d.jsx)("button",{onClick:()=>w("idc"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,d.jsx)("button",{onClick:()=>w("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,d.jsx)("button",{onClick:()=>w("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,d.jsx)("button",{onClick:()=>w("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})})]}),"idc"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(h.pd,{value:i,onChange:a=>j(a.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,d.jsx)(h.pd,{value:k,onChange:a=>l(a.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),o&&(0,d.jsx)("p",{className:"text-sm text-red-600",children:o}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>{i.trim()?b("idc",{startUrl:i.trim(),region:k}):p("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,d.jsx)(h.$n,{onClick:x,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,d.jsxs)("div",{className:"flex-1 text-sm",children:[(0,d.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>z("google"),fullWidth:!0,children:"Continue with Google"}),(0,d.jsx)(h.$n,{onClick:x,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,d.jsxs)("div",{className:"flex-1 text-sm",children:[(0,d.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>z("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,d.jsx)(h.$n,{onClick:x,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[s&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!s&&(0,d.jsxs)(d.Fragment,{children:[u&&(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,d.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!u&&!o&&(0,d.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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(h.pd,{value:m,onChange:a=>n(a.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),o&&(0,d.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,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:o})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:y,fullWidth:!0,disabled:q||!m.trim(),children:q?"Importing...":"Import Token"}),(0,d.jsx)(h.$n,{onClick:x,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})]})})}i.propTypes={isOpen:g().bool.isRequired,onMethodSelect:g().func.isRequired,onClose:g().func.isRequired}},86739:(a,b,c)=>{c.d(b,{default:()=>m});var d=c(48249),e=c(19099),f=c(2116),g=c.n(f),h=c(81220),i=c(49885),j=c.n(i),k=c(50412),l=c(12020);function m({onMenuClick:a,showMenuButton:b=!0}){let c=(0,e.usePathname)(),f=(0,e.useRouter)(),{title:i,description:j,breadcrumbs:m}=(a=>{if(!a)return{title:"",description:"",breadcrumbs:[]};let b=a.match(/\/providers\/([^/]+)$/);if(b){let a=b[1],c=l.zN[a]||l.fg[a];if(c)return{title:c.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:c.name,image:`/providers/${c.id}.png`}]}}return a.includes("/providers")?{title:"Providers",description:"Manage your AI provider connections",breadcrumbs:[]}:a.includes("/combos")?{title:"Combos",description:"Model combos with fallback",breadcrumbs:[]}:a.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",breadcrumbs:[]}:a.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",breadcrumbs:[]}:a.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",breadcrumbs:[]}:a.includes("/profile")?{title:"Settings",description:"Manage your preferences",breadcrumbs:[]}:"/dashboard"===a?{title:"Endpoint",description:"API endpoint configuration",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(c),n=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(f.push("/login"),f.refresh())}catch(a){console.error("Failed to logout:",a)}};return(0,d.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,d.jsx)("div",{className:"flex items-center gap-3 lg:hidden",children:b&&(0,d.jsx)("button",{onClick:a,className:"text-text-main hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,d.jsx)("div",{className:"hidden lg:flex flex-col",children:m.length>0?(0,d.jsx)("div",{className:"flex items-center gap-2",children:m.map((a,b)=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[b>0&&(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),a.href?(0,d.jsx)(g(),{href:a.href,className:"text-text-muted hover:text-primary transition-colors",children:a.label}):(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[a.image&&(0,d.jsx)(h.default,{src:a.image,alt:a.label,width:28,height:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",sizes:"28px",onError:a=>{a.currentTarget.style.display="none"}}),(0,d.jsx)("h1",{className:"text-2xl font-semibold text-text-main tracking-tight",children:a.label})]})]},`${a.label}-${a.href||"current"}`))}):i?(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-2xl font-semibold text-text-main tracking-tight",children:i}),j&&(0,d.jsx)("p",{className:"text-sm text-text-muted",children:j})]}):null}),(0,d.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,d.jsx)(k.UW,{}),(0,d.jsx)("button",{onClick:n,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,d.jsx)("span",{className:"material-symbols-outlined",children:"logout"})})]})]})}m.propTypes={onMenuClick:j().func,showMenuButton:j().bool}},91099:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({options:a=[],value:b,onChange:c,size:f="md",className:g}){let h={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,d.jsx)("div",{className:(0,e.cn)("inline-flex items-center p-1 rounded-lg","bg-black/5 dark:bg-white/5",g),children:a.map(a=>(0,d.jsxs)("button",{onClick:()=>c(a.value),className:(0,e.cn)("px-4 rounded-md font-medium transition-all",h[f],b===a.value?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[a.icon&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:a.icon}),a.label]},a.value))})}},91809:(a,b,c)=>{c.d(b,{default:()=>g});var d=c(48249),e=c(67484),f=c(17660);function g(){let[a,b]=(0,e.useState)([]),[c,g]=(0,e.useState)(!0),[h,i]=(0,e.useState)(!0);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("span",{children:"Auto Refresh (3s)"}),(0,d.jsx)("div",{onClick:()=>i(!h),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${h?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,d.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${h?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,d.jsx)(f.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,d.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:c&&0===a.length?(0,d.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===a.length?(0,d.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,d.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,d.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,d.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border/50",children:a.map((a,b)=>{let c=a.split(" | ");if(c.length<7)return null;let e=c[6],f=e.includes("PENDING"),g=e.includes("FAILED"),h=e.includes("OK");return(0,d.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${f?"bg-primary/5":""}`,children:[(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:c[0]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:c[1]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,d.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:c[2]})}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:c[3],children:c[3]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:c[4]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:c[5]}),(0,d.jsx)("td",{className:`px-3 py-1.5 font-bold ${h?"text-success":g?"text-error":"text-primary animate-pulse"}`,children:e})]},b)})})]})})}),(0,d.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are saved to log.txt in the application data directory."})]})}},95145:(a,b,c)=>{c.d(b,{ConfirmModal:()=>h,default:()=>g});var d=c(48249);c(67484);var e=c(71404),f=c(99070);function g({isOpen:a,onClose:b,title:c,children:f,footer:g,size:h="md",closeOnOverlay:i=!0,showCloseButton:j=!0,className:k}){return a?(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:i?b:void 0}),(0,d.jsxs)("div",{className:(0,e.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"}[h],k),children:[(c||j)&&(0,d.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-black/5 dark:border-white/5",children:[(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mr-4",children:[(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),c&&(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:c})]}),j&&(0,d.jsx)("button",{onClick:b,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,d.jsx)("div",{className:"p-6 max-h-[calc(80vh-140px)] overflow-y-auto",children:f}),g&&(0,d.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-black/5 dark:border-white/5",children:g})]})]}):null}function h({isOpen:a,onClose:b,onConfirm:c,title:e="Confirm",message:h,confirmText:i="Confirm",cancelText:j="Cancel",variant:k="danger",loading:l=!1}){return(0,d.jsx)(g,{isOpen:a,onClose:b,title:e,size:"sm",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.default,{variant:"ghost",onClick:b,disabled:l,children:j}),(0,d.jsx)(f.default,{variant:k,onClick:c,loading:l,children:i})]}),children:(0,d.jsx)("p",{className:"text-text-muted",children:h})})}},95514:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({checked:a=!1,onChange:b,label:c,description:f,disabled:g=!1,size:h="md",className:i}){let j={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,d.jsxs)("div",{className:(0,e.cn)("flex items-center gap-3",g&&"opacity-50 cursor-not-allowed",i),children:[(0,d.jsx)("button",{type:"button",role:"switch","aria-checked":a,disabled:g,onClick:()=>{!g&&b&&b(!a)},className:(0,e.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",a?"bg-primary":"bg-black/10 dark:bg-white/20",j[h].track,g&&"cursor-not-allowed"),children:(0,d.jsx)("span",{className:(0,e.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",a?j[h].translate:"translate-x-0.5",j[h].thumb,"mt-0.5")})}),(c||f)&&(0,d.jsxs)("div",{className:"flex flex-col",children:[c&&(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:c}),f&&(0,d.jsx)("span",{className:"text-xs text-text-muted",children:f})]})]})}},99070:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(71404);let f={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"},g={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 h({children:a,variant:b="primary",size:c="md",icon:h,iconRight:i,disabled:j=!1,loading:k=!1,fullWidth:l=!1,className:m,...n}){return(0,d.jsxs)("button",{className:(0,e.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",f[b],g[c],l&&"w-full",m),disabled:j||k,...n,children:[k?(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):h?(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:h}):null,a,i&&!k&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:i})]})}}};
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(e,s,t,a,r,i,n){return{__rewrites:{afterFiles:[{has:t,source:"/v1/v1/:path*",destination:a},{has:t,source:"/v1/v1",destination:r},{has:t,source:"/codex/:path*",destination:"/api/v1/responses"},{has:t,source:"/v1/:path*",destination:a},{has:t,source:"/v1",destination:r}],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:69,errorRate:1e-4,numBits:1323,numHashes:14,bitArray:[1,1,0,1,0,1,1,1,1,1,0,1,1,0,1,1,1,0,0,1,1,1,0,0,1,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,1,0,0,0,1,0,1,0,0,1,0,1,1,0,1,0,1,1,1,1,0,0,0,0,1,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,1,1,1,0,0,1,0,0,0,1,0,1,1,0,0,1,1,1,0,0,1,1,0,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,1,1,1,0,0,0,1,0,0,1,1,1,0,0,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1,0,1,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,1,0,0,1,0,1,1,1,1,0,0,0,1,0,0,1,1,0,0,1,1,0,1,1,1,1,0,1,0,1,0,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,0,0,0,1,1,0,0,0,1,1,1,0,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,0,1,1,1,0,1,1,0,0,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,0,1,0,0,1,1,1,0,1,1,1,1,1,1,1,0,1,0,0,1,1,0,1,0,0,0,1,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0,0,0,1,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,0,0,1,1,0,0,1,0,0,0,0,0,1,1,0,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,1,1,1,0,0,0,0,1,0,0,1,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,1,0,0,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,1,1,1,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,1,0,0,0,1,1,1,0,0,0,0,0,1,0,0,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,0,1,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,1,1,1,0,0,0,1,0,1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,1,0,1,1,0,1,1,1,0,0,1,0,1,0,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,0,1,0,1,1,1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,0,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,1,0,0,0,0,0,1,1,1,1,0,0,1,0,1,1,1,0,1,1,0,1,0,1,1,1,1,1,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,1,0,1,1,0,0,0,0,1,0,0,1,0,1,1,1,1,1,1,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,1,1,1,0,1,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,1,0,0,0,1,0,0,1,0,1,0,1,0,1,1,0,1,1,1,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,1,1,0,1,0,1,1,0,0,1,1,0,1,1,0,1,0,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,1,0,0,0,1,0,0,1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1,0,1,1,0,0,1,1,1,0,1,0,1,0,1,0,0,0,1,1,0,1,0,1,0,1,1,0,0,1,0,0,1,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,1,1,0,1,1,0,1,1]},__routerFilterDynamic:{numItems:8,errorRate:1e-4,numBits:154,numHashes:14,bitArray:[1,1,1,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,1,0,1,0,0,1,1,1,0,1,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,1,1,0,1,1,1,1,1,0,0,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1,1,0,0,1,1,0,0,0,1,1,0,1,0,0,1,0,1,0,1]},sortedPages:["/_app"]}}(0,0,void 0,"/api/v1/:path*","/api/v1",0,0),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1393],{3774:(e,s,t)=>{Promise.resolve().then(t.bind(t,5907))},5907:(e,s,t)=>{"use strict";t.d(s,{default:()=>x});var l=t(5155),r=t(2115),a=t(4051),i=t.n(a),n=t(5497),d=t(1059);let o="https://9router.com",c=15e3;function x({machineId:e}){let[s,t]=(0,r.useState)([]),[a,i]=(0,r.useState)(!0),[x,m]=(0,r.useState)(!1),[u,h]=(0,r.useState)(""),[y,p]=(0,r.useState)(null),[g,b]=(0,r.useState)(!1),[f,j]=(0,r.useState)(o),[k,v]=(0,r.useState)(o),[N,w]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!1),[$,_]=(0,r.useState)(!1),[E,P]=(0,r.useState)(!1),[A,W]=(0,r.useState)(null),[O,D]=(0,r.useState)(!1),[T,F]=(0,r.useState)(null),[I,K]=(0,r.useState)(""),{copied:U,copy:L}=(0,d.C)();(0,r.useEffect)(()=>{J(),q()},[]);let R=async(e,s=c)=>{let t=new AbortController,l=setTimeout(()=>t.abort(),s);try{let s=await fetch("/api/sync/cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e}),signal:t.signal}),l=await s.json().catch(()=>({}));return{ok:s.ok,status:s.status,data:l}}catch(e){if(e?.name==="AbortError")return{ok:!1,status:408,data:{error:"Cloud request timeout"}};return{ok:!1,status:500,data:{error:e.message||"Cloud request failed"}}}finally{clearTimeout(l)}},q=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();b(s.cloudEnabled||!1);let t=s.cloudUrl||o;j(t),v(t)}}catch(e){console.log("Error loading cloud settings:",e)}},J=async()=>{try{let e=await fetch("/api/keys"),s=await e.json();e.ok&&t(s.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{i(!1)}},z=e=>{e?S(!0):_(!0)},Q=async()=>{D(!0),K("syncing");try{let{ok:e,data:s}=await R("enable");e?(K("verifying"),s.verified?(b(!0),F({type:"success",message:"Cloud Proxy connected and verified!"})):(b(!0),F({type:"warning",message:s.verifyError||"Connected but verification failed"})),S(!1),s.createdKey&&await J()):F({type:"error",message:s.error||"Failed to enable cloud"})}catch(e){F({type:"error",message:e.message})}finally{D(!1),K("")}},V=async()=>{D(!0),K("syncing");try{await R("sync"),K("disabling");let{ok:e,data:s}=await R("disable");e?(b(!1),F({type:"success",message:"Cloud disabled"}),_(!1)):F({type:"error",message:s.error||"Failed to disable cloud"})}catch(e){console.log("Error disabling cloud:",e),F({type:"error",message:"Failed to disable cloud"})}finally{D(!1),K("")}},Z=async()=>{let e=k.trim().replace(/\/v1\/?$/,"").replace(/\/+$/,"");if(e){w(!0),W(null);try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({cloudUrl:e})})).ok?(j(e),v(e),W({type:"success",message:"Worker URL saved"})):W({type:"error",message:"Failed to save Worker URL"})}catch(e){W({type:"error",message:e.message})}finally{w(!1)}}},H=async()=>{if(f){D(!0),W(null);try{let{ok:e,data:s}=await R("check",8e3);e?W({type:"success",message:s.message||"Worker is running"}):W({type:"error",message:s.error||"Check failed"})}catch{W({type:"error",message:"Cannot reach worker"})}finally{D(!1)}}},Y=async()=>{if(u.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:u})}),s=await e.json();e.ok&&(p(s.key),await J(),h(""),m(!1))}catch(e){console.log("Error creating key:",e)}},B=async e=>{if(confirm("Delete this API key?"))try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&t(s.filter(s=>s.id!==e))}catch(e){console.log("Error deleting key:",e)}},[G,M]=(0,r.useState)("/v1"),X=f?`${f}/v1`:"";if((0,r.useEffect)(()=>{M(`${window.location.origin}/v1`)},[]),a)return(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsx)(n.Qv,{}),(0,l.jsx)(n.Qv,{})]});let ee=g?X:G;return(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsxs)(n.Zp,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-semibold",children:"API Endpoint"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:g?"Using Cloud Proxy":"Using Local Server"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"settings",onClick:()=>P(!0),children:"Setup Cloudflare"}),g?(0,l.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"cloud_off",onClick:()=>z(!1),disabled:O,className:"bg-red-500/10! text-red-500! hover:bg-red-500/20! border-red-500/30!",children:"Disable Cloud"}):(0,l.jsx)(n.$n,{variant:"primary",icon:"cloud_upload",onClick:()=>z(!0),disabled:O||!f,className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600",children:"Enable Cloud"})]})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(n.pd,{value:ee,readOnly:!0,className:`flex-1 font-mono text-sm ${g?"animate-border-glow":""}`}),(0,l.jsx)(n.$n,{variant:"secondary",icon:"endpoint_url"===U?"check":"content_copy",onClick:()=>L(ee,"endpoint_url"),children:"endpoint_url"===U?"Copied!":"Copy"})]}),T&&(0,l.jsx)("div",{className:`mt-3 p-2 rounded text-sm ${"success"===T.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===T.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:T.message})]}),(0,l.jsxs)(n.Zp,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold",children:"API Keys"}),(0,l.jsx)(n.$n,{icon:"add",onClick:()=>m(!0),children:"Create Key"})]}),0===s.length?(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,l.jsx)(n.$n,{icon:"add",onClick:()=>m(!0),children:"Create Key"})]}):(0,l.jsx)("div",{className:"flex flex-col",children:s.map(e=>(0,l.jsxs)("div",{className:"group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0",children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,l.jsx)("code",{className:"text-xs text-text-muted font-mono",children:e.key}),(0,l.jsx)("button",{onClick:()=>L(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-0 group-hover:opacity-100 transition-all",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:U===e.id?"check":"content_copy"})})]}),(0,l.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]})]}),(0,l.jsx)("button",{onClick:()=>B(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-0 group-hover:opacity-100 transition-all",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},e.id))})]}),(0,l.jsx)(n.aF,{isOpen:E,title:"Setup Cloudflare Worker",onClose:()=>{P(!1),W(null)},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-3",children:(0,l.jsxs)("p",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,l.jsx)("code",{className:"font-semibold",children:"https://9router.com"})," is a pre-configured worker ready to use. You can also deploy your own."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-medium mb-2",children:"Worker URL"}),(0,l.jsx)("div",{className:"flex gap-2",children:(0,l.jsx)(n.pd,{value:k,onChange:e=>v(e.target.value),placeholder:"https://9router.your-subdomain.workers.dev",className:"flex-1 font-mono text-sm"})}),(0,l.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Deploy your own worker from ",(0,l.jsx)("code",{className:"text-xs bg-sidebar px-1 py-0.5 rounded",children:"app/cloud/"})," directory."," ",(0,l.jsx)("a",{href:"https://github.com/decolua/9router/tree/main/app/cloud",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Setup guide →"})]})]}),A&&(0,l.jsx)("div",{className:`p-2 rounded text-sm ${"success"===A.type?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:A.message}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(n.$n,{onClick:Z,fullWidth:!0,disabled:N||!k.trim()||k.trim().replace(/\/v1\/?$/,"").replace(/\/+$/,"")===f,children:N?"Saving...":"Save"}),(0,l.jsx)(n.$n,{onClick:H,variant:"secondary",fullWidth:!0,disabled:O||!f,icon:"check_circle",children:O?"Checking...":"Check"})]})]})}),(0,l.jsx)(n.aF,{isOpen:C,title:"Enable Cloud Proxy",onClose:()=>S(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:[(0,l.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium mb-2",children:"What you will get"}),(0,l.jsxs)("ul",{className:"text-sm text-blue-700 dark:text-blue-300 space-y-1",children:[(0,l.jsx)("li",{children:"• Access your API from anywhere in the world"}),(0,l.jsx)("li",{children:"• Share endpoint with your team easily"}),(0,l.jsx)("li",{children:"• No need to open ports or configure firewall"}),(0,l.jsx)("li",{children:"• Fast global edge network"})]})]}),(0,l.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,l.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium mb-1",children:"Note"}),(0,l.jsxs)("ul",{className:"text-sm text-yellow-700 dark:text-yellow-300 space-y-1",children:[(0,l.jsx)("li",{children:"• Cloud will keep your auth session for 1 day. If not used, it will be automatically deleted."}),(0,l.jsx)("li",{children:"• Cloud is currently unstable with Claude Code OAuth in some cases."})]})]}),O&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-primary/10 border border-primary/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsxs)("p",{className:"text-sm font-medium text-primary",children:["syncing"===I&&"Syncing data to cloud...","verifying"===I&&"Verifying connection..."]})})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(n.$n,{onClick:Q,fullWidth:!0,disabled:O,children:O?(0,l.jsxs)("span",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===I?"Syncing...":"Verifying..."]}):"Enable Cloud"}),(0,l.jsx)(n.$n,{onClick:()=>S(!1),variant:"ghost",fullWidth:!0,disabled:O,children:"Cancel"})]})]})}),(0,l.jsx)(n.aF,{isOpen:x,title:"Create API Key",onClose:()=>{m(!1),h("")},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(n.pd,{label:"Key Name",value:u,onChange:e=>h(e.target.value),placeholder:"Production Key"}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(n.$n,{onClick:Y,fullWidth:!0,disabled:!u.trim(),children:"Create"}),(0,l.jsx)(n.$n,{onClick:()=>{m(!1),h("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,l.jsx)(n.aF,{isOpen:!!y,title:"API Key Created",onClose:()=>p(null),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,l.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,l.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(n.pd,{value:y||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)(n.$n,{variant:"secondary",icon:"created_key"===U?"check":"content_copy",onClick:()=>L(y,"created_key"),children:"created_key"===U?"Copied!":"Copy"})]}),(0,l.jsx)(n.$n,{onClick:()=>p(null),fullWidth:!0,children:"Done"})]})}),(0,l.jsx)(n.aF,{isOpen:$,title:"Disable Cloud Proxy",onClose:()=>!O&&_(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-red-600 dark:text-red-400",children:"warning"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium mb-1",children:"Warning"}),(0,l.jsx)("p",{className:"text-sm text-red-700 dark:text-red-300",children:"All auth sessions will be deleted from cloud."})]})]})}),O&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-primary/10 border border-primary/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsxs)("p",{className:"text-sm font-medium text-primary",children:["syncing"===I&&"Syncing latest data...","disabling"===I&&"Disabling cloud..."]})})]}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Are you sure you want to disable cloud proxy?"}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(n.$n,{onClick:V,fullWidth:!0,disabled:O,className:"bg-red-500! hover:bg-red-600! text-white!",children:O?(0,l.jsxs)("span",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===I?"Syncing...":"Disabling..."]}):"Disable Cloud"}),(0,l.jsx)(n.$n,{onClick:()=>_(!1),variant:"ghost",fullWidth:!0,disabled:O,children:"Cancel"})]})]})})]})}x.propTypes={machineId:i().string.isRequired}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8729],{85:(i,e,n)=>{n.d(e,{A:()=>t});var a=n(1934),o=n(9311),m=n(620);function d(i){let e=document.documentElement,n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===i?n:i)?e.classList.add("dark"):e.classList.remove("dark")}let t=(0,a.v)((0,o.Zr)((i,e)=>({theme:m.B2.defaultTheme,setTheme:e=>{i({theme:e}),d(e)},toggleTheme:()=>{let n="dark"===e().theme?"light":"dark";i({theme:n}),d(n)},initTheme:()=>{d(e().theme)}}),{name:m.B2.storageKey}))},620:(i,e,n)=>{n.d(e,{Q2:()=>a.Q2,fg:()=>a.fg,vQ:()=>o,MA:()=>a.MA,zN:()=>a.zN,B2:()=>m});var a=n(2679);n(8777);let o={name:"Endpoint Proxy",description:"AI Infrastructure Management",version:"0.2.81"},m={storageKey:"theme",defaultTheme:"system"}},1110:(i,e,n)=>{n.d(e,{ThemeProvider:()=>d});var a=n(5155),o=n(2115),m=n(85);function d({children:i}){let{initTheme:e}=(0,m.A)();return(0,o.useEffect)(()=>{e()},[e]),(0,a.jsx)(a.Fragment,{children:i})}},2679:(i,e,n)=>{n.d(e,{DI:()=>t,IS:()=>a,JH:()=>d,MA:()=>u,Q2:()=>r,fg:()=>m,gb:()=>c,mq:()=>l,wG:()=>s,wb:()=>p,zN:()=>o,zt:()=>g});let a={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"}},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"},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4"},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"}},m={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#6366F1",textIcon:"OR",passthroughModels:!0},glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL"},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM Coding (China)",icon:"code",color:"#DC2626",textIcon:"GC"},kimi:{id:"kimi",alias:"kimi",name:"Kimi Coding",icon:"psychology",color:"#1E3A8A",textIcon:"KM"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA"},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN"},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE"}},d="openai-compatible-",t="anthropic-compatible-";function l(i){return"string"==typeof i&&i.startsWith(d)}function c(i){return"string"==typeof i&&i.startsWith(t)}let r={...a,...o,...m},u={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function g(i){for(let e of Object.values(r))if(e.alias===i||e.id===i)return e;return null}function s(i){let e=r[i];return e?.alias||i}Object.values(r).reduce((i,e)=>(i[e.alias]=e.id,i),{}),Object.values(r).reduce((i,e)=>(i[e.id]=e.alias,i),{});let p=["antigravity","kiro","github"]},3097:(i,e,n)=>{n.d(e,{KC:()=>m,Xg:()=>o,vq:()=>a});let a={cc:[{id:"claude-opus-4-6",name:"Claude Opus 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.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"}],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-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking"},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5"},{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"},{id:"gemini-2.5-flash",name:"Gemini 2.5 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:"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-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"}],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"}],openrouter:[{id:"auto",name:"Auto (Best Available)"}],glm:[{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6v",name:"GLM 4.6V (Vision)"}],"glm-cn":[{id:"glm-4.7",name:"GLM-4.7"},{id:"glm-4.6",name:"GLM-4.6"},{id:"glm-4.5",name:"GLM-4.5"},{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.1",name:"MiniMax M2.1"}],"minimax-cn":[{id:"MiniMax-M2.1",name:"MiniMax M2.1"}]},o={claude:"cc",codex:"cx","gemini-cli":"gc",qwen:"qw",iflow:"if",antigravity:"ag",github:"gh",kiro:"kr",cursor:"cu",openai:"openai",anthropic:"anthropic",gemini:"gemini",openrouter:"openrouter",glm:"glm","glm-cn":"glm-cn",kimi:"kimi",minimax:"minimax","minimax-cn":"minimax-cn"};function m(i){return a[o[i]||i]||[]}},8777:(i,e,n)=>{n.d(e,{KC:()=>a.KC,Xg:()=>a.Xg});var a=n(3097);Object.entries(n(2679).Q2).filter(([,i])=>i.passthroughModels).map(([i])=>i),Object.entries(a.vq).flatMap(([i,e])=>e.map(e=>({provider:i,model:e.id,name:e.name})))}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{6788:(e,t,s)=>{Promise.resolve().then(s.bind(s,8982))},8982:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var a=s(5155),r=s(2115),l=s(5497),n=s(5772),i=s(4588);s(6061);var o=s(3097);function d(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function c({quotas:e=[]}){return e&&0!==e.length?(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full table-fixed",children:[(0,a.jsxs)("colgroup",{children:[(0,a.jsx)("col",{className:"w-[30%]"})," ",(0,a.jsx)("col",{className:"w-[45%]"})," ",(0,a.jsx)("col",{className:"w-[25%]"})," "]}),(0,a.jsx)("tbody",{children:e.map((e,t)=>{let s=void 0!==e.remainingPercentage?Math.round(e.remainingPercentage):d(e.used,e.total),r=s>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:s>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},l=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,s=new Date,a=t-s;if(a<=0)return"-";let r=Math.ceil(a/6e4);if(r<60)return`${r}m`;let l=Math.floor(r/60),n=r%60;if(l<24)return`${l}h ${n}m`;let i=Math.floor(l/24);return`${i}d ${l%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),n=function(e){if(!e)return null;try{let t=new Date(e),s=new Date,a=new Date(s.getFullYear(),s.getMonth(),s.getDate()),r=new Date(a);r.setDate(r.getDate()+1);let l="";l=t>=a&&t<r?"Today":t>=r&&t<new Date(r.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${l}, ${n}`}catch{return null}}(e.resetAt);return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:"py-2 px-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs",children:r.emoji}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-primary",children:e.name})]})}),(0,a.jsx)("td",{className:"py-2 px-3",children:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("div",{className:`h-1.5 rounded-full overflow-hidden border ${r.bgLight} ${0===s?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${r.bg}`,style:{width:`${Math.min(s,100)}%`}})}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${r.text}`,children:[s,"%"]})]})]})}),(0,a.jsx)("td",{className:"py-2 px-3",children:"-"!==l||n?(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==l&&(0,a.jsxs)("div",{className:"text-sm text-text-primary font-medium",children:["in ",l]}),n&&(0,a.jsx)("div",{className:"text-xs text-text-muted",children:n})]}):(0,a.jsx)("div",{className:"text-sm text-text-muted italic",children:"N/A"})})]},t)})})]})}):null}var x=s(2542),m=s(5086),u=s(2679);function h(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)({}),[h,p]=(0,r.useState)({}),[f,g]=(0,r.useState)({}),[b,j]=(0,r.useState)(!0),[v,N]=(0,r.useState)(null),[w,k]=(0,r.useState)(!1),[y,S]=(0,r.useState)(60),[C,D]=(0,r.useState)(!0),q=(0,r.useRef)(null),$=(0,r.useRef)(null),L=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers/client");if(!e.ok)throw Error("Failed to fetch connections");let s=(await e.json()).connections||[];return t(s),s}catch(e){return console.error("Error fetching connections:",e),t([]),[]}},[]),E=(0,r.useCallback)(async(e,t)=>{p(t=>({...t,[e]:!0})),g(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let s=await fetch(`/api/usage/${e}`);if(!s.ok){let a=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===s.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a),l(t=>({...t,[e]:{quotas:[],message:a}}));return}throw Error(`HTTP ${s.status}: ${a}`)}let a=await s.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let r=function(e,t){if(!t||"object"!=typeof t)return[];let s=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"claude":t.message?s.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,o.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));s.sort((t,s)=>{let a=t.modelKey||t.name,r=s.modelKey||s.name;return(e.get(a)??999)-(e.get(r)??999)})}return s}(t,a);l(t=>({...t,[e]:{quotas:r,plan:a.plan||null,message:a.message||null,raw:a}}))}catch(s){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,s),g(t=>({...t,[e]:s.message||"Failed to fetch quota"}))}finally{p(t=>({...t,[e]:!1}))}},[]),P=(0,r.useCallback)(async(e,t)=>{await E(e,t),N(new Date)},[E]),T=(0,r.useCallback)(async()=>{if(!w){k(!0),S(60);try{let e=(await L()).filter(e=>u.wb.includes(e.provider)&&"oauth"===e.authType);await Promise.all(e.map(e=>E(e.id,e.provider))),N(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{k(!1)}}},[w,L,E]);(0,r.useEffect)(()=>{(async()=>{D(!0),await T(),D(!1)})()},[]),(0,r.useEffect)(()=>{if(!b){q.current&&(clearInterval(q.current),q.current=null),$.current&&(clearInterval($.current),$.current=null);return}return q.current=setInterval(()=>{T()},6e4),$.current=setInterval(()=>{S(e=>e<=1?60:e-1)},1e3),()=>{q.current&&clearInterval(q.current),$.current&&clearInterval($.current)}},[b,T]),(0,r.useEffect)(()=>{let e=()=>{document.hidden?(q.current&&(clearInterval(q.current),q.current=null),$.current&&(clearInterval($.current),$.current=null)):b&&(q.current=setInterval(T,6e4),$.current=setInterval(()=>{S(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[b,T]);let A=(0,r.useCallback)(()=>{if(!v)return"Never";let e=Math.floor((new Date-v)/6e4),t=Math.floor(e/60),s=Math.floor(t/24);return s>0?`${s}d ago`:t>0?`${t}h ago`:e>0?`${e}m ago`:"Just now"},[v]),z=[...e.filter(e=>u.wb.includes(e.provider)&&"oauth"===e.authType)].sort((e,t)=>{let s=e=>"antigravity"===e?1:"kiro"===e?2:3,a=s(e.provider),r=s(t.provider);return a!==r?a-r:e.provider.localeCompare(t.provider)});return(z.length,Object.values(s).filter(e=>e?.quotas?.length>0).length,Object.values(s).reduce((e,t)=>t?.quotas?e+ +!!t.quotas.some(e=>30>d(e.used,e.total)&&e.total>0):e,0),C)?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(m.CardSkeleton,{}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[(0,a.jsx)(m.CardSkeleton,{}),(0,a.jsx)(m.CardSkeleton,{}),(0,a.jsx)(m.CardSkeleton,{})]})]}):0===z.length?(0,a.jsx)(i.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-primary",children:"Provider Limits"}),(0,a.jsxs)("span",{className:"text-sm text-text-muted",children:["Last updated: ",A()]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>j(e=>!e),className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-black/10 dark:border-white/10 hover:bg-black/5 dark:hover:bg-white/5 transition-colors",title:b?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${b?"text-primary":"text-text-muted"}`,children:b?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"text-sm text-text-primary",children:"Auto-refresh"}),b&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",y,"s)"]})]}),(0,a.jsx)(x.default,{variant:"secondary",size:"md",icon:"refresh",onClick:T,disabled:w,loading:w,children:"Refresh All"})]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:z.map(e=>{let t=s[e.id],r=h[e.id],l=f[e.id];return(0,a.jsxs)(i.default,{padding:"none",children:[(0,a.jsx)("div",{className:"p-6 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center overflow-hidden",children:(0,a.jsx)(n.default,{src:`/providers/${e.provider}.png`,alt:e.provider,width:40,height:40,className:"object-contain",sizes:"40px"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary capitalize",children:e.provider}),e.name&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e.name})]})]}),(0,a.jsx)("button",{onClick:()=>P(e.id,e.provider),disabled:r,className:"p-2 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] text-text-muted ${r?"animate-spin":""}`,children:"refresh"})})]})}),(0,a.jsx)("div",{className:"p-6",children:r?(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})}):l?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted",children:l})]}):t?.message?(0,a.jsx)("div",{className:"text-center py-8",children:(0,a.jsx)("p",{className:"text-sm text-text-muted",children:t.message})}):(0,a.jsx)(c,{quotas:t?.quotas})})]},e.id)})})]})}var p=s(1474);function f({isOpen:e,onClose:t,title:s,children:l,width:n="md",className:i}){let o={sm:"w-[400px]",md:"w-[500px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-full"};return((0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,r.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,a.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:(0,p.cn)("absolute right-0 top-0 h-full bg-surface shadow-2xl flex flex-col","animate-in slide-in-from-right duration-200","border-l border-black/10 dark:border-white/10",o[n]||o.md,i),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-black/5 dark:border-white/5 flex-shrink-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:s&&(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})}),(0,a.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-6",children:l})]})]}):null}function g({currentPage:e,pageSize:t,totalItems:s,onPageChange:r,onPageSizeChange:l,className:n}){let i=Math.ceil(s/t),o=s>0?(e-1)*t+1:0,d=Math.min(e*t,s),c=(()=>{let t=[],s=Math.max(1,e-2),a=Math.min(i,s+5-1);a-s+1<5&&(s=Math.max(1,a-5+1));for(let e=s;e<=a;e++)t.push(e);return t})();return(0,a.jsxs)("div",{className:(0,p.cn)("flex flex-col sm:flex-row items-center justify-between gap-4 py-4",n),children:[s>0&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["Showing ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:o})," to"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:d})," of"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[l&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,a.jsx)("select",{value:t,onChange:e=>l(Number(e.target.value)),className:(0,p.cn)("h-9 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","cursor-pointer"),children:[10,20,50].map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]}),i>1&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(x.default,{variant:"outline",size:"sm",onClick:()=>r(e-1),disabled:1===e,className:"w-9 px-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),c[0]>1&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.default,{variant:"ghost",size:"sm",onClick:()=>r(1),className:"w-9 px-0",children:"1"}),c[0]>2&&(0,a.jsx)("span",{className:"text-text-muted px-1",children:"..."})]}),c.map(t=>(0,a.jsx)(x.default,{variant:e===t?"primary":"ghost",size:"sm",onClick:()=>r(t),className:"w-9 px-0",children:t},t)),c[c.length-1]<i&&(0,a.jsxs)(a.Fragment,{children:[c[c.length-1]<i-1&&(0,a.jsx)("span",{className:"text-text-muted px-1",children:"..."}),(0,a.jsx)(x.default,{variant:"ghost",size:"sm",onClick:()=>r(i),className:"w-9 px-0",children:i})]}),(0,a.jsx)(x.default,{variant:"outline",size:"sm",onClick:()=>r(e+1),disabled:e===i,className:"w-9 px-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})]})]})}let b=null,j=null;async function v(){if(b&&j)return{providerNameCache:b,providerNodesCache:j};let e=await fetch("/api/provider-nodes"),t=(await e.json()).nodes||[];for(let e of(j={},t))j[e.id]=e.name;return{providerNameCache:b={...u.Q2,...j},providerNodesCache:j}}function N(e,t){if(!e||!t)return e;let s=t[e];if("string"==typeof s)return s;if(s?.name)return s.name;let a=(0,u.zt)(e)||u.Q2[e];return a?.name||e}function w({title:e,children:t,defaultOpen:s=!1,icon:l=null}){let[n,i]=(0,r.useState)(s);return(0,a.jsxs)("div",{className:"border border-black/5 dark:border-white/5 rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"w-full flex items-center justify-between p-3 bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:l}),(0,a.jsx)("span",{className:"font-semibold text-sm text-text-main",children:e})]}),(0,a.jsx)("span",{className:(0,p.cn)("material-symbols-outlined text-[20px] text-text-muted transition-transform duration-200",n?"rotate-90":""),children:"chevron_right"})]}),n&&(0,a.jsx)("div",{className:"p-4 border-t border-black/5 dark:border-white/5",children:t})]})}function k(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[n,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(null),[m,u]=(0,r.useState)(!1),[h,b]=(0,r.useState)([]),[j,k]=(0,r.useState)(null),[y,S]=(0,r.useState)({provider:"",startDate:"",endDate:""}),C=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/usage/providers"),t=await e.json();b(t.providers||[]);let s=await v();k(s.providerNameCache)}catch(e){console.error("Failed to fetch providers:",e)}},[]),D=(0,r.useCallback)(async()=>{o(!0);try{let e=new URLSearchParams({page:s.page.toString(),pageSize:s.pageSize.toString()});y.provider&&e.append("provider",y.provider),y.startDate&&e.append("startDate",y.startDate),y.endDate&&e.append("endDate",y.endDate);let a=await fetch(`/api/usage/request-details?${e}`),r=await a.json();t(r.details||[]),l(e=>({...e,...r.pagination}))}catch(e){console.error("Failed to fetch request details:",e)}finally{o(!1)}},[s.page,s.pageSize,y]);return(0,r.useEffect)(()=>{C()},[C]),(0,r.useEffect)(()=>{D()},[D]),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(i.default,{padding:"md",children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"provider-filter",className:"text-sm font-medium text-text-main",children:"Provider"}),(0,a.jsxs)("select",{id:"provider-filter",value:y.provider,onChange:e=>S({...y,provider:e.target.value}),className:(0,p.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","cursor-pointer min-w-[150px]"),children:[(0,a.jsx)("option",{value:"",children:"All Providers"}),h.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"start-date-filter",className:"text-sm font-medium text-text-main",children:"Start Date"}),(0,a.jsx)("input",{id:"start-date-filter",type:"datetime-local",value:y.startDate,onChange:e=>S({...y,startDate:e.target.value}),className:(0,p.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"end-date-filter",className:"text-sm font-medium text-text-main",children:"End Date"}),(0,a.jsx)("input",{id:"end-date-filter",type:"datetime-local",value:y.endDate,onChange:e=>S({...y,endDate:e.target.value}),className:(0,p.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main opacity-0","aria-hidden":"true",children:"Clear"}),(0,a.jsx)(x.default,{variant:"ghost",onClick:()=>{S({provider:"",startDate:"",endDate:""})},disabled:!y.provider&&!y.startDate&&!y.endDate,children:"Clear Filters"})]})]})}),(0,a.jsxs)(i.default,{padding:"none",children:[(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5",children:[(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Input Tokens"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Output Tokens"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Latency"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Action"})]})}),(0,a.jsx)("tbody",{children:n?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading..."]})})}):0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:"No request details found"})}):e.map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:"p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main font-mono",children:e.model}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main",children:(0,a.jsx)("span",{className:"font-medium",children:N(e.provider,j)})}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:e.tokens?.prompt_tokens?.toLocaleString()||0}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:e.tokens?.completion_tokens?.toLocaleString()||0}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-muted",children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsxs)("div",{children:["TTFT: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.ttft||0,"ms"]})]}),(0,a.jsxs)("div",{children:["Total: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.total||0,"ms"]})]})]})}),(0,a.jsx)("td",{className:"p-4 text-center",children:(0,a.jsx)(x.default,{variant:"outline",size:"sm",onClick:()=>{c(e),u(!0)},children:"Detail"})})]},`${e.id}-${t}`))})]})}),!n&&e.length>0&&(0,a.jsx)("div",{className:"border-t border-black/5 dark:border-white/5",children:(0,a.jsx)(g,{currentPage:s.page,pageSize:s.pageSize,totalItems:s.totalItems,onPageChange:e=>{l(t=>({...t,page:e}))},onPageSizeChange:e=>{l(t=>({...t,pageSize:e,page:1}))}})})]}),(0,a.jsx)(f,{isOpen:m,onClose:()=>u(!1),title:"Request Details",width:"lg",children:d&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"ID:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:d.id})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Timestamp:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:new Date(d.timestamp).toLocaleString()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Provider:"})," ",(0,a.jsx)("span",{className:"text-text-main font-medium",children:N(d.provider,j)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Model:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:d.model})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,a.jsx)("span",{className:(0,p.cn)("font-medium","success"===d.status?"text-green-600":"text-red-600"),children:d.status})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"})," ",(0,a.jsxs)("span",{className:"text-text-main font-mono",children:["TTFT ",d.latency?.ttft||0,"ms / Total ",d.latency?.total||0,"ms"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Input Tokens:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:d.tokens?.prompt_tokens?.toLocaleString()||0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Output Tokens:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:d.tokens?.completion_tokens?.toLocaleString()||0})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(w,{title:"1. Client Request (Input)",defaultOpen:!0,icon:"input",children:(0,a.jsx)("pre",{className:"bg-black/5 dark:bg-white/5 p-4 rounded-lg overflow-auto max-h-[300px] text-xs font-mono text-text-main border border-black/5 dark:border-white/5",children:JSON.stringify(d.request,null,2)})}),d.providerRequest&&(0,a.jsx)(w,{title:"2. Provider Request (Translated)",icon:"translate",children:(0,a.jsx)("pre",{className:"bg-black/5 dark:bg-white/5 p-4 rounded-lg overflow-auto max-h-[300px] text-xs font-mono text-text-main border border-black/5 dark:border-white/5",children:JSON.stringify(d.providerRequest,null,2)})}),d.providerResponse&&(0,a.jsx)(w,{title:"3. Provider Response (Raw)",icon:"data_object",children:(0,a.jsx)("pre",{className:"bg-black/5 dark:bg-white/5 p-4 rounded-lg overflow-auto max-h-[300px] text-xs font-mono text-text-main border border-black/5 dark:border-white/5",children:"object"==typeof d.providerResponse?JSON.stringify(d.providerResponse,null,2):d.providerResponse})}),(0,a.jsxs)(w,{title:"4. Client Response (Final)",defaultOpen:!0,icon:"output",children:[d.response?.thinking&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"font-semibold text-text-main mb-2 flex items-center gap-2 text-xs uppercase tracking-wide opacity-70",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"psychology"}),"Thinking Process"]}),(0,a.jsx)("pre",{className:"bg-amber-50 dark:bg-amber-950/30 p-4 rounded-lg overflow-auto max-h-[200px] text-xs font-mono text-amber-900 dark:text-amber-100 border border-amber-200 dark:border-amber-800",children:d.response.thinking})]}),(0,a.jsx)("h4",{className:"font-semibold text-text-main mb-2 text-xs uppercase tracking-wide opacity-70",children:"Content"}),(0,a.jsx)("pre",{className:"bg-black/5 dark:bg-white/5 p-4 rounded-lg overflow-auto max-h-[300px] text-xs font-mono text-text-main border border-black/5 dark:border-white/5",children:d.response?.content||"[No content]"})]})]})]})})]})}function y(){let[e,t]=(0,r.useState)("overview");return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.Iz,{options:[{value:"overview",label:"Overview"},{value:"logs",label:"Logger"},{value:"limits",label:"Limits"},{value:"details",label:"Details"}],value:e,onChange:t}),"overview"===e&&(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(l.Qv,{}),children:(0,a.jsx)(l.jK,{})}),"logs"===e&&(0,a.jsx)(l.gM,{}),"limits"===e&&(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(l.Qv,{}),children:(0,a.jsx)(h,{})}),"details"===e&&(0,a.jsx)(k,{})]})}}},e=>{e.O(0,[600,3624,8729,5497,8441,3794,7358],()=>e(e.s=6788)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204,335,552,747,748,907,931,992,1070,1088,1110,1200,1288,1451,1512,1566,1625,1666,1860,1949,2121,2296,2720,2797,3025,3038,3079,3102,3472,3549,4286,4896,5079,5107,5177,5211,5466,5745,5922,6268,6529,6580,6819,6988,7241,7429,7442,7520,7758,7851,8167,8207,8246,8453,8489,8573,8648,8814,8948,8974,8975,9027,9069,9088,9141,9321,9461],{4441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=4441)),_N_E=_.O()}]);