zevairouter 1.0.22 → 1.0.24

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 (352) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +4 -4
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  31. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  32. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  33. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  34. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  35. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  36. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  37. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  38. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  40. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  41. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  42. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  43. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  44. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  45. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  46. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  47. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  55. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  59. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  67. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  68. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  71. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  77. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  78. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  79. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  80. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  81. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  82. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  91. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  103. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  104. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  105. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  106. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  107. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  108. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  109. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  110. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  111. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  112. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  113. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  114. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  115. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  116. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  117. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  118. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  119. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  120. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  121. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  122. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  123. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  124. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  125. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  126. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  127. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  128. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  129. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  130. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  131. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  132. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  133. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  134. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  135. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  136. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  137. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  138. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  139. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  140. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  141. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  142. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  143. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  144. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  145. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  146. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  147. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  148. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  149. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  150. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  151. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  152. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  153. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  154. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  155. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  156. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  157. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  158. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  159. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  160. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  161. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  162. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  163. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  164. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  165. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  166. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  167. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  168. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  169. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  170. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  171. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  172. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  173. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  174. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  175. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  176. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  177. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  178. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  179. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  180. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  181. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  182. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  183. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  184. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  185. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  186. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  187. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  188. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  189. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  190. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  191. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  192. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  193. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  194. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  195. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  196. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  197. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  198. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  199. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  200. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  201. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  202. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  203. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  204. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  205. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  206. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  207. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  208. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  209. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  210. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  211. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  212. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  213. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  214. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  215. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  216. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  217. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  218. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  219. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  220. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  221. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  222. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  223. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  224. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  225. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  226. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  227. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  228. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  229. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  230. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  231. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  232. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  233. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  234. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  235. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  236. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  237. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  238. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  239. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  240. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  241. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  242. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  243. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  244. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  245. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  246. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  247. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  248. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  249. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  250. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  251. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  252. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  253. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  254. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  255. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  256. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  257. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  258. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  259. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  260. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  261. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  262. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  263. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  264. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  265. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  266. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  267. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  268. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  269. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  270. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  271. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  272. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  273. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  274. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  275. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  276. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  277. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  278. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  279. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  280. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  281. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  282. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  283. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  284. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  285. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  286. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  287. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  288. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  289. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  290. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  291. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  292. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  293. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  294. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  295. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  296. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  297. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  298. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  299. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  300. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  301. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  302. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  303. package/cli/app/.next-cli-build/server/app/landing.rsc +3 -3
  304. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  305. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  306. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  307. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  308. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  309. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  310. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  312. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  313. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  314. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  315. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  316. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  317. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  318. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  319. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  320. package/cli/app/.next-cli-build/server/app-paths-manifest.json +4 -4
  321. package/cli/app/.next-cli-build/server/chunks/2722.js +4 -4
  322. package/cli/app/.next-cli-build/server/chunks/2777.js +1 -1
  323. package/cli/app/.next-cli-build/server/chunks/3110.js +1 -1
  324. package/cli/app/.next-cli-build/server/chunks/3188.js +1 -1
  325. package/cli/app/.next-cli-build/server/chunks/4161.js +1 -1
  326. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  327. package/cli/app/.next-cli-build/server/chunks/6896.js +1 -1
  328. package/cli/app/.next-cli-build/server/chunks/7153.js +1 -1
  329. package/cli/app/.next-cli-build/server/chunks/915.js +1 -1
  330. package/cli/app/.next-cli-build/server/chunks/9326.js +1 -1
  331. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  332. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  333. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  334. package/cli/app/.next-cli-build/static/chunks/{1321-30fb9e012bf5fb4e.js → 1321-a6feda3a12c3e6cb.js} +1 -1
  335. package/cli/app/.next-cli-build/static/chunks/6069-3a19c2e23280b9f4.js +54 -0
  336. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-a7413a4dee869d79.js +1 -0
  337. package/cli/app/package.json +1 -1
  338. package/cli/package.json +1 -1
  339. package/open-sse/services/antigravityHeaderScrub.js +6 -3
  340. package/open-sse/services/usage.js +25 -5
  341. package/package.json +1 -1
  342. package/src/app/(dashboard)/dashboard/cli-tools/components/AntigravityToolCard.js +3 -3
  343. package/src/app/(dashboard)/dashboard/cli-tools/components/DroidToolCard.js +1 -1
  344. package/src/app/(dashboard)/dashboard/cli-tools/components/JcodeToolCard.js +1 -1
  345. package/src/app/(dashboard)/dashboard/cli-tools/components/MitmServerCard.js +4 -4
  346. package/src/app/(dashboard)/dashboard/cli-tools/components/MitmToolCard.js +1 -1
  347. package/src/app/(dashboard)/dashboard/cli-tools/components/OpenCodeToolCard.js +1 -1
  348. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.js +19 -2
  349. package/cli/app/.next-cli-build/static/chunks/6069-5289910c6c9eebbe.js +0 -54
  350. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-00add5a971054c3c.js +0 -1
  351. /package/cli/app/.next-cli-build/static/{MeDUuqUlU2UM2ozFsfnb6 → -kuRfybSB558SZoMm0iGN}/_buildManifest.js +0 -0
  352. /package/cli/app/.next-cli-build/static/{MeDUuqUlU2UM2ozFsfnb6 → -kuRfybSB558SZoMm0iGN}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{5498:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>$});var a=r(95155),s=r(12115),l=r(57250),n=r(42793);function i(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function o({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:l=!1}){let[n,c]=(0,s.useState)(1),d=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):i(e?.used,e?.total)})),[e]),u=(0,s.useMemo)(()=>"remaining-asc"===r?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,r]),m=Math.max(1,Math.ceil(u.length/10));if((0,s.useEffect)(()=>{c(1)},[r,e]),(0,s.useEffect)(()=>{c(e=>Math.min(e,m))},[m]),!e||0===e.length)return null;let x=u.slice((n-1)*10,10*n),h=0===u.length?0:(n-1)*10+1,b=Math.min(10*n,u.length),p=t?"py-1 px-1.5":"py-2 px-3",g=t?"text-[11px]":"text-sm",f=t?"text-[11px]":"text-sm",v=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[u.length," quota",u.length>1?"s":""]}),l&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:x.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=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,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let l=Math.floor(s/60),n=s%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),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let l="";l=t>=a&&t<s?"Today":t>=s&&t<new Date(s.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:`${p} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${g} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${p} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"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 ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${p} w-[25%]`,children:"-"!==l||n?t?(0,a.jsx)("div",{className:`${f} text-text-primary font-medium truncate`,title:n||"",children:"-"!==l?`in ${l}`:n}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==l&&(0,a.jsxs)("div",{className:`${f} text-text-primary font-medium`,children:["in ",l]}),n&&(0,a.jsx)("div",{className:`${v} text-text-muted`,children:n})]}):(0,a.jsx)("div",{className:`${f} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),m>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",h,"-",b," of ",u.length]}),(0,a.jsxs)("span",{children:["Page ",n," / ",m]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.max(1,e-1)),disabled:1===n,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.min(m,e+1)),disabled:n===m,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var c=r(98542),d=r(84588),u=r(35497),m=r(52679);function x(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function h(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function b(e){return m.Q2[e]?.name||e}function p(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function g(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function f(e,t){return await e(t)}let v="quotaCacheData";function y(){try{let e=window.localStorage.getItem(v);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function k(e,t){try{let r=y();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(v,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}let w="quotaAutoRefresh",j=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],N=[{value:"single",label:"Satuan",icon:"account_circle"},{value:"bulk",label:"Bulk",icon:"stacks"}],S=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],C=[10,20,50,100];function $(){let[e,t]=(0,s.useState)([]),[r,$]=(0,s.useState)({}),[A,q]=(0,s.useState)({}),[E,P]=(0,s.useState)({}),[M,D]=(0,s.useState)(!0),[T,O]=(0,s.useState)(null),[I,L]=(0,s.useState)(!1),[_,z]=(0,s.useState)(!1),[F,U]=(0,s.useState)(60),[R,J]=(0,s.useState)(!0),[K,B]=(0,s.useState)(null),[G,H]=(0,s.useState)(null),[Q,Y]=(0,s.useState)(!1),[V,W]=(0,s.useState)(null),[X,Z]=(0,s.useState)([]),[ee,et]=(0,s.useState)("all"),[er,ea]=(0,s.useState)([]),[es,el]=(0,s.useState)("single"),[en,ei]=(0,s.useState)("all"),[eo,ec]=(0,s.useState)("default"),[ed,eu]=(0,s.useState)(!1),[em,ex]=(0,s.useState)(!1),[eh,eb]=(0,s.useState)(!1),[ep,eg]=(0,s.useState)(1),[ef,ev]=(0,s.useState)(20),[ey,ek]=(0,s.useState)(String(20)),[ew,ej]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eN,eS]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eC=(0,s.useRef)(null),e$=(0,s.useRef)(null),eA=(0,s.useCallback)(async(e=ep)=>{try{var r,a;let s=new URLSearchParams({page:String(e),pageSize:String(ef),accountStatus:en,sort:"priority"});"all"!==ee&&s.set("provider",ee);let l=await fetch(`/api/providers/client?${s.toString()}`);if(!l.ok)throw Error("Failed to fetch connections");let n=await l.json(),i=n.connections||[],o=(r=n.pagination,r||{page:1,pageSize:ef,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,i.length);return t(i),ea(n.providerOptions||[]),ej(o),eS(c),eg((a=n.pagination,a?.page||e)),i}catch(e){return console.error("Error fetching connections:",e),t([]),ea([]),ej({page:1,pageSize:ef,total:0,totalPages:1}),eS({eligibleConnections:0,providerFilteredConnections:0}),[]}},[en,ep,ef,ee]),eq=(0,s.useCallback)(async(e,t,r=!1)=>{q(t=>({...t,[e]:!0})),P(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=await fetch(`/api/usage/${e}${r?"?refresh=1":""}`);if(!a.ok){let r=(await a.json().catch(()=>({}))).error||a.statusText;if(404===a.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===a.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r};$(t=>({...t,[e]:a})),k(e,a);return}throw Error(`HTTP ${a.status}: ${r}`)}let s=await a.json();console.log(`[ProviderLimits] Got quota for ${t}:`,s);let l={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.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])=>{r.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])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"autoclaw":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:"points"===e?"Points":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.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,n.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:s};$(t=>({...t,[e]:l})),k(e,l)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),P(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{q(t=>({...t,[e]:!1}))}},[]),eE=(0,s.useCallback)(async(e,t)=>{await eq(e,t),O(new Date)},[eq]),eP=(0,s.useCallback)(async(e,t)=>{e?.length&&(q(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),await Promise.all(e.map(e=>eq(e,t))),O(new Date))},[eq]),eM=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){B(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){$(t=>{let r={...t};return delete r[e],r}),q(t=>{let r={...t};return delete r[e],r}),P(t=>{let r={...t};return delete r[e],r});try{let t=y();t[e]&&(delete t[e],window.localStorage.setItem(v,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await f(eA,ep)}}catch(e){console.error("Error deleting connection:",e)}finally{B(null)}}},[eA,ep]),eD=(0,s.useCallback)(async(e,t)=>{H(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&($(e=>({...e})),await f(eA,ep))}catch(e){console.error("Error updating connection status:",e)}finally{H(null)}},[eA,ep]),eT=(0,s.useCallback)(async e=>{if(!V?.id)return;let t=V.id,r=V.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eA(),Y(!1),W(null),m.wb.includes(r)&&await eq(t,r))}catch(e){console.error("Error saving connection:",e)}},[V,eA,eq]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&Z(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eO=(0,s.useCallback)(async()=>{if(!_){z(!0),U(60);try{let e=await eA(ep);q(p(e)),P(t=>g(t,e)),$(t=>g(t,e)),await Promise.all(e.map(e=>eq(e.id,e.provider,!0))),O(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{z(!1)}}},[_,eA,eq,ep]);(0,s.useEffect)(()=>{(async()=>{J(!0);let e=await eA(ep);J(!1),q(p(e)),P(t=>g(t,e)),$(t=>g(t,e)),await Promise.all(e.map(e=>eq(e.id,e.provider))),O(new Date)})()},[eA,eq,ep]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(w);D(null===e||"true"===e),L(!0)},[]),(0,s.useEffect)(()=>{I&&window.localStorage.setItem(w,String(M))},[M,I]),(0,s.useEffect)(()=>{if(!I||!M){eC.current&&(clearInterval(eC.current),eC.current=null),e$.current&&(clearInterval(e$.current),e$.current=null);return}return eC.current=setInterval(()=>{eO()},6e4),e$.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3),()=>{eC.current&&clearInterval(eC.current),e$.current&&clearInterval(e$.current)}},[M,eO,I]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eC.current&&(clearInterval(eC.current),eC.current=null),e$.current&&(clearInterval(e$.current),e$.current=null)):M&&I&&(eC.current=setInterval(eO,6e4),e$.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[M,eO,I]);let eI=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),l=h(r,t),n="remaining-asc"===s?a-l:l-a;return 0!==n?n:(x(e)||"").localeCompare(x(r)||"")});if(!r)return e;let l=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=l(e)-l(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(x(e)||"").localeCompare(x(t)||"")})})(e,r,ed,ee,eo),[e,r,ed,ee,eo]),eL=(0,s.useMemo)(()=>{let e;return e=new Map,eI.forEach(t=>{t.provider&&(e.has(t.provider)||e.set(t.provider,[]),e.get(t.provider).push(t))}),[...e.entries()].map(([e,t])=>(function(e,t,r,a,s){if(!t.length)return null;let l=[],n=[],i=null,o=!1;return t.forEach(e=>{let t=r[e.id];Array.isArray(t?.quotas)&&l.push(...t.quotas),t?.message&&!i&&(i=t.message),s[e.id]&&n.push(s[e.id]),a[e.id]&&(o=!0)}),{id:`${e}-aggregate`,provider:e,name:b(e),email:`${t.length} accounts`,isActive:t.some(e=>e.isActive??!0),isAggregate:!0,quota:{quotas:function(e=[]){let t=new Map;return e.forEach(e=>{if(!e?.name)return;let r=t.get(e.name)||{name:e.name,used:0,total:0,resetAt:e.resetAt||null};r.used+=Number(e.used)||0,r.total+=Number(e.total)||0,e.resetAt&&(!r.resetAt||new Date(e.resetAt).getTime()<new Date(r.resetAt).getTime())&&(r.resetAt=e.resetAt),t.set(e.name,r)}),[...t.values()]}(l),message:0===l.length&&i||null},isLoading:o,error:!l.length&&n.length>0?n[0]:null,connectionIds:t.map(e=>e.id)}})(e,t,r,A,E)).filter(Boolean)},[eI,r,A,E]),e_=(0,s.useMemo)(()=>"bulk"===es?eL:eI,[es,eL,eI]),ez=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=i(e.used,e.total))},eF=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eh){eb(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await f(eA,ep)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eb(!1)}}},[eh,eA,ep]),eU="all"===ee?"All providers":ee,eR=eN.eligibleConnections>0,eJ=e_.length>0,eK=eN.eligibleConnections?eN.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ee?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===en?"turned off":"active"===en?"active":"matching"} accounts found for ${ee}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eB=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(ew),eG=!C.includes(ef);return R||eR?R||eJ?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ex(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":em,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ee?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(l.A,{src:`/providers/${ee}.png`,alt:ee,size:18,className:"size-[18px] rounded object-contain",fallbackText:ee.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:eU})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),em&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>ex(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ee&&eg(1),et("all"),ex(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ee?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ee&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:er.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ee!==e&&eg(1),et(e),ex(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ee===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(l.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ee===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("div",{className:"inline-flex h-8 overflow-hidden rounded-lg border border-black/10 bg-black/[0.02] dark:border-white/10 dark:bg-white/[0.03]",children:N.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>el(e.value),"aria-pressed":es===e.value,className:`flex h-full items-center gap-1.5 px-2 text-xs transition-colors ${es===e.value?"bg-primary text-white":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,title:`Show quota in ${e.label} mode`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e.icon}),(0,a.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.value))}),(0,a.jsx)("select",{value:en,onChange:e=>{let t=e.target.value;en!==t&&eg(1),ei(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:j.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ee&&(0,a.jsx)("select",{value:eo,onChange:e=>ec(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:S.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eu(e=>!e),"aria-pressed":ed,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${ed?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eF(eI.filter(e=>(e.isActive??!0)&&ez(e)).map(e=>e.id),!1)},disabled:eh,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eF(eI.filter(e=>!(e.isActive??!0)&&!ez(e)).map(e=>e.id),!0)},disabled:eh,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>D(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:M?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${M?"text-primary":"text-text-muted"}`,children:M?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),M&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",F,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:eO,disabled:_,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${_?"animate-spin":""}`,children:"refresh"})})]})}),ed&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e_.map(e=>{let t=!0===e.isAggregate,s=t?e.quota:r[e.id],n=t?e.isLoading:A[e.id],i=t?e.error:E[e.id],u=!1===e.isActive,m=!t&&(K===e.id||G===e.id);return(0,a.jsxs)(d.default,{padding:"none",className:`min-w-0 ${u?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(l.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.name||b(e.provider)}),x(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:x(e)}):null]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,a.jsx)("button",{type:"button",onClick:()=>t?eP(e.connectionIds,e.provider):eE(e.id,e.provider),disabled:n||m,"aria-label":"Refresh quota",className:"p-1.5 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-[18px] text-text-muted ${n?"animate-spin":""}`,children:"refresh"})}),!t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>{W(e),Y(!0)},disabled:m,"aria-label":"Edit connection",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eM(e.id),disabled:m,"aria-label":"Delete connection",className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${K===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(c.default,{size:"sm",checked:e.isActive??!0,disabled:m,onChange:t=>eD(e.id,t)})})]})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:n?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):i?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:i})]}):s?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:s.message})}):(0,a.jsx)(o,{quotas:s?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==eo})})]},e.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:eB}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:eG?"custom":String(ef),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eg(1),ev(r),ek(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[C.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:ey,onChange:e=>ek(e.target.value),onBlur:()=>{let e=Number.parseInt(ey,10);if(!Number.isFinite(e))return void ek(String(ef));let t=Math.min(500,Math.max(1,e));eg(1),ev(t),ek(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(ey,10);if(!Number.isFinite(t))return void ek(String(ef));let r=Math.min(500,Math.max(1,t));eg(1),ev(r),ek(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",ew.page," / ",ew.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eg(1),disabled:ew.page<=1||R||_,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eg(e=>Math.max(1,e-1)),disabled:ew.page<=1||R||_,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eg(e=>Math.min(ew.totalPages,e+1)),disabled:ew.page>=ew.totalPages||R||_,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eg(ew.totalPages),disabled:ew.page>=ew.totalPages||R||_,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(u.wI,{isOpen:Q,connection:V,proxyPools:X,onSave:eT,onClose:()=>{Y(!1),W(null)}})]}):(0,a.jsx)(d.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:eK.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:eK.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:eK.description})]})}):(0,a.jsx)(d.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."})]})})}}},e=>{e.O(0,[2574,3862,4343,1321,5497,8441,3794,7358],()=>e(e.s=5498)),_N_E=e.O()}]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "ZevaiRouter - AI Router with provider automation, multi-account workflows, and quota tracking",
5
5
  "bin": {
6
6
  "zevai": "./cli/cli.js"
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter-cli",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "ZevaiRouter CLI - Start and manage ZevaiRouter server",
5
5
  "bin": {
6
6
  "zevai": "./cli.js"
@@ -40,8 +40,10 @@ const HEADERS_TO_REMOVE = new Set([
40
40
  "sec-fetch-site",
41
41
  "sec-fetch-dest",
42
42
  "priority",
43
- // Encoding: Antigravity (Node.js) sends "gzip, deflate, br"; Electron adds
44
- // "zstd" which is a fingerprint mismatch.
43
+ // Drop any incoming Accept-Encoding. We must NOT set it ourselves either:
44
+ // undici (Node fetch) only auto-decompresses the response when the request
45
+ // has no explicit Accept-Encoding. Setting it manually makes undici hand back
46
+ // the raw gzip/br bytes, which then fail JSON.parse ("Invalid JSON response").
45
47
  "accept-encoding",
46
48
  ]);
47
49
 
@@ -65,7 +67,8 @@ export function scrubProxyAndFingerprintHeaders(headers) {
65
67
  }
66
68
  cleaned[key] = value;
67
69
  }
68
- cleaned["Accept-Encoding"] = "gzip, deflate, br";
70
+ // NOTE: intentionally do NOT set Accept-Encoding let undici negotiate it and
71
+ // auto-decompress the response. Setting it manually breaks JSON parsing.
69
72
  if (authorizationValue !== undefined) {
70
73
  cleaned["Authorization"] = authorizationValue;
71
74
  }
@@ -116,7 +116,7 @@ export async function getUsageForProvider(connection, proxyOptions = null) {
116
116
  case "qoder":
117
117
  return await getQoderUsage(accessToken, proxyOptions);
118
118
  case "autoclaw":
119
- return await getAutoclawUsage(accessToken, proxyOptions);
119
+ return await getAutoclawUsage(accessToken, proxyOptions, connection);
120
120
  case "qwen":
121
121
  return await getQwenUsage(accessToken, providerSpecificData);
122
122
  case "iflow":
@@ -1693,7 +1693,7 @@ async function getQoderUsage(accessToken, proxyOptions = null) {
1693
1693
  }
1694
1694
  }
1695
1695
 
1696
- async function getAutoclawUsage(accessToken, proxyOptions = null) {
1696
+ async function getAutoclawUsage(accessToken, proxyOptions = null, connection = null) {
1697
1697
  if (!accessToken) {
1698
1698
  return { message: "AutoClaw usage unavailable: no access token" };
1699
1699
  }
@@ -1713,17 +1713,37 @@ async function getAutoclawUsage(accessToken, proxyOptions = null) {
1713
1713
  }
1714
1714
  const total = Number(body.data?.total_balance);
1715
1715
  const remaining = Number.isFinite(total) ? total : 0;
1716
+
1717
+ // AutoClaw's wallet only returns the CURRENT balance, not how much was spent.
1718
+ // To show real consumption, track the highest balance ever seen (baseline)
1719
+ // in the cached snapshot: used = baseline - remaining. Baseline grows if the
1720
+ // account is topped up.
1721
+ let baseline = remaining;
1722
+ try {
1723
+ if (connection?.id) {
1724
+ const { getQuotaSnapshot } = await import("@/lib/localDb.js");
1725
+ const prev = await getQuotaSnapshot(connection.id);
1726
+ const prevBaseline = Number(prev?.usage?.quotas?.points?.total) || 0;
1727
+ const prevRemaining = Number(prev?.usage?.quotas?.points?.remaining);
1728
+ // Baseline = max(prev baseline, current remaining). If balance jumped
1729
+ // above the old baseline (top-up), adopt the new higher value.
1730
+ baseline = Math.max(prevBaseline, remaining, Number.isFinite(prevRemaining) ? prevRemaining : 0);
1731
+ }
1732
+ } catch { /* first run / no snapshot */ }
1733
+
1734
+ const used = Math.max(0, baseline - remaining);
1735
+ const pct = baseline > 0 ? Math.round((remaining / baseline) * 100) : 0;
1716
1736
  return {
1717
1737
  quotas: {
1718
1738
  points: {
1719
- total: remaining,
1720
- used: 0,
1739
+ total: baseline,
1740
+ used,
1721
1741
  remaining,
1722
1742
  unit: "points",
1723
1743
  resetAt: null,
1724
1744
  },
1725
1745
  },
1726
- totalUsagePercentage: 0,
1746
+ totalUsagePercentage: baseline > 0 ? Math.round((used / baseline) * 100) : 0,
1727
1747
  isQuotaExceeded: remaining <= 0,
1728
1748
  };
1729
1749
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "ZevaiRouter - AI Router with provider automation, multi-account workflows, and quota tracking",
5
5
  "bin": {
6
6
  "zevai": "./cli/cli.js"
@@ -391,7 +391,7 @@ export default function AntigravityToolCard({
391
391
  {!isRunning && serverIsWindows && (
392
392
  <div className="flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-yellow-500/10 text-yellow-600 border border-yellow-500/20">
393
393
  <span className="material-symbols-outlined text-[14px]">warning</span>
394
- <span>Windows: Run terminal (9Router) as Administrator to enable MITM</span>
394
+ <span>Windows: Run terminal (ZevaiRouter) as Administrator to enable MITM</span>
395
395
  </div>
396
396
  )}
397
397
 
@@ -399,12 +399,12 @@ export default function AntigravityToolCard({
399
399
  {!isRunning && (
400
400
  <div className="flex flex-col gap-1.5 px-1">
401
401
  <p className="text-xs text-text-muted">
402
- <span className="font-medium text-text-main">How it works:</span> Intercepts Antigravity traffic via DNS redirect, letting you reroute models through 9Router.
402
+ <span className="font-medium text-text-main">How it works:</span> Intercepts Antigravity traffic via DNS redirect, letting you reroute models through ZevaiRouter.
403
403
  </p>
404
404
  <div className="flex flex-col gap-0.5 text-[11px] text-text-muted">
405
405
  <span>1. Generates SSL cert & adds to system keychain</span>
406
406
  <span>2. Redirects <code className="text-[10px] bg-surface px-1 rounded">daily-cloudcode-pa.googleapis.com</code> → localhost</span>
407
- <span>3. Maps Antigravity models to any provider via 9Router</span>
407
+ <span>3. Maps Antigravity models to any provider via ZevaiRouter</span>
408
408
  </div>
409
409
  </div>
410
410
  )}
@@ -256,7 +256,7 @@ export default function DroidToolCard({
256
256
  <span className="material-symbols-outlined text-yellow-500">warning</span>
257
257
  <div className="flex-1">
258
258
  <p className="font-medium text-yellow-600 dark:text-yellow-400">Factory Droid CLI not detected locally</p>
259
- <p className="text-sm text-text-muted">Manual configuration is still available if 9router is deployed on a remote server.</p>
259
+ <p className="text-sm text-text-muted">Manual configuration is still available if ZevaiRouter is deployed on a remote server.</p>
260
260
  </div>
261
261
  </div>
262
262
  <div className="flex items-center gap-2 pl-9">
@@ -250,7 +250,7 @@ id = "${selectedModel || "cc/claude-opus-4-7"}"`;
250
250
  <code className="block mt-2 p-2 bg-black/20 rounded text-xs font-mono">
251
251
  curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash
252
252
  </code>
253
- <p className="text-sm text-text-muted mt-2">Manual configuration is still available if 9router is deployed on a remote server.</p>
253
+ <p className="text-sm text-text-muted mt-2">Manual configuration is still available if ZevaiRouter is deployed on a remote server.</p>
254
254
  </div>
255
255
  </div>
256
256
  <div className="flex items-center gap-2 pl-9">
@@ -165,17 +165,17 @@ export default function MitmServerCard({ apiKeys, cloudEnabled, onStatusChange }
165
165
  {/* Purpose & How it works */}
166
166
  <div className="px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2">
167
167
  <p className="text-[11px] text-text-muted leading-relaxed">
168
- <span className="font-medium text-text-main">Purpose:</span> Use Antigravity IDE & GitHub Copilot → with ANY provider/model from 9Router
168
+ <span className="font-medium text-text-main">Purpose:</span> Use Antigravity IDE & GitHub Copilot → with ANY provider/model from ZevaiRouter
169
169
  </p>
170
170
  <p className="text-[11px] text-text-muted leading-relaxed">
171
- <span className="font-medium text-text-main">How it works:</span> Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → 9Router → response to Antigravity/Copilot
171
+ <span className="font-medium text-text-main">How it works:</span> Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → ZevaiRouter → response to Antigravity/Copilot
172
172
  </p>
173
173
  </div>
174
174
 
175
175
  {/* Base URL + API Key — same row pattern as Claude Code / cli-tools */}
176
176
  <div className="flex flex-col gap-2">
177
177
  <div className="grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2">
178
- <span className="text-xs font-semibold text-text-main sm:text-right sm:text-sm">9Router Base URL</span>
178
+ <span className="text-xs font-semibold text-text-main sm:text-right sm:text-sm">ZevaiRouter Base URL</span>
179
179
  <span className="material-symbols-outlined hidden text-text-muted text-[14px] sm:inline">arrow_forward</span>
180
180
  <input
181
181
  type="text"
@@ -258,7 +258,7 @@ export default function MitmServerCard({ apiKeys, cloudEnabled, onStatusChange }
258
258
  {serverIsWindows && !isAdmin && (
259
259
  <div className="flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 border border-red-500/20">
260
260
  <span className="material-symbols-outlined text-[14px]">shield_lock</span>
261
- <span>Administrator required — restart 9Router as Administrator to use MITM</span>
261
+ <span>Administrator required — restart ZevaiRouter as Administrator to use MITM</span>
262
262
  </div>
263
263
  )}
264
264
  </div>
@@ -181,7 +181,7 @@ export default function MitmToolCard({
181
181
  )}
182
182
  {/* Info */}
183
183
  <div className="flex flex-col gap-0.5 text-[11px] text-text-muted px-1">
184
- <p>Toggle DNS to redirect {tool.name} traffic through 9Router via MITM.</p>
184
+ <p>Toggle DNS to redirect {tool.name} traffic through ZevaiRouter via MITM.</p>
185
185
  {!dnsActive && (
186
186
  <p className="text-amber-600 text-[10px] mt-1">
187
187
  ⚠️ Enable DNS to edit model mappings
@@ -253,7 +253,7 @@ export default function OpenCodeToolCard({ tool, isExpanded, onToggle, baseUrl,
253
253
  <span className="material-symbols-outlined text-yellow-500">warning</span>
254
254
  <div className="flex-1">
255
255
  <p className="font-medium text-yellow-600 dark:text-yellow-400">OpenCode CLI not detected locally</p>
256
- <p className="text-sm text-text-muted">Manual configuration is still available if 9router is deployed on a remote server.</p>
256
+ <p className="text-sm text-text-muted">Manual configuration is still available if ZevaiRouter is deployed on a remote server.</p>
257
257
  </div>
258
258
  </div>
259
259
  <div className="flex items-center gap-2 pl-9">
@@ -185,6 +185,24 @@ export function parseQuotaData(provider, data) {
185
185
  }
186
186
  break;
187
187
 
188
+ case "autoclaw":
189
+ // AutoClaw wallet returns absolute points. total = baseline (peak
190
+ // balance seen), used = baseline - remaining, so the bar reflects real
191
+ // consumption. Drop the absolute `remaining` field (QuotaTable would
192
+ // render it as a percentage); percentage is computed from used/total.
193
+ if (data.quotas) {
194
+ Object.entries(data.quotas).forEach(([quotaType, quota]) => {
195
+ normalizedQuotas.push({
196
+ name: quotaType === "points" ? "Points" : quotaType,
197
+ used: quota.used || 0,
198
+ total: quota.total || 0,
199
+ unit: quota.unit,
200
+ resetAt: quota.resetAt || null,
201
+ });
202
+ });
203
+ }
204
+ break;
205
+
188
206
  case "claude":
189
207
  if (data.message) {
190
208
  // Handle error message case
@@ -194,8 +212,7 @@ export function parseQuotaData(provider, data) {
194
212
  total: 0,
195
213
  resetAt: null,
196
214
  message: data.message,
197
- });
198
- } else if (data.quotas) {
215
+ }); } else if (data.quotas) {
199
216
  Object.entries(data.quotas).forEach(([name, quota]) => {
200
217
  normalizedQuotas.push({
201
218
  name,