keyrouter 1.0.4 → 1.0.5

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 (508) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +19 -19
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +19 -19
  5. package/app/.next-cli-build/react-loadable-manifest.json +8 -8
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.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/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.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/prompt-injection/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-injection/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-injection/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.rsc +7 -7
  89. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -7
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +7 -7
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  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/cli-tools/all-statuses/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/prompt-injection/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  288. package/app/.next-cli-build/server/app/callback.html +1 -1
  289. package/app/.next-cli-build/server/app/callback.rsc +7 -7
  290. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +7 -7
  291. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  292. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +7 -7
  293. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  294. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  295. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  296. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  297. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  298. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  299. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  300. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
  301. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  302. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  303. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  305. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
  306. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  307. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  308. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  309. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  310. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
  311. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  312. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  313. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  314. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  315. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  316. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  317. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  318. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  319. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  320. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
  321. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  322. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  323. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  324. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  325. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
  326. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  327. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  328. package/app/.next-cli-build/server/app/dashboard/prompt-injection.html +1 -1
  329. package/app/.next-cli-build/server/app/dashboard/prompt-injection.rsc +8 -8
  330. package/app/.next-cli-build/server/app/dashboard/prompt-injection.segments/!KGRhc2hib2FyZCk/dashboard/prompt-injection/__PAGE__.segment.rsc +8 -8
  331. package/app/.next-cli-build/server/app/dashboard/prompt-injection.segments/_full.segment.rsc +8 -8
  332. package/app/.next-cli-build/server/app/dashboard/prompt-injection.segments/_tree.segment.rsc +2 -2
  333. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  335. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  336. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  337. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  338. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  340. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
  341. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  342. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  343. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  344. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  345. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
  346. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  347. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  348. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +8 -8
  350. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +8 -8
  351. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +8 -8
  352. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  353. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  354. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  355. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  356. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  357. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  358. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  361. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -8
  363. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -8
  364. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  365. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +8 -8
  366. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  368. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
  369. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  370. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  371. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
  373. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
  374. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
  375. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  376. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  378. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  379. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  380. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  381. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
  383. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +9 -9
  384. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
  385. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  386. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  387. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  388. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
  389. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  390. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  391. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/index.html +1 -1
  393. package/app/.next-cli-build/server/app/index.rsc +7 -7
  394. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +7 -7
  395. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -7
  396. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  397. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  398. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/landing.html +1 -1
  401. package/app/.next-cli-build/server/app/landing.rsc +8 -8
  402. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -8
  403. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  404. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +8 -8
  405. package/app/.next-cli-build/server/app/login/page.js +1 -1
  406. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  408. package/app/.next-cli-build/server/app/login.html +1 -1
  409. package/app/.next-cli-build/server/app/login.rsc +8 -8
  410. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -8
  411. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  412. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +8 -8
  413. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  416. package/app/.next-cli-build/server/app-paths-manifest.json +19 -19
  417. package/app/.next-cli-build/server/chunks/1051.js +1 -1
  418. package/app/.next-cli-build/server/chunks/2172.js +1 -1
  419. package/app/.next-cli-build/server/chunks/3449.js +1 -1
  420. package/app/.next-cli-build/server/chunks/3697.js +1 -1
  421. package/app/.next-cli-build/server/chunks/412.js +6 -6
  422. package/app/.next-cli-build/server/chunks/4190.js +1 -1
  423. package/app/.next-cli-build/server/chunks/4620.js +1 -0
  424. package/app/.next-cli-build/server/chunks/5299.js +7 -7
  425. package/app/.next-cli-build/server/chunks/615.js +1 -1
  426. package/app/.next-cli-build/server/chunks/6708.js +1 -1
  427. package/app/.next-cli-build/server/chunks/7066.js +1 -1
  428. package/app/.next-cli-build/server/chunks/8128.js +1 -1
  429. package/app/.next-cli-build/server/chunks/8251.js +1 -1
  430. package/app/.next-cli-build/server/chunks/8682.js +3 -3
  431. package/app/.next-cli-build/server/chunks/869.js +1 -1
  432. package/app/.next-cli-build/server/chunks/9604.js +1 -1
  433. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  435. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  436. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/pages/404.html +1 -1
  438. package/app/.next-cli-build/server/pages/500.html +1 -1
  439. package/app/.next-cli-build/static/chunks/{124.b7052d76521ac60b.js → 124.2dcfd9a087c9e48b.js} +1 -1
  440. package/app/.next-cli-build/static/chunks/{2435.51481baa53b475e1.js → 2435.7cc8c894f4a21999.js} +1 -1
  441. package/app/.next-cli-build/static/chunks/{2470-e9f1fd5f21c43fac.js → 2470-73a591ec7a5bdf40.js} +1 -1
  442. package/app/.next-cli-build/static/chunks/3521.96065c08772d432e.js +1 -0
  443. package/app/.next-cli-build/static/chunks/3557-ab733a862d0bba72.js +10 -0
  444. package/app/.next-cli-build/static/chunks/{5462.500e87268a882da6.js → 5462.b5dccc4c3626a6a1.js} +1 -1
  445. package/app/.next-cli-build/static/chunks/5496-336ad33bc5785fb5.js +9 -0
  446. package/app/.next-cli-build/static/chunks/5497-b6161d058c4b63f4.js +1 -0
  447. package/app/.next-cli-build/static/chunks/6808-ecaf0603c2c647dd.js +1 -0
  448. package/app/.next-cli-build/static/chunks/761-748923a2523301a7.js +132 -0
  449. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-dc2bbddae0338265.js +1 -0
  450. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-946dbaff84568fd1.js +1 -0
  451. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-c995565de72de5d6.js +1 -0
  452. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-569d2ce1c361cb5b.js → page-e9856c47cc41d2f2.js} +5 -5
  453. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-d8d32b819432e76e.js +1 -0
  454. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/prompt-injection/page-c0c7f0ec4d840259.js +1 -0
  455. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-745147f2bf98d096.js +27 -0
  456. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-3006aca559388a7a.js +1 -0
  457. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-c832cd28ad361668.js +4 -0
  458. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-f4d89bf3d96928c9.js +1 -0
  459. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-33826a8bc196b7de.js +1 -0
  460. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-6acecf90f03a1af3.js +1 -0
  461. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-71814d68cea6ef7d.js +1 -0
  462. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-ebe244550b022a8f.js +1 -0
  463. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-84ba30538381db07.js +1 -0
  464. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-607b1f15b82c8bba.js +1 -0
  465. package/app/.next-cli-build/static/chunks/app/landing/page-3e38f4876602c2fb.js +1 -0
  466. package/app/.next-cli-build/static/chunks/app/{layout-5be078fd5da689ca.js → layout-8e337d947af1970c.js} +1 -1
  467. package/app/.next-cli-build/static/chunks/app/login/{page-d50a71c8703d2790.js → page-17082356385ade34.js} +1 -1
  468. package/app/.next-cli-build/static/chunks/{webpack-01b0b9fe7dbba18d.js → webpack-a1905b20ab1a879d.js} +1 -1
  469. package/app/.next-cli-build/static/css/d7b388223f36a397.css +1 -0
  470. package/app/package.json +1 -1
  471. package/app/public/favicon.svg +2 -12
  472. package/app/public/fonts/arabic-subset.ttf +0 -0
  473. package/app/public/fonts/bengali-subset.ttf +0 -0
  474. package/app/public/fonts/devanagari-subset.ttf +0 -0
  475. package/app/public/fonts/hebrew-subset.ttf +0 -0
  476. package/app/public/fonts/jp-subset.ttf +0 -0
  477. package/app/public/fonts/khmer-subset.ttf +0 -0
  478. package/app/public/fonts/kr-subset.ttf +0 -0
  479. package/app/public/fonts/sc-subset.ttf +0 -0
  480. package/app/public/fonts/tc-subset.ttf +0 -0
  481. package/app/public/fonts/thai-subset.ttf +0 -0
  482. package/package.json +1 -1
  483. package/app/.next-cli-build/server/chunks/5626.js +0 -1
  484. package/app/.next-cli-build/static/chunks/3521.03e47d524e0fcbf6.js +0 -1
  485. package/app/.next-cli-build/static/chunks/3557-437defff109ccb42.js +0 -10
  486. package/app/.next-cli-build/static/chunks/5496-a3a9ad577f310490.js +0 -9
  487. package/app/.next-cli-build/static/chunks/5497-3add1c35ece30dbf.js +0 -1
  488. package/app/.next-cli-build/static/chunks/6808-4e4ca2233c09ffad.js +0 -1
  489. package/app/.next-cli-build/static/chunks/761-00700c1c25957243.js +0 -132
  490. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-7feaa4a67a8eb771.js +0 -1
  491. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-624e8d61fe459544.js +0 -1
  492. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-5da47ad2a6d8d5de.js +0 -1
  493. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-628c4ef1c9482980.js +0 -1
  494. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/prompt-injection/page-35a6881f7569aa64.js +0 -1
  495. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-3b9d43febf1e79d4.js +0 -27
  496. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-e9c955f52e5ae812.js +0 -1
  497. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-bbf57717de4a9782.js +0 -4
  498. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-b275a947fc978997.js +0 -1
  499. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-5434337e59f24de1.js +0 -1
  500. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-c7eb81dfb0b4fd77.js +0 -1
  501. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-1b0510b28ff8de92.js +0 -1
  502. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-be974a86e9053540.js +0 -1
  503. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-18c2613dd78ff66f.js +0 -1
  504. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-c439d82cf7840dc9.js +0 -1
  505. package/app/.next-cli-build/static/chunks/app/landing/page-38fc3c430a1a29dc.js +0 -1
  506. package/app/.next-cli-build/static/css/841943e9a30fe5cd.css +0 -1
  507. /package/app/.next-cli-build/static/{7Sq72xYQxt_cCm5BESVbY → nPdnpoRoh59z5OwsCS3Vd}/_buildManifest.js +0 -0
  508. /package/app/.next-cli-build/static/{7Sq72xYQxt_cCm5BESVbY → nPdnpoRoh59z5OwsCS3Vd}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{56804:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>z});var a=r(95155),s=r(12115),n=r(73321),i=r(57250),l=r(39403),o=r(13097);let d="quotaCacheData",c="quotaAutoRefresh",u=[10,20,50,100],m=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],x=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function p(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function h(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function g(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function b(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function f(e,t){return await e(t)}function y(){try{let e=window.localStorage.getItem(d);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function v(e,t){try{let r=y();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(d,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function w(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=t?.[e]?.hidden;return Array.isArray(a)&&0!==a.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)))]}(a,r):a).map(String)):new Set}function k({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:n=!1,onHideQuota:i=null}){let[l,o]=(0,s.useState)(1),d=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.percentage!==void 0?Math.max(0,Math.round(!0===e.percentageIsUsed?100-e.percentage:e.percentage)):e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):w(e?.used,e?.total)})),[e]),c=(0,s.useMemo)(()=>"remaining-asc"===r?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,r]),u=Math.max(1,Math.ceil(c.length/10));if((0,s.useEffect)(()=>{o(1)},[r,e]),(0,s.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 i;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:"space-y-px",children:m.map(e=>{var r;let s=!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"}:(r=e.colorPercentage??e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},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 s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let n=Math.floor(s/60),i=s%60;if(n<24)return`${n}h ${i}m`;let l=Math.floor(n/24);return`${l}d ${n%24}h ${i}m`}catch(e){return"-"}}(e.resetAt),d=!e.neverExpires&&!e.resetAt&&!!e.detailUrl,c=e.emptyMessage?e.emptyMessage: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()),s=new Date(a);s.setDate(s.getDate()+1);let n="";n=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let i=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${n}, ${i}`}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)("div",{className:`flex items-center gap-2 border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${h}`,children:[(0,a.jsxs)("div",{className:"flex w-36 min-w-0 items-center gap-1.5",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})]}),(0,a.jsxs)("div",{className:`min-w-0 flex-1 ${t?"space-y-1":"space-y-1.5"}`,children:[!s&&!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 gap-1 min-w-0 ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted truncate",title:s?`${e.used.toLocaleString()} used \xb7 Unlimited`:n?`Credit balance: ${e.total.toFixed(2)} ${e.currency||""}`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}`,children:s?`${e.used.toLocaleString()} used \xb7 Unlimited`:n?`Credit: ${e.total.toFixed(2)} ${e.currency||""}`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}${e.unit?` ${e.unit}`:""}`}),(0,a.jsx)("span",{className:`font-medium ${s?"text-green-600 dark:text-green-400":n?"text-blue-600 dark:text-blue-400":l.text} shrink-0`,children:s?"Unlimited":n?"":`${e.remaining}%`})]})]}),(0,a.jsx)("div",{className:"min-w-0 shrink",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:"min-w-0 space-y-0.5",children:["-"!==o&&(0,a.jsx)("div",{className:`${b} text-text-primary font-medium truncate`,children:m}),c&&(0,a.jsx)("div",{className:`${f} text-text-muted truncate`,children:x(f)})]}):(0,a.jsx)("div",{className:`${b} text-text-muted italic`,children:"N/A"})}),y&&(0,a.jsx)("button",{type:"button",onClick:()=>i(e),className:"inline-flex h-6 w-6 shrink-0 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 C=r(98542),S=r(97677),A=r(84588),$=r(35497),P=r(97132),q=r(93195),E=r(88105),_=r(11059);let D={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},M={claude:"claudeAutoPing",codex:"codexAutoPing"};function O(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 T(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}let I={five_hour:"session",seven_day:"weekly",seven_day_overage_included:"weekly",seven_day_opus:"Opus weekly",seven_day_sonnet:"Sonnet weekly"};function F(e){let t=[...new Set((e||[]).map(e=>I[e]).filter(Boolean))];return t.length?`${t.join(" + ")} limits`:"limits"}function L(e){return E.Q2[e]?.name||e}function U(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 R(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),s=r%24;return a>0?`${a}d ${s}h`:`${s}h`}function z(){let{copied:e,copy:t}=(0,_.C)(),r=(0,n.useSearchParams)(),I=(0,n.useRouter)(),z=(0,n.usePathname)(),[H,W]=(0,s.useState)([]),[B,J]=(0,s.useState)({}),[K,V]=(0,s.useState)({}),[G,Q]=(0,s.useState)({}),[Z,Y]=(0,s.useState)(!0),[X,ee]=(0,s.useState)({claude:{},codex:{}}),[et,er]=(0,s.useState)(null),[ea,es]=(0,s.useState)(null),[en,ei]=(0,s.useState)(!1),[el,eo]=(0,s.useState)(!1),[ed,ec]=(0,s.useState)(60),[eu,em]=(0,s.useState)(!0),[ex,ep]=(0,s.useState)(null),[eh,eg]=(0,s.useState)(null),[eb,ef]=(0,s.useState)(null),[ey,ev]=(0,s.useState)(null),[ew,ej]=(0,s.useState)(null),[eN,ek]=(0,s.useState)(!1),[eC,eS]=(0,s.useState)(null),[eA,e$]=(0,s.useState)([]),[eP,eq]=(0,s.useState)(()=>r?.get("provider")||"all"),eE=(0,s.useCallback)(e=>{eq(e);try{let t=new URLSearchParams(r?.toString()||"");"all"===e?t.delete("provider"):t.set("provider",e);let a=t.toString()?`${z}?${t.toString()}`:z;I.replace(a,{scroll:!1})}catch{}},[z,I,r]),[e_,eD]=(0,s.useState)([]),[eM,eO]=(0,s.useState)("all"),[eT,eI]=(0,s.useState)("default"),[eF,eL]=(0,s.useState)({}),[eU,eR]=(0,s.useState)(!1),[ez,eH]=(0,s.useState)(!1),[eW,eB]=(0,s.useState)(!1),[eJ,eK]=(0,s.useState)(1),[eV,eG]=(0,s.useState)(20),[eQ,eZ]=(0,s.useState)(String(20)),[eY,eX]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[e0,e1]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),e2=(0,s.useRef)(null),e5=(0,s.useRef)(null),e3=(0,s.useRef)(0),e4=(0,s.useCallback)(async(e=eJ)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(eV),accountStatus:eM,sort:"priority"});"all"!==eP&&a.set("provider",eP);let s=await fetch(`/api/providers/client?${a.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let n=await s.json(),i=n.connections||[],l=(t=n.pagination,t||{page:1,pageSize:eV,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,i.length);return W(i),eD(n.providerOptions||[]),eX(l),e1(o),eK((r=n.pagination,r?.page||e)),i}catch(e){return console.error("Error fetching connections:",e),W([]),eD([]),eX({page:1,pageSize:eV,total:0,totalPages:1}),e1({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eM,eU,eJ,eV,eP]),e8=(0,s.useCallback)(async(e,t,{force:r=!1}={})=>{V(t=>({...t,[e]:!0})),Q(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=`/api/usage/${e}${r?"?force=1":""}`,s=await fetch(a);if(!s.ok){let r=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===s.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r};J(t=>({...t,[e]:a})),v(e,a);return}throw Error(`HTTP ${s.status}: ${r}`)}let n=await s.json();console.log(`[ProviderLimits] Got quota for ${t}:`,n);let i={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"]),s=new Set(["gemini_session","claude_gpt_session"]),n=new Set([...a,...s]),i=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),l=e.filter(([e])=>e.startsWith("claude-")),o=e.filter(([e])=>e.includes("image")),d=e.filter(([e])=>n.has(e)),c=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.includes("image")&&!n.has(e)),u=!!t.quotas.gemini_weekly,m=!!t.quotas.gemini_session,x=!!t.quotas.claude_gpt_weekly,p=!!t.quotas.claude_gpt_session;if(m)d.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(i.length>0){let e=i.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],a=t.quotas.gemini_weekly?.resetAt;u&&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(u&&d.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})}),p)d.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(l.length>0){let e=l.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],a=t.quotas.claude_gpt_weekly?.resetAt;x&&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})}x&&d.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})}),o.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})}),x||p||c.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:w(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"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,isCreditBalance:t.isCreditBalance??!0,currency:t.currency||(e.includes("(")?e.slice(e.indexOf("(")+1,e.indexOf(")")):"USD")})});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,remainingPercentage:t.remainingPercentage})});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"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"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:t.name||e,used:t.used||0,total:t.total||0,percentage:t.percentage,colorPercentage:t.colorPercentage,percentageIsUsed:!0===t.percentageIsUsed,resetAt:t.resetAt||null,emptyMessage:t.emptyMessage||null})})}}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,s=r.modelKey||r.name;return("gemini"===a||"gemini_session"===a)&&(a="gemini-3.8-flash-high"),("claude"===a||"claude_gpt_session"===a)&&(a="claude-sonnet-4-6"),("gemini"===s||"gemini_session"===s)&&(s="gemini-3.8-flash-high"),("claude"===s||"claude_gpt_session"===s)&&(s="claude-sonnet-4-6"),(e.get(a)??999)-(e.get(s)??999)})}return r}(t,n),plan:n.plan||null,message:n.message||null,raw:n};J(t=>({...t,[e]:i})),v(e,i)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),Q(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{V(t=>({...t,[e]:!1}))}},[]),e6=(0,s.useCallback)(async(e,t)=>{await e8(e,t,{force:!0}),es(new Date)},[e8]),e9=(0,s.useCallback)(async(e,t)=>{if(("codex"===t||"claude"===t)&&!eb){ef(e),Q(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:B[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 e8(e,t,{force:!0}),es(new Date)}catch(t){Q(r=>({...r,[e]:t.message||"Failed to reset limit"}))}finally{ef(null)}}},[e8,eb,B]),e7=(0,s.useCallback)((e,t)=>{ej({connection:e,loading:!1,error:null,data:{kind:"claude",...t}})},[]),te=(0,s.useCallback)(async e=>{ej({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)=>(e.expiresAt?new Date(e.expiresAt).getTime():1/0)-(t.expiresAt?new Date(t.expiresAt).getTime():1/0)),ej({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){ej({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),tt=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){ep(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){J(t=>{let r={...t};return delete r[e],r}),V(t=>{let r={...t};return delete r[e],r}),Q(t=>{let r={...t};return delete r[e],r});try{let t=y();t[e]&&(delete t[e],window.localStorage.setItem(d,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await f(e4,eJ)}}catch(e){console.error("Error deleting connection:",e)}finally{ep(null)}}},[e4,eJ]),tr=(0,s.useCallback)(async(e,t)=>{eg(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(J(e=>({...e})),await f(e4,eJ))}catch(e){console.error("Error updating connection status:",e)}finally{eg(null)}},[e4,eJ]),ta=(0,s.useCallback)(async e=>{if(!eC?.id)return;let t=eC.id,r=eC.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await e4(),ek(!1),eS(null),E.wb.includes(r)&&await e8(t,r))}catch(e){console.error("Error saving connection:",e)}},[eC,e4,e8]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&e$(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let ts=(0,s.useCallback)(async(e=!1)=>{if(el)return;eo(!0),ec(60);let t=e3.current+=1;try{let r=await e4(eJ);V(g(r)),Q(e=>b(e,r)),J(e=>b(e,r)),await Promise.all(r.filter(r=>e||"claude"!==r.provider||t%10==0).map(e=>e8(e.id,e.provider))),es(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{eo(!1)}},[el,e4,e8,eJ]);(0,s.useEffect)(()=>{(async()=>{em(!0);let e=await e4(eJ);em(!1),V(g(e)),Q(t=>b(t,e)),J(t=>b(t,e)),await Promise.all(e.map(e=>e8(e.id,e.provider))),es(new Date)})()},[e4,e8,eJ]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(c);Y(null===e||"true"===e),ei(!0)},[]),(0,s.useEffect)(()=>{en&&window.localStorage.setItem(c,String(Z))},[Z,en]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{ee({claude:e?.claudeAutoPing||{},codex:e?.codexAutoPing||{}}),eL(e?.quotaVisibility||{})}).catch(()=>{})},[]);let tn=(0,s.useCallback)(async(e,t,{reactive:r,schedule:a})=>{let s=M[t];if(!s)return;let n=X[t]||{},i={...n,connections:{...n.connections||{},[e]:r},schedules:{...n.schedules||{},[e]:a}};ee({...X,[t]:i});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[s]||{},connections:i.connections,schedules:i.schedules};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[s]:t})})}catch{ee(X)}},[X]),ti=(0,s.useCallback)(async(e,t)=>{eL(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),eL(t)}},[]),tl=(0,s.useCallback)((e,t)=>{let r=j(t);if(!e||!r)return;let a=eF[e]||{},s=new Set(a.hidden||[]);if(s.add(r),"antigravity"===e){if("gemini"===r)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===r)for(let e of s)e.startsWith("claude-")&&s.delete(e)}ti({...eF,[e]:{...a,hidden:[...s]}},eF)},[eF,ti]),to=(0,s.useCallback)((e,t)=>{let r=j(t);if(!e||!r)return;let a=eF[e]||{},s=new Set(a.hidden||[]);if(s.delete(r),"antigravity"===e){if("gemini"===r)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===r)for(let e of s)e.startsWith("claude-")&&s.delete(e)}ti({...eF,[e]:{...a,hidden:[...s]}},eF)},[eF,ti]);(0,s.useEffect)(()=>{if(!en||!Z){e2.current&&(clearInterval(e2.current),e2.current=null),e5.current&&(clearInterval(e5.current),e5.current=null);return}return e2.current=setInterval(()=>{ts()},6e4),e5.current=setInterval(()=>{ec(e=>e<=1?60:e-1)},1e3),()=>{e2.current&&clearInterval(e2.current),e5.current&&clearInterval(e5.current)}},[Z,ts,en]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(e2.current&&(clearInterval(e2.current),e2.current=null),e5.current&&(clearInterval(e5.current),e5.current=null)):Z&&en&&(e2.current=setInterval(()=>ts(),6e4),e5.current=setInterval(()=>{ec(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[Z,ts,en]);let td=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),n=h(r,t),i="remaining-asc"===s?a-n:n-a;return 0!==i?i:(p(e)||"").localeCompare(p(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||"")||(p(e)||"").localeCompare(p(t)||"")})})(H,B,eU,eP,eT),[H,B,eU,eP,eT]),tc=e=>{let t=B[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=w(e.used,e.total))},tu=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eW){eB(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await f(e4,eJ)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eB(!1)}}},[eW,e4,eJ]),tm="all"===eP?"All providers":L(eP),tx=e0.eligibleConnections>0,tp=td.length>0,th=e0.eligibleConnections?e0.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"===eP?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eM?"turned off":"active"===eM?"active":"matching"} accounts found for ${eP}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tg=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}`}(eY),tb=!u.includes(eV);return eu||tx?eu||tp?(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-center",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:()=>eH(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-border bg-surface px-2 font-display text-xs font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2","aria-haspopup":"menu","aria-expanded":ez,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===eP?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:`/providers/${eP}.png`,alt:eP,size:18,className:"size-[18px] rounded object-contain",fallbackText:eP.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate hidden lg:inline",children:tm})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),ez&&(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:()=>eH(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-xl border border-border bg-surface p-1.5 shadow-warm sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==eP&&eK(1),eE("all"),eH(!1)},className:`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left text-sm transition-colors ${"all"===eP?"bg-surface-2 text-text-main":"text-text-main hover:bg-surface-2"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===eP&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-border"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:e_.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{eP!==e&&eK(1),eE(e),eH(!1)},className:`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left text-sm transition-colors ${eP===e?"bg-surface-2 text-text-main":"text-text-main hover:bg-surface-2"}`,children:[(0,a.jsx)(i.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",children:L(e)}),eP===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)(l.A,{value:eM,onChange:e=>{eM!==e&&eK(1),eO(e)},options:m.map(e=>({value:e.value,label:e.label})),buttonClassName:"h-8 rounded-lg px-2 font-display text-xs font-medium",menuClassName:"w-48",align:"right"}),"codex"===eP&&(0,a.jsx)(l.A,{value:eT,onChange:eI,options:x.map(e=>({value:e.value,label:e.label})),buttonClassName:"h-8 rounded-lg px-2 font-display text-xs font-medium",menuClassName:"w-48",align:"right"}),(0,a.jsxs)("button",{type:"button",onClick:()=>eR(e=>!e),"aria-pressed":eU,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 font-display text-xs font-medium transition-colors ${eU?"border-text-subtle bg-surface-2 text-text-main":"border-border text-text-main hover:bg-surface-2"}`,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:()=>{tu(td.filter(e=>(e.isActive??!0)&&tc(e)).map(e=>e.id),!1)},disabled:eW,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border bg-surface px-2 font-display text-xs font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tu(td.filter(e=>!(e.isActive??!0)&&!tc(e)).map(e=>e.id),!0)},disabled:eW,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border bg-surface px-2 font-display text-xs font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2 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] text-text-muted",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>Y(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border bg-surface px-2 font-display text-xs font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2",title:Z?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${Z?"text-text-main":"text-text-subtle"}`,children:Z?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-main sm:inline",children:"Auto-refresh"}),Z&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",ed,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>ts(!0),disabled:el,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border bg-surface px-2 font-display text-xs font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${el?"animate-spin":""}`,children:"refresh"})})]})}),eU&&(0,a.jsx)("div",{className:"rounded-xl border border-border bg-surface-2/50 px-3 py-2 text-xs text-text-muted",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:td.map(r=>{let s,n,l,o=B[r.id],d=K[r.id],c=G[r.id],u=!1===r.isActive,m="codex"===r.provider,x="claude"===r.provider?o?.raw?.resetCredits:null,h=m?"Codex reset credit":"Claude limit reset",g=Number.isFinite(n="number"==typeof(s=o?.raw?.resetCredits?.availableCount)?s:Number(s))?Math.max(0,n):0,b=eb===r.id,f=ex===r.id||eh===r.id||b,y=o?.quotas||[],v=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=N(e,r,t);return 0===a.size?t:t.filter(e=>!a.has(j(e)))}(r.provider,y,eF),w=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=N(e,r,t);return 0===a.size?[]:t.filter(e=>a.has(j(e)))}(r.provider,y,eF);return(0,a.jsxs)(A.default,{padding:"none",className:`min-w-0 ${u?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-border",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(i.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:L(r.provider)}),p(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:p(r)}):null,O(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:O(r)}):null,"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-surface-2 px-2 py-0.5 text-[10px] font-medium text-text-muted",children:(l=r.providerSpecificData?.authMethod)&&D[l]?D[l]:"api_key"===r.authType?"API Key":"OAuth"}),T(r)&&(0,a.jsx)("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-medium text-text-muted",children:T(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-medium ${u?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-success/10 text-success":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-danger/10 text-danger":"bg-surface-2 text-text-muted"}`,children:u?"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:[(m||x)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.default,{text:g>0?x?`Use your reset now (${g} left, use by ${U(x.expiresAt)}) \xb7 refills ${F(x.clears)}`:`Use one ${h}. Available: ${g}`:`No ${h}s available`,children:(0,a.jsxs)("button",{type:"button",onClick:()=>ev({connection:r,resetCreditCount:g}),disabled:g<=0||d||f,"aria-label":g>0?`Use one ${h}. ${g} available.`:`No ${h}s available`,className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 font-display 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 ${g>0?"border-text-subtle bg-surface-2 text-text-main hover:bg-surface-3":"border-border bg-surface text-text-muted"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${b?"animate-spin":""}`,children:b?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:g})]})}),(0,a.jsx)(S.default,{text:m?"View Codex reset credit expiry":"View Claude Code reset expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>m?te(r):e7(r,x),disabled:d||f,"aria-label":m?"View Codex reset credit expiry":"View Claude Code reset expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-surface text-text-muted transition-colors hover:border-text-subtle hover:bg-surface-2 hover:text-text-main disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),M[r.provider]&&"oauth"===r.authType&&(()=>{let e=X[r.provider]||{},t=e.connections?.[r.id]===!0,s=e.schedules?.[r.id],n=s?.enabled===!0,i=[];if(t&&i.push("On reset"),n){let e=(0,q.JW)(s).join(" / ");i.push(`Scheduled (${e||"active"})`)}let l=i.length>0?`Auto-ping active: ${i.join(" + ")}. Click to configure.`:"codex"===r.provider?"Auto-starts the next 5h Codex 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)(S.default,{text:l,children:(0,a.jsx)("button",{type:"button",onClick:()=>er(r),"aria-label":"Configure auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg border transition-colors hover:border-text-subtle hover:bg-surface-2 ${t||n?"border-text-subtle bg-surface-2 text-text-main":"border-border bg-surface text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})})})(),(0,a.jsx)(S.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>e6(r.id,r.provider),disabled:d||f,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-surface transition-colors hover:border-text-subtle hover:bg-surface-2 disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${d?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(S.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{eS(r),ek(!0)},disabled:f,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-surface text-text-muted transition-colors hover:border-text-subtle hover:bg-surface-2 hover:text-text-main disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(S.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>tt(r.id),disabled:f,"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] ${ex===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)(C.default,{size:"sm",checked:r.isActive??!0,disabled:f,onChange:e=>tr(r.id,e)})})]})]})}),(0,a.jsxs)("div",{className:"px-2 py-1.5",children:[d?(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"})}):c?(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:c})]}):o?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:o.message})}):(0,a.jsx)(k,{quotas:v,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==eT,onHideQuota:e=>tl(r.provider,e)}),o?.message&&!c&&!d&&(0,a.jsx)("p",{className:"mt-2 px-1 text-[10px] leading-relaxed text-text-muted",children:o.message}),w.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-border pt-2 text-[10px] text-text-muted",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:w.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>to(r.provider,e),className:"shrink-0 rounded-md border border-border bg-surface px-1.5 py-0.5 font-display transition-colors hover:bg-surface-2 hover:text-text-main",title:"Show this quota row",children:e.name},j(e)))})]})]})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-border bg-surface-2/50 px-3 py-2",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-[10px] uppercase tracking-wider text-text-subtle",children:tg}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(l.A,{value:tb?"custom":String(eV),onChange:e=>{if("custom"===e)return;let t=Number.parseInt(String(e),10);Number.isFinite(t)&&(eK(1),eG(t),eZ(String(t)))},options:[...u.map(e=>({value:String(e),label:`${e} / page`})),{value:"custom",label:"Custom"}],buttonClassName:"h-8 rounded-lg px-2 font-display text-xs font-medium",menuClassName:"w-40",align:"right"}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eQ,onChange:e=>eZ(e.target.value),onBlur:()=>{let e=Number.parseInt(eQ,10);if(!Number.isFinite(e))return void eZ(String(eV));let t=Math.min(500,Math.max(1,e));eK(1),eG(t),eZ(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eQ,10);if(!Number.isFinite(t))return void eZ(String(eV));let r=Math.min(500,Math.max(1,t));eK(1),eG(r),eZ(String(r))},className:"h-8 w-20 rounded-lg border border-border bg-surface px-2 font-display text-xs font-medium text-text-main outline-none transition-colors hover:border-text-subtle hover:bg-surface-2","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"font-mono text-[10px] uppercase tracking-wider text-text-subtle",children:["Page ",eY.page," / ",eY.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eK(1),disabled:eY.page<=1||eu||el,className:"flex h-8 items-center rounded-lg border border-border bg-surface px-3 font-display text-xs font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eK(e=>Math.max(1,e-1)),disabled:eY.page<=1||eu||el,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-surface font-display text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40","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:()=>eK(e=>Math.min(eY.totalPages,e+1)),disabled:eY.page>=eY.totalPages||eu||el,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-surface font-display text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40","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:()=>eK(eY.totalPages),disabled:eY.page>=eY.totalPages||eu||el,className:"flex h-8 items-center rounded-lg border border-border bg-surface px-3 font-display text-xs font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40",children:"Last Page"})]})]})}),(0,a.jsx)($.uo,{isOpen:!!ey,onClose:()=>{eb||ev(null)},onConfirm:async()=>{let e=ey?.connection;e&&(await e9(e.id,e.provider),ev(null))},title:ey?.connection?.provider==="claude"?"Reset Claude limits?":"Reset Codex limit?",message:ey?.connection?.provider==="claude"?`Refills your ${F(B[ey.connection.id]?.raw?.resetCredits?.clears)} now for ${p(ey.connection)||"this account"} \xb7 your weekly reset day stays ${U(B[ey.connection.id]?.raw?.resetCredits?.weeklyResetsAt)}. This cannot be undone. Resets left: ${ey.resetCreditCount??0}.`:`Use 1 Codex reset credit for ${p(ey?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${ey?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!eb}),ew&&(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:ew.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:p(ew.connection)||(ew.data?.kind==="claude"?"Claude account":"Codex account")})]}),(0,a.jsx)("button",{type:"button",onClick:()=>ej(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:ew.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..."]}):ew.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:ew.error}):ew.data?.kind==="claude"&&ew.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:[ew.data.availableCount??0," reset",1===ew.data.availableCount?"":"s"," left"]}),(0,a.jsxs)("span",{children:["Weekly reset day: ",U(ew.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:(ew.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:F(e.clears)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:U(e.endsAt)}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-2 font-medium text-text-primary",children:R(e.endsAt)})]},e.id))})]})})]}):ew.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:[ew.data.credits.length," reset credit",1===ew.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ew.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:ew.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:U(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:U(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:R(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:ew.data?.kind==="claude"?"No limit resets available for this account.":"No reset credit details returned for this account."})})]})}),(0,a.jsx)($.wI,{isOpen:eN,connection:eC,proxyPools:eA,onSave:ta,onClose:()=>{ek(!1),eS(null)}}),et&&(0,a.jsx)(P.A,{isOpen:!!et,onClose:()=>er(null),connection:et,reactive:X[et.provider]?.connections?.[et.id]===!0,schedule:X[et.provider]?.schedules?.[et.id]||null,onSave:e=>tn(et.id,et.provider,e)})]}):(0,a.jsx)(A.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:th.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:th.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:th.description})]})}):(0,a.jsx)(A.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:()=>s,nz:()=>i});let s={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 i(e){return Math.max(1,Math.floor(24/e))}function l(e,t,r,a){let s="number"==typeof e?e:Number(e);return Number.isFinite(s)?Math.min(a,Math.max(r,s)):t}function o(e){let t=function(e){if(!e||!0!==e.enabled)return null;let t=n(e.anchor)||n(s.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)?s.timezone:e.timezone,o=l(e.windowHours,s.windowHours,.5,24),d=Math.round(l(e.slotsPerDay,s.slotsPerDay,1,i(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),s=r(12115),n=r(14051),i=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:i=!1,schedule:m=null}){let[x,p]=(0,s.useState)(()=>({mode:m?.enabled===!0?"schedule":!0===i?"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,j="schedule"!==x.mode||w,N=w?(0,d.JW)({enabled:!0,...x,windowHours:h,slotsPerDay:g}):[],k=N.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:()=>{j&&(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:!j,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"})]}),N.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:N.join(" → ")}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",N[0]," – ",k,", then pauses until ",N[0]," next day."]})]})]})]})})}u.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onSave:i().func.isRequired,connection:i().object,reactive:i().bool,schedule:i().object}}},e=>{e.O(0,[763,2470,705,3557,5497,8441,3794,7358],()=>e(e.s=56804)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{64082:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var s=r(95155),i=r(35497),n=r(11059);let a="keyzakyy-dev/keyrouter",o=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/master/skills`,c=[{id:"keyrouter",name:"KeyRouter",description:"Setup guide + index of all capabilities. Start here.",endpoint:null,icon:"hub",isEntry:!0},{id:"keyrouter-chat",name:"Chat",description:"Chat & code generation via OpenAI or Anthropic formats, with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"keyrouter-image",name:"Image Generation",description:"Text-to-image via DALL‑E, Imagen, FLUX, MiniMax, SD WebUI.",endpoint:"/v1/images/generations",icon:"image"},{id:"keyrouter-tts",name:"Text-to-Speech",description:"Speech synthesis via OpenAI, ElevenLabs, Edge, Google, or Deepgram.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"keyrouter-stt",name:"Speech-to-Text",description:"Transcription via Whisper, Groq, Gemini, Deepgram, or AssemblyAI.",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"keyrouter-embeddings",name:"Embeddings",description:"Embeddings for RAG & semantic search via OpenAI, Gemini, or Mistral.",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"keyrouter-web-search",name:"Web Search",description:"Web & X search via Tavily, Exa, Brave, Serper, SearXNG, or PSE.",endpoint:"/v1/search",icon:"search"},{id:"keyrouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, or Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function l(e){return`${d}/${e}/SKILL.md`}function x({value:e,label:t="Copy"}){let{copied:r,copy:i}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>i(e),className:`inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md border px-2.5 font-display text-[11px] font-semibold transition-colors cursor-pointer ${r?"border-success bg-success/10 text-success":"border-text-subtle text-text-main hover:bg-surface-2"}`,title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:r?"check":"content_copy"}),r?"Copied!":t]})}function m({skill:e}){let t=l(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-xl border transition-colors ${e.isEntry?"border-border bg-surface-2/50":"border-border-subtle bg-surface hover:bg-surface-2/60"}`,children:[(0,s.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-surface-2 border border-border",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("h3",{className:"truncate font-display text-sm font-medium text-text-main",children:e.name}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[e.isEntry&&(0,s.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-2 py-0.5 font-mono text-[10px] uppercase tracking-wider text-text-muted",children:"START HERE"}),e.endpoint&&(0,s.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-2 py-0.5 font-mono text-[10px] uppercase tracking-wider text-text-muted",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted line-clamp-2",children:e.description})]}),(0,s.jsx)(x,{value:t})]})}function p(){return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-main",children:"Skills"}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-wider text-text-subtle",children:"Copy-paste agent skills for KeyRouter"})]}),(0,s.jsxs)(i.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"mb-2 font-mono text-[11px] uppercase tracking-wider text-text-subtle",children:"Paste into your AI"}),(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",l("keyrouter")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:c.map(e=>(0,s.jsx)(m,{skill:e},e.id))}),(0,s.jsx)(i.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("svg",{viewBox:"0 0 16 16",width:"20",height:"20",fill:"currentColor",className:"shrink-0 text-text-muted","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"font-display text-base font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Browse the source, README, and examples for every skill."})]})]}),(0,s.jsxs)("a",{href:`${o}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-border bg-surface-2 px-3 text-sm font-display font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted",children:"open_in_new"}),"View on GitHub"]})]})})]})}},96796:(e,t,r)=>{Promise.resolve().then(r.bind(r,64082))}},e=>{e.O(0,[763,2470,705,3557,5497,8441,3794,7358],()=>e(e.s=96796)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>d,Nv:()=>m,RL:()=>c,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>o});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,o=5,c=1e4,d=5e3,x=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],m=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var a=s(95155),l=s(12115),r=s(35497),n=s(11059),i=s(73006),o=s(15536);function c(){let[e,t]=(0,l.useState)(!0),[s,c]=(0,l.useState)(!1),[d,x]=(0,l.useState)("http://localhost:8787"),[m,h]=(0,l.useState)(3e3),[p,u]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[f,g]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[v,y]=(0,l.useState)(""),[N,k]=(0,l.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[w,C]=(0,l.useState)([]),[S,E]=(0,l.useState)(!1),[T,P]=(0,l.useState)(""),[R,I]=(0,l.useState)(null),[$,L]=(0,l.useState)(""),[M,O]=(0,l.useState)(null),[U,H]=(0,l.useState)(!1),[A,_]=(0,l.useState)(!0),[z,D]=(0,l.useState)(!1),F=(0,l.useRef)(null),[B,J]=(0,l.useState)(!1),[K,W]=(0,l.useState)("full"),[G,X]=(0,l.useState)(!1),[q,Z]=(0,l.useState)("full"),[Y,Q]=(0,l.useState)(!1),[V,ee]=(0,l.useState)(25e3),[et,es]=(0,l.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[ea,el]=(0,l.useState)(null),[er,en]=(0,l.useState)(!1),[ei,eo]=(0,l.useState)(!1),[ec,ed]=(0,l.useState)(""),[ex,em]=(0,l.useState)("en"),{copied:eh,copy:ep}=(0,n.C)();(0,l.useEffect)(()=>(em((0,i.kk)()),(0,i.oQ)(()=>em((0,i.kk)()))),[]);let eu=o.hT.includes(ex),ef=eu?o.ev:o.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=o.ev.find(e=>e.id===K);e?.wenyan&&!eu&&(W("ultra"),eg({cavemanLevel:"ultra"}))},[eu,K]);let eg=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},eb=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},ej=async()=>{let e=d.trim()||"http://localhost:8787";x(e),await eg({headroomUrl:e}),ev()},ev=(0,l.useCallback)(async()=>{u(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(u({...t,loading:!1}),!t?.installed){k({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([]);return}try{let e=await fetch("/api/headroom/extras",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error("extras status failed");let t=await e.json();k(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),C([])}catch{k({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([])}}catch{u({installed:!1,running:!1,python:null,loading:!1}),k({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([])}},[]),ey=(0,l.useCallback)(async()=>{y(""),j(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await ev()}catch(e){y(e.message)}finally{j(!1)}},[ev]),eN=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await ev()}finally{j(!1)}},[ev]),ek=(0,l.useCallback)(()=>{L(""),F.current&&clearInterval(F.current);let e=async()=>{try{let e=await fetch("/api/headroom/extras?log=1",{headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));"string"==typeof t.log&&L(t.log)}catch{}};e(),F.current=setInterval(e,1500)},[]),ew=(0,l.useCallback)(()=>{F.current&&(clearInterval(F.current),F.current=null)},[]);(0,l.useEffect)(()=>()=>ew(),[ew]);let eC=(0,l.useCallback)(async()=>{if(0!==w.length){E(!0),P(""),ek();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:w})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");k(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),C([])}catch(e){P(e.message)}finally{ew(),E(!1)}}},[w,ek,ew]),eS=(0,l.useCallback)(async e=>{I(e),P(""),ek();try{let t=await fetch("/api/headroom/extras",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:[e]})}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||"Remove failed");k(e=>({...e,version:s.version??e.version,extras:s.extras||e.extras}))}catch(e){P(e.message)}finally{ew(),I(null)}},[ek,ew]),eE=(0,l.useCallback)(()=>{if(0!==w.length){if(w.includes("ml"))return void O({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:eC});eC()}},[w,eC]),eT=(0,l.useCallback)(e=>{O({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eS(e)})},[eS]),eP=(0,l.useCallback)(async(e,t)=>{if(P(""),"code"===e&&H(t),"ml"===e&&_(t),await eg({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),p.running){D(!0);try{let e=await fetch("/api/headroom/restart",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Restart failed");await ev()}catch(e){P(e.message)}finally{D(!1)}}},[p.running,ev]),eR=(0,l.useCallback)(async()=>{es(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();es({...t,loading:!1}),"number"==typeof t.minChars&&ee(t.minChars)}catch{es({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eI=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});el(await e.json())}catch(e){el({healthy:!1,checks:[],error:e.message})}},[]),e$=(0,l.useCallback)(async e=>{ed(""),eo(!0);try{let t=await fetch(`/api/pxpipe/${e}`,{method:"POST"}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||`PXPIPE ${e} failed`);await eR(),await eI()}catch(e){ed(e.message)}finally{eo(!1)}},[eR,eI]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),c(!!s.headroomEnabled),x(s.headroomUrl||"http://localhost:8787"),"number"==typeof s.headroomTimeoutMs&&h(s.headroomTimeoutMs),H(!0===s.headroomCodeAware),_(!1!==s.headroomKompress),J(!!s.cavemanEnabled),W(s.cavemanLevel||"full"),X(!!s.ponytailEnabled),Z(s.ponytailLevel||"full"),Q(!!s.pxpipeEnabled),"number"==typeof s.pxpipeMinChars&&ee(s.pxpipeMinChars),ev(),eR().then(eI)}}catch{}})()},[ev,eR,eI]);let eL=!!p.running,eM=p.loading?"Checking…":eL?"Running":!1===p.localUrl||p.installed?!1!==p.localUrl?"Stopped":"External":"Not installed",eO=!1!==p.localUrl,eU=!!p.canStart,eH=eO&&!!p.managedPid,eA=ea?.healthy===!0,e_=et.loading?"Checking…":et.installing?"Installing…":et.installed?eA?"Healthy":et.running?"Running":"Stopped":"Not installed";return eA||et.running,(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(r.Zp,{className:"relative overflow-hidden",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3.5",children:[(0,a.jsx)("div",{className:"grid size-11 shrink-0 place-items-center rounded-[12px] bg-gradient-to-br from-brand-500 to-brand-700 text-white shadow-[var(--shadow-warm)]",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"savings"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"font-display text-lg font-semibold text-text-main",children:"Token Saver"}),(0,a.jsx)("p",{className:"mt-0.5 font-display text-sm text-text-muted",children:"Reduce token spend by compressing prompts and model output"})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"rounded-full bg-surface-2 px-3 py-1 text-[11px] font-medium text-text-muted",children:"RTK \xb7 Headroom \xb7 Caveman \xb7 Ponytail"})})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 items-stretch gap-5 lg:grid-cols-2",children:[(0,a.jsxs)(r.Zp,{id:"rtk",className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-surface-2 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-display text-base font-semibold text-text-main",children:"RTK"}),(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs text-primary underline hover:opacity-80",children:"docs"})]}),(0,a.jsx)("p",{className:"font-mono text-xs uppercase text-text-subtle",children:"Tool output compressor"})]})]}),(0,a.jsx)(r.lM,{checked:e,onChange:()=>eb(!e)})]}),(0,a.jsx)("div",{className:"rounded-lg bg-bg-subtle p-3",children:(0,a.jsx)("p",{className:"font-display text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})}),(0,a.jsx)("div",{className:"mt-auto flex flex-wrap items-center gap-2",children:(0,a.jsx)("span",{className:"rounded-md bg-success/10 px-2 py-0.5 text-[11px] font-medium text-success",children:"Compresses tool output"})})]}),(0,a.jsxs)(r.Zp,{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-surface-2 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"compress"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-display text-base font-semibold text-text-main",children:"Headroom"}),(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs text-primary underline hover:opacity-80",children:"docs"})]}),(0,a.jsx)("p",{className:"font-mono text-xs uppercase text-text-subtle",children:"Context compressor"})]})]}),(0,a.jsx)(r.lM,{checked:s,onChange:()=>{var e;let t;return e=!s,void(x(t=d.trim()||"http://localhost:8787"),c(e),eg({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`rounded-md px-2 py-0.5 text-[11px] font-medium ${eL?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:eM}),(0,a.jsx)("button",{type:"button",onClick:()=>g(!0),className:"text-xs text-primary underline hover:opacity-80",children:eL?"Manage":"Setup"})]}),(0,a.jsx)("div",{className:"rounded-lg bg-bg-subtle p-3",children:(0,a.jsx)("p",{className:"font-display text-sm text-text-muted",children:"Compress prompts via /v1/compress before routing to the model"})}),p.installed&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border p-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Compression extras",N.version?` \xb7 v${N.version}`:"",":"]}),N.available.map(e=>{let t=!!N.extras[e],s=w.includes(e),l="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?U:A;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs px-2 py-1 rounded border border-success/40 bg-success/5 text-text",title:l,children:[(0,a.jsx)(r.lM,{size:"sm",checked:t,disabled:z,onChange:()=>eP(e,!t)}),(0,a.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e),disabled:R===e,className:"ml-1 text-error underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:R===e?"Uninstalling…":"Uninstall"})]},e)}return(0,a.jsxs)("label",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded border cursor-pointer transition-colors ${s?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:bg-surface-2"}`,title:l,children:[(0,a.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:s,onChange:()=>{C(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}),(0,a.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,a.jsx)("span",{className:"opacity-70",children:"not installed"})]},e)}),w.length>0&&(0,a.jsx)("button",{onClick:eE,disabled:S,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:S?"Installing…":`Install [proxy,${w.join(",")}]`})]}),T&&(0,a.jsx)("p",{className:"text-xs text-error",children:T}),z&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Restarting proxy…"}),(S||R)&&$&&(0,a.jsx)("pre",{className:"max-h-32 overflow-auto rounded bg-surface-2 p-2 text-[10px] leading-tight text-text-muted whitespace-pre-wrap",children:$}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Installing adds the package; use ",(0,a.jsx)("code",{children:"on"}),"/",(0,a.jsx)("code",{children:"off"})," ","to activate it (restarts the proxy). Default install is"," ",(0,a.jsx)("code",{children:"[proxy]"})," only (SmartCrusher for JSON). Adding"," ",(0,a.jsx)("code",{children:"[code]"})," enables AST compression (Python/JS/TS/Go/Rust/Java/C/C++/Perl). Adding ",(0,a.jsx)("code",{children:"[ml]"})," ","enables the Kompress-v2 HF model for prose/agentic traces but adds ~1 GB (torch + huggingface-hub)."]})]})]}),(0,a.jsxs)(r.Zp,{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-surface-2 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"format_quote"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-display text-base font-semibold text-text-main",children:"Caveman"}),(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs text-primary underline hover:opacity-80",children:"docs"})]}),(0,a.jsx)("p",{className:"font-mono text-xs uppercase text-text-subtle",children:"LLM output compressor"})]})]}),(0,a.jsx)(r.lM,{checked:B,onChange:()=>{var e;J(e=!B),eg({cavemanEnabled:e})}})]}),(0,a.jsx)("div",{className:"rounded-lg bg-bg-subtle p-3",children:(0,a.jsx)("p",{className:"font-display text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})}),B&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:ef.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;W(t=e.id),eg({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${K===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:o.ev.find(e=>e.id===K)?.desc})]})]}),(0,a.jsxs)(r.Zp,{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-surface-2 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"content_cut"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-display text-base font-semibold text-text-main",children:"Ponytail"}),(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs text-primary underline hover:opacity-80",children:"docs"})]}),(0,a.jsx)("p",{className:"font-mono text-xs uppercase text-text-subtle",children:"Minimal-code bias"})]})]}),(0,a.jsx)(r.lM,{checked:G,onChange:()=>{var e;X(e=!G),eg({ponytailEnabled:e})}})]}),(0,a.jsx)("div",{className:"rounded-lg bg-bg-subtle p-3",children:(0,a.jsx)("p",{className:"font-display text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})}),G&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:o.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;Z(t=e.id),eg({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${q===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:o.Nv.find(e=>e.id===q)?.desc})]})]})]}),(0,a.jsx)(r.aF,{isOpen:f,title:eL?"Headroom":"Setup Headroom",onClose:()=>g(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:eL?"text-success":"text-warning",children:eM})]}),eL&&(0,a.jsx)("a",{href:"/api/headroom/proxy/dashboard",target:"_blank",rel:"noreferrer",className:"w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Headroom Dashboard"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(r.pd,{value:d,onChange:e=>x(e.target.value),onBlur:ej,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Timeout (ms)"}),(0,a.jsx)(r.pd,{value:String(m),onChange:e=>h(e.target.value),onBlur:()=>{let e=Math.round(Number(m)),t=Number.isFinite(e)&&e>0?e:3e3;h(t),eg({headroomTimeoutMs:t})},placeholder:"3000",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Request timeout in milliseconds. Defaults to 3000 ms."})]}),eH?(0,a.jsx)(r.$n,{onClick:eN,variant:"ghost",fullWidth:!0,disabled:b,children:b?"Stopping…":"Stop Headroom"}):eL?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):eU?(0,a.jsx)(r.$n,{onClick:ey,fullWidth:!0,disabled:b,children:b?"Starting…":"Start Headroom"}):eO?p.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>ep('pip install "headroom-ai[proxy]"'),children:eh?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),v&&(0,a.jsx)("p",{className:"text-sm text-warning",children:v}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>ev(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(r.$n,{onClick:()=>g(!1),fullWidth:!0,children:"Done"})]})]})}),(0,a.jsx)(r.aF,{isOpen:!1,title:et.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>en(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"font-display text-sm text-text-muted",children:"Compress prompts using multimodal encoding. Runs in-process - no extra server or environment variables required."}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsxs)("span",{className:eA||et.running?"text-success":"text-warning",children:[e_,et.version?` \xb7 v${et.version}`:""]})]}),ea?.checks?.length>0&&(0,a.jsxs)("div",{className:"flex flex-col gap-1 rounded border border-border p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:"Health check"}),ea.checks.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:e.ok?"text-success":"text-warning",children:[e.ok?"●":"○"," ",e.label]}),e.detail&&(0,a.jsx)("span",{className:"text-text-muted font-mono truncate max-w-[50%]",children:e.detail})]},e.id)),ea.error&&(0,a.jsx)("p",{className:"text-xs text-warning mt-1",children:ea.error})]}),et.installed?(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[et.running?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.$n,{onClick:()=>e$("restart"),variant:"ghost",disabled:ei,children:"Restart"}),(0,a.jsx)(r.$n,{onClick:()=>e$("stop"),variant:"ghost",disabled:ei,children:"Stop"})]}):(0,a.jsx)(r.$n,{onClick:()=>e$("start"),disabled:ei,children:ei?"Starting…":"Start"}),(0,a.jsx)(r.$n,{onClick:()=>e$("install"),variant:"ghost",disabled:ei,children:"Repair"}),(0,a.jsx)("a",{href:"/dashboard/pxpipe#logs",className:"col-span-2 rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Logs"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("p",{className:"text-sm text-warning",children:"PXPIPE is not installed."}),(0,a.jsx)(r.$n,{onClick:()=>e$("install"),fullWidth:!0,disabled:ei||et.installing,children:ei||et.installing?"Installing…":"Install"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Installs the npm package ",(0,a.jsx)("code",{className:"font-mono",children:"pxpipe-proxy"})," into the KeyRouter data directory. May take a few minutes."]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Minimum prompt size (chars)"}),(0,a.jsx)(r.pd,{value:String(V),onChange:e=>ee(e.target.value),onBlur:()=>{let e=Math.max(0,Number(V)||25e3);ee(e),eg({pxpipeMinChars:e})},placeholder:"25000",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requests smaller than this bypass PXPIPE and are sent as-is."})]}),ec&&(0,a.jsx)("p",{className:"text-sm text-warning",children:ec}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>eR().then(eI),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(r.$n,{onClick:()=>en(!1),fullWidth:!0,children:"Done"})]})]})}),(0,a.jsx)(r.uo,{isOpen:!!M,onClose:()=>O(null),onConfirm:()=>{let e=M?.onConfirm;O(null),e?.()},title:M?.title,message:M?.message,confirmText:M?.confirmText,variant:M?.variant})]})}},73288:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))}},e=>{e.O(0,[763,2470,705,3557,5497,8441,3794,7358],()=>e(e.s=73288)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{16797:(e,t,s)=>{Promise.resolve().then(s.bind(s,81772))},81772:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>S});var a=s(95155),n=s(12115),l=s(73321),i=s(35497),r=s(6808),o=s(84588),d=s(92542),x=s(31474);function c({isOpen:e,onClose:t,title:s,children:l,width:i="md",className:r}){let o={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,x.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",o[i]||o.md,r),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:l})]})]}):null}var m=s(39403);function p({currentPage:e,pageSize:t,totalItems:s,onPageChange:n,onPageSizeChange:l,className:i}){let r=Math.ceil(s/t),o=s>0?(e-1)*t+1:0,c=Math.min(e*t,s),u=(()=>{let t=[],s=Math.max(1,e-2),a=Math.min(r,s+5-1);a-s+1<5&&(s=Math.max(1,a-5+1));for(let e=s;e<=a;e++)t.push(e);return t})();return(0,a.jsxs)("div",{className:(0,x.cn)("flex flex-col sm:flex-row items-center justify-between gap-4 py-4 px-2",i),children:[s>0&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["Showing ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:o})," to"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:c})," of"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[l&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,a.jsx)(m.A,{value:t,onChange:e=>l(Number(e)),options:[10,20,50].map(e=>({value:e,label:String(e)})),buttonClassName:"h-9 min-w-[70px] py-1"})]}),r>1&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(d.default,{variant:"outline",size:"sm",onClick:()=>n(e-1),disabled:1===e,className:"w-9 px-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),u[0]>1&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.default,{variant:"ghost",size:"sm",onClick:()=>n(1),className:"w-9 px-0 hidden sm:inline-flex",children:"1"}),u[0]>2&&(0,a.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."})]}),u.map(t=>(0,a.jsx)(d.default,{variant:e===t?"primary":"ghost",size:"sm",onClick:()=>n(t),className:(0,x.cn)("w-9 px-0",e===t?"inline-flex":"hidden sm:inline-flex"),children:t},t)),u[u.length-1]<r&&(0,a.jsxs)(a.Fragment,{children:[u[u.length-1]<r-1&&(0,a.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."}),(0,a.jsx)(d.default,{variant:"ghost",size:"sm",onClick:()=>n(r),className:"w-9 px-0 hidden sm:inline-flex",children:r})]}),(0,a.jsx)(d.default,{variant:"outline",size:"sm",onClick:()=>n(e+1),disabled:e===r,className:"w-9 px-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})]})]})}var u=s(88105);let h=null,f=null;async function j(){if(h&&f)return{providerNameCache:h,providerNodesCache:f};let e=await fetch("/api/provider-nodes"),t=(await e.json()).nodes||[];for(let e of(f={},t))f[e.id]=e.name;return{providerNameCache:h={...u.Q2,...f},providerNodesCache:f}}function g(e,t){if(!e||!t)return e;let s=t[e];if("string"==typeof s)return s;if(s?.name)return s.name;let a=(0,u.zt)(e)||u.Q2[e];return a?.name||e}function b({title:e,children:t,defaultOpen:s=!1,icon:l=null}){let[i,r]=(0,n.useState)(s);return(0,a.jsxs)("div",{className:"border border-border-subtle rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>r(!i),className:"w-full flex items-center justify-between p-3 bg-bg-subtle/60 hover:bg-bg-subtle 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,x.cn)("material-symbols-outlined text-[20px] text-text-muted transition-transform duration-200",i?"rotate-90":""),children:"chevron_right"})]}),i&&(0,a.jsx)("div",{className:"p-4 border-t border-border-subtle",children:t})]})}function v(e){return e?.cached_tokens||e?.cache_read_input_tokens||0}function N(e){return e?.cache_creation_input_tokens||0}function w(e){let t=e?.prompt_tokens||e?.input_tokens||0,s=v(e);return t<s?s:t}function k(){let[e,t]=(0,n.useState)([]),[s,l]=(0,n.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[i,r]=(0,n.useState)(!1),[u,h]=(0,n.useState)(null),[f,k]=(0,n.useState)(!1),[y,S]=(0,n.useState)([]),[C,D]=(0,n.useState)(null),[_,P]=(0,n.useState)({provider:"",startDate:"",endDate:""}),z=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/usage/providers"),t=await e.json();S(t.providers||[]);let s=await j();D(s.providerNameCache)}catch(e){console.error("Failed to fetch providers:",e)}},[]),L=(0,n.useCallback)(async()=>{r(!0);try{let e=new URLSearchParams({page:s.page.toString(),pageSize:s.pageSize.toString()});_.provider&&e.append("provider",_.provider),_.startDate&&e.append("startDate",_.startDate),_.endDate&&e.append("endDate",_.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{r(!1)}},[s.page,s.pageSize,_]);return(0,n.useEffect)(()=>{z()},[z]),(0,n.useEffect)(()=>{L()},[L]),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(o.default,{padding:"md",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Provider"}),(0,a.jsx)(m.A,{value:_.provider,onChange:e=>P({..._,provider:e}),options:[{value:"",label:"All Providers"},...y.map(e=>({value:e.id,label:e.name}))],buttonClassName:(0,x.cn)("h-9 px-3 rounded-lg","text-sm text-text-main w-full min-w-0"),className:"w-full min-w-0"})]}),(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:_.startDate,onChange:e=>P({..._,startDate:e.target.value}),className:(0,x.cn)("h-9 px-3 rounded-lg border border-border 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:_.endDate,onChange:e=>P({..._,endDate:e.target.value}),className:(0,x.cn)("h-9 px-3 rounded-lg border border-border 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)(d.default,{variant:"ghost",onClick:()=>{P({provider:"",startDate:"",endDate:""})},disabled:!_.provider&&!_.startDate&&!_.endDate,className:"w-full",children:"Clear Filters"})]})]})}),(0,a.jsxs)(o.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-border-subtle",children:[(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Input Tokens"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"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:i?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading..."]})})}):0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:"No request details found"})}):e.map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-border-subtle last:border-b-0 hover:bg-surface-2/50 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:g(e.provider,C)})}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:w(e.tokens).toLocaleString()}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:v(e.tokens)>0?v(e.tokens).toLocaleString():"-"}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:N(e.tokens)>0?N(e.tokens).toLocaleString():"-"}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:e.tokens?.completion_tokens?.toLocaleString()||0}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-muted",children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsxs)("div",{children:["TTFT: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.ttft||0,"ms"]})]}),(0,a.jsxs)("div",{children:["Total: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.total||0,"ms"]})]})]})}),(0,a.jsx)("td",{className:"p-4 text-center",children:(0,a.jsx)(d.default,{variant:"outline",size:"sm",onClick:()=>{h(e),k(!0)},children:"Detail"})})]},`${e.id}-${t}`))})]})}),!i&&e.length>0&&(0,a.jsx)("div",{className:"border-t border-border-subtle",children:(0,a.jsx)(p,{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)(c,{isOpen:f,onClose:()=>k(!1),title:"Request Details",width:"lg",children:u&&(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:u.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(u.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:g(u.provider,C)})]}),(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:u.model})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,a.jsx)("span",{className:(0,x.cn)("font-medium","success"===u.status?"text-success":"text-danger"),children:u.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 ",u.latency?.ttft||0,"ms / Total ",u.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:w(u.tokens).toLocaleString()})]}),v(u.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:v(u.tokens).toLocaleString()})]}),N(u.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:N(u.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:u.tokens?.completion_tokens?.toLocaleString()||0})]})]}),u.pxpipe&&(0,a.jsxs)("div",{className:"rounded-lg border border-border-subtle 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,x.cn)("text-xs px-2 py-0.5 rounded",u.pxpipe.applied?"bg-success/15 text-success":"bg-warning/15 text-warning"),children:u.pxpipe.applied?"Activated":"Skipped"})]}),u.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:[(u.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:[(u.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-success",children:[u.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:[u.pxpipe.imageCount||0," (",u.pxpipe.durationMs||0,"ms)"]})]})]}):(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Reason: ",(0,a.jsx)("span",{className:"font-mono",children:u.pxpipe.reason}),u.pxpipe.detail?` - ${u.pxpipe.detail}`:""]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(b,{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-border-subtle bg-bg-subtle p-3 font-mono text-xs text-text-main sm:p-4",children:JSON.stringify(u.request,null,2)})}),u.providerRequest&&(0,a.jsx)(b,{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-border-subtle bg-bg-subtle p-3 font-mono text-xs text-text-main sm:p-4",children:JSON.stringify(u.providerRequest,null,2)})}),u.providerResponse&&(0,a.jsx)(b,{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-border-subtle bg-bg-subtle p-3 font-mono text-xs text-text-main sm:p-4",children:"object"==typeof u.providerResponse?JSON.stringify(u.providerResponse,null,2):u.providerResponse})}),(0,a.jsxs)(b,{title:"4. Client Response (Final)",defaultOpen:!0,icon:"output",children:[u.response?.thinking&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"font-semibold text-text-main mb-2 flex items-center gap-2 text-xs uppercase tracking-wide opacity-70",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"psychology"}),"Thinking Process"]}),(0,a.jsx)("pre",{className:"max-h-[200px] max-w-full overflow-auto rounded-lg border border-warning/40 bg-warning/10 p-3 font-mono text-xs text-warning sm:p-4",children:u.response.thinking})]}),(0,a.jsx)("h4",{className:"font-semibold text-text-main mb-2 text-xs uppercase tracking-wide opacity-70",children:"Content"}),(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-border-subtle bg-bg-subtle p-3 font-mono text-xs text-text-main sm:p-4",children:u.response?.content||"[No content]"})]})]})]})})]})}let y=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"},{value:"all",label:"All"}];function S(){return(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(i.Qv,{}),children:(0,a.jsx)(C,{})})}function C(){let e=(0,l.useSearchParams)(),t=(0,l.useRouter)(),[s,o]=(0,n.useState)("today"),d=e.get("tab"),x=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 flex-col gap-2",children:[(0,a.jsx)("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-main",children:"Usage"}),(0,a.jsx)("p",{className:"font-mono text-[10px] uppercase tracking-wider text-text-subtle",children:"Usage across every provider connection - real-time requests, tokens, and estimated cost."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(i.Iz,{options:[{value:"overview",label:"Overview",icon:"monitoring"},{value:"details",label:"Details",icon:"table_rows"}],value:x,onChange:s=>{if(s===x)return;let a=new URLSearchParams(e);a.set("tab",s),t.push(`/dashboard/usage?${a.toString()}`,{scroll:!1})},className:"w-full sm:w-auto"}),"overview"===x&&(0,a.jsx)(i.Iz,{options:y,value:s,onChange:o,size:"sm",wrap:!0,className:"w-full sm:w-auto sm:justify-end"})]}),"overview"===x&&(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(i.Qv,{}),children:(0,a.jsx)(r.default,{period:s,setPeriod:o,hidePeriodSelector:!0})}),"logs"===x&&(0,a.jsx)(i.gM,{}),"details"===x&&(0,a.jsx)(k,{})]})}}},e=>{e.O(0,[763,2470,705,3557,5497,6808,8441,3794,7358],()=>e(e.s=16797)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{13506:(e,s,n)=>{Promise.resolve().then(n.bind(n,96748)),Promise.resolve().then(n.bind(n,56319)),Promise.resolve().then(n.bind(n,56061)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,29366)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,40197)),Promise.resolve().then(n.bind(n,45455)),Promise.resolve().then(n.bind(n,30815)),Promise.resolve().then(n.bind(n,73579)),Promise.resolve().then(n.bind(n,92173)),Promise.resolve().then(n.bind(n,95088)),Promise.resolve().then(n.bind(n,8823)),Promise.resolve().then(n.bind(n,80752)),Promise.resolve().then(n.bind(n,23936)),Promise.resolve().then(n.bind(n,11910)),Promise.resolve().then(n.bind(n,61500)),Promise.resolve().then(n.bind(n,62899)),Promise.resolve().then(n.bind(n,94230)),Promise.resolve().then(n.bind(n,21931)),Promise.resolve().then(n.bind(n,91450)),Promise.resolve().then(n.bind(n,30233)),Promise.resolve().then(n.bind(n,25086)),Promise.resolve().then(n.bind(n,28815)),Promise.resolve().then(n.bind(n,28058)),Promise.resolve().then(n.bind(n,81127)),Promise.resolve().then(n.bind(n,28011)),Promise.resolve().then(n.bind(n,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,23615)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,92622)),Promise.resolve().then(n.bind(n,48366)),Promise.resolve().then(n.bind(n,21110)),Promise.resolve().then(n.bind(n,38587)),Promise.resolve().then(n.bind(n,98542)),Promise.resolve().then(n.bind(n,97677)),Promise.resolve().then(n.bind(n,38267)),Promise.resolve().then(n.bind(n,40684)),Promise.resolve().then(n.bind(n,30312))}},e=>{e.O(0,[763,2470,705,3557,5497,8441,3794,7358],()=>e(e.s=13506)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7370],{64506:(e,t,s)=>{Promise.resolve().then(s.bind(s,64533))},64533:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(95155),a=s(12115),i=s(73321),n=s(84588),l=s(62630);function c({isOpen:e,onClose:t,onSave:s}){let[i,n]=(0,a.useState)({}),[d,o]=(0,a.useState)(!0),[x,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&u()},[e]);let u=async()=>{o(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();n(t)}else{let e=(0,l.ad)();n(e)}}catch(t){console.error("Failed to load pricing:",t);let e=(0,l.ad)();n(e)}finally{o(!1)}},h=async()=>{m(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(e.ok)s?.(),t();else{let t=await e.json();alert(`Failed to save pricing: ${t.error}`)}}catch(e){console.error("Failed to save pricing:",e),alert("Failed to save pricing")}finally{m(!1)}},p=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{if((await fetch("/api/pricing",{method:"DELETE"})).ok){let e=(0,l.ad)();n(e)}}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let j=Object.keys(i).sort(),b=["input","output","cached","reasoning","cache_creation"];return(0,r.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,r.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,r.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,r.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,r.jsx)("div",{className:"flex-1 overflow-auto p-4",children:d?(0,r.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,r.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,r.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,r.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),j.map(e=>{let t=Object.keys(i[e]).sort();return(0,r.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,r.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm",children:[(0,r.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,r.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),b.map(s=>(0,r.jsx)("td",{className:"px-3 py-2",children:(0,r.jsx)("input",{type:"number",step:"0.01",min:"0",value:i[e][t][s]||0,onChange:r=>{let a;!isNaN(a=parseFloat(r.target.value))&&!(a<0)&&n(r=>{let i={...r};return i[e]||(i[e]={}),i[e][t]||(i[e][t]={}),i[e][t][s]=a,i})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},s))]},t))})]})})]},e)}),0===j.length&&(0,r.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,r.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,r.jsx)("button",{onClick:p,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:x,children:"Reset to Defaults"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:x,children:"Cancel"}),(0,r.jsx)("button",{onClick:h,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:x,children:x?"Saving...":"Save Changes"})]})]})]})})}function d(){(0,i.useRouter)();let[e,t]=(0,a.useState)(!1),[s,l]=(0,a.useState)(null),[d,o]=(0,a.useState)(!0);(0,a.useEffect)(()=>{x()},[]);let x=async()=>{o(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();l(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{o(!1)}};return(0,r.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-3xl font-bold",children:"Pricing Settings"}),(0,r.jsx)("p",{className:"text-text-muted mt-1",children:"Configure pricing rates for cost tracking and calculations"})]}),(0,r.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:"Edit Pricing"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,r.jsxs)(n.default,{className:"p-4",children:[(0,r.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Models"}),(0,r.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(()=>{if(!s)return 0;let e=0;for(let t in s)e+=Object.keys(s[t]).length;return e})()})]}),(0,r.jsxs)(n.default,{className:"p-4",children:[(0,r.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Providers"}),(0,r.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(!s?[]:Object.keys(s).sort()).length})]}),(0,r.jsxs)(n.default,{className:"p-4",children:[(0,r.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Status"}),(0,r.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:d?"...":"Active"})]})]}),(0,r.jsxs)(n.default,{className:"p-6",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"How Pricing Works"}),(0,r.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Cost Calculation:"})," Costs are calculated based on token usage and pricing rates. Each request's cost is determined by: (input_tokens \xd7 input_rate) + (output_tokens \xd7 output_rate) + (cached_tokens \xd7 cached_rate)"]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Pricing Format:"})," All rates are in ",(0,r.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: An input rate of 2.50 means $2.50 per 1,000,000 input tokens."]}),(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Token Types:"})}),(0,r.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Input:"})," Standard prompt tokens"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Output:"})," Completion/response tokens"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Cached:"})," Cached input tokens (typically 50% of input rate)"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Reasoning:"})," Special reasoning/thinking tokens (fallback to output rate)"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Cache Creation:"})," Tokens used to create cache entries (fallback to input rate)"]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Custom Pricing:"})," You can override default pricing for specific models. Reset to defaults anytime to restore standard rates."]})]})]}),(0,r.jsxs)(n.default,{className:"p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Current Pricing Overview"}),(0,r.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:"View Full Details"})]}),d?(0,r.jsx)("div",{className:"text-center py-4 text-text-muted",children:"Loading pricing data..."}):s?(0,r.jsxs)("div",{className:"space-y-3",children:[Object.keys(s).slice(0,5).map(e=>(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,r.jsxs)("span",{className:"text-text-muted",children:[Object.keys(s[e]).length," models"]})]},e)),Object.keys(s).length>5&&(0,r.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",Object.keys(s).length-5," more providers"]})]}):(0,r.jsx)("div",{className:"text-text-muted",children:"No pricing data available"})]}),e&&(0,r.jsx)(c,{isOpen:e,onClose:()=>t(!1),onSave:()=>{x()}})]})}},73321:(e,t,s)=>{"use strict";var r=s(74645);s.o(r,"notFound")&&s.d(t,{notFound:function(){return r.notFound}}),s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})}},e=>{e.O(0,[705,8441,3794,7358],()=>e(e.s=64506)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7018],{8247:(e,t,s)=>{"use strict";s.d(t,{HY:()=>o,Kw:()=>i});let r={"perplexity-agent":"perplexity","gitlab-duo":"gitlab","vercel-ai-gateway":"vercel","ollama-search":"ollama","minimax-code":"minimax","minimax-code-global":"minimax","opencode-zen":"opencode","deepseek-web":"deepseek","muse-web":"muse","gemini-web":"gemini","chatgpt-web":"openai"},a=new Set;function l(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function o(e){let t=function(e){let t=l(e);if(!t||a.has(t))return"";let s=r[t]||t;return a.has(s)?"":s}(e);return t?`/providers/${t}.png`:null}function i(e){let t=l(e);t&&a.add(t);let s=r[t];s&&a.add(s)}},11059:(e,t,s)=>{"use strict";s.d(t,{C:()=>a});var r=s(12115);function a(e=2e3){let[t,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return{copied:t,copy:(0,r.useCallback)((t,r="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),s(r),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(null)},e)},[e])}}},55598:(e,t,s)=>{Promise.resolve().then(s.bind(s,85941))},57250:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(95155),a=s(12115),l=s(14051),o=s.n(l),i=s(8247);function n({src:e,providerId:t,alt:s,size:l=32,className:o="",fallbackText:d="?",fallbackColor:c}){let x=function(e,t){if(t)return(0,i.HY)(t);if(!e)return null;let s=String(e).match(/^\/providers\/([^/]+)\.png$/i);return s?(0,i.HY)(s[1]):e}(e,t),[h,m]=(0,a.useState)(!1);return!x||h?(0,r.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${o}`.trim(),style:{width:l,height:l,color:c,fontSize:Math.max(10,Math.floor(.38*l))},children:d}):(0,r.jsx)("img",{src:x,alt:s,width:l,height:l,className:o,loading:"lazy",decoding:"async",onError:()=>{let e=x.match(/^\/providers\/([^/]+)\.png$/i);e&&(0,i.Kw)(e[1]),t&&(0,i.Kw)(t),m(!0)}})}n.propTypes={src:o().string,providerId:o().string,alt:o().string,size:o().number,className:o().string,fallbackText:o().string,fallbackColor:o().string}},85941:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s(95155),a=s(39092),l=s.n(a),o=s(73321),i=s(12115);function n(){let[e,t]=(0,i.useState)(!1),s=(0,o.useRouter)();return(0,r.jsxs)("nav",{className:"fixed top-0 z-50 w-full bg-[#14141b]/80 backdrop-blur-md border-b border-[#2f2f3c]",children:[(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[(0,r.jsxs)("button",{type:"button",className:"flex items-center gap-3 cursor-pointer bg-transparent border-none p-0",onClick:()=>s.push("/"),"aria-label":"Navigate to home",children:[(0,r.jsx)("div",{className:"size-8 rounded bg-linear-to-br from-white to-[#d4d4d4] flex items-center justify-center text-[#14141b]",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"hub"})}),(0,r.jsx)("h2",{className:"text-white text-xl font-bold tracking-tight",children:"KeyRouter"})]}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-8",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",children:"Features"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",children:"How it Works"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,r.jsxs)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors flex items-center gap-1",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:["GitHub ",(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"open_in_new"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>s.push("/dashboard"),className:"hidden sm:flex h-9 items-center justify-center rounded-lg px-4 bg-white hover:bg-[#d4d4d4] transition-all text-[#14141b] text-sm font-bold shadow-[0_0_15px_rgba(255,255,255,0.15)] hover:shadow-[0_0_20px_rgba(255,255,255,0.25)]",children:"Get Started"}),(0,r.jsx)("button",{className:"md:hidden text-white",onClick:()=>t(!e),children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:e?"close":"menu"})})]})]}),e&&(0,r.jsx)("div",{className:"md:hidden border-t border-[#2f2f3c] bg-[#14141b]/95 backdrop-blur-md",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",onClick:()=>t(!1),children:"Features"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",onClick:()=>t(!1),children:"How it Works"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("button",{onClick:()=>s.push("/dashboard"),className:"h-9 rounded-lg bg-white hover:bg-[#d4d4d4] text-[#14141b] text-sm font-bold",children:"Get Started"})]})})]})}function d(){return(0,r.jsxs)("section",{className:"relative pt-32 pb-20 px-6 min-h-[90vh] flex flex-col items-center justify-center overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-white/10 rounded-full blur-[120px] pointer-events-none"}),(0,r.jsxs)("div",{className:"relative z-10 max-w-4xl w-full text-center flex flex-col items-center gap-8",children:[(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-[#2f2f3c] bg-[#1e1e28]/50 px-3 py-1 text-xs font-medium text-white",children:[(0,r.jsx)("span",{className:"flex h-2 w-2 rounded-full bg-white animate-pulse"}),"v1.0 is now live"]}),(0,r.jsxs)("h1",{className:"text-5xl md:text-7xl font-black leading-[1.1] tracking-tight",children:["One Endpoint for ",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-white",children:"All AI Providers"})]}),(0,r.jsx)("p",{className:"text-lg md:text-xl text-gray-400 max-w-2xl mx-auto font-light",children:"AI endpoint proxy with web dashboard - A JavaScript port of CLIProxyAPI. Works seamlessly with Claude Code, OpenAI Codex, Cline, RooCode, and other CLI tools."}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4 w-full",children:[(0,r.jsxs)("button",{className:"h-12 px-8 rounded-lg bg-white hover:bg-[#d4d4d4] text-[#14141b] text-base font-bold transition-all shadow-[0_0_15px_rgba(255,255,255,0.2)] flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined",children:"rocket_launch"}),"Get Started"]}),(0,r.jsxs)("a",{href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",className:"h-12 px-8 rounded-lg border border-[#2f2f3c] bg-[#1e1e28] hover:bg-[#2f2f3c] text-white text-base font-bold transition-all flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined",children:"code"}),"View on GitHub"]})]})]})]})}var c=s(57250);let x=[{id:"claude",name:"Claude Code",image:"/providers/claude.png"},{id:"codex",name:"OpenAI Codex",image:"/providers/codex.png"},{id:"cline",name:"Cline",image:"/providers/cline.png"},{id:"cursor",name:"Cursor",image:"/providers/cursor.png"}],h=[{id:"openai",name:"OpenAI",color:"bg-emerald-500",textColor:"text-white"},{id:"anthropic",name:"Anthropic",color:"bg-brand-400",textColor:"text-white"},{id:"gemini",name:"Gemini",color:"bg-blue-500",textColor:"text-white"},{id:"github",name:"GitHub Copilot",color:"bg-gray-700",textColor:"text-white"}];function m(){let[e,t]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let e=setInterval(()=>{t(e=>(e+1)%h.length)},2e3);return()=>clearInterval(e)},[]),(0,r.jsxs)("div",{className:"mt-16 w-full max-w-4xl relative h-[360px] hidden md:flex items-center justify-center animate-[float_6s_ease-in-out_infinite]",children:[(0,r.jsxs)("div",{className:"relative z-20 w-32 h-32 rounded-full bg-[#1e1e28] border-2 border-white shadow-[0_0_40px_rgba(255,255,255,0.2)] flex flex-col items-center justify-center gap-1 group cursor-pointer hover:scale-105 transition-transform duration-500",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-white",children:"hub"}),(0,r.jsx)("span",{className:"text-xs font-bold text-white tracking-widest uppercase",children:"KeyRouter"}),(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border border-white/30 animate-ping opacity-20"})]}),(0,r.jsx)("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 flex flex-col gap-7",children:x.map(e=>(0,r.jsx)("div",{className:"flex items-center gap-3 opacity-70 hover:opacity-100 transition-opacity group",children:(0,r.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-[#1e1e28] border border-[#2f2f3c] flex items-center justify-center overflow-hidden p-2 hover:border-white/50 transition-all hover:scale-105",children:(0,r.jsx)(c.A,{src:e.image,alt:e.name,size:48,className:"object-contain rounded-xl max-w-[48px] max-h-[48px]",fallbackText:e.name.slice(0,2).toUpperCase()})})},e.id))}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none stroke-yellow-700",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 50 C 250 70, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 140 C 250 140, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 210 C 250 210, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 300 C 250 280, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"})]}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 50, 740 50",fill:"none",stroke:0===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:0===e?"3":"2",className:0===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 130, 740 130",fill:"none",stroke:1===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:1===e?"3":"2",className:1===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 230, 740 230",fill:"none",stroke:2===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:2===e?"3":"2",className:2===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 310, 740 310",fill:"none",stroke:3===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:3===e?"3":"2",className:3===e?"animate-pulse":""})]}),(0,r.jsx)("div",{className:"absolute right-0 top-0 bottom-0 flex flex-col justify-between py-6",children:h.map((t,s)=>(0,r.jsx)("div",{className:`px-4 py-2 rounded-lg ${t.color} ${t.textColor} flex items-center justify-center font-bold text-xs shadow-lg hover:scale-110 transition-all cursor-help min-w-[140px] ${e===s?"ring-4 ring-white/40 scale-110":""}`,title:t.name,children:t.name},t.id))}),(0,r.jsx)("div",{className:"md:hidden mt-8 w-full p-4 rounded-lg bg-[#1e1e28] border border-[#2f2f3c]",children:(0,r.jsx)("p",{className:"text-sm text-center text-gray-400",children:"Interactive diagram visible on desktop"})})]})}function f(){return(0,r.jsx)("section",{className:"py-24 border-y border-[#2f2f3c] bg-[#1e1e28]/30",id:"how-it-works",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"How KeyRouter Works"}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:"Data flows seamlessly from your application through our intelligent routing layer to the best provider for the job."})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 relative",children:[(0,r.jsx)("div",{className:"hidden md:block absolute top-12 left-[16%] right-[16%] h-[2px] bg-linear-to-r from-gray-700 via-white to-gray-700 -z-10"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#14141b] border border-[#2f2f3c] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-gray-300",children:"terminal"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2",children:"1. CLI & SDKs"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"Your requests start from your favorite tools or our unified SDK. Just change the base URL."})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-center md:text-center",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#14141b] border-2 border-white flex items-center justify-center shadow-[0_0_30px_rgba(255,255,255,0.15)] z-10 mx-auto",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-white animate-pulse",children:"hub"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 text-white",children:"2. KeyRouter Hub"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"Our engine analyzes the prompt, checks provider health, and routes for lowest latency or cost."})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-end md:text-right",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#14141b] border border-[#2f2f3c] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2",children:"3. AI Providers"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"The request is fulfilled by OpenAI, Anthropic, Gemini, or others instantly."})]})]})]})]})})}let u=[{icon:"link",title:"Unified Endpoint",desc:"Access all providers via a single standard API URL.",colors:{border:"hover:border-blue-500/50",bg:"hover:bg-blue-500/5",iconBg:"bg-blue-500/10",iconText:"text-blue-500",titleHover:"group-hover:text-blue-400"}},{icon:"bolt",title:"Easy Setup",desc:"Get up and running in minutes with npx command.",colors:{border:"hover:border-white/50",bg:"hover:bg-white/5",iconBg:"bg-white/10",iconText:"text-white",titleHover:"group-hover:text-[#d4d4d4]"}},{icon:"shield_with_heart",title:"Model Fallback",desc:"Automatically switch providers on failure or high latency.",colors:{border:"hover:border-rose-500/50",bg:"hover:bg-rose-500/5",iconBg:"bg-rose-500/10",iconText:"text-rose-500",titleHover:"group-hover:text-rose-400"}},{icon:"monitoring",title:"Usage Tracking",desc:"Detailed analytics and cost monitoring across all models.",colors:{border:"hover:border-purple-500/50",bg:"hover:bg-purple-500/5",iconBg:"bg-purple-500/10",iconText:"text-purple-500",titleHover:"group-hover:text-purple-400"}},{icon:"key",title:"OAuth & API Keys",desc:"Securely manage credentials in one vault.",colors:{border:"hover:border-amber-500/50",bg:"hover:bg-amber-500/5",iconBg:"bg-amber-500/10",iconText:"text-amber-500",titleHover:"group-hover:text-amber-400"}},{icon:"cloud_sync",title:"Cloud Sync",desc:"Sync your configurations across devices instantly.",colors:{border:"hover:border-sky-500/50",bg:"hover:bg-sky-500/5",iconBg:"bg-sky-500/10",iconText:"text-sky-500",titleHover:"group-hover:text-sky-400"}},{icon:"terminal",title:"CLI Support",desc:"Works with Claude Code, Codex, Cline, Cursor, and more.",colors:{border:"hover:border-emerald-500/50",bg:"hover:bg-emerald-500/5",iconBg:"bg-emerald-500/10",iconText:"text-emerald-500",titleHover:"group-hover:text-emerald-400"}},{icon:"dashboard",title:"Dashboard",desc:"Visual dashboard for real-time traffic analysis.",colors:{border:"hover:border-fuchsia-500/50",bg:"hover:bg-fuchsia-500/5",iconBg:"bg-fuchsia-500/10",iconText:"text-fuchsia-500",titleHover:"group-hover:text-fuchsia-400"}}];function b(){return(0,r.jsx)("section",{className:"py-24 px-6",id:"features",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Powerful Features"}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:"Everything you need to manage your AI infrastructure in one place, built for scale."})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:u.map(e=>(0,r.jsxs)("div",{className:`p-6 rounded-xl bg-[#1e1e28] border border-[#2f2f3c] ${e.colors.border} ${e.colors.bg} transition-all duration-300 group`,children:[(0,r.jsx)("div",{className:`w-10 h-10 rounded-lg ${e.colors.iconBg} flex items-center justify-center mb-4 ${e.colors.iconText} group-hover:scale-110 transition-transform duration-300`,children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:e.icon})}),(0,r.jsx)("h3",{className:`text-lg font-bold mb-2 ${e.colors.titleHover} transition-colors`,children:e.title}),(0,r.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed",children:e.desc})]},e.title))})]})})}var g=s(11059);function p(){let{copied:e,copy:t}=(0,g.C)();return(0,r.jsx)("section",{className:"py-24 px-6 bg-[#120f0d]",children:(0,r.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-16 items-start",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"Get Started in 30 Seconds"}),(0,r.jsx)("p",{className:"text-gray-400 text-lg mb-8",children:"Install KeyRouter, configure your providers via web dashboard, and start routing AI requests."}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 text-white flex items-center justify-center font-bold",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Install KeyRouter"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Run npx command to start the server instantly"})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 text-white flex items-center justify-center font-bold",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Open Dashboard"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Configure providers and API keys via web interface"})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 text-white flex items-center justify-center font-bold",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Route Requests"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Point your CLI tools to http://localhost:20131"})]})]})]})]}),(0,r.jsx)("div",{className:"flex-1 w-full",children:(0,r.jsxs)("div",{className:"rounded-xl overflow-hidden bg-[#1e1e1e] border border-[#2f2f3c] shadow-2xl",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-[#252526] border-b border-gray-700",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-green-500"}),(0,r.jsx)("div",{className:"ml-2 text-xs text-gray-500 font-mono",children:"terminal"})]}),(0,r.jsxs)("div",{className:"p-6 font-mono text-sm leading-relaxed overflow-x-auto",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 group cursor-pointer",onClick:()=>{t("npx keyrouter","landing")},children:[(0,r.jsx)("span",{className:"text-green-400",children:"$"}),(0,r.jsx)("span",{className:"text-white",children:"npx keyrouter"}),(0,r.jsx)("span",{className:"ml-auto text-gray-500 text-xs opacity-0 group-hover:opacity-100",children:"landing"===e?"✓ Copied":"Copy"})]}),(0,r.jsxs)("div",{className:"text-gray-400 mb-6",children:[(0,r.jsx)("span",{className:"text-white",children:">"})," Starting KeyRouter...",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-white",children:">"})," Server running on ",(0,r.jsx)("span",{className:"text-blue-400",children:"http://localhost:20131"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-white",children:">"})," Dashboard: ",(0,r.jsx)("span",{className:"text-blue-400",children:"http://localhost:20131/dashboard"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-green-400",children:">"})," Ready to route! ✓"]}),(0,r.jsx)("div",{className:"text-xs text-gray-500 mb-2 border-t border-gray-700 pt-4",children:"\uD83D\uDCDD Configure providers in dashboard or use environment variables"}),(0,r.jsxs)("div",{className:"text-gray-400 text-xs",children:[(0,r.jsx)("span",{className:"text-purple-400",children:"Data Location:"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:" macOS/Linux:"})," ~/.keyrouter/db/data.sqlite",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:" Windows:"})," %APPDATA%/keyrouter/db/data.sqlite"]})]})]})})]})})})}function j(){return(0,r.jsx)("footer",{className:"border-t border-[#2f2f3c] bg-[#120f0d] pt-16 pb-8 px-6",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 mb-16",children:[(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,r.jsx)("div",{className:"size-6 rounded bg-white flex items-center justify-center text-[#14141b]",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"hub"})}),(0,r.jsx)("h3",{className:"text-white text-lg font-bold",children:"KeyRouter"})]}),(0,r.jsx)("p",{className:"text-gray-500 text-sm max-w-xs mb-6",children:"The unified endpoint for AI generation. Connect, route, and manage your AI providers with ease."}),(0,r.jsx)("div",{className:"flex gap-4",children:(0,r.jsx)("a",{className:"text-gray-400 hover:text-white transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"code"})})})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Product"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"#features",children:"Features"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"/dashboard",children:"Dashboard"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"Changelog"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Resources"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Documentation"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://www.npmjs.com/package/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"NPM"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Legal"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:"MIT License"})]})]}),(0,r.jsxs)("div",{className:"border-t border-[#2f2f3c] pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,r.jsx)("p",{className:"text-gray-600 text-sm",children:"\xa9 2025 KeyRouter. All rights reserved."}),(0,r.jsxs)("div",{className:"flex gap-6",children:[(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://www.npmjs.com/package/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"NPM"})]})]})]})})}function v(){let e=(0,o.useRouter)();return(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative text-white font-sans overflow-x-hidden antialiased selection:bg-white selection:text-[#14141b]",children:[(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 fixed inset-0 z-0 overflow-hidden pointer-events-none bg-[#14141b]",children:[(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(to right, #ffffff 1px, transparent 1px), linear-gradient(to bottom, #ffffff 1px, transparent 1px)",backgroundSize:"50px 50px"},className:"jsx-3853dfda129ea3f2 absolute inset-0 opacity-[0.06]"}),(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 absolute top-0 left-1/4 w-[700px] h-[700px] bg-white/10 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"2s",animationDuration:"22s"},className:"jsx-3853dfda129ea3f2 absolute top-1/3 right-1/4 w-[600px] h-[600px] bg-purple-500/10 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"4s",animationDuration:"25s"},className:"jsx-3853dfda129ea3f2 absolute bottom-0 left-1/2 w-[650px] h-[650px] bg-blue-500/8 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{background:"radial-gradient(circle at center, transparent 0%, rgba(24, 20, 17, 0.4) 100%)"},className:"jsx-3853dfda129ea3f2 absolute inset-0"})]}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative z-10",children:[(0,r.jsx)(n,{}),(0,r.jsxs)("main",{className:"jsx-3853dfda129ea3f2",children:[(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative",children:[(0,r.jsx)(d,{}),(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 flex justify-center pb-20",children:(0,r.jsx)(m,{})})]}),(0,r.jsx)(p,{}),(0,r.jsx)(f,{}),(0,r.jsx)(b,{}),(0,r.jsxs)("section",{className:"jsx-3853dfda129ea3f2 py-32 px-6 relative overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 absolute inset-0 bg-linear-to-t from-white/5 to-transparent pointer-events-none"}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 max-w-4xl mx-auto text-center relative z-10",children:[(0,r.jsx)("h2",{className:"jsx-3853dfda129ea3f2 text-4xl md:text-5xl font-black mb-6",children:"Ready to Simplify Your AI Infrastructure?"}),(0,r.jsx)("p",{className:"jsx-3853dfda129ea3f2 text-xl text-gray-400 mb-10 max-w-2xl mx-auto",children:"Join developers who are streamlining their AI integrations with KeyRouter. Open source and free to start."}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 flex flex-col sm:flex-row items-center justify-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>e.push("/dashboard"),className:"jsx-3853dfda129ea3f2 w-full sm:w-auto h-14 px-10 rounded-lg bg-white hover:bg-[#d4d4d4] text-[#14141b] text-lg font-bold transition-all shadow-[0_0_20px_rgba(255,255,255,0.3)]",children:"Start Free"}),(0,r.jsx)("button",{onClick:()=>window.open("https://github.com/keyzakyy-dev/keyrouter#readme","_blank"),className:"jsx-3853dfda129ea3f2 w-full sm:w-auto h-14 px-10 rounded-lg border border-[#2f2f3c] hover:bg-[#1e1e28] text-white text-lg font-bold transition-all",children:"Read Documentation"})]})]})]})]}),(0,r.jsx)(j,{})]}),(0,r.jsx)(l(),{id:"3853dfda129ea3f2",children:"@keyframes float{0%,100%{transform:translatey(0)}50%{transform:translatey(-10px)}}@keyframes dash{to{stroke-dashoffset:-20}}@keyframes blob{0%,100%{transform:translate(0,0)scale(1)}33%{transform:translate(30px,-50px)scale(1.1)}66%{transform:translate(-20px,20px)scale(.9)}}.animate-blob{animation:blob 20s ease-in-out infinite}"})]})}}},e=>{e.O(0,[5242,8441,3794,7358],()=>e(e.s=55598)),_N_E=e.O()}]);