@rsalmn/extremerouter 0.7.8 → 0.8.0

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 (962) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +8 -5
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/required-server-files.json +1 -1
  5. package/app/.next-cli-build/routes-manifest.json +20 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  88. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  99. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  103. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  104. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  106. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  109. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  148. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  174. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  190. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  192. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -0
  216. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -0
  217. package/app/.next-cli-build/server/app/api/oauth/1min/import/route_client-reference-manifest.js +1 -0
  218. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  225. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -0
  245. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -0
  246. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route_client-reference-manifest.js +1 -0
  247. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  248. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -0
  260. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -0
  261. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route_client-reference-manifest.js +1 -0
  262. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  311. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  315. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +3 -3
  329. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  335. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  383. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  397. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  429. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  431. package/app/.next-cli-build/server/app/callback.html +1 -1
  432. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  433. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  434. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  436. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  444. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  445. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  447. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  453. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/index.html +1 -1
  455. package/app/.next-cli-build/server/app/index.rsc +5 -5
  456. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  458. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  460. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  462. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  464. package/app/.next-cli-build/server/app/landing.html +1 -1
  465. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  466. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  467. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  469. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/login/page.js +2 -2
  473. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/login.html +1 -1
  476. package/app/.next-cli-build/server/app/login.rsc +6 -6
  477. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  478. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  480. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  484. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/page.js +2 -2
  486. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  488. package/app/.next-cli-build/server/app-paths-manifest.json +8 -5
  489. package/app/.next-cli-build/server/chunks/1239.js +1 -0
  490. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  491. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  492. package/app/.next-cli-build/server/chunks/212.js +1 -1
  493. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  494. package/app/.next-cli-build/server/chunks/{2722.js → 2342.js} +24 -24
  495. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  496. package/app/.next-cli-build/server/chunks/2926.js +1 -1
  497. package/app/.next-cli-build/server/chunks/318.js +37 -35
  498. package/app/.next-cli-build/server/chunks/319.js +1 -1
  499. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  500. package/app/.next-cli-build/server/chunks/3992.js +1 -0
  501. package/app/.next-cli-build/server/chunks/4040.js +5 -3
  502. package/app/.next-cli-build/server/chunks/412.js +2 -2
  503. package/app/.next-cli-build/server/chunks/4632.js +1 -1
  504. package/app/.next-cli-build/server/chunks/4741.js +4 -2
  505. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  506. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  507. package/app/.next-cli-build/server/chunks/5628.js +1 -0
  508. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  509. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  510. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  511. package/app/.next-cli-build/server/chunks/615.js +1 -1
  512. package/app/.next-cli-build/server/chunks/6316.js +2 -2
  513. package/app/.next-cli-build/server/chunks/6630.js +1 -1
  514. package/app/.next-cli-build/server/chunks/7152.js +1 -1
  515. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  516. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  517. package/app/.next-cli-build/server/chunks/8895.js +2 -2
  518. package/app/.next-cli-build/server/chunks/9630.js +1 -1
  519. package/app/.next-cli-build/server/chunks/9703.js +1 -1
  520. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  521. package/app/.next-cli-build/server/middleware.js +2 -2
  522. package/app/.next-cli-build/server/pages/404.html +1 -1
  523. package/app/.next-cli-build/server/pages/500.html +1 -1
  524. package/app/.next-cli-build/static/chunks/1321-207059925975e2dc.js +1 -0
  525. package/app/.next-cli-build/static/chunks/{1636-25599a8426fd97ed.js → 1636-47ea773ffa2d3a4b.js} +1 -1
  526. package/app/.next-cli-build/static/chunks/3794-1b03b52e3112452e.js +32 -0
  527. package/app/.next-cli-build/static/chunks/5497-c5ee857b78a8cf8a.js +7 -0
  528. package/app/.next-cli-build/static/chunks/{6069-bd1f2f41043f8c30.js → 682-03720d6613bcbd0f.js} +3 -3
  529. package/app/.next-cli-build/{server/chunks/8084.js → static/chunks/8105-705e80a4c161374b.js} +1 -1
  530. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-4a622e705e5c4efc.js → page-920869c698a8b3cf.js} +1 -1
  531. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-76e413764f752c03.js → page-75247ad22e97f7cc.js} +1 -1
  532. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d722ccf5e0fec340.js +1 -0
  533. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-afc62a0533448ca0.js +1 -0
  534. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-262aee689cd6eb34.js → page-a91bcaf7425e68a3.js} +1 -1
  535. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-18b262b802c95472.js → page-a8c4d8c681e19868.js} +1 -1
  536. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-408845bd809806a6.js +1 -0
  537. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d077213deca8c217.js +1 -0
  538. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-e8d14560b2019a5f.js → page-b635b8b051acb5a5.js} +1 -1
  539. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-a27c538ea71ebf8a.js → page-d9958dfec1d2e28e.js} +1 -1
  540. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-5e3375dcb5344f35.js → page-a36b3b632d16f4cb.js} +1 -1
  541. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e1875ca8be7183eb.js → page-92a0799a23d869b3.js} +1 -1
  542. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-99540bfed3193080.js +1 -0
  543. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-640703af38ea9eed.js → page-262fa6911888d4f1.js} +1 -1
  544. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-f644da989b8878c3.js +1 -0
  545. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-0a50de81e7b688fc.js +1 -0
  546. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-1b18b64a9ced4e9f.js → page-aa26b25a26b5dac8.js} +1 -1
  547. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-53ab489f01e3da19.js +10 -0
  548. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-f2075be55913fe76.js → page-8965749fb7d0fac3.js} +1 -1
  549. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-e71aac08cb013b28.js → page-96d3eb0dfde0711b.js} +1 -1
  550. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-964ac16d6816983d.js → page-843c810c0818ce1b.js} +1 -1
  551. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-da7dccb599243439.js → page-bc16a0312f0a7915.js} +1 -1
  552. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-6c82876d3dc71dfb.js → page-97c920b552343488.js} +1 -1
  553. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-73e504f021474182.js → page-2592739cbb862828.js} +1 -1
  554. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-422974480d3bd378.js → page-a8af04fbd6293d2f.js} +1 -1
  555. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-6235a5ba123759b2.js → page-5433f8ac60dd59f0.js} +1 -1
  556. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-fbd9ba3da73c1af0.js → layout-df0ed16971ba7386.js} +1 -1
  557. package/app/.next-cli-build/static/chunks/app/_global-error/page-abffaa46b4637bee.js +1 -0
  558. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-abffaa46b4637bee.js +1 -0
  559. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-abffaa46b4637bee.js +1 -0
  560. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-abffaa46b4637bee.js +1 -0
  561. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-abffaa46b4637bee.js +1 -0
  562. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-abffaa46b4637bee.js +1 -0
  563. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-abffaa46b4637bee.js +1 -0
  564. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-abffaa46b4637bee.js +1 -0
  565. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-abffaa46b4637bee.js +1 -0
  566. package/app/.next-cli-build/static/chunks/app/api/cache/route-abffaa46b4637bee.js +1 -0
  567. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-abffaa46b4637bee.js +1 -0
  568. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-abffaa46b4637bee.js +1 -0
  569. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-abffaa46b4637bee.js +1 -0
  570. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-abffaa46b4637bee.js +1 -0
  571. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-abffaa46b4637bee.js +1 -0
  572. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-abffaa46b4637bee.js +1 -0
  573. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-abffaa46b4637bee.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-abffaa46b4637bee.js +1 -0
  575. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-abffaa46b4637bee.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-abffaa46b4637bee.js +1 -0
  577. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-abffaa46b4637bee.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-abffaa46b4637bee.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-abffaa46b4637bee.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-abffaa46b4637bee.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-abffaa46b4637bee.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-abffaa46b4637bee.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-abffaa46b4637bee.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-abffaa46b4637bee.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/combos/route-abffaa46b4637bee.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-abffaa46b4637bee.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-abffaa46b4637bee.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-abffaa46b4637bee.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-abffaa46b4637bee.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-abffaa46b4637bee.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-abffaa46b4637bee.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/health/route-abffaa46b4637bee.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-abffaa46b4637bee.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/init/route-abffaa46b4637bee.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-abffaa46b4637bee.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/keys/route-abffaa46b4637bee.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/locale/route-abffaa46b4637bee.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-abffaa46b4637bee.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-abffaa46b4637bee.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-abffaa46b4637bee.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-abffaa46b4637bee.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-abffaa46b4637bee.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-abffaa46b4637bee.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-abffaa46b4637bee.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-abffaa46b4637bee.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-abffaa46b4637bee.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-abffaa46b4637bee.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-abffaa46b4637bee.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/models/route-abffaa46b4637bee.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/models/test/route-abffaa46b4637bee.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-abffaa46b4637bee.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-abffaa46b4637bee.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-abffaa46b4637bee.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-abffaa46b4637bee.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-abffaa46b4637bee.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-abffaa46b4637bee.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-abffaa46b4637bee.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-abffaa46b4637bee.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-abffaa46b4637bee.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-abffaa46b4637bee.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-abffaa46b4637bee.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-abffaa46b4637bee.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-abffaa46b4637bee.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-abffaa46b4637bee.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-abffaa46b4637bee.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-abffaa46b4637bee.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-abffaa46b4637bee.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/pricing/route-abffaa46b4637bee.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-abffaa46b4637bee.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-abffaa46b4637bee.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-abffaa46b4637bee.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-abffaa46b4637bee.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-abffaa46b4637bee.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-abffaa46b4637bee.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-abffaa46b4637bee.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-abffaa46b4637bee.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-abffaa46b4637bee.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-abffaa46b4637bee.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-abffaa46b4637bee.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-abffaa46b4637bee.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-abffaa46b4637bee.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-abffaa46b4637bee.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-abffaa46b4637bee.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-abffaa46b4637bee.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-abffaa46b4637bee.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-abffaa46b4637bee.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-abffaa46b4637bee.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/providers/route-abffaa46b4637bee.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-abffaa46b4637bee.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-abffaa46b4637bee.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-abffaa46b4637bee.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-abffaa46b4637bee.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-abffaa46b4637bee.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-abffaa46b4637bee.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-abffaa46b4637bee.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-abffaa46b4637bee.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-abffaa46b4637bee.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-abffaa46b4637bee.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-abffaa46b4637bee.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-abffaa46b4637bee.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-abffaa46b4637bee.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-abffaa46b4637bee.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/settings/route-abffaa46b4637bee.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-abffaa46b4637bee.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-abffaa46b4637bee.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-abffaa46b4637bee.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/tags/route-abffaa46b4637bee.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-abffaa46b4637bee.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-abffaa46b4637bee.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-abffaa46b4637bee.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-abffaa46b4637bee.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-abffaa46b4637bee.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-abffaa46b4637bee.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-abffaa46b4637bee.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-abffaa46b4637bee.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-abffaa46b4637bee.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-abffaa46b4637bee.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-abffaa46b4637bee.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-abffaa46b4637bee.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-abffaa46b4637bee.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-abffaa46b4637bee.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-abffaa46b4637bee.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-abffaa46b4637bee.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-abffaa46b4637bee.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-abffaa46b4637bee.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-abffaa46b4637bee.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-abffaa46b4637bee.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-abffaa46b4637bee.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-abffaa46b4637bee.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-abffaa46b4637bee.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-abffaa46b4637bee.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-abffaa46b4637bee.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-abffaa46b4637bee.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-abffaa46b4637bee.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-abffaa46b4637bee.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-abffaa46b4637bee.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-abffaa46b4637bee.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-abffaa46b4637bee.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-abffaa46b4637bee.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-abffaa46b4637bee.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-abffaa46b4637bee.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-abffaa46b4637bee.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-abffaa46b4637bee.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-abffaa46b4637bee.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-abffaa46b4637bee.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-abffaa46b4637bee.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-abffaa46b4637bee.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/v1/route-abffaa46b4637bee.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-abffaa46b4637bee.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-abffaa46b4637bee.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-abffaa46b4637bee.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-abffaa46b4637bee.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/version/route-abffaa46b4637bee.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-abffaa46b4637bee.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/version/update/route-abffaa46b4637bee.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/{layout-402f477579b8a063.js → layout-16b611f4f5717ccd.js} +1 -1
  717. package/app/.next-cli-build/static/chunks/app/login/{page-f9cc5c6db5a0cf57.js → page-0831b035aa4c0f17.js} +1 -1
  718. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-abffaa46b4637bee.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/page-abffaa46b4637bee.js +1 -0
  720. package/app/.next-cli-build/static/chunks/{main-52cce31a84751ecc.js → main-28015457a328b97c.js} +1 -1
  721. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-abffaa46b4637bee.js +1 -0
  722. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-abffaa46b4637bee.js +1 -0
  723. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-abffaa46b4637bee.js +1 -0
  724. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-abffaa46b4637bee.js +1 -0
  725. package/app/.next-cli-build/static/css/d7d86034708483b4.css +1 -0
  726. package/app/.next-cli-build/static/lE_TtdkNAUztAcvs6X_vC/_buildManifest.js +1 -0
  727. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.8-to-0.7.9-0.7.9-20260729-181011/data.sqlite +0 -0
  728. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.9-to-0.8.0-0.8.0-20260729-213634/data.sqlite +0 -0
  729. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite +0 -0
  730. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  731. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  732. package/app/node_modules/@next/env/package.json +1 -1
  733. package/app/node_modules/nanoid/non-secure/index.cjs +2 -2
  734. package/app/node_modules/nanoid/package.json +1 -1
  735. package/app/node_modules/next/dist/build/load-jsconfig.js +40 -20
  736. package/app/node_modules/next/dist/build/next-config-ts/transpile-config.js +3 -114
  737. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  738. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  739. package/app/node_modules/next/dist/cli/next-test.js +2 -1
  740. package/app/node_modules/next/dist/compiled/http-proxy/index.js +5 -5
  741. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +11 -10
  742. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +11 -10
  743. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +11 -10
  744. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +11 -10
  745. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  746. package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
  747. package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +9 -9
  748. package/app/node_modules/next/dist/lib/install-dependencies.js +1 -1
  749. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  750. package/app/node_modules/next/dist/lib/typescript/loadTsConfig.js +181 -0
  751. package/app/node_modules/next/dist/lib/typescript/missingDependencyError.js +1 -1
  752. package/app/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +53 -0
  753. package/app/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +256 -0
  754. package/app/node_modules/next/dist/lib/verify-typescript-setup.js +97 -56
  755. package/app/node_modules/next/dist/server/app-render/action-handler.js +129 -34
  756. package/app/node_modules/next/dist/server/app-render/manifests-singleton.js +52 -4
  757. package/app/node_modules/next/dist/server/config-schema.js +1 -1
  758. package/app/node_modules/next/dist/server/config-shared.js +1 -2
  759. package/app/node_modules/next/dist/server/config.js +1 -1
  760. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  761. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  762. package/app/node_modules/next/dist/server/image-optimizer.js +8 -27
  763. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  764. package/app/node_modules/next/dist/server/lib/incremental-cache/index.js +90 -53
  765. package/app/node_modules/next/dist/server/lib/patch-fetch.js +15 -2
  766. package/app/node_modules/next/dist/server/lib/router-utils/proxy-request.js +4 -0
  767. package/app/node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.js +2 -1
  768. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  769. package/app/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  770. package/app/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +2 -1
  771. package/app/node_modules/next/dist/shared/lib/server-reference-info.js +12 -0
  772. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  773. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  774. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  775. package/app/node_modules/next/package.json +10 -10
  776. package/app/package.json +9 -3
  777. package/app/public/providers/agnes-api.svg +6 -0
  778. package/app/public/providers/agnes-web.svg +6 -0
  779. package/app/public/providers/stepfun.svg +54 -0
  780. package/app/public/providers/wp-studio.svg +11 -0
  781. package/app/server.js +1 -1
  782. package/app/src/lib/db/adapters/sqljsAdapter.js +115 -115
  783. package/package.json +1 -1
  784. package/app/.next-cli-build/server/chunks/1914.js +0 -1
  785. package/app/.next-cli-build/static/chunks/1321-d29ac582f42c2ed2.js +0 -1
  786. package/app/.next-cli-build/static/chunks/3794-c66b3d8325973459.js +0 -32
  787. package/app/.next-cli-build/static/chunks/5497-ffa6b6463e401ac2.js +0 -7
  788. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-4efb04e1eca7f27c.js +0 -1
  789. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-f6cb00bfa1358617.js +0 -1
  790. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cb5d0aca5faba3b4.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-406bf4ebc93eda61.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-325de46b5cec5533.js +0 -1
  793. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-3538bc80a52010ff.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8a44865bda8d1138.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-cd819afe3da4581e.js +0 -10
  796. package/app/.next-cli-build/static/chunks/app/_global-error/page-200d63272da34918.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-200d63272da34918.js +0 -1
  798. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-200d63272da34918.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-200d63272da34918.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-200d63272da34918.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-200d63272da34918.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-200d63272da34918.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-200d63272da34918.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-200d63272da34918.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/cache/route-200d63272da34918.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-200d63272da34918.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-200d63272da34918.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-200d63272da34918.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-200d63272da34918.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-200d63272da34918.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-200d63272da34918.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-200d63272da34918.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-200d63272da34918.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-200d63272da34918.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-200d63272da34918.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-200d63272da34918.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-200d63272da34918.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-200d63272da34918.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-200d63272da34918.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-200d63272da34918.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-200d63272da34918.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-200d63272da34918.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-200d63272da34918.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/combos/route-200d63272da34918.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-200d63272da34918.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-200d63272da34918.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-200d63272da34918.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-200d63272da34918.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-200d63272da34918.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-200d63272da34918.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/health/route-200d63272da34918.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-200d63272da34918.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/init/route-200d63272da34918.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-200d63272da34918.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/keys/route-200d63272da34918.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/locale/route-200d63272da34918.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-200d63272da34918.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-200d63272da34918.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-200d63272da34918.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-200d63272da34918.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-200d63272da34918.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-200d63272da34918.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-200d63272da34918.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-200d63272da34918.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-200d63272da34918.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-200d63272da34918.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-200d63272da34918.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/models/route-200d63272da34918.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/models/test/route-200d63272da34918.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-200d63272da34918.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-200d63272da34918.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-200d63272da34918.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-200d63272da34918.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-200d63272da34918.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-200d63272da34918.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-200d63272da34918.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-200d63272da34918.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-200d63272da34918.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-200d63272da34918.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-200d63272da34918.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-200d63272da34918.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-200d63272da34918.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-200d63272da34918.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-200d63272da34918.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/pricing/route-200d63272da34918.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-200d63272da34918.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-200d63272da34918.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-200d63272da34918.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-200d63272da34918.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-200d63272da34918.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-200d63272da34918.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-200d63272da34918.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-200d63272da34918.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-200d63272da34918.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-200d63272da34918.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-200d63272da34918.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-200d63272da34918.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-200d63272da34918.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-200d63272da34918.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-200d63272da34918.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-200d63272da34918.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-200d63272da34918.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-200d63272da34918.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/providers/route-200d63272da34918.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-200d63272da34918.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-200d63272da34918.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-200d63272da34918.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-200d63272da34918.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-200d63272da34918.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-200d63272da34918.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-200d63272da34918.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-200d63272da34918.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-200d63272da34918.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-200d63272da34918.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-200d63272da34918.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-200d63272da34918.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-200d63272da34918.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-200d63272da34918.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/settings/route-200d63272da34918.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-200d63272da34918.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-200d63272da34918.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-200d63272da34918.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/tags/route-200d63272da34918.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-200d63272da34918.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-200d63272da34918.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-200d63272da34918.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-200d63272da34918.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-200d63272da34918.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-200d63272da34918.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-200d63272da34918.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-200d63272da34918.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-200d63272da34918.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-200d63272da34918.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-200d63272da34918.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-200d63272da34918.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-200d63272da34918.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-200d63272da34918.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-200d63272da34918.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-200d63272da34918.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-200d63272da34918.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-200d63272da34918.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-200d63272da34918.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-200d63272da34918.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-200d63272da34918.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-200d63272da34918.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-200d63272da34918.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-200d63272da34918.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-200d63272da34918.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-200d63272da34918.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-200d63272da34918.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-200d63272da34918.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-200d63272da34918.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-200d63272da34918.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-200d63272da34918.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-200d63272da34918.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-200d63272da34918.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-200d63272da34918.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-200d63272da34918.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-200d63272da34918.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-200d63272da34918.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-200d63272da34918.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-200d63272da34918.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-200d63272da34918.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/v1/route-200d63272da34918.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-200d63272da34918.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-200d63272da34918.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-200d63272da34918.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-200d63272da34918.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/version/route-200d63272da34918.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-200d63272da34918.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/version/update/route-200d63272da34918.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-200d63272da34918.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/page-200d63272da34918.js +0 -1
  954. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-200d63272da34918.js +0 -1
  955. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-200d63272da34918.js +0 -1
  956. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-200d63272da34918.js +0 -1
  957. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-200d63272da34918.js +0 -1
  958. package/app/.next-cli-build/static/css/78539cadb589145c.css +0 -1
  959. package/app/.next-cli-build/static/dHWTn-aPGqZj1NLa8-PSh/_buildManifest.js +0 -1
  960. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.4-to-0.7.5-0.7.5-20260722-212802/data.sqlite +0 -0
  961. /package/app/.next-cli-build/static/{dHWTn-aPGqZj1NLa8-PSh → lE_TtdkNAUztAcvs6X_vC}/_ssgManifest.js +0 -0
  962. /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.7.5-to-0.7.6-0.7.6-20260725-174113 → upgrade-0.7.7-to-0.7.8-0.7.8-20260727-004850}/data.sqlite +0 -0
@@ -1,4 +1,4 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{57076:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var l=r(95155),s=r(12115),o=r(35497),a=r(65921);function i(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}function n(){let[e,t]=(0,s.useState)([]),[r,n]=(0,s.useState)(!0),[d,c]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(!1),[u,y]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[j,v]=(0,s.useState)(!1),[b,k]=(0,s.useState)(null),[N,w]=(0,s.useState)(i()),[C,P]=(0,s.useState)(""),[$,D]=(0,s.useState)({vercelToken:"",projectName:"vercel-relay"}),[S,T]=(0,s.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[A,E]=(0,s.useState)({denoToken:"",orgDomain:"",projectName:""}),[I,U]=(0,s.useState)(!1),[O,z]=(0,s.useState)(!1),[F,W]=(0,s.useState)(!1),[R,_]=(0,s.useState)(null),[L,q]=(0,s.useState)([]),[V,J]=(0,s.useState)(!1),[B,G]=(0,s.useState)({current:0,total:0}),[M,H]=(0,s.useState)(!1),[Y,Q]=(0,s.useState)(null),K=(0,s.useRef)(null),Z=(0,a.i)();(0,s.useEffect)(()=>{let e=e=>{K.current&&!K.current.contains(e.target)&&v(!1)};return j&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let X=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),r=await e.json();e.ok&&t(r.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{n(!1)}},[]);(0,s.useEffect)(()=>{X()},[X]);let ee=()=>{k(null),w(i())},et=()=>{ee(),c(!0)},er=()=>{c(!1),ee()},el=async()=>{let e={name:N.name.trim(),proxyUrl:N.proxyUrl.trim(),noProxy:N.noProxy.trim(),isActive:!0===N.isActive,strictProxy:!0===N.strictProxy};if(e.name&&e.proxyUrl){U(!0);try{let t=!!b,r=await fetch(t?`/api/proxy-pools/${b.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok)await X(),er(),Z.success(b?"Proxy pool updated":"Proxy pool created");else{let e=await r.json();Z.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{U(!1)}}},es=async e=>{Q({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{Q(null);try{let r=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(r.ok){t(t=>t.filter(t=>t.id!==e.id)),Z.success("Proxy pool deleted");return}let l=await r.json();409===r.status?Z.warning(`Cannot delete: ${l.boundConnectionCount||0} connection(s) are still using this pool.`):Z.error(l.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),Z.error("Failed to delete proxy pool")}}})},eo=async e=>{_(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),r=await t.json();if(!t.ok)return void Z.error(r.error||"Failed to test proxy");await X(),Z.success(r.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),Z.error("Failed to test proxy")}finally{_(null)}},ea=async e=>{let r=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:r}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),Z.error("Failed to update active state"))}catch(r){console.log("Error toggling active:",r),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},ei=e.length>0&&L.length===e.length,en=()=>q([]),ed=async t=>{let r=L.length>0?L:e.map(e=>e.id);if(0!==r.length){H(!0);try{let e=0,l=0;for(let s of r)try{(await fetch(`/api/proxy-pools/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?e+=1:l+=1}catch{l+=1}await X(),Z.success(`${t?"Activated":"Deactivated"} ${e}${l?`, failed ${l}`:""}`)}finally{H(!1)}}},ec=async()=>{0!==L.length&&Q({title:"Delete Proxy Pools",message:`Delete ${L.length} proxy pool(s)?`,onConfirm:async()=>{Q(null),H(!0);try{let e=0,t=0,r=0;for(let l of L)try{let s=await fetch(`/api/proxy-pools/${l}`,{method:"DELETE"});s.ok?e+=1:409===s.status?t+=1:r+=1}catch{r+=1}await X(),en(),Z.success(`Deleted ${e}${t?`, ${t} bound`:""}${r?`, ${r} failed`:""}`)}finally{H(!1)}}})},ex=async()=>{let t=L.length>0?e.filter(e=>L.includes(e.id)):e;if(0===t.length)return;J(!0),G({current:0,total:t.length});let r=0,l=[],s=0,o=[...t],a=async()=>{for(;o.length>0;){let e=o.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),s=await t.json();t.ok&&s.ok?r+=1:l.push(e.id)}catch{l.push(e.id)}finally{G({current:s+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},a)),await X(),J(!1),G({current:0,total:0}),l.length>0?Q({title:"Disable Dead Proxies",message:`Alive: ${r}, Dead: ${l.length}.
2
2
 
3
3
  Disable ${l.length} dead proxies?`,onConfirm:async()=>{Q(null),H(!0);try{for(let e of l)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await X(),Z.success(`Disabled ${l.length} dead proxies`)}finally{H(!1)}}}):Z.success(`Health check done. Alive: ${r}, Dead: ${l.length}`)};(0,s.useEffect)(()=>{q(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let ep=()=>{O||p(!1)},em=()=>{F||h(!1)},eh=()=>{F||y(!1)},eu=()=>{F||g(!1)},ey=async()=>{if($.vercelToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),t=await e.json();e.ok?(await X(),em(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ef=async()=>{if(S.accountId.trim()&&S.apiToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),t=await e.json();e.ok?(await X(),eh(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},eg=async()=>{if(A.denoToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),t=await e.json();e.ok?(await X(),eu(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ej=async()=>{let t=C.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void Z.warning("Please paste at least one proxy line.");let r=[],l=[];if(t.forEach((e,t)=>{try{let l=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),r=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${r}`}}let r=t.split(":");if(4===r.length){let[e,t,l,s]=r;if(!e||!t||!l||!s)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(l)}:${encodeURIComponent(s)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);l&&r.push({...l,lineNumber:t+1})}catch(e){l.push(`Line ${t+1}: ${e.message}`)}}),l.length>0)return void Z.error(`Invalid proxy format:
4
- ${l.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),l=0,s=0,o=0;for(let e of r){let r=`${e.proxyUrl}|||`;if(t.has(r)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(l+=1,t.add(r)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${l}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},ev=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return r?(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,l.jsx)(o.Qv,{}),(0,l.jsx)(o.Qv,{})]}):(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6",children:[(0,l.jsx)(o.zY,{title:"Proxy Pools",description:"Outbound proxy routing and health checks",icon:"lan",actions:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"relative",ref:K,children:[(0,l.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>v(!j),children:["Deploy Relay",(0,l.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,l.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 w-48 rounded-panel border border-border-subtle bg-panel p-1 shadow-[var(--shadow-elev)]",children:[(0,l.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-warning",children:"cloud"}),"Cloudflare Relay"]}),(0,l.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-info",children:"cloud_upload"}),"Vercel Relay"]}),(0,l.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-success",children:"terminal"}),"Deno Relay"]})]})]}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,l.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})}),(0,l.jsxs)(o.Zp,{children:[(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,l.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,l.jsxs)(o.Ex,{variant:"success",children:["Active: ",ev]})]}),(L.length>0||V)&&(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,l.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,l.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,l.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,l.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,l.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,l.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,l.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,l.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,l.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,l.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,l.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,l.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,l.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,l.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,l.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,l.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,l.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,l.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,l.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,l.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,l.jsxs)(l.Fragment,{children:["Token is used once for deployment and not stored. ",(0,l.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,l.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,l.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"My Profile"})," → ",(0,l.jsx)("b",{children:"API Tokens"})," → ",(0,l.jsx)("b",{children:"Create Token"})]}),(0,l.jsxs)("li",{children:["Scroll down to ",(0,l.jsx)("b",{children:"Custom Token"})," and click ",(0,l.jsx)("b",{children:"Get started"})]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,l.jsx)("i",{children:"Your Account Name"})]}),(0,l.jsxs)("li",{children:["Click ",(0,l.jsx)("b",{children:"Continue to summary"})," → ",(0,l.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,l.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,l.jsx)(l.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,l.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,l.jsxs)(l.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,l.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,l.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,l.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,l.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,l.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"console.deno.com"})]}),(0,l.jsxs)("li",{children:["Select your ",(0,l.jsx)("b",{children:"Organization"})," → ",(0,l.jsx)("b",{children:"Settings"})," → ",(0,l.jsx)("b",{children:"Organization Tokens"})]}),(0,l.jsxs)("li",{children:["Create a ",(0,l.jsx)("b",{children:"Organization Token"})," (prefix ",(0,l.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,l.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,l.jsx)(l.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,l.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,l.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:d,title:b?"Edit Proxy Pool":"Add Proxy Pool",onClose:er,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,l.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,l.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,l.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,l.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:el,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:er,disabled:I,children:"Cancel"})]})]})}),(0,l.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}},67212:(e,t,r)=>{Promise.resolve().then(r.bind(r,57076))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=67212)),_N_E=e.O()}]);
4
+ ${l.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),l=0,s=0,o=0;for(let e of r){let r=`${e.proxyUrl}|||`;if(t.has(r)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(l+=1,t.add(r)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${l}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},ev=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return r?(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,l.jsx)(o.Qv,{}),(0,l.jsx)(o.Qv,{})]}):(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6",children:[(0,l.jsx)(o.zY,{title:"Proxy Pools",description:"Outbound proxy routing and health checks",icon:"lan",actions:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"relative",ref:K,children:[(0,l.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>v(!j),children:["Deploy Relay",(0,l.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,l.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 w-48 rounded-panel border border-border-subtle bg-panel p-1 shadow-[var(--shadow-elev)]",children:[(0,l.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-warning",children:"cloud"}),"Cloudflare Relay"]}),(0,l.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-info",children:"cloud_upload"}),"Vercel Relay"]}),(0,l.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-success",children:"terminal"}),"Deno Relay"]})]})]}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,l.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})}),(0,l.jsxs)(o.Zp,{children:[(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,l.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,l.jsxs)(o.Ex,{variant:"success",children:["Active: ",ev]})]}),(L.length>0||V)&&(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,l.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,l.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,l.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,l.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,l.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,l.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,l.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,l.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,l.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,l.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,l.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,l.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,l.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,l.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,l.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,l.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,l.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,l.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,l.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,l.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,l.jsxs)(l.Fragment,{children:["Token is used once for deployment and not stored. ",(0,l.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,l.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,l.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"My Profile"})," → ",(0,l.jsx)("b",{children:"API Tokens"})," → ",(0,l.jsx)("b",{children:"Create Token"})]}),(0,l.jsxs)("li",{children:["Scroll down to ",(0,l.jsx)("b",{children:"Custom Token"})," and click ",(0,l.jsx)("b",{children:"Get started"})]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,l.jsx)("i",{children:"Your Account Name"})]}),(0,l.jsxs)("li",{children:["Click ",(0,l.jsx)("b",{children:"Continue to summary"})," → ",(0,l.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,l.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,l.jsx)(l.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,l.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,l.jsxs)(l.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,l.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,l.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,l.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,l.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,l.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"console.deno.com"})]}),(0,l.jsxs)("li",{children:["Select your ",(0,l.jsx)("b",{children:"Organization"})," → ",(0,l.jsx)("b",{children:"Settings"})," → ",(0,l.jsx)("b",{children:"Organization Tokens"})]}),(0,l.jsxs)("li",{children:["Create a ",(0,l.jsx)("b",{children:"Organization Token"})," (prefix ",(0,l.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,l.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,l.jsx)(l.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,l.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,l.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:d,title:b?"Edit Proxy Pool":"Add Proxy Pool",onClose:er,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,l.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,l.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,l.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,l.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:el,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:er,disabled:I,children:"Cancel"})]})]})}),(0,l.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}},67212:(e,t,r)=>{Promise.resolve().then(r.bind(r,57076))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=67212)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{17566:(e,t,r)=>{"use strict";r.d(t,{default:()=>O});var a=r(95155),s=r(12115),i=r(57250),n=r(8247),l=r(70778);let o="quotaCacheData",d="quotaAutoRefresh",c=[10,20,50,100],u=[{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 m(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 p(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 g(e,t){return await e(t)}function f(){try{let e=window.localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function y(e,t){try{let r=f();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(o,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function v(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function j({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1}){let[n,l]=(0,s.useState)(1),o=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):v(e?.used,e?.total)})),[e]),d=(0,s.useMemo)(()=>"remaining-asc"===r?[...o].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...o].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):o,[o,r]),c=Math.max(1,Math.ceil(d.length/10));if((0,s.useEffect)(()=>{l(1)},[r,e]),(0,s.useEffect)(()=>{l(e=>Math.min(e,c))},[c]),!e||0===e.length)return null;let u=d.slice((n-1)*10,10*n),x=0===d.length?0:(n-1)*10+1,m=Math.min(10*n,d.length),h=t?"py-1 px-1.5":"py-2 px-3",p=t?"text-[11px]":"text-sm",b=t?"text-[11px]":"text-sm",g=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[d.length," quota",d.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:u.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},i=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 i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),n=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let i="";i=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt),l=!1!==e.recurring?`in ${i}`:`expires in ${i}`;return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${h} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${p} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${h} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${h} w-[25%]`,children:"-"!==i||n?t?(0,a.jsx)("div",{className:`${b} text-text-primary font-medium truncate`,title:n||"",children:"-"!==i?l:n}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==i&&(0,a.jsx)("div",{className:`${b} text-text-primary font-medium`,children:l}),n&&(0,a.jsx)("div",{className:`${g} text-text-muted`,children:n})]}):(0,a.jsx)("div",{className:`${b} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),c>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,"-",m," of ",d.length]}),(0,a.jsxs)("span",{children:["Page ",n," / ",c]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.max(1,e-1)),disabled:1===n,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.min(c,e+1)),disabled:n===c,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 w=r(98542),N=r(97677),k=r(54960),C=r(84588),S=r(35497),A=r(88105),$=r(11059);let P={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},q={claude:"claudeAutoPing",codex:"codexAutoPing"},E={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function D(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]:"")||""}function M(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 O(){let{copied:e,copy:t}=(0,$.C)(),[r,O]=(0,s.useState)([]),[I,_]=(0,s.useState)({}),[F,L]=(0,s.useState)({}),[z,R]=(0,s.useState)({}),[U,J]=(0,s.useState)(!0),[K,G]=(0,s.useState)({claude:{},codex:{}}),[H,B]=(0,s.useState)(null),[V,W]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(60),[ee,et]=(0,s.useState)(!0),[er,ea]=(0,s.useState)(null),[es,ei]=(0,s.useState)(null),[en,el]=(0,s.useState)(null),[eo,ed]=(0,s.useState)(null),[ec,eu]=(0,s.useState)(null),[ex,em]=(0,s.useState)(!1),[eh,ep]=(0,s.useState)(null),[eb,eg]=(0,s.useState)([]),[ef,ey]=(0,s.useState)("all"),[ev,ej]=(0,s.useState)([]),[ew,eN]=(0,s.useState)("all"),[ek,eC]=(0,s.useState)("default"),[eS,eA]=(0,s.useState)(!1),[e$,eP]=(0,s.useState)(!1),[eq,eE]=(0,s.useState)(!1),[eD,eT]=(0,s.useState)(1),[eM,eO]=(0,s.useState)(20),[eI,e_]=(0,s.useState)(String(20)),[eF,eL]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ez,eR]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eU=(0,s.useRef)(null),eJ=(0,s.useRef)(null),eK=(0,s.useRef)(0),eG=(0,s.useCallback)(async(e=eD)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(eM),accountStatus:ew,sort:"priority"});"all"!==ef&&a.set("provider",ef);let s=await fetch(`/api/providers/client?${a.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let i=await s.json(),n=i.connections||[],l=(t=i.pagination,t||{page:1,pageSize:eM,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,n.length);return O(n),ej(i.providerOptions||[]),eL(l),eR(o),eT((r=i.pagination,r?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),O([]),ej([]),eL({page:1,pageSize:eM,total:0,totalPages:1}),eR({eligibleConnections:0,providerFilteredConnections:0}),[]}},[ew,eS,eD,eM,ef]),eH=(0,s.useCallback)(async(e,t)=>{L(t=>({...t,[e]:!0})),R(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};_(t=>({...t,[e]:r})),y(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s=a??{},i={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});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":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"xai":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,recurring:!1,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,recurring:!1,unlimited:!0});break;case"tokenrouter":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,recurring:!1,unlimited:!1})});break;case"cline":case"clinepass":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remainingPercentage,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"infron":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,recurring:!1,unlimited:!1})});break;case"grok-web":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,recurring:!0,unlimited:!1})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,l.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:a};_(t=>({...t,[e]:i})),y(e,i)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),R(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{L(t=>({...t,[e]:!1}))}},[]),eB=(0,s.useCallback)(async(e,t)=>{await eH(e,t),B(new Date)},[eH]),eV=(0,s.useCallback)(async(e,t)=>{if("codex"===t&&!en){el(e),R(t=>({...t,[e]:null}));try{let r=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 Codex limit");await eH(e,t),B(new Date)}catch(t){R(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{el(null)}}},[eH,en]),eW=(0,s.useCallback)(async e=>{eu({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eu({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eu({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),eQ=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){ea(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){_(t=>{let r={...t};return delete r[e],r}),L(t=>{let r={...t};return delete r[e],r}),R(t=>{let r={...t};return delete r[e],r});try{let t=f();t[e]&&(delete t[e],window.localStorage.setItem(o,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await g(eG,eD)}}catch(e){console.error("Error deleting connection:",e)}finally{ea(null)}}},[eG,eD]),eY=(0,s.useCallback)(async(e,t)=>{ei(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(_(e=>({...e})),await g(eG,eD))}catch(e){console.error("Error updating connection status:",e)}finally{ei(null)}},[eG,eD]),eX=(0,s.useCallback)(async e=>{if(!eh?.id)return;let t=eh.id,r=eh.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eG(),em(!1),ep(null),A.wb.includes(r)&&await eH(t,r))}catch(e){console.error("Error saving connection:",e)}},[eh,eG,eH]);(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&&eg(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eZ=(0,s.useCallback)(async(e=!1)=>{if(Q)return;Y(!0),Z(60);let t=eK.current+=1,r=Math.round(3);try{let a=await eG(eD);L(p(a)),R(e=>b(e,a)),_(e=>b(e,a)),await Promise.all(a.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eH(e.id,e.provider))),B(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{Y(!1)}},[Q,eG,eH,eD]);(0,s.useEffect)(()=>{(async()=>{et(!0);let e=await eG(eD);et(!1),L(p(e)),R(t=>b(t,e)),_(t=>b(t,e)),await Promise.all(e.map(e=>eH(e.id,e.provider))),B(new Date)})()},[eG,eH,eD]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(d);J(null===e||"true"===e),W(!0)},[]),(0,s.useEffect)(()=>{V&&window.localStorage.setItem(d,String(U))},[U,V]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>G({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}})).catch(()=>{})},[]);let e0=(0,s.useCallback)(async(e,t,r)=>{let a=q[t];if(!a)return;let s={...K[t]||{},[e]:r};G({...K,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:s};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{G(K)}},[K]);(0,s.useEffect)(()=>{if(!V||!U){eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null);return}return eU.current=setInterval(()=>{eZ()},6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3),()=>{eU.current&&clearInterval(eU.current),eJ.current&&clearInterval(eJ.current)}},[U,eZ,V]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null)):U&&V&&(eU.current=setInterval(()=>eZ(),6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[U,eZ,V]);let e1=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),i=h(r,t),n="remaining-asc"===s?a-i:i-a;return 0!==n?n:(m(e)||"").localeCompare(m(r)||"")});if(!r)return e;let i=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=i(e)-i(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(m(e)||"").localeCompare(m(t)||"")})})(r,I,eS,ef,ek),[r,I,eS,ef,ek]),e2=e=>{let t=I[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=v(e.used,e.total))},e5=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eq){eE(!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 g(eG,eD)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eE(!1)}}},[eq,eG,eD]),e3="all"===ef?"All providers":ef,e8=ez.eligibleConnections>0,e4=e1.length>0,e6=ez.eligibleConnections?ez.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"===ef?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===ew?"turned off":"active"===ew?"active":"matching"} accounts found for ${ef}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},e7=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}`}(eF),e9=!c.includes(eM);return ee||e8?ee||e4?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(k.default,{title:"Quota",description:"Capacity, resets, and account availability",icon:"data_usage"}),(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eP(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":e$,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ef?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:(0,n.k)(ef),alt:ef,size:18,className:"size-[18px] rounded object-contain",fallbackText:ef.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:e3})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),e$&&(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:()=>eP(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-border bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ef&&eT(1),ey("all"),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ef?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ef&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ev.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ef!==e&&eT(1),ey(e),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ef===e?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)(i.A,{src:(0,n.k)(e),alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ef===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:ew,onChange:e=>{let t=e.target.value;ew!==t&&eT(1),eN(t)},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ef&&(0,a.jsx)("select",{value:ek,onChange:e=>eC(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:x.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eA(e=>!e),"aria-pressed":eS,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eS?"border-amber-500/40 bg-warning/10 text-warning":"border-border text-text-primary hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>(e.isActive??!0)&&e2(e)).map(e=>e.id),!1)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-danger transition-colors hover:bg-danger/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>!(e.isActive??!0)&&!e2(e)).map(e=>e.id),!0)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>J(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5",title:U?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${U?"text-primary":"text-text-muted"}`,children:U?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),U&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",X,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eZ(!0),disabled:Q,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${Q?"animate-spin":""}`,children:"refresh"})})]})}),eS&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-warning/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e1.map(r=>{let s,l,o,d=I[r.id],c=F[r.id],u=z[r.id],x=!1===r.isActive,h="codex"===r.provider,p=Number.isFinite(l="number"==typeof(s=d?.raw?.resetCredits?.availableCount)?s:Number(s))?Math.max(0,l):0,b=en===r.id,g=er===r.id||es===r.id||b;return(0,a.jsxs)(C.default,{padding:"none",className:`min-w-0 ${x?"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:(0,n.k)(r.provider),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 capitalize truncate",children:r.provider}),m(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:m(r)}):null,D(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:D(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-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(o=r.providerSpecificData?.authMethod)&&P[o]?P[o]:"api_key"===r.authType?"API Key":"OAuth"}),T(r)&&(0,a.jsx)("span",{className:"rounded-full bg-info/10 px-2 py-0.5 text-[10px] font-semibold text-info",children:T(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${x?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-success":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-danger":"bg-surface-2 text-text-muted"}`,children:x?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.default,{text:p>0?`Use one Codex reset credit. Available: ${p}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>ed({connection:r,resetCreditCount:p}),disabled:p<=0||c||g,"aria-label":p>0?`Use one Codex reset credit. ${p} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${p>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-border bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${b?"animate-spin":""}`,children:b?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:p})]})}),(0,a.jsx)(N.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>eW(r),disabled:c||g,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),q[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(N.default,{text:E[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>e0(r.id,r.provider,K[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:hover:bg-surface-3 ${K[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(N.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>eB(r.id,r.provider),disabled:c||g,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${c?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(N.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{ep(r),em(!0)},disabled:g,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(N.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>eQ(r.id),disabled:g,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-danger/10 text-danger transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${er===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)(w.default,{size:"sm",checked:r.isActive??!0,disabled:g,onChange:e=>eY(r.id,e)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:c?(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"})}):u?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:u})]}):d?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d.message})}):(0,a.jsx)(j,{quotas:d?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==ek})})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:e7}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:e9?"custom":String(eM),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eT(1),eO(r),e_(String(r)))},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[c.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eI,onChange:e=>e_(e.target.value),onBlur:()=>{let e=Number.parseInt(eI,10);if(!Number.isFinite(e))return void e_(String(eM));let t=Math.min(500,Math.max(1,e));eT(1),eO(t),e_(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eI,10);if(!Number.isFinite(t))return void e_(String(eM));let r=Math.min(500,Math.max(1,t));eT(1),eO(r),e_(String(r))},className:"h-8 w-20 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eF.page," / ",eF.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eT(1),disabled:eF.page<=1||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.max(1,e-1)),disabled:eF.page<=1||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.min(eF.totalPages,e+1)),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(eF.totalPages),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(S.uo,{isOpen:!!eo,onClose:()=>{en||ed(null)},onConfirm:async()=>{let e=eo?.connection;e&&(await eV(e.id,e.provider),ed(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${m(eo?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${eo?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!en}),ec&&(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-surface dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border 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:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:m(ec.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eu(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 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-surface",children:ec.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..."]}):ec.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:ec.error}):ec.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-border 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:[ec.data.credits.length," reset credit",1===ec.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ec.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",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:ec.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-border-subtle",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:M(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:M(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(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`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-border 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:"No reset credit details returned for this account."})})]})}),(0,a.jsx)(S.wI,{isOpen:ex,connection:eh,proxyPools:eb,onSave:eX,onClose:()=>{em(!1),ep(null)}})]}):(0,a.jsx)(C.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:e6.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:e6.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:e6.description})]})}):(0,a.jsx)(C.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."})]})})}},67471:(e,t,r)=>{Promise.resolve().then(r.bind(r,17566)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=67471)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{17566:(e,t,r)=>{"use strict";r.d(t,{default:()=>O});var a=r(95155),s=r(12115),i=r(57250),n=r(8247),l=r(70778);let o="quotaCacheData",d="quotaAutoRefresh",c=[10,20,50,100],u=[{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 m(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 p(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 g(e,t){return await e(t)}function f(){try{let e=window.localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function y(e,t){try{let r=f();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(o,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function v(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function j({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1}){let[n,l]=(0,s.useState)(1),o=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):v(e?.used,e?.total)})),[e]),d=(0,s.useMemo)(()=>"remaining-asc"===r?[...o].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...o].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):o,[o,r]),c=Math.max(1,Math.ceil(d.length/10));if((0,s.useEffect)(()=>{l(1)},[r,e]),(0,s.useEffect)(()=>{l(e=>Math.min(e,c))},[c]),!e||0===e.length)return null;let u=d.slice((n-1)*10,10*n),x=0===d.length?0:(n-1)*10+1,m=Math.min(10*n,d.length),h=t?"py-1 px-1.5":"py-2 px-3",p=t?"text-[11px]":"text-sm",b=t?"text-[11px]":"text-sm",g=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[d.length," quota",d.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:u.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},i=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 i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),n=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let i="";i=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt),l=!1!==e.recurring?`in ${i}`:`expires in ${i}`;return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${h} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${p} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${h} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${h} w-[25%]`,children:"-"!==i||n?t?(0,a.jsx)("div",{className:`${b} text-text-primary font-medium truncate`,title:n||"",children:"-"!==i?l:n}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==i&&(0,a.jsx)("div",{className:`${b} text-text-primary font-medium`,children:l}),n&&(0,a.jsx)("div",{className:`${g} text-text-muted`,children:n})]}):(0,a.jsx)("div",{className:`${b} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),c>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,"-",m," of ",d.length]}),(0,a.jsxs)("span",{children:["Page ",n," / ",c]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.max(1,e-1)),disabled:1===n,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.min(c,e+1)),disabled:n===c,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 w=r(98542),N=r(97677),k=r(54960),C=r(84588),S=r(35497),A=r(88105),$=r(11059);let P={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},q={claude:"claudeAutoPing",codex:"codexAutoPing"},E={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function D(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]:"")||""}function M(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 O(){let{copied:e,copy:t}=(0,$.C)(),[r,O]=(0,s.useState)([]),[I,_]=(0,s.useState)({}),[F,L]=(0,s.useState)({}),[z,R]=(0,s.useState)({}),[U,J]=(0,s.useState)(!0),[K,G]=(0,s.useState)({claude:{},codex:{}}),[H,B]=(0,s.useState)(null),[V,W]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(60),[ee,et]=(0,s.useState)(!0),[er,ea]=(0,s.useState)(null),[es,ei]=(0,s.useState)(null),[en,el]=(0,s.useState)(null),[eo,ed]=(0,s.useState)(null),[ec,eu]=(0,s.useState)(null),[ex,em]=(0,s.useState)(!1),[eh,ep]=(0,s.useState)(null),[eb,eg]=(0,s.useState)([]),[ef,ey]=(0,s.useState)("all"),[ev,ej]=(0,s.useState)([]),[ew,eN]=(0,s.useState)("all"),[ek,eC]=(0,s.useState)("default"),[eS,eA]=(0,s.useState)(!1),[e$,eP]=(0,s.useState)(!1),[eq,eE]=(0,s.useState)(!1),[eD,eT]=(0,s.useState)(1),[eM,eO]=(0,s.useState)(20),[eI,e_]=(0,s.useState)(String(20)),[eF,eL]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ez,eR]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eU=(0,s.useRef)(null),eJ=(0,s.useRef)(null),eK=(0,s.useRef)(0),eG=(0,s.useCallback)(async(e=eD)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(eM),accountStatus:ew,sort:"priority"});"all"!==ef&&a.set("provider",ef);let s=await fetch(`/api/providers/client?${a.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let i=await s.json(),n=i.connections||[],l=(t=i.pagination,t||{page:1,pageSize:eM,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,n.length);return O(n),ej(i.providerOptions||[]),eL(l),eR(o),eT((r=i.pagination,r?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),O([]),ej([]),eL({page:1,pageSize:eM,total:0,totalPages:1}),eR({eligibleConnections:0,providerFilteredConnections:0}),[]}},[ew,eS,eD,eM,ef]),eH=(0,s.useCallback)(async(e,t)=>{L(t=>({...t,[e]:!0})),R(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};_(t=>({...t,[e]:r})),y(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s=a??{},i={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});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":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"xai":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,recurring:!1,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,recurring:!1,unlimited:!0});break;case"tokenrouter":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,recurring:!1,unlimited:!1})});break;case"cline":case"clinepass":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remainingPercentage,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"infron":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,recurring:!1,unlimited:!1})});break;case"grok-web":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,recurring:!0,unlimited:!1})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,l.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:a};_(t=>({...t,[e]:i})),y(e,i)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),R(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{L(t=>({...t,[e]:!1}))}},[]),eB=(0,s.useCallback)(async(e,t)=>{await eH(e,t),B(new Date)},[eH]),eV=(0,s.useCallback)(async(e,t)=>{if("codex"===t&&!en){el(e),R(t=>({...t,[e]:null}));try{let r=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 Codex limit");await eH(e,t),B(new Date)}catch(t){R(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{el(null)}}},[eH,en]),eW=(0,s.useCallback)(async e=>{eu({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eu({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eu({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),eQ=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){ea(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){_(t=>{let r={...t};return delete r[e],r}),L(t=>{let r={...t};return delete r[e],r}),R(t=>{let r={...t};return delete r[e],r});try{let t=f();t[e]&&(delete t[e],window.localStorage.setItem(o,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await g(eG,eD)}}catch(e){console.error("Error deleting connection:",e)}finally{ea(null)}}},[eG,eD]),eY=(0,s.useCallback)(async(e,t)=>{ei(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(_(e=>({...e})),await g(eG,eD))}catch(e){console.error("Error updating connection status:",e)}finally{ei(null)}},[eG,eD]),eX=(0,s.useCallback)(async e=>{if(!eh?.id)return;let t=eh.id,r=eh.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eG(),em(!1),ep(null),A.wb.includes(r)&&await eH(t,r))}catch(e){console.error("Error saving connection:",e)}},[eh,eG,eH]);(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&&eg(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eZ=(0,s.useCallback)(async(e=!1)=>{if(Q)return;Y(!0),Z(60);let t=eK.current+=1,r=Math.round(3);try{let a=await eG(eD);L(p(a)),R(e=>b(e,a)),_(e=>b(e,a)),await Promise.all(a.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eH(e.id,e.provider))),B(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{Y(!1)}},[Q,eG,eH,eD]);(0,s.useEffect)(()=>{(async()=>{et(!0);let e=await eG(eD);et(!1),L(p(e)),R(t=>b(t,e)),_(t=>b(t,e)),await Promise.all(e.map(e=>eH(e.id,e.provider))),B(new Date)})()},[eG,eH,eD]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(d);J(null===e||"true"===e),W(!0)},[]),(0,s.useEffect)(()=>{V&&window.localStorage.setItem(d,String(U))},[U,V]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>G({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}})).catch(()=>{})},[]);let e0=(0,s.useCallback)(async(e,t,r)=>{let a=q[t];if(!a)return;let s={...K[t]||{},[e]:r};G({...K,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:s};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{G(K)}},[K]);(0,s.useEffect)(()=>{if(!V||!U){eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null);return}return eU.current=setInterval(()=>{eZ()},6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3),()=>{eU.current&&clearInterval(eU.current),eJ.current&&clearInterval(eJ.current)}},[U,eZ,V]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null)):U&&V&&(eU.current=setInterval(()=>eZ(),6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[U,eZ,V]);let e1=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),i=h(r,t),n="remaining-asc"===s?a-i:i-a;return 0!==n?n:(m(e)||"").localeCompare(m(r)||"")});if(!r)return e;let i=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=i(e)-i(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(m(e)||"").localeCompare(m(t)||"")})})(r,I,eS,ef,ek),[r,I,eS,ef,ek]),e2=e=>{let t=I[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=v(e.used,e.total))},e5=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eq){eE(!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 g(eG,eD)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eE(!1)}}},[eq,eG,eD]),e3="all"===ef?"All providers":ef,e8=ez.eligibleConnections>0,e4=e1.length>0,e6=ez.eligibleConnections?ez.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"===ef?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===ew?"turned off":"active"===ew?"active":"matching"} accounts found for ${ef}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},e7=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}`}(eF),e9=!c.includes(eM);return ee||e8?ee||e4?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(k.default,{title:"Quota",description:"Capacity, resets, and account availability",icon:"data_usage"}),(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eP(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":e$,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ef?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:(0,n.k)(ef),alt:ef,size:18,className:"size-[18px] rounded object-contain",fallbackText:ef.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:e3})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),e$&&(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:()=>eP(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-border bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ef&&eT(1),ey("all"),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ef?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ef&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ev.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ef!==e&&eT(1),ey(e),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ef===e?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)(i.A,{src:(0,n.k)(e),alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ef===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:ew,onChange:e=>{let t=e.target.value;ew!==t&&eT(1),eN(t)},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ef&&(0,a.jsx)("select",{value:ek,onChange:e=>eC(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:x.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eA(e=>!e),"aria-pressed":eS,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eS?"border-amber-500/40 bg-warning/10 text-warning":"border-border text-text-primary hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>(e.isActive??!0)&&e2(e)).map(e=>e.id),!1)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-danger transition-colors hover:bg-danger/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>!(e.isActive??!0)&&!e2(e)).map(e=>e.id),!0)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>J(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5",title:U?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${U?"text-primary":"text-text-muted"}`,children:U?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),U&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",X,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eZ(!0),disabled:Q,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${Q?"animate-spin":""}`,children:"refresh"})})]})}),eS&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-warning/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e1.map(r=>{let s,l,o,d=I[r.id],c=F[r.id],u=z[r.id],x=!1===r.isActive,h="codex"===r.provider,p=Number.isFinite(l="number"==typeof(s=d?.raw?.resetCredits?.availableCount)?s:Number(s))?Math.max(0,l):0,b=en===r.id,g=er===r.id||es===r.id||b;return(0,a.jsxs)(C.default,{padding:"none",className:`min-w-0 ${x?"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:(0,n.k)(r.provider),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 capitalize truncate",children:r.provider}),m(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:m(r)}):null,D(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:D(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-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(o=r.providerSpecificData?.authMethod)&&P[o]?P[o]:"api_key"===r.authType?"API Key":"OAuth"}),T(r)&&(0,a.jsx)("span",{className:"rounded-full bg-info/10 px-2 py-0.5 text-[10px] font-semibold text-info",children:T(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${x?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-success":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-danger":"bg-surface-2 text-text-muted"}`,children:x?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.default,{text:p>0?`Use one Codex reset credit. Available: ${p}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>ed({connection:r,resetCreditCount:p}),disabled:p<=0||c||g,"aria-label":p>0?`Use one Codex reset credit. ${p} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${p>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-border bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${b?"animate-spin":""}`,children:b?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:p})]})}),(0,a.jsx)(N.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>eW(r),disabled:c||g,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),q[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(N.default,{text:E[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>e0(r.id,r.provider,K[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:hover:bg-surface-3 ${K[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(N.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>eB(r.id,r.provider),disabled:c||g,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${c?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(N.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{ep(r),em(!0)},disabled:g,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(N.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>eQ(r.id),disabled:g,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-danger/10 text-danger transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${er===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)(w.default,{size:"sm",checked:r.isActive??!0,disabled:g,onChange:e=>eY(r.id,e)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:c?(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"})}):u?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:u})]}):d?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d.message})}):(0,a.jsx)(j,{quotas:d?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==ek})})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:e7}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:e9?"custom":String(eM),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eT(1),eO(r),e_(String(r)))},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[c.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eI,onChange:e=>e_(e.target.value),onBlur:()=>{let e=Number.parseInt(eI,10);if(!Number.isFinite(e))return void e_(String(eM));let t=Math.min(500,Math.max(1,e));eT(1),eO(t),e_(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eI,10);if(!Number.isFinite(t))return void e_(String(eM));let r=Math.min(500,Math.max(1,t));eT(1),eO(r),e_(String(r))},className:"h-8 w-20 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eF.page," / ",eF.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eT(1),disabled:eF.page<=1||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.max(1,e-1)),disabled:eF.page<=1||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.min(eF.totalPages,e+1)),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(eF.totalPages),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(S.uo,{isOpen:!!eo,onClose:()=>{en||ed(null)},onConfirm:async()=>{let e=eo?.connection;e&&(await eV(e.id,e.provider),ed(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${m(eo?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${eo?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!en}),ec&&(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-surface dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border 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:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:m(ec.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eu(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 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-surface",children:ec.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..."]}):ec.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:ec.error}):ec.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-border 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:[ec.data.credits.length," reset credit",1===ec.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ec.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",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:ec.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-border-subtle",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:M(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:M(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(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`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-border 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:"No reset credit details returned for this account."})})]})}),(0,a.jsx)(S.wI,{isOpen:ex,connection:eh,proxyPools:eb,onSave:eX,onClose:()=>{em(!1),ep(null)}})]}):(0,a.jsx)(C.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:e6.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:e6.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:e6.description})]})}):(0,a.jsx)(C.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."})]})})}},67471:(e,t,r)=>{Promise.resolve().then(r.bind(r,17566)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=67471)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{60922:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=60922)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{60922:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=60922)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>o,Nv:()=>m,RL:()=>d,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});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"}],n=2e3,r=3e5,i=5e3,c=5,d=1e4,o=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:()=>d});var a=s(95155),l=s(12115),n=s(35497),r=s(11059),i=s(73006),c=s(15536);function d(){let[e,t]=(0,l.useState)(!0),[s,d]=(0,l.useState)(!1),[o,x]=(0,l.useState)("http://localhost:8787"),[m,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,P]=(0,l.useState)(.85),[$,R]=(0,l.useState)(null),[z,_]=(0,l.useState)(!1),[H,I]=(0,l.useState)({installed:!1,loaded:!1,version:null,loading:!0}),[M,O]=(0,l.useState)(!1),[A,F]=(0,l.useState)("en"),{copied:D,copy:B}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let W=c.hT.includes(A),G=W?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!W&&(w("ultra"),J({cavemanLevel:"ultra"}))},[W,N]);let J=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)}},Y=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)}},q=async()=>{let e=o.trim()||"http://localhost:8787";x(e),await J({headroomUrl:e}),Z()},Z=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),K=(0,l.useCallback)(async()=>{b(""),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 Z()}catch(e){b(e.message)}finally{j(!1)}},[Z]),Q=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await Z()}finally{j(!1)}},[Z]),X=async()=>{I(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();I({...t,loading:!1})}catch{I({installed:!1,loaded:!1,version:null,loading:!1})}},V=async()=>{O(!0);try{let e=await fetch("/api/pxpipe/install",{method:"POST"});await e.json(),await X()}catch{}O(!1)},ee=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),d(!!s.headroomEnabled),x(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),P("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),_(!!s.pxpipeEnabled),Z(),X()}}catch{}})()},[Z]);let et=!!m.running,es=m.loading?"Checking…":et?"Running":!1===m.localUrl||m.installed?!1!==m.localUrl?"Stopped":"External":"Not installed",ea=!1!==m.localUrl,el=!!m.canStart,en=ea&&!!m.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(n.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(n.lM,{checked:e,onChange:()=>Y(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${et?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:es}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:et?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(n.lM,{checked:s&&et,disabled:!et,onChange:()=>{var e;let t;return e=!s,void(x(t=o.trim()||"http://localhost:8787"),d(e),J({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[y&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:G.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),J({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===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:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(n.lM,{checked:y,onChange:()=>{var e;v(e=!y),J({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),J({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===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:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(n.lM,{checked:k,onChange:()=>{var e;C(e=!k),J({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(n.lM,{checked:T,onChange:()=>{var e;L(e=!T),J({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;P(t=parseFloat(e.target.value)),J({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),$&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",$.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",$.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",$.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",$.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",$.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:ee,children:"Clear Cache"})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"image_compressor"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Pxpipe (Image Compression)"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Render dense Claude-format contexts as PNG images before dispatch. Saves ~35-60% input tokens on large payloads."})]})]}),(0,a.jsx)(n.lM,{checked:z,onChange:()=>{var e;_(e=!z),J({pxpipeEnabled:e})}})]}),z&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${H.installed?"text-success":"text-warning"}`,children:H.installed?"check_circle":"error"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Package: ",H.installed?`v${H.version||"?"} installed`:"not installed"]}),H.loaded&&(0,a.jsx)(Badge,{variant:"success",size:"sm",dot:!0,children:"Loaded"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:M?"progress_activity":"download",onClick:V,disabled:M,children:M?"Installing...":H.installed?"Reinstall / Upgrade":"Install Package"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"refresh",onClick:X,children:"Refresh Status"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Only activates for Claude-format requests with text content above threshold. Fail-open — never blocks requests."})]})]}),(0,a.jsx)(n.aF,{isOpen:p,title:et?"Headroom":"Setup Headroom",onClose:()=>u(!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:et?"text-success":"text-warning",children:es})]}),(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)(n.pd,{value:o,onChange:e=>x(e.target.value),onBlur:q,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."})]}),en?(0,a.jsx)(n.$n,{onClick:Q,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):et?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):el?(0,a.jsx)(n.$n,{onClick:K,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):ea?m.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)(n.$n,{size:"sm",variant:"ghost",onClick:()=>B('pip install "headroom-ai[proxy]"'),children:D?"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."}),g&&(0,a.jsx)("p",{className:"text-sm text-warning",children:g}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:()=>Z(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(n.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>o,Nv:()=>m,RL:()=>d,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});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"}],n=2e3,r=3e5,i=5e3,c=5,d=1e4,o=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:()=>d});var a=s(95155),l=s(12115),n=s(35497),r=s(11059),i=s(73006),c=s(15536);function d(){let[e,t]=(0,l.useState)(!0),[s,d]=(0,l.useState)(!1),[o,x]=(0,l.useState)("http://localhost:8787"),[m,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,P]=(0,l.useState)(.85),[$,R]=(0,l.useState)(null),[z,_]=(0,l.useState)(!1),[H,I]=(0,l.useState)({installed:!1,loaded:!1,version:null,loading:!0}),[M,O]=(0,l.useState)(!1),[A,F]=(0,l.useState)("en"),{copied:D,copy:B}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let W=c.hT.includes(A),G=W?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!W&&(w("ultra"),J({cavemanLevel:"ultra"}))},[W,N]);let J=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)}},Y=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)}},q=async()=>{let e=o.trim()||"http://localhost:8787";x(e),await J({headroomUrl:e}),Z()},Z=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),K=(0,l.useCallback)(async()=>{b(""),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 Z()}catch(e){b(e.message)}finally{j(!1)}},[Z]),Q=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await Z()}finally{j(!1)}},[Z]),X=async()=>{I(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();I({...t,loading:!1})}catch{I({installed:!1,loaded:!1,version:null,loading:!1})}},V=async()=>{O(!0);try{let e=await fetch("/api/pxpipe/install",{method:"POST"});await e.json(),await X()}catch{}O(!1)},ee=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),d(!!s.headroomEnabled),x(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),P("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),_(!!s.pxpipeEnabled),Z(),X()}}catch{}})()},[Z]);let et=!!m.running,es=m.loading?"Checking…":et?"Running":!1===m.localUrl||m.installed?!1!==m.localUrl?"Stopped":"External":"Not installed",ea=!1!==m.localUrl,el=!!m.canStart,en=ea&&!!m.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(n.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(n.lM,{checked:e,onChange:()=>Y(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${et?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:es}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:et?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(n.lM,{checked:s&&et,disabled:!et,onChange:()=>{var e;let t;return e=!s,void(x(t=o.trim()||"http://localhost:8787"),d(e),J({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[y&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:G.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),J({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===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:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(n.lM,{checked:y,onChange:()=>{var e;v(e=!y),J({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),J({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===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:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(n.lM,{checked:k,onChange:()=>{var e;C(e=!k),J({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(n.lM,{checked:T,onChange:()=>{var e;L(e=!T),J({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;P(t=parseFloat(e.target.value)),J({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),$&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",$.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",$.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",$.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",$.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",$.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:ee,children:"Clear Cache"})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"image_compressor"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Pxpipe (Image Compression)"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Render dense Claude-format contexts as PNG images before dispatch. Saves ~35-60% input tokens on large payloads."})]})]}),(0,a.jsx)(n.lM,{checked:z,onChange:()=>{var e;_(e=!z),J({pxpipeEnabled:e})}})]}),z&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${H.installed?"text-success":"text-warning"}`,children:H.installed?"check_circle":"error"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Package: ",H.installed?`v${H.version||"?"} installed`:"not installed"]}),H.loaded&&(0,a.jsx)(Badge,{variant:"success",size:"sm",dot:!0,children:"Loaded"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:M?"progress_activity":"download",onClick:V,disabled:M,children:M?"Installing...":H.installed?"Reinstall / Upgrade":"Install Package"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"refresh",onClick:X,children:"Refresh Status"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Only activates for Claude-format requests with text content above threshold. Fail-open — never blocks requests."})]})]}),(0,a.jsx)(n.aF,{isOpen:p,title:et?"Headroom":"Setup Headroom",onClose:()=>u(!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:et?"text-success":"text-warning",children:es})]}),(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)(n.pd,{value:o,onChange:e=>x(e.target.value),onBlur:q,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."})]}),en?(0,a.jsx)(n.$n,{onClick:Q,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):et?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):el?(0,a.jsx)(n.$n,{onClick:K,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):ea?m.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)(n.$n,{size:"sm",variant:"ghost",onClick:()=>B('pip install "headroom-ai[proxy]"'),children:D?"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."}),g&&(0,a.jsx)("p",{className:"text-sm text-warning",children:g}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:()=>Z(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(n.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(5214),n(2451),n(53887)},32930:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},41112:(e,t,n)=>{"use strict";function r({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return d}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let o="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return o?new o:new s}function i(e){return o?o.bind(e):s.bind(e)}function d(){return o?o.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),a=n(12115),s=n(41112);function o(e){return{default:e&&"default"in e?e.default:e}}n(21957);let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},n=(0,a.lazy)(()=>t.loader().then(o)),i=t.loading;function d(e){let o=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:o}:{},children:c})}return d.displayName="LoadableComponent",d}},69472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(95155),a=n(12115),s=n(35497),o=n(11059),l=n(75707);let i=n.n(l)()(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),d=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],c={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function u(){let[e,t]=(0,a.useState)({}),[n,l]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),b=(e,n)=>t(t=>({...t,[e]:n})),h=e=>l(t=>{let n={};return d.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),y=async e=>{let t=d.find(t=>t.id===e);g(`load-${e}`,!0);try{let n=await fetch(`/api/translator/load?file=${t.file}`),r=await n.json();r.success?(b(e,r.content),1===e&&await j(r.content)):alert(r.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),r=await n.json();r.success&&x(r.result)}catch{}},_=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),v=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);_("1_req_client.json",t),_("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:n.body||n},null,2));let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:n})}),a=await r.json();if(!a.success)return void alert(a.error);let s=JSON.stringify(a.result.body,null,2);b(3,s),h(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},O=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);_("3_req_openai.json",t);let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...n,provider:m?.provider,model:m?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let s={...a.result,provider:m?.provider,model:m?.model};b(4,JSON.stringify(s,null,2)),h(4)}catch(e){alert(e.message)}g("toTarget",!1)},S=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);_("4_req_target.json",t);let r=n.provider||m?.provider,a=n.model||m?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let s=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!s.ok){let e=await s.json().catch(()=>({error:s.statusText}));alert(e.error||"Send failed");return}let o=s.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await o.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),h(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:w}=(0,o.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(s.zY,{title:"Translator",description:"Inspect format conversion between clients and providers",icon:"translate"}),m&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,r.jsx)(p,{label:"src",value:m.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(p,{label:"dst",value:m.targetFormat,color:"orange"}),(0,r.jsx)(p,{label:"provider",value:m.provider,color:"green"}),(0,r.jsx)(p,{label:"model",value:m.model,color:"purple"})]}),d.map(t=>{var a;let o=1===(a=t.id)?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toOpenAI,onClick:v,children:"→ OpenAI"}):3===a?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toTarget,onClick:O,children:"→ Target"}):4===a?(0,r.jsx)(s.$n,{size:"sm",icon:"send",loading:u.send,onClick:S,children:"Send"}):null,d=!!n[t.id],p=e[t.id]||"";return(0,r.jsx)(s.Zp,{children:(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>{let e;return e=t.id,l(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:d?"expand_more":"chevron_right"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,r.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),p&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",p.length," chars)"]})]}),!d&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id)}),o]})]}),d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(i,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:p,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:c})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id),children:"Load"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);b(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),o]})]})]})},t.id)})]})}function p({label:e,value:t,color:n}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[n]}`,children:[(0,r.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(73623)._(n(68635));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=32930)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(5214),n(2451),n(53887)},32930:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},41112:(e,t,n)=>{"use strict";function r({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return d}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let o="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return o?new o:new s}function i(e){return o?o.bind(e):s.bind(e)}function d(){return o?o.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),a=n(12115),s=n(41112);function o(e){return{default:e&&"default"in e?e.default:e}}n(21957);let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},n=(0,a.lazy)(()=>t.loader().then(o)),i=t.loading;function d(e){let o=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:o}:{},children:c})}return d.displayName="LoadableComponent",d}},69472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(95155),a=n(12115),s=n(35497),o=n(11059),l=n(75707);let i=n.n(l)()(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),d=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],c={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function u(){let[e,t]=(0,a.useState)({}),[n,l]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),b=(e,n)=>t(t=>({...t,[e]:n})),h=e=>l(t=>{let n={};return d.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),y=async e=>{let t=d.find(t=>t.id===e);g(`load-${e}`,!0);try{let n=await fetch(`/api/translator/load?file=${t.file}`),r=await n.json();r.success?(b(e,r.content),1===e&&await j(r.content)):alert(r.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),r=await n.json();r.success&&x(r.result)}catch{}},_=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),v=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);_("1_req_client.json",t),_("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:n.body||n},null,2));let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:n})}),a=await r.json();if(!a.success)return void alert(a.error);let s=JSON.stringify(a.result.body,null,2);b(3,s),h(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},O=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);_("3_req_openai.json",t);let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...n,provider:m?.provider,model:m?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let s={...a.result,provider:m?.provider,model:m?.model};b(4,JSON.stringify(s,null,2)),h(4)}catch(e){alert(e.message)}g("toTarget",!1)},S=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);_("4_req_target.json",t);let r=n.provider||m?.provider,a=n.model||m?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let s=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!s.ok){let e=await s.json().catch(()=>({error:s.statusText}));alert(e.error||"Send failed");return}let o=s.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await o.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),h(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:w}=(0,o.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(s.zY,{title:"Translator",description:"Inspect format conversion between clients and providers",icon:"translate"}),m&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,r.jsx)(p,{label:"src",value:m.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(p,{label:"dst",value:m.targetFormat,color:"orange"}),(0,r.jsx)(p,{label:"provider",value:m.provider,color:"green"}),(0,r.jsx)(p,{label:"model",value:m.model,color:"purple"})]}),d.map(t=>{var a;let o=1===(a=t.id)?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toOpenAI,onClick:v,children:"→ OpenAI"}):3===a?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toTarget,onClick:O,children:"→ Target"}):4===a?(0,r.jsx)(s.$n,{size:"sm",icon:"send",loading:u.send,onClick:S,children:"Send"}):null,d=!!n[t.id],p=e[t.id]||"";return(0,r.jsx)(s.Zp,{children:(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>{let e;return e=t.id,l(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:d?"expand_more":"chevron_right"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,r.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),p&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",p.length," chars)"]})]}),!d&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id)}),o]})]}),d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(i,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:p,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:c})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id),children:"Load"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);b(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),o]})]})]})},t.id)})]})}function p({label:e,value:t,color:n}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[n]}`,children:[(0,r.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(73623)._(n(68635));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=32930)),_N_E=e.O()}]);