@rabbi696/ezrouter 0.6.36 → 0.6.37

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 (697) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +31 -31
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/react-loadable-manifest.json +6 -6
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  85. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  86. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  87. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/ha/resolve/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/ha/status/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/health/status/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/models-dev/import/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/models-dev/refresh/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/models-dev/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/opendesign/device/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/settings/provider-order/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/models/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/wakeup/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/wakeup/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/callback.html +1 -1
  341. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  342. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  343. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  345. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  347. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  350. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  351. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  353. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  355. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  356. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  357. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  360. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  361. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  364. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  365. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  367. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  370. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  371. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  374. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  375. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  377. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
  380. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  381. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  384. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
  385. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  386. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
  387. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  390. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  391. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  394. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  395. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  397. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/ha.html +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/ha.rsc +4 -4
  400. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha/__PAGE__.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  404. package/app/.next-cli-build/server/app/dashboard/ha.segments/_full.segment.rsc +4 -4
  405. package/app/.next-cli-build/server/app/dashboard/ha.segments/_head.segment.rsc +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/ha.segments/_index.segment.rsc +3 -3
  407. package/app/.next-cli-build/server/app/dashboard/ha.segments/_tree.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
  410. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
  416. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
  418. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
  421. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
  427. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
  429. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
  432. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  433. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
  437. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
  439. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  442. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  443. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  448. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  450. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  453. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  458. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  460. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/models.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/models.rsc +5 -5
  463. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models/__PAGE__.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/models.segments/_full.segment.rsc +5 -5
  468. package/app/.next-cli-build/server/app/dashboard/models.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/models.segments/_index.segment.rsc +3 -3
  470. package/app/.next-cli-build/server/app/dashboard/models.segments/_tree.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  473. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  478. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  480. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  483. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  489. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  491. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  494. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  499. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  501. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  504. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  509. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  511. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  514. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  519. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  521. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  524. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  525. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  528. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  529. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  531. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
  534. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  535. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  538. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
  539. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
  541. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  546. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  547. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  549. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  556. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  561. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  563. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  566. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  570. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  571. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  573. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  576. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  577. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  580. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  581. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  583. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  586. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  587. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  588. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  590. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  591. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  593. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/wakeup.html +1 -1
  595. package/app/.next-cli-build/server/app/dashboard/wakeup.rsc +4 -4
  596. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup/__PAGE__.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  600. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_full.segment.rsc +4 -4
  601. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_head.segment.rsc +1 -1
  602. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_index.segment.rsc +3 -3
  603. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_tree.segment.rsc +1 -1
  604. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  605. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  606. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  607. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  610. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  612. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  614. package/app/.next-cli-build/server/app/index.html +1 -1
  615. package/app/.next-cli-build/server/app/index.rsc +3 -3
  616. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  618. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  619. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  620. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  622. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  623. package/app/.next-cli-build/server/app/landing.html +1 -1
  624. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  625. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  626. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  628. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  630. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  632. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  633. package/app/.next-cli-build/server/app/login.html +1 -1
  634. package/app/.next-cli-build/server/app/login.rsc +4 -4
  635. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  636. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  637. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  638. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  640. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  641. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  642. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  643. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  644. package/app/.next-cli-build/server/app-paths-manifest.json +31 -31
  645. package/app/.next-cli-build/server/chunks/169.js +1 -0
  646. package/app/.next-cli-build/server/chunks/2807.js +1 -1
  647. package/app/.next-cli-build/server/chunks/3449.js +1 -1
  648. package/app/.next-cli-build/server/chunks/4190.js +1 -1
  649. package/app/.next-cli-build/server/chunks/4606.js +1 -1
  650. package/app/.next-cli-build/server/chunks/4878.js +1 -1
  651. package/app/.next-cli-build/server/chunks/5044.js +1 -1
  652. package/app/.next-cli-build/server/chunks/5095.js +1 -1
  653. package/app/.next-cli-build/server/chunks/5461.js +1 -1
  654. package/app/.next-cli-build/server/chunks/5941.js +1 -1
  655. package/app/.next-cli-build/server/chunks/6038.js +1 -1
  656. package/app/.next-cli-build/server/chunks/6247.js +1 -1
  657. package/app/.next-cli-build/server/chunks/6328.js +1 -0
  658. package/app/.next-cli-build/server/chunks/6708.js +1 -1
  659. package/app/.next-cli-build/server/chunks/6747.js +1 -1
  660. package/app/.next-cli-build/server/chunks/6834.js +1 -1
  661. package/app/.next-cli-build/server/chunks/7099.js +1 -1
  662. package/app/.next-cli-build/server/chunks/7225.js +1 -1
  663. package/app/.next-cli-build/server/chunks/7302.js +1 -1
  664. package/app/.next-cli-build/server/chunks/7791.js +1 -1
  665. package/app/.next-cli-build/server/chunks/795.js +1 -1
  666. package/app/.next-cli-build/server/chunks/7972.js +1 -1
  667. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  668. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  669. package/app/.next-cli-build/server/chunks/869.js +1 -1
  670. package/app/.next-cli-build/server/chunks/9623.js +1 -1
  671. package/app/.next-cli-build/server/chunks/9726.js +1 -1
  672. package/app/.next-cli-build/server/chunks/9865.js +1 -1
  673. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  674. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  675. package/app/.next-cli-build/server/pages/404.html +1 -1
  676. package/app/.next-cli-build/server/pages/500.html +1 -1
  677. package/app/.next-cli-build/static/chunks/124.c2d1c1d0687829f8.js +1 -0
  678. package/app/.next-cli-build/static/chunks/{1321-cc6310fda089782b.js → 1321-74e75c31eec8e1ee.js} +1 -1
  679. package/app/.next-cli-build/static/chunks/2435.079a185c4039945c.js +1 -0
  680. package/app/.next-cli-build/static/chunks/5462.120f5564fda17134.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-f3a02dd58536e08b.js +4 -0
  682. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c9b47ee84c4ad7f2.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-af41fe6639c2bd4e.js +1 -0
  684. package/app/.next-cli-build/static/chunks/{webpack-e334136bb1f9d253.js → webpack-424ca2f55c66c54d.js} +1 -1
  685. package/app/CHANGELOG.md +19 -0
  686. package/app/package.json +1 -1
  687. package/app/public/CHANGELOG.md +19 -0
  688. package/package.json +1 -1
  689. package/app/.next-cli-build/server/chunks/6639.js +0 -1
  690. package/app/.next-cli-build/static/chunks/124.ae7fd6230e0dca05.js +0 -1
  691. package/app/.next-cli-build/static/chunks/2435.b1bd5c57b0218867.js +0 -1
  692. package/app/.next-cli-build/static/chunks/5462.e8530080addc5032.js +0 -1
  693. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-75af1cc3388a7faf.js +0 -4
  694. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-8bee73ac71f4d2a7.js +0 -1
  695. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-8d587b33c4e2e37b.js +0 -1
  696. /package/app/.next-cli-build/static/{VBj5pkomcOIYMzvV1x4oF → CWoJ3iU16eL9gSkUA7FkJ}/_buildManifest.js +0 -0
  697. /package/app/.next-cli-build/static/{VBj5pkomcOIYMzvV1x4oF → CWoJ3iU16eL9gSkUA7FkJ}/_ssgManifest.js +0 -0
@@ -1,4 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{85907:(e,t,l)=>{Promise.resolve().then(l.bind(l,97461))},97461:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>d});var r=l(95155),s=l(12115),a=l(35497),o=l(65921);function i(e,t){let l=new Set(t);return e.filter(e=>l.has(e.id)).map(e=>e.id)}function n(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}function d(){let[e,t]=(0,s.useState)([]),[l,d]=(0,s.useState)(!0),[c,x]=(0,s.useState)(!1),[p,m]=(0,s.useState)(!1),[h,u]=(0,s.useState)(!1),[y,f]=(0,s.useState)(!1),[g,j]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1),[k,N]=(0,s.useState)(!1),[w,C]=(0,s.useState)(null),[P,$]=(0,s.useState)(n()),[D,S]=(0,s.useState)(""),[T,A]=(0,s.useState)({vercelToken:"",projectName:"vercel-relay"}),[E,I]=(0,s.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[U,O]=(0,s.useState)({denoToken:"",orgDomain:"",projectName:""}),[R,F]=(0,s.useState)({netlifyToken:"",projectName:"netlify-relay"}),[z,W]=(0,s.useState)(!1),[_,L]=(0,s.useState)(!1),[q,V]=(0,s.useState)(!1),[G,M]=(0,s.useState)(null),[J,B]=(0,s.useState)([]),[H,Y]=(0,s.useState)("all"),[K,Q]=(0,s.useState)(!1),[Z,X]=(0,s.useState)({current:0,total:0}),[ee,et]=(0,s.useState)(!1),[el,er]=(0,s.useState)(null),es=(0,s.useRef)(null),ea=(0,s.useRef)(null),eo=(0,o.i)(),ei=(0,s.useMemo)(()=>"enabled"===H?e.filter(e=>!0===e.isActive):"disabled"===H?e.filter(e=>!0!==e.isActive):e,[e,H]),en=i(ei,J),ed=(0,s.useRef)([]);(0,s.useEffect)(()=>{ed.current=ei},[ei]),(0,s.useEffect)(()=>{let e=e=>{es.current&&!es.current.contains(e.target)&&N(!1)};return k&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[k]);let ec=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),l=await e.json();e.ok&&t(l.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{d(!1)}},[]);(0,s.useEffect)(()=>{ec()},[ec]);let ex=()=>{C(null),$(n())},ep=()=>{ex(),x(!0)},em=()=>{x(!1),ex()},eh=async()=>{let e={name:P.name.trim(),proxyUrl:P.proxyUrl.trim(),noProxy:P.noProxy.trim(),isActive:!0===P.isActive,strictProxy:!0===P.strictProxy};if(e.name&&e.proxyUrl){W(!0);try{let t=!!w,l=await fetch(t?`/api/proxy-pools/${w.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(l.ok)await ec(),em(),eo.success(w?"Proxy pool updated":"Proxy pool created");else{let e=await l.json();eo.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{W(!1)}}},eu=async e=>{er({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{er(null);try{let l=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(l.ok){t(t=>t.filter(t=>t.id!==e.id)),eo.success("Proxy pool deleted");return}let r=await l.json();409===l.status?eo.warning(`Cannot delete: ${r.boundConnectionCount||0} connection(s) are still using this pool.`):eo.error(r.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),eo.error("Failed to delete proxy pool")}}})},ey=async e=>{M(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),l=await t.json();if(!t.ok)return void eo.error(l.error||"Failed to test proxy");await ec(),eo.success(l.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),eo.error("Failed to test proxy")}finally{M(null)}},ef=async e=>{let l=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:l}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:l})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),eo.error("Failed to update active state"))}catch(l){console.log("Error toggling active:",l),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},eg=ei.length>0&&en.length===ei.length,ej=()=>{B([]),ea.current=null},eb=async e=>{let t=en.length>0?en:ei.map(e=>e.id);if(0!==t.length){et(!0);try{let l=0,r=0;for(let s of t)try{(await fetch(`/api/proxy-pools/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:e})})).ok?l+=1:r+=1}catch{r+=1}await ec(),eo.success(`${e?"Activated":"Deactivated"} ${l}${r?`, failed ${r}`:""}`)}finally{et(!1)}}},ev=async()=>{0!==en.length&&er({title:"Delete Proxy Pools",message:`Delete ${en.length} proxy pool(s)?`,onConfirm:async()=>{let e=i(ed.current,en);er(null),et(!0);try{let t=0,l=0,r=0;for(let s of e)try{let e=await fetch(`/api/proxy-pools/${s}`,{method:"DELETE"});e.ok?t+=1:409===e.status?l+=1:r+=1}catch{r+=1}await ec(),ej(),eo.success(`Deleted ${t}${l?`, ${l} bound`:""}${r?`, ${r} failed`:""}`)}finally{et(!1)}}})},ek=async()=>{let e=en.length>0?ei.filter(e=>en.includes(e.id)):ei;if(0===e.length)return;Q(!0),X({current:0,total:e.length});let t=0,l=[],r=0,s=[...e],a=async()=>{for(;s.length>0;){let a=s.shift();if(!a)break;try{let e=await fetch(`/api/proxy-pools/${a.id}/test`,{method:"POST"}),r=await e.json();e.ok&&r.ok?t+=1:l.push(a.id)}catch{l.push(a.id)}finally{X({current:r+=1,total:e.length})}}};await Promise.all(Array.from({length:Math.min(10,e.length)},a)),await ec(),Q(!1),X({current:0,total:0}),l.length>0?er({title:"Disable Dead Proxies",message:`Alive: ${t}, Dead: ${l.length}.
2
-
3
- Disable ${l.length} dead proxies?`,onConfirm:async()=>{er(null),et(!0);try{for(let e of l)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await ec(),eo.success(`Disabled ${l.length} dead proxies`)}finally{et(!1)}}}):eo.success(`Health check done. Alive: ${t}, Dead: ${l.length}`)};(0,s.useEffect)(()=>{B(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let eN=()=>{_||m(!1)},ew=()=>{q||u(!1)},eC=()=>{q||f(!1)},eP=()=>{q||j(!1)},e$=()=>{q||v(!1)},eD=async()=>{if(T.vercelToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(T)}),t=await e.json();e.ok?(await ec(),ew(),eo.success(`Deployed: ${t.deployUrl}`)):eo.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),eo.error("Deploy failed")}finally{V(!1)}}},eS=async()=>{if(E.accountId.trim()&&E.apiToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)}),t=await e.json();e.ok?(await ec(),eC(),eo.success(`Deployed: ${t.deployUrl}`)):eo.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),eo.error("Deploy failed")}finally{V(!1)}}},eT=async()=>{if(U.denoToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U)}),t=await e.json();e.ok?(await ec(),eP(),eo.success(`Deployed: ${t.deployUrl}`)):eo.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),eo.error("Deploy failed")}finally{V(!1)}}},eA=async()=>{if(R.netlifyToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/netlify-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),t=await e.json();e.ok?(await ec(),e$(),eo.success(`Deployed: ${t.deployUrl}`)):eo.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Netlify relay:",e),eo.error("Deploy failed")}finally{V(!1)}}},eE=async()=>{let t=D.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void eo.warning("Please paste at least one proxy line.");let l=[],r=[];if(t.forEach((e,t)=>{try{let r=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),l=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${l}`}}let l=t.split(":");if(4===l.length){let[e,t,r,s]=l;if(!e||!t||!r||!s)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(r)}:${encodeURIComponent(s)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);r&&l.push({...r,lineNumber:t+1})}catch(e){r.push(`Line ${t+1}: ${e.message}`)}}),r.length>0)return void eo.error(`Invalid proxy format:
4
- ${r.join("\n")}`);L(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),r=0,s=0,a=0;for(let e of l){let l=`${e.proxyUrl}|||`;if(t.has(l)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(r+=1,t.add(l)):a+=1}await ec(),m(!1),eo.success(`Batch import completed: Created ${r}, Skipped ${s}, Failed ${a}`)}catch(e){console.log("Error batch importing proxies:",e),eo.error("Batch import failed")}finally{L(!1)}},eI=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return l?(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsx)(a.Qv,{}),(0,r.jsx)(a.Qv,{})]}):(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("h1",{className:"text-xl font-semibold sm:text-2xl",children:"Proxy Pools"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,r.jsxs)("div",{className:"relative",ref:es,children:[(0,r.jsxs)(a.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>N(!k),children:["Deploy Relay",(0,r.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:k?"expand_less":"expand_more"})]}),k&&(0,r.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-xl border border-black/10 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-zinc-900 sm:left-auto sm:right-0",children:[(0,r.jsxs)("button",{onClick:()=>{I({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),f(!0),N(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,r.jsxs)("button",{onClick:()=>{A({vercelToken:"",projectName:"vercel-relay"}),u(!0),N(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,r.jsxs)("button",{onClick:()=>{O({denoToken:"",orgDomain:"",projectName:""}),j(!0),N(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]}),(0,r.jsxs)("button",{onClick:()=>{F({netlifyToken:"",projectName:"netlify-relay"}),v(!0),N(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-teal-500",children:"deployed_code"}),"Netlify Relay"]})]})]}),(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{S(""),m(!0)},children:"Batch Import"}),(0,r.jsx)(a.$n,{size:"sm",icon:"add",onClick:ep,children:"Add Proxy Pool"})]})]}),(0,r.jsxs)(a.Zp,{children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[(0,r.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-muted",children:["Status",(0,r.jsxs)("select",{value:H,disabled:ee||K,onChange:e=>{Y(e.target.value),ej()},className:"rounded-lg border border-border bg-background px-2 py-1.5 text-sm text-text-main",children:[(0,r.jsx)("option",{value:"all",children:"All"}),(0,r.jsx)("option",{value:"enabled",children:"Enabled"}),(0,r.jsx)("option",{value:"disabled",children:"Disabled"})]})]}),ei.length>0&&(0,r.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:eg,onChange:()=>{B(eg?[]:ei.map(e=>e.id)),ea.current=null},disabled:ee||K,className:"size-4 rounded border-black/20 dark:border-white/20"}),eg?"Unselect visible":"Select all visible"]}),(0,r.jsxs)(a.Ex,{variant:"default",children:["Total: ",e.length]}),(0,r.jsxs)(a.Ex,{variant:"success",children:["Active: ",eI]}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["Showing ",ei.length," \xb7 Shift+click to select a range"]})]}),(en.length>0||K)&&(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:en.length>0?`${en.length} selected`:"Visible pools"}),(0,r.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,r.jsx)(a.$n,{size:"sm",icon:K?"progress_activity":"health_and_safety",onClick:ek,disabled:K||ee||0===ei.length,children:K?`Checking ${Z.current}/${Z.total}`:"Health Check"}),en.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>eb(!0),disabled:ee||K,children:"Activate"}),(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>eb(!1),disabled:ee||K,children:"Deactivate"}),(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ev,disabled:ee||K,children:"Delete"}),(0,r.jsx)(a.$n,{size:"sm",variant:"ghost",onClick:ej,disabled:ee||K,children:"Clear"})]})]})]}),0===e.length?(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,r.jsx)(a.$n,{icon:"add",onClick:ep,children:"Add Proxy Pool"})]}):0===ei.length?(0,r.jsx)("p",{className:"py-10 text-center text-sm text-text-muted",children:"No proxy pools match this status."}):(0,r.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:ei.map(e=>{var t;return(0,r.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,r.jsx)("input",{type:"checkbox",checked:en.includes(e.id),onChange:t=>{var l,r,s;let a;return l=e.id,r=t.target.checked,s=!0===t.nativeEvent.shiftKey,a=ea.current,void(B(e=>(function(e,t,{id:l,anchorId:r,checked:s,shiftKey:a}){let o=e.map(e=>e.id),n=new Set(i(e,t)),d=o.indexOf(l);if(-1===d)return[...n];let c=a?o.indexOf(r):-1;for(let e of -1===c?[l]:o.slice(Math.min(c,d),Math.max(c,d)+1))s?n.add(e):n.delete(e);return o.filter(e=>n.has(e))})(ei,e,{id:l,checked:r,shiftKey:s,anchorId:a})),ea.current=l)},disabled:ee||K,"aria-label":`Select ${e.name}`,className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,r.jsx)(a.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,r.jsx)(a.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),"deno"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"deno relay"}),"netlify"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"netlify relay"}),(0,r.jsxs)(a.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,r.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,r.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,r.jsx)(a.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ef(e),title:e.isActive?"Disable":"Enable"}),(0,r.jsx)("button",{onClick:()=>ey(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:G===e.id,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:G===e.id?{animation:"spin 1s linear infinite"}:void 0,children:G===e.id?"progress_activity":"science"})}),(0,r.jsx)("button",{onClick:()=>{C(e),$(n(e)),x(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,r.jsx)("button",{onClick:()=>eu(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,r.jsx)(a.aF,{isOpen:p,title:"Batch Import Proxies",onClose:eN,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,r.jsx)("textarea",{value:D,onChange:e=>S(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] 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 focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eE,disabled:!D.trim()||_,children:_?"Importing...":"Import"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:eN,disabled:_,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:h,title:"Deploy Vercel Relay",onClose:ew,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,r.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,r.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,r.jsx)(a.pd,{label:"Vercel API Token",value:T.vercelToken,onChange:e=>A(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(a.pd,{label:"Project Name",value:T.projectName,onChange:e=>A(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eD,disabled:!T.vercelToken.trim()||q,children:q?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:ew,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:y,title:"Deploy Cloudflare Relay",onClose:eC,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,r.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,r.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"My Profile"})," → ",(0,r.jsx)("b",{children:"API Tokens"})," → ",(0,r.jsx)("b",{children:"Create Token"})]}),(0,r.jsxs)("li",{children:["Scroll down to ",(0,r.jsx)("b",{children:"Custom Token"})," and click ",(0,r.jsx)("b",{children:"Get started"})]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,r.jsx)("i",{children:"Your Account Name"})]}),(0,r.jsxs)("li",{children:["Click ",(0,r.jsx)("b",{children:"Continue to summary"})," → ",(0,r.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,r.jsx)(a.pd,{label:"Account ID",value:E.accountId,onChange:e=>I(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,r.jsx)(r.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,r.jsx)(a.pd,{label:"API Token",value:E.apiToken,onChange:e=>I(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,r.jsxs)(r.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,r.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(a.pd,{label:"Worker Name",value:E.projectName,onChange:e=>I(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eS,disabled:!E.accountId.trim()||!E.apiToken.trim()||q,children:q?"Deploying...":"Deploy Worker"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:eC,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:g,title:"Deploy Deno Relay",onClose:eP,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,r.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,r.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,r.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,r.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"console.deno.com"})]}),(0,r.jsxs)("li",{children:["Select your ",(0,r.jsx)("b",{children:"Organization"})," → ",(0,r.jsx)("b",{children:"Settings"})," → ",(0,r.jsx)("b",{children:"Organization Tokens"})]}),(0,r.jsxs)("li",{children:["Create a ",(0,r.jsx)("b",{children:"Organization Token"})," (prefix ",(0,r.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,r.jsx)(a.pd,{label:"Deno Deploy API Token",value:U.denoToken,onChange:e=>O(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,r.jsx)(r.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,r.jsx)(a.pd,{label:"Organization Domain",value:U.orgDomain,onChange:e=>O(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,r.jsx)(a.pd,{label:"App Name",value:U.projectName,onChange:e=>O(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eT,disabled:!U.denoToken.trim()||!U.orgDomain.trim()||q,children:q?"Deploying...":"Deploy Relay"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:eP,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:b,title:"Deploy Netlify Relay",onClose:e$,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-teal-500/5 border border-teal-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Netlify Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a serverless relay function to Netlify's global edge network. All AI provider requests are forwarded through Netlify's edge, masking your real IP."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Runs on Netlify Functions with a 60-second execution limit and streaming support"}),(0,r.jsx)("li",{children:"Free tier: 125,000 function invocations and 100GB bandwidth per month"}),(0,r.jsx)("li",{children:"Relay URL format: https://your-site.netlify.app/.netlify/functions/relay"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-teal-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"User Settings"})," → ",(0,r.jsx)("b",{children:"Applications"})," → ",(0,r.jsx)("b",{children:"Personal access tokens"})]}),(0,r.jsxs)("li",{children:["Select ",(0,r.jsx)("b",{children:"New access token"})," and generate a token"]}),(0,r.jsx)("li",{children:"Copy the token — you won't see it again after leaving the page"})]})]})]}),(0,r.jsx)(a.pd,{label:"Netlify API Token",value:R.netlifyToken,onChange:e=>F(t=>({...t,netlifyToken:e.target.value})),placeholder:"nfp_xxxxxxxxxxxxxxxx",hint:(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://app.netlify.com/user/applications#personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(a.pd,{label:"Site Name",value:R.projectName,onChange:e=>F(t=>({...t,projectName:e.target.value})),placeholder:"netlify-relay",hint:"Unique site name (lowercase letters, numbers, hyphens). Your relay URL will be https://site-name.netlify.app/.netlify/functions/relay"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eA,disabled:!R.netlifyToken.trim()||q,children:q?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:e$,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:c,title:w?"Edit Proxy Pool":"Add Proxy Pool",onClose:em,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(a.pd,{label:"Name",value:P.name,onChange:e=>$(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,r.jsx)(a.pd,{label:"Proxy URL",value:P.proxyUrl,onChange:e=>$(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,r.jsx)(a.pd,{label:"No Proxy",value:P.noProxy,onChange:e=>$(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,r.jsx)(a.lM,{checked:!0===P.isActive,onChange:()=>$(e=>({...e,isActive:!e.isActive})),disabled:z})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,r.jsx)(a.lM,{checked:!0===P.strictProxy,onChange:()=>$(e=>({...e,strictProxy:!e.strictProxy})),disabled:z})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eh,disabled:!P.name.trim()||!P.proxyUrl.trim()||z,children:z?"Saving...":"Save"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:z,children:"Cancel"})]})]})}),(0,r.jsx)(a.uo,{isOpen:!!el,onClose:()=>er(null),onConfirm:el?.onConfirm,title:el?.title||"Confirm",message:el?.message,variant:"danger"})]})}}},e=>{e.O(0,[763,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=85907)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{14383:(e,t,r)=>{"use strict";r.d(t,{AN:()=>a.AN,FR:()=>a.FR,MS:()=>a.MS,Mp:()=>a.Mp,fp:()=>a.fp,uN:()=>a.uN});var a=r(44923)},14558:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(95155),i=r(12115),n=r(97677);function s({connectionId:e,disabled:t=!1,onComplete:r}){let[l,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(null);async function u(){if(!l){if(d)return void c(null);o(!0);try{let t=await fetch("/api/wakeup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ping",connectionId:e})}),a=await t.json();if(!t.ok)throw Error(a.error||"Ping failed.");c(a),r&&Promise.resolve(r()).catch(()=>{})}catch(e){c({status:"failed",message:e.message})}finally{o(!1)}}}let m=l?"Pinging…":d?`${d.message} Click to reset.`:"Ping now — sends a small request. Consumes quota; does not change Auto-Ping.",x=d?"succeeded"===d.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400":"text-text-muted hover:text-primary";return(0,a.jsx)(n.default,{text:m,children:(0,a.jsx)("button",{type:"button",onClick:u,disabled:l||t&&!d,"aria-label":m,"aria-busy":l,className:`flex h-8 w-8 items-center justify-center rounded-lg ${x} hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50`,children:(0,a.jsx)("span",{"aria-hidden":"true",style:{fontSize:l?20:32},className:`material-symbols-outlined ${l?"animate-spin":""}`,children:l?"progress_activity":"play_arrow"})})})}},62022:(e,t,r)=>{Promise.resolve().then(r.bind(r,89947)),Promise.resolve().then(r.bind(r,25086))},84680:(e,t,r)=>{"use strict";r.d(t,{PM:()=>a.PM,Sj:()=>a.Sj,Vy:()=>a.Vy,fF:()=>a.fF,sl:()=>a.sl,vL:()=>a.vL,y$:()=>a.y$,zM:()=>a.zM});var a=r(44923)},89947:(e,t,r)=>{"use strict";r.d(t,{default:()=>er});var a=r(95155),i=r(12115),n=r(73321),s=r(57250),l=r(14558),o=r(89523);let d="quotaCacheData",c="quotaAutoRefresh",u="quotaTrackerPreferences",m=[10,20,50,100],x=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],p=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function h(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function g(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function b(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function f(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function y(e,t){return await e(t)}function v(){try{let e=window.localStorage.getItem(d);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function w(e,t){try{let r=v();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(d,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function k(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function j(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function N(e,t,r){let a=r?.[e]||{};return a.connections?.[t]||a}function C(e,t,r,a={},i=!0){let n=j(r);if(!e||!t||!n)return a;let s=a[e]||{},l=N(e,t,a),o=new Set(Array.isArray(l.hidden)?l.hidden.map(e=>String(e).trim()).filter(Boolean):[]);if(i?o.add(n):o.delete(n),"antigravity"===e)for(let e of o)("gemini"===n&&e.startsWith("gemini-")&&!e.includes("image")||"claude"===n&&e.startsWith("claude-"))&&o.delete(e);return{...a,[e]:{...s,connections:{...s.connections,[t]:{...s.connections?.[t],hidden:[...o]}}}}}function S(e,t,r=[],a){let i=N(e,a,t).hidden;return Array.isArray(i)&&0!==i.length?new Set((r.length>0?function(e=[],t=[]){if(!Array.isArray(e)||0===e.length)return[];let r=new Set(t.map(j).filter(Boolean));return[...new Set(e.map(e=>String(e).trim()).filter(e=>r.has(e)))]}(i,r):i).map(String)):new Set}let A={green:{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"},yellow:{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"},red:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"}};function P({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:n=!1,onHideQuota:s=null}){let[l,o]=(0,i.useState)(1),d=(0,i.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):k(e?.used,e?.total)})),[e]),c=(0,i.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]),u=Math.max(1,Math.ceil(c.length/10));if((0,i.useEffect)(()=>{o(1)},[r,e]),(0,i.useEffect)(()=>{o(e=>Math.min(e,u))},[u]),!e||0===e.length)return null;let m=c.slice((l-1)*10,10*l),x=0===c.length?0:(l-1)*10+1,p=Math.min(10*l,c.length),h=t?"py-1 px-1.5":"py-2 px-3",g=t?"text-[11px]":"text-sm",b=t?"text-[11px]":"text-sm",f=t?"text-[10px] leading-tight":"text-xs",y="function"==typeof s;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:[c.length," quota",c.length>1?"s":""]}),n&&(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:m.map(e=>{var r;let i=!0===e.unlimited,n=!0===e.isCreditBalance,l=n?{text:"text-blue-600 dark:text-blue-400",bg:"bg-blue-500",bgLight:"bg-blue-500/10",emoji:"\uD83D\uDCB0"}:A[(r=e.remaining)>70?"green":r>=30?"yellow":"red"],o=e.neverExpires?"-":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 i=Math.ceil(a/6e4);if(i<60)return`${i}m`;let n=Math.floor(i/60),s=i%60;if(n<24)return`${n}h ${s}m`;let l=Math.floor(n/24);return`${l}d ${n%24}h ${s}m`}catch(e){return"-"}}(e.resetAt),d=!e.neverExpires&&!e.resetAt&&!!e.detailUrl,c=e.neverExpires?"Never expires":d?"See details":function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),i=new Date(a);i.setDate(i.getDate()+1);let n="";n=t>=a&&t<i?"Today":t>=i&&t<new Date(i.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${n}, ${s}`}catch{return null}}(e.resetAt),u=d&&e.detailUrl?e.detailUrl:c,m=!1!==e.recurring?`in ${o}`:`expires in ${o}`,x=t=>d?(0,a.jsxs)("a",{href:e.detailUrl,target:"_blank",rel:"noopener noreferrer",className:`${t} inline-flex items-center gap-0.5 hover:text-text-primary hover:underline`,title:`Open usage details: ${u}`,"aria-label":`Open usage details for ${e.name}`,children:[c,(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]}):c;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:`${h} 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:l.emoji}),(0,a.jsx)("span",{className:`${g} font-medium text-text-primary truncate`,children:e.name}),e.runtimeLimited&&(e.runtimeActionUrl?(0,a.jsx)("a",{href:e.runtimeActionUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-600 underline decoration-dotted underline-offset-2 dark:text-amber-400",title:e.runtimeLimitReason||"Verify this Google account, then retry the model.",children:e.runtimeLimitLabel||"account blocked"}):(0,a.jsx)("span",{className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-600 dark:text-amber-400",title:e.runtimeLimitReason||"The provider runtime rejected this model even though the quota endpoint still reports capacity.",children:e.runtimeLimitLabel||"runtime limit"}))]})}),(0,a.jsx)("td",{className:`${h} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[!i&&!n&&(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${l.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 ${l.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.jsx)("span",{className:"text-text-muted",children:i?`${e.used.toLocaleString()} used \xb7 Unlimited`:n?`Credit: ${e.total.toFixed(2)} ${e.name.split(" ")[2]||""}`:e.percentageOnly?(0,a.jsx)("span",{title:e.quotaNote||"The provider does not expose an absolute request count.",children:"count unavailable"}):(0,a.jsxs)(a.Fragment,{children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞",e.unit?` ${e.unit}`:""]})}),(0,a.jsx)("span",{className:`font-medium ${i?"text-green-600 dark:text-green-400":n?"text-blue-600 dark:text-blue-400":l.text}`,children:i?"Unlimited":n?"":`${e.remaining}%`})]})]})}),(0,a.jsx)("td",{className:`${h} ${y?"w-[20%]":"w-[25%]"}`,children:"-"!==o||c?t?(0,a.jsx)("div",{className:`${b} text-text-primary font-medium truncate`,title:u||"",children:"-"!==o?m:x(b)}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==o&&(0,a.jsx)("div",{className:`${b} text-text-primary font-medium`,children:m}),c&&(0,a.jsx)("div",{className:`${f} text-text-muted`,children:x(f)})]}):(0,a.jsx)("div",{className:`${b} text-text-muted italic`,children:"N/A"})}),y&&(0,a.jsx)("td",{className:`${h} w-[5%] text-right`,children:(0,a.jsx)("button",{type:"button",onClick:()=>s(e),className:"inline-flex h-6 w-6 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5",title:"Hide this quota row","aria-label":`Hide quota ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"visibility_off"})})})]},`${e.name}-${e.index}`)})})})}),u>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 ",x,"-",p," of ",c.length]}),(0,a.jsxs)("span",{children:["Page ",l," / ",u]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>o(e=>Math.max(1,e-1)),disabled:1===l,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:()=>o(e=>Math.min(u,e+1)),disabled:l===u,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 $=r(11059);function _({connectionId:e,onDone:t,className:r=""}){let[n,s]=(0,i.useState)("idle"),[l,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(null),[u,m]=(0,i.useState)(0),{copied:x,copy:p}=(0,$.C)(),h=(0,i.useRef)(null),g=(0,i.useRef)(0),b=(0,i.useRef)(!1),f=(0,i.useRef)(!0),y=(0,i.useRef)(null),v=(0,i.useCallback)(()=>{b.current=!0,h.current&&(clearTimeout(h.current),h.current=null),y.current&&(clearInterval(y.current),y.current=null)},[]);(0,i.useEffect)(()=>(f.current=!0,()=>{f.current=!1,b.current=!0,h.current&&clearTimeout(h.current),y.current&&clearInterval(y.current),h.current=null,y.current=null}),[]);let w=(0,i.useCallback)(e=>{v(),f.current&&(s("error"),c(e||"Kh\xf4ng lấy được Control Key"))},[v]),k=(0,i.useCallback)(async r=>{if(b.current)return;let a=null,i=0;try{let t=await fetch(`/api/opendesign/device/${encodeURIComponent(r.deviceId)}?connectionId=${encodeURIComponent(e)}`,{cache:"no-store"});i=t.status,a=await t.json().catch(()=>null)}catch(e){if(b.current||!f.current)return;if(Date.now()>=g.current)return void w("Hết thời gian chờ duyệt — bấm lấy lại Control Key");j(r);return}if(!b.current&&f.current){if(a?.status==="approved"&&a?.saved===!0){v(),s("approved"),c(null),t?.();return}if(i>=500||a?.status==="error")return void w(a?.error||`Kh\xf4ng kiểm tra được trạng th\xe1i duyệt (HTTP ${i})`);if(a?.status==="denied"||a?.status==="expired")return void w("denied"===a.status?"Y\xeau cầu đ\xe3 bị từ chối tr\xean tr\xecnh duyệt — bấm lấy lại Control Key":"M\xe3 x\xe1c nhận đ\xe3 hết hạn — bấm lấy lại Control Key");if(Date.now()>=g.current)return void w("Hết thời gian chờ duyệt — bấm lấy lại Control Key");j(r)}},[e,w,t,v]);function j(e){let t=Math.max(1e3,e.intervalMs||2500);h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{h.current=null,k(e)},t)}let N=(0,i.useCallback)(e=>{v(),b.current=!1;let t=Date.parse(e.expiresAt);g.current=Number.isFinite(t)?t:Date.now()+9e5+3e5,y.current&&clearInterval(y.current);let r=()=>{f.current&&m(Math.max(0,Math.ceil((g.current-Date.now())/1e3)))};r(),y.current=setInterval(r,1e3),j(e)},[v]),C=(0,i.useCallback)(async()=>{v(),b.current=!1,s("starting"),c(null),o(null),m(0);try{let t=await fetch("/api/opendesign/device",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e})}),r=await t.json().catch(()=>null);if(!t.ok||!r?.deviceId||!r?.userCode)throw Error(r?.error||`Kh\xf4ng tạo được m\xe3 x\xe1c nhận (HTTP ${t.status})`);if(!f.current)return;o(r),s("waiting"),N(r)}catch(e){w(e?.message||"Kh\xf4ng tạo được m\xe3 x\xe1c nhận")}},[e,w,N,v]),S=(0,i.useCallback)(()=>{v(),s("idle"),c(null),o(null),m(0)},[v]);return"idle"===n||"error"===n?(0,a.jsxs)("div",{className:`space-y-1.5 ${r}`,children:[(0,a.jsxs)("button",{type:"button",onClick:"error"===n?S:C,className:"inline-flex items-center gap-1.5 rounded-lg border border-primary/30 bg-primary/5 px-2.5 py-1.5 text-[11px] font-semibold text-primary transition-colors hover:bg-primary/10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"key"}),(0,a.jsx)("span",{children:"error"===n?"Thử lại":"Lấy Control Key"})]}),"error"===n&&(0,a.jsx)("p",{className:"px-1 text-[10px] leading-relaxed text-red-600 dark:text-red-400",children:d})]}):"starting"===n?(0,a.jsxs)("div",{className:`flex items-center gap-2 px-1 py-1 text-[11px] text-text-muted ${r}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Đang tạo m\xe3 x\xe1c nhận…"})]}):"approved"===n?(0,a.jsxs)("div",{className:`flex items-center gap-2 rounded-lg border border-green-500/20 bg-green-500/10 px-2.5 py-1.5 text-[11px] font-medium text-green-700 dark:text-green-400 ${r}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"check_circle"}),(0,a.jsx)("span",{children:"Đ\xe3 lưu Control Key"})]}):(0,a.jsxs)("div",{className:`space-y-2 rounded-lg border border-primary/20 bg-primary/5 p-2.5 ${r}`,children:[(0,a.jsx)("p",{className:"text-[11px] font-medium text-text-primary",children:"Nhập m\xe3 n\xe0y tr\xean trang duyệt của OpenDesign"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("code",{className:"rounded-md border border-black/10 bg-white px-2.5 py-1 font-mono text-base font-bold tracking-[0.2em] text-text-primary dark:border-white/10 dark:bg-black/30",children:l?.userCode}),(0,a.jsxs)("button",{type:"button",onClick:()=>p(l?.userCode,"user-code"),className:"inline-flex items-center gap-1 rounded-md border border-black/10 px-1.5 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary dark:border-white/10",title:"Copy m\xe3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"user-code"===x?"check":"content_copy"}),"Copy"]})]}),l?.activationUrl&&(0,a.jsxs)("a",{href:l.activationUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[11px] font-semibold text-primary underline-offset-2 hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"open_in_new"}),"Mở trang duyệt (open-design.ai)"]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px] animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Đang chờ bạn duyệt tr\xean tr\xecnh duyệt…"}),u>0&&(0,a.jsxs)("span",{className:"tabular-nums",children:["(c\xf2n ",u,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:S,className:"text-[10px] text-text-muted underline-offset-2 hover:text-text-primary hover:underline",children:"Huỷ / lấy m\xe3 kh\xe1c"})]})}var q=r(98542),M=r(97677),E=r(84588),T=r(35497),D=r(97132),O=r(93195),F=r(88105),L=r(78177),I=r(14383),R=r(87256),z=r(5020),U=r(39768);let H=(0,i.createContext)(null);function K({id:e,disabled:t=!1,className:r="",children:i}){let{attributes:n,listeners:s,setNodeRef:l,transform:o,isDragging:d}=(0,R.gl)({id:e,disabled:t}),c={transform:U.Ks.Transform.toString(o),opacity:d?.4:1,zIndex:d?999:void 0};return(0,a.jsx)(H.Provider,{value:{attributes:n,listeners:s,isDragging:d,disabled:t},children:(0,a.jsx)("div",{ref:l,style:c,className:`min-w-0 ${d?"rounded-xl shadow-md ring-1 ring-primary/30":""} ${r}`,children:i})})}function J({title:e="Drag to move this provider"}){let t=(0,i.useContext)(H);if(!t||t.disabled)return null;let{attributes:r,listeners:n}=t;return(0,a.jsx)("button",{...r,...n,type:"button",className:"shrink-0 cursor-grab touch-none rounded p-0.5 text-text-muted transition-colors hover:text-primary active:cursor-grabbing",title:e,"aria-label":e,children:(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[(0,a.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})})}function B(e){if(!Array.isArray(e))return[];let t=new Set,r=[];for(let a of e){let e=a?.provider;"string"!=typeof e||!e||t.has(e)||(t.add(e),r.push(e))}return r}let W={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},G={claude:"claudeAutoPing",codex:"codexAutoPing",antigravity:"antigravityAutoPing"};function V(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function Q(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}let Y={five_hour:"session",seven_day:"weekly",seven_day_overage_included:"weekly",seven_day_opus:"Opus weekly",seven_day_sonnet:"Sonnet weekly"};function Z(e){let t=[...new Set((e||[]).map(e=>Y[e]).filter(Boolean))];return t.length?`${t.join(" + ")} limits`:"limits"}function X(e,t){return t?.providerSpecificData?.nodeName||F.Q2[e]?.name||e}function ee(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function et(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),i=r%24;return a>0?`${a}d ${i}h`:`${i}h`}function er(){let{copied:e,copy:t}=(0,$.C)(),r=(0,n.useSearchParams)(),N=(0,n.useRouter)(),A=(0,n.usePathname)(),[U,H]=(0,i.useState)([]),[Y,er]=(0,i.useState)({}),[ea,ei]=(0,i.useState)({}),[en,es]=(0,i.useState)({}),[el,eo]=(0,i.useState)(!0),[ed,ec]=(0,i.useState)({claude:{},codex:{},antigravity:{}}),[eu,em]=(0,i.useState)(null),[ex,ep]=(0,i.useState)(null),[eh,eg]=(0,i.useState)(!1),[eb,ef]=(0,i.useState)(!1),[ey,ev]=(0,i.useState)(!1),[ew,ek]=(0,i.useState)(60),[ej,eN]=(0,i.useState)(!0),[eC,eS]=(0,i.useState)(null),[eA,eP]=(0,i.useState)(null),[e$,e_]=(0,i.useState)(null),[eq,eM]=(0,i.useState)(null),[eE,eT]=(0,i.useState)(null),[eD,eO]=(0,i.useState)(null),[eF,eL]=(0,i.useState)(!1),[eI,eR]=(0,i.useState)(null),[ez,eU]=(0,i.useState)([]),[eH,eK]=(0,i.useState)(()=>r?.get("provider")||"all"),eJ=(0,i.useCallback)(e=>{eK(e);try{let t=new URLSearchParams(r?.toString()||"");"all"===e?t.delete("provider"):t.set("provider",e);let a=t.toString()?`${A}?${t.toString()}`:A;N.replace(a,{scroll:!1})}catch{}},[A,N,r]),[eB,eW]=(0,i.useState)([]),[eG,eV]=(0,i.useState)("all"),[eQ,eY]=(0,i.useState)("default"),[eZ,eX]=(0,i.useState)({}),[e0,e1]=(0,i.useState)(!1),[e5,e2]=(0,i.useState)(!1),[e3,e4]=(0,i.useState)(!1),[e8,e6]=(0,i.useState)(1),[e9,e7]=(0,i.useState)(20),[te,tt]=(0,i.useState)(String(20)),[tr,ta]=(0,i.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ti,tn]=(0,i.useState)({eligibleConnections:0,providerFilteredConnections:0}),ts=(0,i.useRef)(0),tl=(0,i.useCallback)(async(e=e8)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(e9),accountStatus:eG,sort:"priority"});"all"!==eH&&a.set("provider",eH);let i=await fetch(`/api/providers/client?${a.toString()}`);if(!i.ok)throw Error("Failed to fetch connections");let n=await i.json(),s=n.connections||[],l=(t=n.pagination,t||{page:1,pageSize:e9,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,s.length);return H(s),eW(n.providerOptions||[]),ta(l),tn(o),e6((r=n.pagination,r?.page||e)),s}catch(e){return console.error("Error fetching connections:",e),H([]),eW([]),ta({page:1,pageSize:e9,total:0,totalPages:1}),tn({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eG,e0,e8,e9,eH]),to=(0,i.useCallback)(async(e,t,{force:r=!1}={})=>{ei(t=>({...t,[e]:!0})),es(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=`/api/usage/${e}${r?"?force=1":""}`,i=await fetch(a);if(!i.ok){let r=(await i.json().catch(()=>({}))).error||i.statusText;if(404===i.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===i.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r};er(t=>({...t,[e]:a})),w(e,a);return}throw Error(`HTTP ${i.status}: ${r}`)}let n=await i.json();console.log(`[ProviderLimits] Got quota for ${t}:`,n);let s={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":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":if(t.quotas){let e=Object.entries(t.quotas),a=new Set(["gemini_weekly","claude_gpt_weekly","gemini_argon_weekly","argon_weekly"]),i=new Set(["gemini_session","claude_gpt_session","gemini_argon_session","argon_session"]),n=new Set([...a,...i]),s=e.filter(([e])=>e.includes("argon")),l=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")&&!e.includes("argon")),o=e.filter(([e])=>e.startsWith("claude-")),d=e.filter(([e])=>e.includes("image")),c=e.filter(([e])=>n.has(e)),u=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.includes("image")&&!n.has(e)),m=!!t.quotas.gemini_weekly,x=!!t.quotas.gemini_session,p=!!(t.quotas.gemini_argon_weekly||t.quotas.argon_weekly),h=!!(t.quotas.gemini_argon_session||t.quotas.argon_session),g=!!t.quotas.claude_gpt_weekly,b=!!t.quotas.claude_gpt_session;if(x)c.filter(([e])=>"gemini_session"===e).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})});else if(l.length>0){let e=l.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],a=t.quotas.gemini_weekly?.resetAt;m&&e.resetAt===a&&(e.remainingPercentage??0)===0||r.push({name:"Gemini (Flash / Pro)",modelKey:"gemini",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}if(m&&c.filter(([e])=>"gemini_weekly"===e).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})}),h)c.filter(([e])=>"gemini_argon_session"===e||"argon_session"===e).slice(0,1).forEach(([e,t])=>{r.push({name:t.displayName||"Gemini 4 Argon (5h)",modelKey:"gemini_argon_session",used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});else if(!p&&s.length>0){let e=s.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],a=t.quotas.gemini_session?.resetAt,i=t.quotas.gemini_weekly?.resetAt;x&&e.resetAt===a&&e.remainingPercentage===t.quotas.gemini_session?.remainingPercentage||m&&e.resetAt===i&&e.remainingPercentage===t.quotas.gemini_weekly?.remainingPercentage||r.push({name:"Gemini 4 Argon",modelKey:"gemini_argon",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}if(p&&c.filter(([e])=>"gemini_argon_weekly"===e||"argon_weekly"===e).slice(0,1).forEach(([e,t])=>{r.push({name:t.displayName||"Gemini 4 Argon (Weekly)",modelKey:"gemini_argon_weekly",used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),b)c.filter(([e])=>"claude_gpt_session"===e).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})});else if(o.length>0){let e=o.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],a=t.quotas.claude_gpt_weekly?.resetAt;g&&e.resetAt===a&&(e.remainingPercentage??0)===0||r.push({name:"Claude (Sonnet / Opus)",modelKey:"claude",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}g&&c.filter(([e])=>"claude_gpt_weekly"===e).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})}),d.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})}),g||b||u.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])=>{let a=e;"spark_session"===e?a="Spark (5h)":"spark_weekly"===e?a="Spark (Weekly)":"session"===e?a="5h":"weekly"===e?a="Weekly":"review_session"===e?a="Review (5h)":"review_weekly"===e&&(a="Review (Weekly)"),r.push({name:a,quotaType: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":case"qoder-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{t&&0!==(Number(t.total)||0)&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":"addOn"===e?"Add-on":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null,neverExpires:!0===t.neverExpires,detailUrl:t.detailUrl||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,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||100)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:k(t.used,t.total),resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":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,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":case"codebuddy-intl":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,recurring:!1!==t.recurring})});break;case"grok-cli":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,remainingPercentage:t.remainingPercentage})});break;case"kimi":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,remainingPercentage:t.remainingPercentage})});break;case"cursor":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"deepseek":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,remainingPercentage:t.remainingPercentage})});break;case"cloudflare-ai":for(let[e,a]of Object.entries(t.quotas||{}))r.push({...a,name:a.name||e});break;case"groq":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"clinepass":case"ollama":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,remainingPercentage:t.remainingPercentage,isCreditBalance:t.isCreditBalance,currency:t.currency,unit:t.unit,unlimited:t.unlimited})});break;case"clinepass":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,remainingPercentage:t.remainingPercentage})});break;case"zed":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,remainingPercentage:t.remainingPercentage,unlimited:t.unlimited})});break;case"minimax-code":case"minimax-code-global":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,message:t.message,isCreditBalance:t.isCreditBalance,currency:t.currency})});break;default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,unlimited:t.unlimited,isCreditBalance:t.isCreditBalance,currency:t.currency,unit:t.unit})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if(e?.toLowerCase()==="claude"){let e={"session (5h)":0,"weekly (7d)":1,"weekly fable (7d)":2,"weekly opus (7d)":3,"weekly sonnet (7d)":4};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}let a=(0,o.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,i=r.modelKey||r.name;return("gemini_argon"===a||"gemini_argon_session"===a)&&(a="gemini-4-argon-high"),("gemini"===a||"gemini_session"===a)&&(a="gemini-3.8-flash-high"),("claude"===a||"claude_gpt_session"===a)&&(a="claude-sonnet-4-6"),("gemini_argon"===i||"gemini_argon_session"===i)&&(i="gemini-4-argon-high"),("gemini"===i||"gemini_session"===i)&&(i="gemini-3.8-flash-high"),("claude"===i||"claude_gpt_session"===i)&&(i="claude-sonnet-4-6"),(e.get(a)??999)-(e.get(i)??999)})}return r}(t,n),plan:n.plan||null,message:n.message||null,raw:n};er(t=>({...t,[e]:s})),w(e,s)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),es(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{ei(t=>({...t,[e]:!1}))}},[]),td=(0,i.useCallback)(async(e,t)=>{await to(e,t,{force:!0}),ep(new Date)},[to]),tc=(0,i.useCallback)(async(e,t)=>{if(("codex"===t||"claude"===t)&&!eq){eM(e),es(t=>({...t,[e]:null}));try{let r="claude"===t?await fetch(`/api/usage/${e}/claude-reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantId:Y[e]?.raw?.resetCredits?.nextGrantId})}):await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset limit");await to(e,t,{force:!0}),ep(new Date)}catch(t){es(r=>({...r,[e]:t.message||"Failed to reset limit"}))}finally{eM(null)}}},[to,eq,Y]),tu=(0,i.useCallback)((e,t)=>{eO({connection:e,loading:!1,error:null,data:{kind:"claude",...t}})},[]),tm=(0,i.useCallback)(async e=>{eO({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eO({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eO({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),tx=(0,i.useCallback)(async e=>{if(confirm("Delete this connection?")){eS(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){er(t=>{let r={...t};return delete r[e],r}),ei(t=>{let r={...t};return delete r[e],r}),es(t=>{let r={...t};return delete r[e],r});try{let t=v();t[e]&&(delete t[e],window.localStorage.setItem(d,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await y(tl,e8)}}catch(e){console.error("Error deleting connection:",e)}finally{eS(null)}}},[tl,e8]),tp=(0,i.useCallback)(async(e,t)=>{eP(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(er(e=>({...e})),await y(tl,e8))}catch(e){console.error("Error updating connection status:",e)}finally{eP(null)}},[tl,e8]),th=(0,i.useCallback)(async(e,t)=>{if(!e$){e_(e.id);try{let r=await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{fastMode:t,..."codex"===e.provider?{codexFastMode:t}:{}}})}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.error||"Failed to save fast mode");H(r=>r.map(r=>r.id===e.id?{...r,providerSpecificData:{...r.providerSpecificData,fastMode:t,..."codex"===e.provider?{codexFastMode:t}:{}}}:r))}catch(e){alert(e.message||"Failed to save fast mode")}finally{e_(null)}}},[e$]),tg=(0,i.useCallback)(async e=>{if(!eI?.id)return;let t=eI.id,r=eI.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tl(),eL(!1),eR(null),F.wb.includes(r)&&await to(t,r))}catch(e){console.error("Error saving connection:",e)}},[eI,tl,to]),tb=(0,i.useCallback)(async(e,t,r)=>{let a=U.find(t=>t.id===e);if(!a)return;let i={...a.quotaPauseThresholds&&"object"==typeof a.quotaPauseThresholds?a.quotaPauseThresholds:{}},n=Number(r);Number.isFinite(n)&&n>0&&n<=100?i[t]=n:delete i[t];try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaPauseThresholds:i})})).ok&&H(t=>t.map(t=>t.id===e?{...t,quotaPauseThresholds:i}:t))}catch(e){console.error("Error updating quota threshold:",e)}},[U]);(0,i.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&eU(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let tf=(0,i.useCallback)(async(e=!1)=>{if(ey)return;ev(!0),ek(60);let t=ts.current+=1;try{let r=await tl(e8),a=function(e,{force:t=!1,tick:r=0}={}){if(t)return e;let a=Math.round(10);return e.filter(e=>"claude"!==e.provider||r%a==0)}(r,{force:e,tick:t});ei(b(a)),es(e=>f(e,r)),er(e=>f(e,r)),await Promise.all(a.map(e=>to(e.id,e.provider))),ep(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{ev(!1)}},[ey,tl,to,e8]);(0,i.useEffect)(()=>{(async()=>{eN(!0);let e=await tl(e8);eN(!1),ei(b(e)),es(t=>f(t,e)),er(t=>f(t,e)),await Promise.all(e.map(e=>to(e.id,e.provider))),ep(new Date)})()},[tl,to,e8]),(0,i.useEffect)(()=>{let e=window.localStorage.getItem(c);eo(null===e||"true"===e),eg(!0)},[]),(0,i.useEffect)(()=>{eh&&window.localStorage.setItem(c,String(el))},[el,eh]),(0,i.useEffect)(()=>{try{let e=window.localStorage.getItem(u);if(e){let t=JSON.parse(e);if(t?.accountFilter&&["all","active","inactive"].includes(t.accountFilter)&&eV(t.accountFilter),t?.pageSize){let e=Number(t.pageSize);Number.isFinite(e)&&e>0&&(e7(e),tt(String(e)))}}}catch{}ef(!0)},[]),(0,i.useEffect)(()=>{if(eb)try{window.localStorage.setItem(u,JSON.stringify({accountFilter:eG,pageSize:e9}))}catch{}},[eG,e9,eb]),(0,i.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{ec({claude:e?.claudeAutoPing||{},codex:e?.codexAutoPing||{},antigravity:e?.antigravityAutoPing||{}}),eX(e?.quotaVisibility||{})}).catch(()=>{})},[]);let ty=(0,i.useCallback)(async(e,t,{reactive:r,schedule:a})=>{let i=G[t];if(!i)return;let n=ed[t]||{},s={...n,connections:{...n.connections||{},[e]:r},schedules:{...n.schedules||{},[e]:a}};ec({...ed,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[i]||{},connections:s.connections,schedules:s.schedules};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[i]:t})})}catch{ec(ed)}},[ed]),tv=(0,i.useCallback)(async(e,t)=>{eX(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eX(t)}},[]),tw=(0,i.useCallback)((e,t,r)=>{tv(C(e,t,r,eZ,!0),eZ)},[eZ,tv]),tk=(0,i.useCallback)((e,t,r)=>{tv(C(e,t,r,eZ,!1),eZ)},[eZ,tv]),tj=(0,i.useRef)(tf);(0,i.useEffect)(()=>{tj.current=tf},[tf]);let tN=(0,i.useMemo)(()=>(function({onRefresh:e,onTick:t,refreshIntervalMs:r,tickMs:a=1e3}){let i=null,n=null,s=()=>{null!==i&&(clearInterval(i),i=null),null!==n&&(clearInterval(n),n=null)};return{start:()=>{s(),i=setInterval(()=>e(),r),n=setInterval(()=>t(),a)},stop:s,isRunning:()=>null!==i||null!==n}})({onRefresh:()=>tj.current(),onTick:()=>ek(e=>e<=1?60:e-1),refreshIntervalMs:6e4}),[]);(0,i.useEffect)(()=>!eh||!el||"u">typeof document&&document.hidden?void tN.stop():(tN.start(),()=>tN.stop()),[el,eh,tN]),(0,i.useEffect)(()=>{let e=()=>{document.hidden?tN.stop():el&&eh&&tN.start()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e),tN.stop()}},[el,eh,tN]);let tC=(0,i.useMemo)(()=>(function(e,t,r,a,i){if("codex"===a&&"default"!==i)return[...e].sort((e,r)=>{let a=g(e,t),n=g(r,t),s="remaining-asc"===i?a-n:n-a;return 0!==s?s:(h(e)||"").localeCompare(h(r)||"")});if(!r){let t=new Map;for(let r of e){let e=r.provider||"";t.has(e)||t.set(e,[]),t.get(e).push(r)}return Array.from(t.values()).flat()}let n=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=n(e)-n(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(h(e)||"").localeCompare(h(t)||"")})})(U,Y,e0,eH,eQ),[U,Y,e0,eH,eQ]),[tS,tA]=(0,i.useState)(!1),tP=e0||tS,t$=(0,I.FR)((0,I.MS)(I.AN,{activationConstraint:{distance:5}}),(0,I.MS)(I.uN,{coordinateGetter:R.JR})),t_=(0,i.useMemo)(()=>tC.map(e=>e.id),[tC]),tq=(0,i.useCallback)(async e=>{let{active:t,over:r}=e;if(!r||t.id===r.id)return;let a=tC.find(e=>e.id===t.id),i=tC.find(e=>e.id===r.id);if(!a||!i||a.provider===i.provider)return;let n=function(e,t,r){if(!Array.isArray(e)||!t||!r||t===r)return e;let a=B(e),i=a.indexOf(t),n=a.indexOf(r);if(-1===i||-1===n||i===n)return e;let s=function(e,t,r){let a=[...e];if(!Number.isInteger(t)||!Number.isInteger(r)||t<0||t>=a.length)return a;let i=Math.max(0,Math.min(a.length-1,r));if(t===i)return a;let[n]=a.splice(t,1);return a.splice(i,0,n),a}(a,i,n),l=new Map;for(let t of e){let e=t?.provider;l.has(e)||l.set(e,[]),l.get(e).push(t)}let o=[];for(let e of s){let t=l.get(e);t&&o.push(...t)}if(o.length!==e.length){let t=new Set(o);for(let r of e)t.has(r)||o.push(r)}return o}(tC,a.provider,i.provider);if(n!==tC){H(n),tA(!0);try{let e=await fetch("/api/settings/provider-order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:B(n)})});if(!e.ok)throw Error(`Provider order save failed (${e.status})`)}catch(e){console.error("Error saving provider order:",e),await tl()}finally{tA(!1)}}},[tC,tl]),tM=e=>{let t=Y[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=k(e.used,e.total))},tE=(0,i.useCallback)(async(e,t)=>{if(e.length&&!e3){e4(!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 y(tl,e8)}catch(e){console.error("Error bulk toggling connections:",e)}finally{e4(!1)}}},[e3,tl,e8]),tT="all"===eH?"All providers":eH,tD=ti.eligibleConnections>0,tO=tC.length>0,tF=ti.eligibleConnections?ti.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"===eH?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eG?"turned off":"active"===eG?"active":"matching"} accounts found for ${eH}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tL=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}`}(tr),tI=!m.includes(e9);return ej||tD?ej||tO?(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:()=>e2(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":e5,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===eH?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(s.A,{src:`/providers/${eH}.png`,alt:eH,size:18,className:"size-[18px] rounded object-contain",fallbackText:eH.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:tT})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),e5&&(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:()=>e2(!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"!==eH&&e6(1),eJ("all"),e2(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===eH?"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"===eH&&(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:eB.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{eH!==e&&e6(1),eJ(e),e2(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${eH===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(s.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}),eH===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eG,onChange:e=>{let t=e.target.value;eG!==t&&e6(1),eV(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:x.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===eH&&(0,a.jsx)("select",{value:eQ,onChange:e=>eY(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:p.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>e1(e=>!e),"aria-pressed":e0,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${e0?"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:()=>{tE(tC.filter(e=>(e.isActive??!0)&&tM(e)).map(e=>e.id),!1)},disabled:e3,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:()=>{tE(tC.filter(e=>!(e.isActive??!0)&&!tM(e)).map(e=>e.id),!0)},disabled:e3,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:()=>eo(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:el?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${el?"text-primary":"text-text-muted"}`,children:el?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),el&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",ew,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>tf(!0),disabled:ey,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] ${ey?"animate-spin":""}`,children:"refresh"})})]})}),e0&&(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)(I.Mp,{sensors:t$,collisionDetection:I.fp,onDragEnd:tq,modifiers:[z.gj],children:(0,a.jsx)(R.gB,{items:t_,strategy:R.kL,children:(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:tC.map(r=>{let i,n,o,d,c=Y[r.id],u=ea[r.id],m=en[r.id],x=!1===r.isActive,p="codex"===r.provider,g=p?(i=c?.plan?.trim())&&"unknown"!==i.toLowerCase()?i:r?.providerSpecificData?.chatgptPlanType?.trim()||null:null,b="claude"===r.provider?c?.raw?.resetCredits:null,f=p?"Codex reset credit":"Claude limit reset",y=Number.isFinite(o="number"==typeof(n=c?.raw?.resetCredits?.availableCount)?n:Number(n))?Math.max(0,o):0,v=eq===r.id,w=e$===r.id,k=eC===r.id||eA===r.id||v||w,N="opendesign-go"===r.provider&&!m&&"string"==typeof c?.message&&(c.message.includes("chưa cấu h\xecnh Control Key")||c.message.toLowerCase().includes("control key")),C=c?.quotas||[],A=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let i=S(e,r,t,a);return 0===i.size?t:t.filter(e=>!i.has(j(e)))}(r.provider,C,eZ,r.id),$=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let i=S(e,r,t,a);return 0===i.size?[]:t.filter(e=>i.has(j(e)))}(r.provider,C,eZ,r.id),D=(0,L.XD)(r);return(0,a.jsx)(K,{id:r.id,disabled:tP,children:(0,a.jsxs)(E.default,{padding:"none",className:`min-w-0 ${x?"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)(J,{title:e0?"Provider order is disabled while “Expiring first” is on":`Drag to move ${X(r.provider,r)} up or down`}),(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(s.A,{src:`/providers/${r.provider}.png`,alt:r.provider,size:32,className:"object-contain",fallbackText:r.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 truncate",children:X(r.provider,r)}),h(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:h(r)}):null,V(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:V(r)}):null,g?(0,a.jsx)("span",{className:"mt-1 inline-flex rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:g}):null,D.enabled&&(0,a.jsx)("p",{className:"mt-0.5",children:(0,a.jsx)(T.Ex,{variant:D.paused?"warning":"default",size:"sm",children:D.paused?`Paused (quota${D.triggered?`: ${D.triggered.key}`:""})`:"Buffers set"})}),"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(d=r.providerSpecificData?.authMethod)&&W[d]?W[d]:"api_key"===r.authType?"API Key":"OAuth"}),Q(r)&&(0,a.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:Q(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${x?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:x?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(p||b)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M.default,{text:y>0?b?`Use your reset now (${y} left, use by ${ee(b.expiresAt)}) \xb7 refills ${Z(b.clears)}`:`Use one ${f}. Available: ${y}`:`No ${f}s available`,children:(0,a.jsxs)("button",{type:"button",onClick:()=>eT({connection:r,resetCreditCount:y}),disabled:y<=0||u||k,"aria-label":y>0?`Use one ${f}. ${y} available.`:`No ${f}s available`,className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${y>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${v?"animate-spin":""}`,children:v?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:y})]})}),(0,a.jsx)(M.default,{text:p?"View Codex reset credit expiry":"View Claude Code reset expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>p?tm(r):tu(r,b),disabled:u||k,"aria-label":p?"View Codex reset credit expiry":"View Claude Code reset expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})}),F.Q2[r.provider]?.fastMode&&(0,a.jsx)(M.default,{text:`Fast mode is ${r.providerSpecificData?.fastMode===!0?"on":"off"}. Uses the provider's faster processing mode at a higher token cost.`,children:(0,a.jsxs)("button",{type:"button",onClick:()=>th(r,r.providerSpecificData?.fastMode!==!0),disabled:u||k,role:"switch","aria-label":"Toggle fast mode","aria-checked":r.providerSpecificData?.fastMode===!0,className:`flex h-8 min-w-14 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${r.providerSpecificData?.fastMode===!0?"border-primary/30 bg-primary/10 text-primary":"border-black/10 text-text-muted hover:bg-black/5 hover:text-primary dark:border-white/10 dark:hover:bg-white/5"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${w?"animate-spin":""}`,children:w?"progress_activity":"speed"}),(0,a.jsx)("span",{children:"Fast"})]})})]}),G[r.provider]&&"oauth"===r.authType&&(()=>{let e=ed[r.provider]||{},t=e.connections?.[r.id]===!0,i=e.schedules?.[r.id],n=i?.enabled===!0,s=[];if(t&&s.push("On reset"),n){let e=(0,O.JW)(i).join(" / ");s.push(`Scheduled (${e||"active"})`)}let l=s.length>0?`Auto-ping active: ${s.join(" + ")}. Click to configure.`:"codex"===r.provider?"Auto-starts the next 5h Codex window after reset or on schedule. Click to configure.":"antigravity"===r.provider?"Auto-starts the next 5h Antigravity window after reset or on schedule. Click to configure.":"Auto-starts a new window on quota reset or fixed schedule. Click to configure.";return(0,a.jsx)(M.default,{text:l,children:(0,a.jsx)("button",{type:"button",onClick:()=>em(r),"aria-label":"Configure auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${t||n?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})})})(),p&&(0,a.jsx)(M.default,{text:r.providerSpecificData?.codexFastMode===!0||r.providerSpecificData?.fastMode===!0?"Fast mode ON — Codex requests on this account use the priority tier. Click to disable.":"Force fast mode — Codex requests on this account use the priority tier.",children:(0,a.jsx)("button",{type:"button",onClick:()=>{let e=r.providerSpecificData?.codexFastMode===!0||r.providerSpecificData?.fastMode===!0;th(r,!e)},disabled:k,"aria-label":"Toggle fast mode",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${r.providerSpecificData?.codexFastMode===!0||r.providerSpecificData?.fastMode===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${w?"animate-spin":""}`,children:w?"progress_activity":"speed"})})}),G[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(l.A,{connectionId:r.id,disabled:!1===r.isActive,onComplete:()=>td(r.id,r.provider)}),(0,a.jsx)(M.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>td(r.id,r.provider),disabled:u||k,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${u?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(M.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{eR(r),eL(!0)},disabled:k,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(M.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>tx(r.id),disabled:k,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${eC===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(q.default,{size:"sm",checked:r.isActive??!0,disabled:k,onChange:e=>tp(r.id,e)})})]})]})}),(0,a.jsxs)("div",{className:"px-2 py-1.5",children:[u?(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"})}):m?(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:m})]}):c?.message?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:c.message}),N&&(0,a.jsx)(_,{connectionId:r.id,onDone:()=>td(r.id,r.provider),className:"mx-auto mt-2 max-w-sm text-left"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(P,{quotas:A,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==eQ,onHideQuota:e=>tw(r.provider,r.id,e)}),r.lastQuotaSnapshot?.windows?.length>0&&(0,a.jsxs)("div",{className:"mt-2 border-t border-black/5 pt-2 dark:border-white/5",children:[(0,a.jsx)("p",{className:"mb-1 text-[10px] text-text-muted",children:"Pause buffer — pause this account when a window's remaining % ≤"}),(0,a.jsx)("div",{className:"flex flex-col gap-1",children:r.lastQuotaSnapshot.windows.map(e=>{let t=Number(r.quotaPauseThresholds?.[e.key])||0;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] text-text-muted",title:e.key,children:e.key}),(0,a.jsx)("span",{className:"w-10 text-right text-[10px] tabular-nums text-text-muted",children:"number"==typeof e.remainingPercentage?`${e.remainingPercentage}%`:"—"}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"≤"}),(0,a.jsx)("input",{type:"number",min:0,max:100,value:t,onChange:t=>tb(r.id,e.key,Number.parseInt(t.target.value,10)||0),className:"w-14 rounded border border-border bg-background px-1 py-0.5 text-[11px] focus:border-primary focus:outline-none","aria-label":`Pause buffer for ${e.key}`}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"%"})]},e.key)})})]})]}),c?.message&&!m&&!u&&(0,a.jsx)("p",{className:"mt-2 px-1 text-[10px] leading-relaxed text-text-muted",children:c.message}),c?.raw?.speed&&(0,a.jsx)("div",{className:"mt-1 px-1 text-[10px] leading-relaxed text-text-muted tabular-nums",children:(c.raw.speed.byModel?.length?c.raw.speed.byModel:[{model:"Speed",...c.raw.speed}]).slice(0,3).map(e=>(0,a.jsxs)("p",{children:[e.model,": ",Math.round(e.avgTps).toLocaleString()," tok/s avg \xb7 last ",Math.round(e.lastTps).toLocaleString()," \xb7 TTFT ",(e.avgTtftMs/1e3).toFixed(1),"s (n=",e.samples,")"]},e.model))}),$.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-black/5 pt-2 text-[10px] text-text-muted dark:border-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,a.jsx)("span",{className:"shrink-0",children:"Hidden:"}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap pb-2",children:$.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>tk(r.provider,r.id,e),className:"shrink-0 rounded-md border border-black/10 px-1.5 py-0.5 transition-colors hover:bg-black/5 hover:text-text-primary dark:border-white/10 dark:hover:bg-white/5",title:"Show this quota row",children:e.name},j(e)))})]})]})]})},r.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:tL}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:tI?"custom":String(e9),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(e6(1),e7(r),tt(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:[m.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:te,onChange:e=>tt(e.target.value),onBlur:()=>{let e=Number.parseInt(te,10);if(!Number.isFinite(e))return void tt(String(e9));let t=Math.min(500,Math.max(1,e));e6(1),e7(t),tt(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(te,10);if(!Number.isFinite(t))return void tt(String(e9));let r=Math.min(500,Math.max(1,t));e6(1),e7(r),tt(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 ",tr.page," / ",tr.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>e6(1),disabled:tr.page<=1||ej||ey,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:()=>e6(e=>Math.max(1,e-1)),disabled:tr.page<=1||ej||ey,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:()=>e6(e=>Math.min(tr.totalPages,e+1)),disabled:tr.page>=tr.totalPages||ej||ey,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:()=>e6(tr.totalPages),disabled:tr.page>=tr.totalPages||ej||ey,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)(T.uo,{isOpen:!!eE,onClose:()=>{eq||eT(null)},onConfirm:async()=>{let e=eE?.connection;e&&(await tc(e.id,e.provider),eT(null))},title:eE?.connection?.provider==="claude"?"Reset Claude limits?":"Reset Codex limit?",message:eE?.connection?.provider==="claude"?`Refills your ${Z(Y[eE.connection.id]?.raw?.resetCredits?.clears)} now for ${h(eE.connection)||"this account"} \xb7 your weekly reset day stays ${ee(Y[eE.connection.id]?.raw?.resetCredits?.weeklyResetsAt)}. This cannot be undone. Resets left: ${eE.resetCreditCount??0}.`:`Use 1 Codex reset credit for ${h(eE?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${eE?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!eq}),eD&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:eD.data?.kind==="claude"?"Claude Code Limit Resets":"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:h(eD.connection)||(eD.data?.kind==="claude"?"Claude account":"Codex account")})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eO(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:eD.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):eD.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:eD.error}):eD.data?.kind==="claude"&&eD.data.grants?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[eD.data.availableCount??0," reset",1===eD.data.availableCount?"":"s"," left"]}),(0,a.jsxs)("span",{children:["Weekly reset day: ",ee(eD.data.weeklyResetsAt)]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Reset"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Left"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Refills"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Use By"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:(eD.data.grants||[]).map(e=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsxs)("td",{className:"px-3 py-2",children:[(0,a.jsx)("div",{className:"text-text-primary",children:e.label||e.id}),(0,a.jsx)("span",{className:"mt-1 inline-block rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.resetsLeft<=0?"used":e.paused?"paused":e.endsAt&&new Date(e.endsAt).getTime()<=Date.now()?"expired":e.usableNow?"usable now":e.startsAt&&new Date(e.startsAt).getTime()>Date.now()?"not started":e.useRequiresLimit?"at limit only":"unavailable"})]}),(0,a.jsxs)("td",{className:"whitespace-nowrap px-3 py-2 font-medium tabular-nums text-text-primary",children:[e.resetsLeft," / ",e.resetsTotal]}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:Z(e.clears)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:ee(e.endsAt)}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-2 font-medium text-text-primary",children:et(e.endsAt)})]},e.id))})]})})]}):eD.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[eD.data.credits.length," reset credit",1===eD.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[eD.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:eD.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:ee(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:ee(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:et(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:eD.data?.kind==="claude"?"No limit resets available for this account.":"No reset credit details returned for this account."})})]})}),(0,a.jsx)(T.wI,{isOpen:eF,connection:eI,proxyPools:ez,onSave:tg,onClose:()=>{eL(!1),eR(null)}}),eu&&(0,a.jsx)(D.A,{isOpen:!!eu,onClose:()=>em(null),connection:eu,reactive:ed[eu.provider]?.connections?.[eu.id]===!0,schedule:ed[eu.provider]?.schedules?.[eu.id]||null,onSave:e=>ty(eu.id,eu.provider,e)})]}):(0,a.jsx)(E.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:tF.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:tF.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:tF.description})]})}):(0,a.jsx)(E.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."})]})})}},93195:(e,t,r)=>{"use strict";function a(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}r.d(t,{JW:()=>o,Vm:()=>a,fB:()=>n,gy:()=>i,nz:()=>s});let i={anchor:"09:30",timezone:a(),windowHours:5,slotsPerDay:3};function n(e){let t=/^(\d{1,2}):(\d{2})$/.exec(String(e||"").trim());if(!t)return null;let r=Number(t[1]),a=Number(t[2]);return r>23||a>59?null:{hour:r,minute:a}}function s(e){return Math.max(1,Math.floor(24/e))}function l(e,t,r,a){let i="number"==typeof e?e:Number(e);return Number.isFinite(i)?Math.min(a,Math.max(r,i)):t}function o(e){let t=function(e){if(!e||!0!==e.enabled)return null;let t=n(e.anchor)||n(i.anchor),r=`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}`,a=!function(e){if(!e||"string"!=typeof e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(e.timezone)?i.timezone:e.timezone,o=l(e.windowHours,i.windowHours,.5,24),d=Math.round(l(e.slotsPerDay,i.slotsPerDay,1,s(o)));return{enabled:!0,anchor:r,timezone:a,windowHours:o,slotsPerDay:d}}(e);if(!t)return[];let{hour:r,minute:a}=n(t.anchor),o=60*r+a;return Array.from({length:t.slotsPerDay},(e,r)=>{let a=Math.round(o+r*t.windowHours*60)%1440;return`${String(Math.floor(a/60)).padStart(2,"0")}:${String(a%60).padStart(2,"0")}`})}},97132:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var a=r(95155),i=r(12115),n=r(14051),s=r.n(n),l=r(35497),o=r(31474),d=r(93195);let c=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function u({isOpen:e,onClose:t,onSave:r,connection:n,reactive:s=!1,schedule:m=null}){let[x,p]=(0,i.useState)(()=>({mode:m?.enabled===!0?"schedule":!0===s?"reset":"off",anchor:m?.anchor||d.gy.anchor,timezone:(0,d.Vm)(),windowHours:String(m?.windowHours??d.gy.windowHours),slotsPerDay:String(m?.slotsPerDay??d.gy.slotsPerDay)})),h=Number(x.windowHours),g=Number(x.slotsPerDay),b=!!(0,d.fB)(x.anchor),f=Number.isFinite(h)&&h>=.5&&h<=24,y=f?(0,d.nz)(h):24,v=Number.isInteger(g)&&g>=1&&g<=y,w=b&&f&&v,k="schedule"!==x.mode||w,j=w?(0,d.JW)({enabled:!0,...x,windowHours:h,slotsPerDay:g}):[],N=j.length&&f?(()=>{let{hour:e,minute:t}=(0,d.fB)(x.anchor),r=Math.round(60*e+t+g*h*60)%1440;return`${String(Math.floor(r/60)).padStart(2,"0")}:${String(r%60).padStart(2,"0")}`})():"",C=e=>p(t=>({...t,...e}));return(0,a.jsx)(l.aF,{isOpen:e,onClose:t,title:"Auto-ping settings",size:"lg",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{variant:"secondary",onClick:t,children:"Cancel"}),(0,a.jsx)(l.$n,{onClick:()=>{k&&(r({reactive:"reset"===x.mode,schedule:"schedule"===x.mode?{enabled:!0,anchor:x.anchor,timezone:x.timezone,windowHours:h,slotsPerDay:g}:{enabled:!1}}),t())},disabled:!k,children:"Save"})]}),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",n?.name?` for ${n.name}`:""," — pick one mode."]}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:c.map(e=>{let t=x.mode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>C({mode:e.value}),className:(0,o.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",t?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:e.icon}),(0,a.jsx)("span",{children:e.label})]},e.value)})}),"reset"===x.mode&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===x.mode&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,a.jsx)(l.pd,{label:"Anchor time",type:"time",value:x.anchor,onChange:e=>C({anchor:e.target.value}),error:b?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,a.jsx)(l.pd,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:x.windowHours,onChange:e=>C({windowHours:e.target.value}),error:f?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,a.jsx)(l.pd,{label:"Pings per day",type:"number",min:"1",max:String(y),step:"1",value:x.slotsPerDay,onChange:e=>C({slotsPerDay:e.target.value}),error:v?"":`1 – ${y}`,hint:v?`Max ${y}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),j.length>0&&(0,a.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,a.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",x.timezone,")"]}),(0,a.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:j.join(" → ")}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",j[0]," – ",N,", then pauses until ",j[0]," next day."]})]})]})]})})}u.propTypes={isOpen:s().bool.isRequired,onClose:s().func.isRequired,onSave:s().func.isRequired,connection:s().object,reactive:s().bool,schedule:s().object}}},e=>{e.O(0,[763,5353,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=62022)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{29499:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(95155),n=s(12115),l=s(31474);function r({isOpen:e,onClose:t,title:s,children:i,width:o="md",className:d}){let c={sm:"w-[400px]",md:"w-[500px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-full"};return((0,n.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,n.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-[2px] fade-in cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:(0,l.cn)("absolute right-0 top-0 h-full bg-surface flex flex-col","shadow-[var(--shadow-elev)]","slide-in-right","border-l border-border-subtle",c[o]||c.md,d),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border-subtle 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-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main 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 custom-scrollbar",children:i})]})]}):null}},32554:(e,t,s)=>{Promise.resolve().then(s.bind(s,56483))},56483:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>D});var a=s(95155),n=s(12115),l=s(73321),r=s(35497),i=s(36509),o=s(26186),d=s(84588),c=s(92542),x=s(29499),m=s(50378),p=s(31474),h=s(88105);function u(e){return null==e?"":"string"==typeof e?e:JSON.stringify(e,(e,t)=>"signature"===e?"[Hidden]":t,2)}function f(e){return e?.cached_tokens||e?.cache_read_input_tokens||0}function b(e){return e?.cache_creation_input_tokens||0}function j(e){let t=e?.prompt_tokens||e?.input_tokens||0,s=f(e);return t<s?s:t}function g(e){return e?.completion_tokens||e?.output_tokens||0}let N=null,v=null;async function k(){if(N&&v)return{providerNameCache:N,providerNodesCache:v};let e=await fetch("/api/provider-nodes"),t=(await e.json()).nodes||[];for(let e of(v={},t))v[e.id]=e.name;return{providerNameCache:N={...h.Q2,...v},providerNodesCache:v}}function w(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,h.zt)(e)||h.Q2[e];return a?.name||e}function y({title:e,children:t,defaultOpen:s=!1,icon:l=null}){let[r,i]=(0,n.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(!r),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",r?"rotate-90":""),children:"chevron_right"})]}),r&&(0,a.jsx)("div",{className:"p-4 border-t border-black/5 dark:border-white/5",children:t})]})}function S(){let[e,t]=(0,n.useState)([]),[s,l]=(0,n.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[r,i]=(0,n.useState)(!1),[o,h]=(0,n.useState)(null),[N,v]=(0,n.useState)(!1),[S,C]=(0,n.useState)([]),[D,P]=(0,n.useState)([]),[_,L]=(0,n.useState)(null),[K,T]=(0,n.useState)({provider:"",model:"",startDate:"",endDate:""}),R=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/usage/providers"),t=await e.json();C(t.providers||[]);let s=await k();L(s.providerNameCache)}catch(e){console.error("Failed to fetch providers:",e)}},[]),I=(0,n.useCallback)(async e=>{try{let t=new URLSearchParams;e&&t.append("provider",e);let s=await fetch(`/api/usage/models?${t.toString()}`),a=await s.json(),n=Array.isArray(a.models)?a.models:[];return P(n),n}catch(e){return console.error("Failed to fetch models:",e),P([]),[]}},[]),z=(0,n.useCallback)(async()=>{i(!0);try{let e=new URLSearchParams({page:s.page.toString(),pageSize:s.pageSize.toString()});K.provider&&e.append("provider",K.provider),K.model&&e.append("model",K.model),K.startDate&&e.append("startDate",K.startDate),K.endDate&&e.append("endDate",K.endDate);let a=await fetch(`/api/usage/request-details?${e}`),n=await a.json();t(n.details||[]),l(e=>({...e,...n.pagination}))}catch(e){console.error("Failed to fetch request details:",e)}finally{i(!1)}},[s.page,s.pageSize,K]);(0,n.useEffect)(()=>{R()},[R]),(0,n.useEffect)(()=>{let e=!1;return(async()=>{let t=await I(K.provider);e||T(e=>e.model&&!t.includes(e.model)?{...e,model:""}:e)})(),()=>{e=!0}},[K.provider,I]),(0,n.useEffect)(()=>{z()},[z]);let E=function(e){let t=[],s=[];for(let a of Array.isArray(e?.content)?e.content:[e?.content])if(a?.type==="thinking")s.push(u(a.thinking)||"[Thinking content unavailable]");else if(a?.type==="redacted_thinking")s.push("[Redacted thinking]");else{let e=u(a?.type==="text"?a.text:a);e&&t.push(e)}return{content:t.join("\n")||"[No content]",thinking:u(e?.thinking)||s.join("\n")}}(o?.response);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(d.default,{padding:"md",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 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:K.provider,onChange:e=>T({...K,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","w-full min-w-0 cursor-pointer"),style:{colorScheme:"auto"},children:[(0,a.jsx)("option",{value:"",children:"All Providers"}),S.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"model-filter",className:"text-sm font-medium text-text-main",children:"Model"}),(0,a.jsxs)("select",{id:"model-filter",value:K.model,onChange:e=>T({...K,model: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","w-full min-w-0 cursor-pointer"),style:{colorScheme:"auto"},children:[(0,a.jsx)("option",{value:"",children:"All Models"}),D.map(e=>(0,a.jsx)("option",{value:e,children:e},e))]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 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:K.startDate,onChange:e=>T({...K,startDate:e.target.value}),className:(0,p.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 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:K.endDate,onChange:e=>T({...K,endDate:e.target.value}),className:(0,p.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:col-span-2 lg:col-span-1",children:[(0,a.jsx)("span",{className:"hidden text-sm font-medium text-text-main opacity-0 lg:block","aria-hidden":"true",children:"Clear"}),(0,a.jsx)(c.default,{variant:"ghost",onClick:()=>{T({provider:"",model:"",startDate:"",endDate:""})},disabled:!K.provider&&!K.model&&!K.startDate&&!K.endDate,className:"w-full",children:"Clear Filters"})]})]})}),(0,a.jsxs)(d.default,{padding:"none",children:[(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[880px]",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-left p-4 text-sm font-semibold text-text-main",children:"API Key"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Input Guard"}),(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:"Cached"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Cache Creation"}),(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:r?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"11",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:"11",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:"whitespace-nowrap p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,a.jsx)("td",{className:"max-w-[260px] truncate p-4 font-mono text-sm text-text-main",children:e.model}),(0,a.jsx)("td",{className:"max-w-[180px] truncate p-4 text-sm text-text-main",children:(0,a.jsx)("span",{className:"font-medium",children:w(e.provider,_)})}),(0,a.jsx)("td",{className:"max-w-[160px] truncate p-4 text-sm text-text-main",children:e.apiKeyName&&e.apiKey?(0,a.jsxs)("div",{className:"flex flex-col min-w-0",title:`${e.apiKeyName} (${e.apiKey})`,children:[(0,a.jsx)("span",{className:"font-medium truncate",children:e.apiKeyName}),(0,a.jsx)("span",{className:"font-mono text-xs text-text-muted truncate",children:e.apiKey})]}):(0,a.jsx)("span",{className:(0,p.cn)("truncate font-mono text-xs",!e.apiKey&&"text-text-muted italic"),children:e.apiKeyName||e.apiKey||"Local / No Key"})}),(0,a.jsx)("td",{className:"p-4 text-center",children:e.convoy?.applied?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-green-500/15 px-2 py-1 text-xs text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"filter_alt"}),e.convoy.hits?.length||0," applied"]}):(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Not applied"})}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:j(e.tokens).toLocaleString()}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:f(e.tokens)>0?f(e.tokens).toLocaleString():"—"}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:b(e.tokens)>0?b(e.tokens).toLocaleString():"—"}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:g(e.tokens).toLocaleString()}),(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)(c.default,{variant:"outline",size:"sm",onClick:()=>{h(e),v(!0)},children:"Detail"})})]},`${e.id}-${t}`))})]})}),!r&&e.length>0&&(0,a.jsx)("div",{className:"border-t border-black/5 dark:border-white/5",children:(0,a.jsx)(m.default,{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)(x.A,{isOpen:N,onClose:()=>v(!1),title:"Request Details",width:"lg",children:o&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 text-sm sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"ID:"})," ",(0,a.jsx)("span",{className:"break-all font-mono text-text-main",children:o.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(o.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:w(o.provider,_)})]}),(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:o.model})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"API Key:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:o.apiKeyName?o.apiKey?`${o.apiKeyName} (${o.apiKey})`:o.apiKeyName:o.apiKey||"Local / No Key"})]}),(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"===o.status?"text-green-600":"text-red-600"),children:o.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 ",o.latency?.ttft||0,"ms / Total ",o.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:j(o.tokens).toLocaleString()})]}),f(o.tokens)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Cached Tokens:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:f(o.tokens).toLocaleString()})]}),b(o.tokens)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Cache Creation:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:b(o.tokens).toLocaleString()})]}),(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:g(o.tokens).toLocaleString()})]})]}),o.pxpipe&&(0,a.jsxs)("div",{className:"rounded-lg border border-black/5 dark:border-white/5 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"image"}),(0,a.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"PXPIPE"}),(0,a.jsx)("span",{className:(0,p.cn)("text-xs px-2 py-0.5 rounded",o.pxpipe.applied?"bg-green-500/15 text-green-600":"bg-amber-500/15 text-amber-600"),children:o.pxpipe.applied?"Activated":"Skipped"})]}),o.pxpipe.applied?(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm sm:grid-cols-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted block text-xs",children:"Original (est.)"}),(0,a.jsxs)("span",{className:"font-mono",children:[(o.pxpipe.tokensBeforeEst||0).toLocaleString()," tokens"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted block text-xs",children:"Compressed (est.)"}),(0,a.jsxs)("span",{className:"font-mono",children:[(o.pxpipe.tokensAfterEst||0).toLocaleString()," tokens"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted block text-xs",children:"Saved"}),(0,a.jsxs)("span",{className:"font-mono text-green-600",children:[o.pxpipe.savedPct||0,"%"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted block text-xs",children:"Images"}),(0,a.jsxs)("span",{className:"font-mono",children:[o.pxpipe.imageCount||0," (",o.pxpipe.durationMs||0,"ms)"]})]})]}):(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Reason: ",(0,a.jsx)("span",{className:"font-mono",children:o.pxpipe.reason}),o.pxpipe.detail?` — ${o.pxpipe.detail}`:""]})]}),o.convoy&&(0,a.jsxs)("div",{className:"rounded-lg border border-black/5 p-4 dark:border-white/5",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"filter_alt"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Input Guard"}),(0,a.jsx)("span",{className:`rounded px-2 py-0.5 text-xs ${o.convoy.applied?"bg-green-500/15 text-green-600":"bg-black/5 text-text-muted dark:bg-white/5"}`,children:o.convoy.applied?"Applied":"No match"})]}),o.convoy.applied&&(0,a.jsx)("div",{className:"space-y-1 text-sm",children:(o.convoy.hits||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded bg-black/[0.02] px-3 py-2 dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-text-main",children:e.ruleName}),(0,a.jsxs)("span",{className:"font-mono text-xs text-text-muted",children:[e.count," match(es)"]})]},e.ruleId))})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(y,{title:"1. Client Request (Input)",defaultOpen:!0,icon:"input",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:JSON.stringify(o.request,null,2)})}),o.providerRequest&&(0,a.jsx)(y,{title:"2. Provider Request (Translated)",icon:"translate",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:JSON.stringify(o.providerRequest,null,2)})}),o.providerResponse&&(0,a.jsx)(y,{title:"3. Provider Response (Raw)",icon:"data_object",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:"object"==typeof o.providerResponse?JSON.stringify(o.providerResponse,null,2):o.providerResponse})}),(0,a.jsxs)(y,{title:"4. Client Response (Final)",defaultOpen:!0,icon:"output",children:[E.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:"max-h-[200px] max-w-full overflow-auto rounded-lg border border-amber-200 bg-amber-50 p-3 font-mono text-xs text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-100 sm:p-4",children:E.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:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:E.content})]})]})]})})]})}let C=o.T1;function D(){return(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(r.Qv,{}),children:(0,a.jsx)(P,{})})}function P(){let e=(0,l.useSearchParams)(),t=(0,l.useRouter)(),[s,o]=(0,n.useState)("today"),d=e.get("tab"),c=d&&["overview","logs","details"].includes(d)?d:"overview";return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"relative z-20 shrink-0",children:(0,a.jsx)(r.Iz,{options:[{value:"overview",label:"Overview"},{value:"details",label:"Details"}],value:c,onChange:s=>{if(s===c)return;let a=new URLSearchParams(e);a.set("tab",s),t.push(`/dashboard/usage?${a.toString()}`,{scroll:!1})},className:"w-auto shrink-0"})}),"overview"===c&&(0,a.jsx)("div",{className:"flex min-w-0 flex-1 justify-end overflow-hidden",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)(r.Iz,{options:C,value:s,onChange:o,size:"sm",className:"min-w-max"})})})]}),"overview"===c&&(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(r.Qv,{}),children:(0,a.jsx)(i.default,{period:s,setPeriod:o,hidePeriodSelector:!0})}),"logs"===c&&(0,a.jsx)(r.gM,{}),"details"===c&&(0,a.jsx)(S,{})]})}}},e=>{e.O(0,[763,8105,801,1321,5497,6509,8441,3794,7358],()=>e(e.s=32554)),_N_E=e.O()}]);